Ask Your Question

Problem with building navigation stack

asked 2019-06-05 12:57:02 -0500

Veera Ragav gravatar image

updated 2019-06-06 05:05:33 -0500

I am using ROS melodic on Ubuntu 18.04 in Nvidia Jetson Nano. I am trying to building navigation from the code in github. I get the following error.

[ 98%] Built target planner
In file included from /home/nano/ws/src/navigation/move_base/src/move_base.cpp:38:0:
/home/nano/ws/src/navigation/move_base/include/move_base/move_base.h:64:41: error: ‘move_base_msgs’ was not declared in this scope
   typedef actionlib::SimpleActionServer<move_base_msgs::MoveBaseAction> MoveBaseActionServer;
/home/nano/ws/src/navigation/move_base/include/move_base/move_base.h:64:41: note: suggested alternative: ‘move_base_EXPORTS’
   typedef actionlib::SimpleActionServer<move_base_msgs::MoveBaseAction> MoveBaseActionServer;
/home/nano/ws/src/navigation/move_base/include/move_base/move_base.h:64:71: error: template argument 1 is invalid
   typedef actionlib::SimpleActionServer<move_base_msgs::MoveBaseAction> MoveBaseActionServer;
/home/nano/ws/src/navigation/move_base/include/move_base/move_base.h:163:28: error: ‘move_base_msgs’ does not name a type; did you mean ‘move_base_EXPORTS’?
       void executeCb(const move_base_msgs::MoveBaseGoalConstPtr& move_base_goal);
/home/nano/ws/src/navigation/move_base/include/move_base/move_base.h:163:64: error: expected unqualified-id before ‘&’ token
       void executeCb(const move_base_msgs::MoveBaseGoalConstPtr& move_base_goal);
/home/nano/ws/src/navigation/move_base/include/move_base/move_base.h:163:64: error: expected ‘)’ before ‘&’ token
/home/nano/ws/src/navigation/move_base/include/move_base/move_base.h:163:64: error: expected ‘;’ at end of member declaration
/home/nano/ws/src/navigation/move_base/include/move_base/move_base.h:163:66: error: ‘move_base_goal’ does not name a type; did you mean ‘move_base_EXPORTS’?
       void executeCb(const move_base_msgs::MoveBaseGoalConstPtr& move_base_goal);
In file included from /usr/include/boost/bind.hpp:22:0,
                 from /opt/ros/melodic/include/ros/publisher.h:35,
                 from /opt/ros/melodic/include/ros/node_handle.h:32,
                 from /opt/ros/melodic/include/ros/ros.h:45,
                 from /home/nano/ws/src/navigation/move_base/include/move_base/move_base.h:43,
                 from /home/nano/ws/src/navigation/move_base/src/move_base.cpp:38:
/usr/include/boost/bind/bind.hpp: In instantiation of ‘struct boost::_bi::result_traits<boost::_bi::unspecified, void (move_base::MoveBase::*)(...) &>’:
/usr/include/boost/bind/bind.hpp:1284:48:   required from ‘class boost::_bi::bind_t<boost::_bi::unspecified, void (move_base::MoveBase::*)(...) &, boost::_bi::list2<boost::_bi::value<move_base::MoveBase*>, boost::arg<1> > >’
/home/nano/ws/src/navigation/move_base/src/move_base.cpp:60:110:   required from here
/usr/include/boost/bind/bind.hpp:75:37: error: ‘void (move_base::MoveBase::*)(...) &’ is not a class, struct, or union type
     typedef typename F::result_type type;
/home/nano/ws/src/navigation/move_base/src/move_base.cpp: In constructor ‘move_base::MoveBase::MoveBase(tf2_ros::Buffer&)’:
/home/nano/ws/src/navigation/move_base/src/move_base.cpp:60:118: error: new initializer expression list treated as compound expression [-fpermissive]
 s_ = new MoveBaseActionServer(ros::NodeHandle(), "move_base", boost::bind(&MoveBase::executeCb, this, _1), false);
/home/nano/ws/src/navigation/move_base/src/move_base.cpp:95:44: error: ‘move_base_msgs’ was not declared in this scope
     action_goal_pub_ = action_nh.advertise<move_base_msgs::MoveBaseActionGoal>("goal", 1);
/home/nano/ws/src/navigation/move_base/src/move_base.cpp:95:44: note: suggested alternative: ‘move_base_EXPORTS’
     action_goal_pub_ = action_nh.advertise<move_base_msgs::MoveBaseActionGoal>("goal", 1);
/home/nano/ws/src/navigation/move_base/src/move_base.cpp:95:34: error: parse error ...
edit retag flag offensive close merge delete



It will probably help forum members help you if you could provide some more details on how you've setup your development environment. Which code you cloned, which version, how you dealt with dependencies, which build tool your using, etc.

gvdhoorn gravatar imagegvdhoorn ( 2019-06-05 14:02:11 -0500 )edit

1 Answer

Sort by » oldest newest most voted

answered 2019-06-06 04:59:14 -0500

kosmastsk gravatar image

updated 2019-06-06 04:59:33 -0500

sudo apt-get install ros-melodic-move-base-msgs should solve your problem. If not, add your CMakeLists.txt to your question, that'll help

edit flag offensive delete link more


I know that that command will work. I had added my CMakeLists.txt.

Veera Ragav gravatar imageVeera Ragav ( 2019-06-06 05:06:10 -0500 )edit

Did you do rosdep to install all your dependencies before compiling?

stevemacenski gravatar imagestevemacenski ( 2019-06-06 13:05:45 -0500 )edit

I remember doing rosdep init and rosdep update during ros installation. Is this different from that? If so how do I do that?

Veera Ragav gravatar imageVeera Ragav ( 2019-06-06 13:08:32 -0500 )edit

Those steps just setup rosdep to be used, you have to invoke rosdep like:

rosdep install --from-paths src --ignore-src -r -y

stevemacenski gravatar imagestevemacenski ( 2019-06-06 13:14:32 -0500 )edit

@Veera Ragav: you could take a look at #q252478 for the general workflow when building packages from source. If you're building entire stacks from source, you'll want to use rosinstall_generator.

gvdhoorn gravatar imagegvdhoorn ( 2019-06-06 13:31:59 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2019-06-05 12:57:02 -0500

Seen: 42 times

Last updated: Jun 06