0
$\begingroup$

Rosanswers logo

I am trying to perform a rosmake on my package and I keep getting the same errors no matter what I have tried to do to fix them. I started out creating the package with:

roscreate-pkg movbotGPS2 geometry_msgs roscpp

and in my CMakeLists.txt I have uncommented the following:

rosbuild_init() set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin) set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib) rosbuild_genmsg() rosbuild_add_library(${PROJECT_NAME} src/movesquare_modified.cpp) rosbuild_add_executable(movesquare src/movesquare_modified.cpp)

My manifest.xml file contains:

 movbotGPS2
BSD http://ros.org/wiki/movbotGPS2

and my 'make' errors are:

[ rosmake ] Packages requested are: ['movbotGPS2'] [ rosmake ] Logging to directory/home/turtlebot/.ros/rosmake/rosmake_output-20120411-134134 [ rosmake ] Expanded args ['movbotGPS2'] to: ['movbotGPS2'] [ rosmake ] Checking rosdeps compliance for packages movbotGPS2. This may take a few seconds. [ rosmake ] rosdep check passed all system dependencies in packages [rosmake-0] Starting >>> rosbuild [ make ] [rosmake-0] Finished <<< rosbuild ROS_NOBUILD in package rosbuild No Makefile in package rosbuild [rosmake-1] Starting >>> cpp_common [ make ] [rosmake-1] Finished <<< cpp_common ROS_NOBUILD in package cpp_common [rosmake-2] Starting >>> roslib [ make ] [rosmake-2] Finished <<< roslib ROS_NOBUILD in package roslib [rosmake-1] Starting >>> roscpp_traits [ make ] [rosmake-2] Starting >>> rostime [ make ] [rosmake-3] Starting >>> xmlrpcpp [ make ] [rosmake-0] Starting >>> roslang [ make ] [rosmake-2] Finished <<< rostime ROS_NOBUILD in package rostime [rosmake-3] Finished <<< xmlrpcpp ROS_NOBUILD in package xmlrpcpp [rosmake-2] Starting >>> rosconsole [ make ] [rosmake-0] Finished <<< roslang ROS_NOBUILD in package roslang No Makefile in package roslang [rosmake-3] Starting >>> std_msgs [ make ] [rosmake-0] Starting >>> rosclean [ make ] [rosmake-1] Finished <<< roscpp_traits ROS_NOBUILD in package roscpp_traits [rosmake-1] Starting >>> roscpp_serialization [ make ] [rosmake-3] Finished <<< std_msgs ROS_NOBUILD in package std_msgs [rosmake-2] Finished <<< rosconsole ROS_NOBUILD in package rosconsole [rosmake-3] Starting >>> rosgraph_msgs [ make ] [rosmake-0] Finished <<< rosclean ROS_NOBUILD in package rosclean [rosmake-2] Starting >>> rosgraph [ make ] [rosmake-0] Starting >>> rosparam [ make ] [rosmake-1] Finished <<< roscpp_serialization ROS_NOBUILD in package roscpp_serialization [rosmake-1] Starting >>> rosmaster [ make ] [rosmake-3] Finished <<< rosgraph_msgs ROS_NOBUILD in package rosgraph_msgs [rosmake-2] Finished <<< rosgraph ROS_NOBUILD in package rosgraph [rosmake-2] Starting >>> rospy [ make ] [rosmake-3] Starting >>> roscpp [ make ] [rosmake-0] Finished <<< rosparam ROS_NOBUILD in package rosparam [rosmake-0] Starting >>> rosunit [ make ] [rosmake-1] Finished <<< rosmaster ROS_NOBUILD in package rosmaster [rosmake-3] Finished <<< roscpp ROS_NOBUILD in package roscpp [rosmake-3] Starting >>> rosout [ make ] [rosmake-2] Finished <<< rospy ROS_NOBUILD in package rospy [rosmake-0] Finished <<< rosunit ROS_NOBUILD in package rosunit [rosmake-3] Finished <<< rosout ROS_NOBUILD in package rosout [rosmake-3] Starting >>> roslaunch [ make ] [rosmake-3] Finished <<< roslaunch ROS_NOBUILD in package roslaunch No Makefile in package roslaunch [rosmake-3] Starting >>> rostest [ make ] [rosmake-3] Finished <<< rostest ROS_NOBUILD in package rostest [rosmake-3] Starting >>> topic_tools [ make ] [rosmake-3] Finished <<< topic_tools ROS_NOBUILD in package topic_tools [rosmake-3] Starting >>> rosbag [ make ] [rosmake-3] Finished <<< rosbag ROS_NOBUILD in package rosbag [rosmake-3] Starting >>> rosbagmigration [ make ] [rosmake-3] Finished <<< rosbagmigration ROS_NOBUILD in package rosbagmigration No Makefile in package rosbagmigration [rosmake-3] Starting >>> geometry_msgs [ make ] [rosmake-3] Finished <<< geometry_msgs ROS_NOBUILD in package geometry_msgs [rosmake-3] Starting >>> movbotGPS2 [ make ] [ rosmake ] Last 40 linesvbotGPS2: 6.0 sec ] [ 1 Active 26/27 Complete ] {------------------------------------------------------------------------------- make[3]: Leaving directory /home/turtlebot/ros_workspace/movbotGPS2/build' [ 0%] Built target rospack_genmsg make[3]: Entering directory /home/turtlebot/ros_workspace/movbotGPS2/build' make[3]: Leaving directory /home/turtlebot/ros_workspace/movbotGPS2/build' [ 0%] Built target rosbuild_precompile make[3]: Entering directory /home/turtlebot/ros_workspace/movbotGPS2/build' make[3]: Leaving directory /home/turtlebot/ros_workspace/movbotGPS2/build' make[3]: Entering directory /home/turtlebot/ros_workspace/movbotGPS2/build' [ 50%] Building CXX object CMakeFiles/movbotGPS2.dir/src/movesquare_modified.o /home/turtlebot/ros_workspace/movbotGPS2/src/movesquare_modified.cpp:12:45: error: turtlebot_node/SetTurtlebotMode.h: No such file or directory /home/turtlebot/ros_workspace/movbotGPS2/src/movesquare_modified.cpp:133:19: warning: character constant too long for its type /home/turtlebot/ros_workspace/movbotGPS2/src/movesquare_modified.cpp: In function ‘int main(int, char**)’: /home/turtlebot/ros_workspace/movbotGPS2/src/movesquare_modified.cpp:39: error: ‘Vector3’ has not been declared /home/turtlebot/ros_workspace/movbotGPS2/src/movesquare_modified.cpp:39: error: expected ‘;’ before ‘tw’ /home/turtlebot/ros_workspace/movbotGPS2/src/movesquare_modified.cpp:40: error: ‘tw’ was not declared in this scope /home/turtlebot/ros_workspace/movbotGPS2/src/movesquare_modified.cpp:55: warning: unused variable ‘rndm2’ /home/turtlebot/ros_workspace/movbotGPS2/src/movesquare_modified.cpp:71: error: ‘pubvel’ was not declared in this scope /home/turtlebot/ros_workspace/movbotGPS2/src/movesquare_modified.cpp:74: error: ‘MAX_RUNTIME_SECONDS’ was not declared in this scope /home/turtlebot/ros_workspace/movbotGPS2/src/movesquare_modified.cpp:79: error: ‘roscpp’ was not declared in this scope /home/turtlebot/ros_workspace/movbotGPS2/src/movesquare_modified.cpp:79: error: ‘self’ was not declared in this scope /home/turtlebot/ros_workspace/movbotGPS2/src/movesquare_modified.cpp:84: error: ‘rate’ was not declared in this scope /home/turtlebot/ros_workspace/movbotGPS2/src/movesquare_modified.cpp:103: error: ‘nx’ was not declared in this scope /home/turtlebot/ros_workspace/movbotGPS2/src/movesquare_modified.cpp:103: error: ‘turtlebot_node’ has not been declared /home/turtlebot/ros_workspace/movbotGPS2/src/movesquare_modified.cpp:104: error: ‘turtlebot_node’ has not been declared /home/turtlebot/ros_workspace/movbotGPS2/src/movesquare_modified.cpp:104: error: expected ‘;’ before ‘srvMsg’ /home/turtlebot/ros_workspace/movbotGPS2/src/movesquare_modified.cpp:105: error: ‘srvMsg’ was not declared in this scope /home/turtlebot/ros_workspace/movbotGPS2/src/movesquare_modified.cpp:113: error: ‘twist’ was not declared in this scope /home/turtlebot/ros_workspace/movbotGPS2/src/movesquare_modified.cpp:113: error: ‘Twist’ was not declared in this scope /home/turtlebot/ros_workspace/movbotGPS2/src/movesquare_modified.cpp:121: error: expected unqualified-id before ‘<’ token /home/turtlebot/ros_workspace/movbotGPS2/src/movesquare_modified.cpp:121: error: expected ‘;’ before ‘)’ token /home/turtlebot/ros_workspace/movbotGPS2/src/movesquare_modified.cpp:131: error: expected primary-expression before ‘>’ token /home/turtlebot/ros_workspace/movbotGPS2/src/movesquare_modified.cpp:131: warning: left-hand operand of comma has no effect /home/turtlebot/ros_workspace/movbotGPS2/src/movesquare_modified.cpp:134: error: ‘square’ was not declared in this scope make[3]: *** [CMakeFiles/movbotGPS2.dir/src/movesquare_modified.o] Error 1 make[3]: Leaving directory /home/turtlebot/ros_workspace/movbotGPS2/build' make[2]: *** [CMakeFiles/movbotGPS2.dir/all] Error 2 make[2]: Leaving directory /home/turtlebot/ros_workspace/movbotGPS2/build' make[1]: *** [all] Error 2 make[1]: Leaving directory `/home/turtlebot/ros_workspace/movbotGPS2/build'

[ rosmake ] Output from build of package movbotGPS2 written to: [ rosmake ] /home/turtlebot/.ros/rosmake/rosmake_output-20120411-134134/movbotGPS2/build_output.log [rosmake-3] Finished <<< movbotGPS2 [FAIL] [ 6.12 seconds ]
[ rosmake ] Halting due to failure in package movbotGPS2. [ rosmake ] Waiting for other threads to complete. [ rosmake ] Results:
[ rosmake ] Built 27 packages with 1 failures.
[ rosmake ] Summary output to directory
[ rosmake ] /home/turtlebot/.ros/rosmake/rosmake_output-20120411-134134

So can anyone help me by telling what I'm doing wrong?

Thanks,

Gene


Originally posted by SmithGeneP on ROS Answers with karma: 21 on 2012-04-12

Post score: 0


Original comments

Comment by SmithGeneP on 2012-04-16:
I commented out the rosbuild_add_library line, added turtlebot_node in manifest.xml and I checked and made sure ros/ros.h was included. So I ran rosmake and the errors disappeared. Thank you Lorenz for the help.

Comment by SmithGeneP on 2012-04-16:
I commented out the rosbuild_add_library line, added turtlebot_node in manifest.xml and I checked and made sure ros/ros.h was included. So I ran rosmake and the errors disappeared. Thank you Lorenz for the help.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

In your case, I think you shouldn't build a library since you have a main function. Get rid of the rosbuild_add_library line.

From the error message, I see that you are also depending on turtlebot_node, make sure that you depend on it in the manifest file. In addition, it seems like the compiler cannot find some roscpp stuff. Did you include ros/ros.h?

Vector3 is provided by bullet. Add either tf or bullet to your dependencies in the manifest file and make sure that you have the corresponding include line in your cpp file.


Originally posted by Lorenz with karma: 22731 on 2012-04-12

This answer was ACCEPTED on the original site

Post score: 3

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.