Problem with building navigation stack
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;
^~~~~~~~~~~~~~
move_base_EXPORTS
/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);
^~~~~~~~~~~~~~
move_base_EXPORTS
/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);
^~~~~~~~~~~~~~
move_base_EXPORTS
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);
^~~~~~~~~~~~~~
move_base_EXPORTS
/home/nano/ws/src/navigation/move_base/src/move_base.cpp:95:34: error: parse error ...
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.