Hello, I am trying understand what exactly is the use of navigation stack and how I can leverage navigation stack for Line following robot(AGV), I just want simple object avoidance with laser data and to follow a line with opencv camera.
↧
How to use navigation stack for line following with opencv
↧
Navigation problem "Cannot connect to move_base action server"
Hi,
I'm trying to do remote 3D mapping and navigation using Raspberry Pi 3 and XBOX Kinect 360 camera on Pioneer robot. I use my laptop as a remote station for visualization and sending 2D nav from Rviz over WiFi.
I am running Ubuntu 14.04 LTS 32-bit with ROS Kinetic.
Navigation stack is run on RPi3. On laptop, when I give a 2D nav goal in Rviz I get the following error:
[ INFO] [1533205073.090658850]: Connecting to move_base action server...
[ERROR] [1533205078.090822743]: Cannot connect to move_base action server!
[ INFO] [1533205078.091473582]: rtabmap (98): Rate=1.00s, Limit=0.700s, RTAB-Map=0.1182s, Maps update=0.0389s pub=5.0023s (local map=1, WM=1)
[ INFO] [1533205078.447025404]: Publishing next goal: 1 -> xyz=0.767808,-0.870866,0.000000 rpy=0.000000,0.000000,-1.453314
I aslo noticed a following warning on the robot side (RPI):
[WARN] [1533120036.753731825]: Timed out waiting for transform from base_link to map to become available before running costmap, tf error: Could not find a connection between 'map' and 'base_link' because they are not part of the same tree.Tf has two or more unconnected trees
I disabled robot's wheel odometry, that is RosAria's TF odom broadcaster by commenting this [line](https://github.com/amor-ros-pkg/rosaria/blob/aa8d5f7faf4b2bc57bea2c597efee1b9a79953ea/RosAria.cpp#L567) and switched to using visual RTAB-Map [rgbd odometry](http://wiki.ros.org/rtabmap_ros#rgbd_odometry).
Here are my roslaunch files: [robot](https://pastebin.com/jxhGGJ0B), [client](https://pastebin.com/Lp0fNw72), move base [params](https://pastebin.com/9L4YawQj)
Here are [rqt_graph](https://imgur.com/FuSPyXd), [view_frames](https://imgur.com/31uESJR)
In RViz, local costmap and global costmap can't be visualized. I did check that I'm subscribing to right topics, but still I get the warning "[No map received](https://imgur.com/c1SUZ7p)"
Any suggestions?
Thanks!
↧
↧
switch between GPS and AMCL based on location
Background on my robot situation:
- Outdoor robot. Not waterproof. Not submersible.
- In-ground swimming pool. No fence between robot and pool.
- GPS that is very accurate (5 cm) when not near the house but terrible near the house (2 - 5 meter jumps near house).
- Laser scanner that's good to about 4 - 5 meters.
- ODOM is pretty good and have IMU with mag.
- Strong preference to keep robot out of the pool.
I would like to be able to use the NAV Stack relying on AMCL near the house, and then transition to using primarily the GPS when away from the house (the map is empty away from house so AMCL provides no location data there). GPS should be ignored near the house. There is nothing near the pool for laser scanner to see so must rely primarily on GPS around the pool.
Questions:
Have any of you had success with a NAV Stack setup that used different "weighting" on AMCL or GPS based on location within the map? If so, how did you approach?
↧
Is there any way to move a robot from A to B points in the Map using only a RTK GPS for localization?
Hi,
I am working on path coverage problem using a RTK-GPS on a differential drive automatic model. I do not have laser or lidar for the purpose that they serve. Is there anyway to move the robot from a to b on a map by using rtk-gps data for localization on a map.
Thanks
Shobhit
↧
Using navigation stack without laser/point cloud
Hello,
I am currently using the navigation stack for simulation with a fake laser. However, I'd like to remove the laser since I plan on using data from a motion capture system. The entire area where the robot is moving can be precisely check for obstacle without the laser or a local costmap and a map (nav_msgs/occupancygrid) is generated. Every time I try to remove it one way or another, I get endless warnings of "The base_scan observation buffer has not been updated for X seconds, and it should be updated every 0.40 seconds." and "[/move_base_node]:Sensor data is out of date, we're not going to allow commanding of the base for safety", so nothing moves.
Is it possible to use this stack without a laser/point cloud?
↧
↧
replacement of odometry in navigation stack
Hi, I'm working on navigation stack, with a lidar only, I don't have any odometry, so I wonder if the data from the lidar can be sufficient to publish relevant tf and the nav_msgs/Odometry message...
I searched around and saw [laser_scan_matcher might be possible](https://answers.ros.org/question/12489/obtaining-nav_msgsodometry-from-a-laser_scan-eg-with-laser_scan_matcher/), but it doesn't contain velocity?
there I also found a package [rf2o_laser_odometry](http://wiki.ros.org/rf2o_laser_odometry), but I have no idea how to implement or if it really works to substitute the odometry (I'm very new to ROS...)
Is there anyone who came across these and could give me advice/ any tutorial on these?
Thanks!
↧
Understanding ros 2 navigation stack, white papers and software architecture sketches would help
Hi,
I would like to understand the [ROS 2 navigation stack](https://github.com/ros2/navigation) and perhaps help in its development.
I am hoping if someone could suggest any white paper's/books on which it is based on. Also, Is there any documentation/sketches on the software architecture.
↧
How to change the cost (time) to reach the goal using path planning algorithm ?
I had created the map using gmapping, and also used AMCL to localize the robot in its environment. I wanted to know how I can add other factor which can influence time to reach the goal, or on what factor the does it depend.
↧
Navigation Stack - could not get robot pose
Hi there,
I just tried to use the navigation stack package. I have a lidar, formed a map (though in poor quality) with hector map, I followed [this](http://wiki.ros.org/navigation/Tutorials/RobotSetup) and put the map in for navigation. except for the odom, I tried with laser_scan_matcher [(this)](http://docs.erlerobotics.com/erle_robots/erle_rover/examples/include_odometry_with_a_2d_laser).
However, I got these while roslaunch the move_base.launch, and the pose of the robot/ costmap local could not be found...
[ WARN] [1549943317.338789222]: Trajectory Rollout planner initialized with param meter_scoring not set. Set it to true to make your settins robust against changes of costmap resolution.
[ INFO] [1549943318.632678731]: Recovery behavior will clear layer obstacles
[ INFO] [1549943318.731042550]: Recovery behavior will clear layer obstacles
[ WARN] [1549943318.891879203]: Map update loop missed its desired rate of 5.0000Hz... the loop actually took 0.4183 seconds
[ WARN] [1549943416.070164221]: Costmap2DROS transform timeout. Current time: 1549943416.0697, global_pose stamp: 1549943415.6726, tolerance: 0.3000
[ WARN] [1549943416.071357157]: Could not get robot pose, cancelling reconfiguration
The robot_configuration.launch:
and the move_base.launch
This is my tf tree: (Will there be something missing? appreciate if someone can help with this. thanks!) 
------------------------**Edit**
I then tried to provide the initial pose as billy said. however, the tf is not moving anywhere, while the laser scanning just like swinging to here and there (the lidar stayed still without moving), not really mapping to the boundary.
also, I got the error:
[ WARN] [1549961650.626591362]: Map update loop missed its desired rate of 5.0000Hz... the loop actually took 0.4752 seconds
[ WARN] [1549961650.840136325]: Control loop missed its desired rate of 20.0000Hz... the loop actually took 0.1786 seconds
[ERROR] [1549961650.841627700]: Extrapolation Error: Lookup would require extrapolation into the future. Requested time 1549961650.866647546 but the latest data is at time 1549961650.862548296, when looking up transform from frame [odom] to frame [map]
[ERROR] [1549961650.841905132]: Global Frame: odom Plan Frame size 42: map

↧
↧
including rf2o laser-to-odometry node to navigation stack
Hi, there
I am planning to use [rfo2 laser-to-odometry](http://wiki.ros.org/rf2o) in the navigation stack.
for this, I downloaded the package from github (since it looks like it can't be downloaded through apt-get), and my configuration file for navigation stack:
However, I got :
ERROR: cannot launch node of type [rf2o_laser_odometry/rf2o_laser_odometry_node]: can't locate node [rf2o_laser_odometry_node] in package [rf2o_laser_odometry]
while launching the file.. catkin_make was done after downloading the package...anyone knows what the problem is?
any help will be appreciated! Thank you
↧
TF not moving in navigation stack
Hi there,
I'm following the wiki tutorial for the navigation stack, however, when I launch it,
- the tf in the map seems not moving when I physically move it and
- it doesn't move as well when I tried to use 2D pose estimate as well. But the local footprint polygon and laser scanning data flashes continuously between the tf and the selected location.
Anyone knows what the problem is? (will that be because of the static tf publisher of odom to footprint?)
Here's the robot_configuration.launch
and the move_base.launch
Any help will be appreciated! Thanks
↧
Pose with mirrored direction in navigation stack (rf2o)
Hi, I'm using [rf2o laser_to_odometry](https://github.com/MAPIRlab/rf2o_laser_odometry) for the navigation stack. I rotated my lidar 90 degrees around z direction, and flipped upside down, and it scans only half range, from -180 to 0 degree.
There I got a problem: pose goes to mirrored direction( x axis)...i.e. when I move robot to right, the tf goes to left..
The tf setup seems to be correct because I run the same tf for hector slam to create a map, and no problem with the pose direction. Also, the map created is not flipped.
I'm thinking about if it is because of the rf2o not supporting the flipping..or is there anything I could change to solve this? Thanks in advance!
↧
Robot reverses at high speed before following path given by ros nav stack
Hi,
I am using ros nav stack in conjunction with google cartographer (Mapping and localization) to navigate the robot through a known map. Right now, the robot follows the path generated with acceptable accuracy. But,often, once the path has been generated, the robot reverses at the highest speed set in the params file (escape_velocity parameter), and then starts to move forward correctly on the genrated path.
I have attached images of all my param file:
1. [C:\fakepath\params1.png](/upfiles/15513912556250948.png)
2. [C:\fakepath\params2.png](/upfiles/15513912908929779.png)
This is a link to a video of how it looks on rviz. https://vimeo.com/320040685
The thinner line in green is the plan generated by ros nav stack. The thicker line seen later in the video is the actual robot movement. You can see that the robot first reverses and then starts moving forward.
I am new to this forum so please let me know if I need to give anymore data for anyone to answer this
Has anyone else has this probelm? Will apprecite any tips on fixing this!
Thanks in advance!
↧
↧
Pass known map to ROS navigation stack.
Hi there, I've been using the [ros navigation stack](http://wiki.ros.org/navigation) with the turtlebot, but right now it's doing SLAM and constructing the map as it goes, is there a way to pass a known map to the map_server? Any tips or examples on how to do so?
↧
frontier_exploration severe warning message when specifying map area to explore.
Hi guys. I can't seem to get `frontier_exploration` to work for some reason.
Based on the [Wiki](http://wiki.ros.org/frontier_exploration), I have satisfied all the requirements needed to run the `frontier_exploration` package.
On my real robot, `navigation_stack` is confirmed to be working well.
Here is what I did:
[ ... run all required nodes for navigation stack ...]
rosrun exploration_server exploration.launch
`rosrun exploration_server exploration.launch` console:
NODES
/
exploration_server_node (exploration_server/exploration_server_node)
plugin_client (exploration_server/plugin_client)
ROS_MASTER_URI=http://192.168.31.164:11311
process[plugin_client-1]: started with pid [2452]
process[exploration_server_node-2]: started with pid [2453]
[ INFO] [1554222325.582473407]: Please use the 'Point' tool in Rviz to select an exporation boundary.
[ WARN] [1554222325.682487327]: Change marker topic to exploration_polygon_marker before continuing.
[ INFO] [1554222325.955557215]: Using plugin "static"
[ INFO] [1554222325.968418355]: Requesting the map...
[ INFO] [1554222326.171825922]: Resizing costmap to 384 X 384 at 0.050000 m/pix
[ INFO] [1554222326.271449255]: Received a 384 X 384 map at 0.050000 m/pix
[ INFO] [1554222326.271525899]: Subscribing to updates
[ INFO] [1554222326.285617338]: Using plugin "polygon_layer"
[ INFO] [1554222326.297002975]: Using plugin "sensor"
[ INFO] [1554222326.298983534]: Subscribed to Topics: laser
[ INFO] [1554222326.327030325]: Using plugin "inflation"
In rViz, I specified the map area for my robot to start exploring by publishing 5 points:

`rosrun exploration_server exploration.launch` console:
...
[ WARN] [1554222479.089538067]: Please select an initial point for exploration inside the polygon
[ INFO] [1554222482.193100407]: Sending goal
[ INFO] [1554222482.209814608]: Updating polygon
[ INFO] [1554222482.209888753]: Requesting a goal
[ INFO] [1554222482.210900543]: Robot is now at 0.007659, 0.006953
[ INFO] [1554222482.210984663]: Robot moving to: 1.000000, 1.000000
Warning: class_loader.ClassLoader: SEVERE WARNING!!! Attempting to unload library while objects created by this loader exist in the heap! You should delete your objects before attempting to unload the library or destroying the ClassLoader. The library will NOT be unloaded.
at line 122 in /tmp/binarydeb/ros-melodic-class-loader-0.4.1/src/class_loader.cpp
I'm expecting the robot to start exploring the specified area. However, that is not the case as the robot does not move. What could be the problem?
Regards,
↧
Faulty navigational behaviour
I have a GoPiGo (Raspberry Pi b+) that uses RPLIdar A2 for scanning. I've been trying for a long time to get mapping working properly with movement. I've searched a lot on how to fix my problems but none of the solutions seemed to work.
I'm using Ubuntu_Mate 16.04 and all the lastest stacks and updates on everything else, the repos I use are listed below.
For navigation im using https://github.com/iot-magi/gopigo3_navigation
in combination with that repository im also using https://github.com/ros-gopigo/gopigo3_node
finally, im using this repo for the RPLIdar https://github.com/Slamtec/rplidar_ros
Im getting the map and costmap up properly, and it seems to be working fine. But as I try to publish a goal to the navgoal the robot gets very confused and starts rapidly turning (i will provide a video if it's needed).
I should also point out that the map in RViz flickers a lot, which i cannot find a solution for.
I noticed something that seems off with my TF_tree, GoPIGO_body and LIdar has 10000 hertz average rate. Could this be causing a problem?
https://imgur.com/U8LLtqp
I have costumised some values so it works with my hardware setup.
I would greatly appreciate any help or points in the right direction. If there is anything more you want to know about my config or anything else ill answer very fast.
↧
To understand the concept of Origin field from map_server
Hello.
I'm trying to run some tutorial which have a ROS Navigation Stack sample.
On doing, I couldn't understand the concept of ORIGIN field from yaml which the map_server create after mapping.
Here is a [description](http://wiki.ros.org/map_server) by ROS wiki.
> origin : The 2-D pose of the lower-left pixel in the map, as (x, y, yaw), with yaw as counterclockwise rotation (yaw=0 means no rotation). Many parts of the system currently ignore yaw.
**What this, "the lower-left pixel in the map", mean??**
↧
↧
Quadrotor Navigation Stack communication with flight controller
Hi there,
I'm working on building an autonomous quadrotor (SLAM, navigation, obstacle avoidance etc.) but I'm having trouble with getting the navigation stack to communicate effectively with the custom flight controller.
Is there any way to send the path plan from the on board computer to a flight controller in terms of xy coordinates? Probably using some kind of rosnode/topic?
What I'm thinking is that the flight controller compares current xy position with the position error ( = Ideal next measurement position - current position), and sends the signal to the motors to respond and the process iterates for time steps.
How might I achieve this? Or have you got any other suggestions for implementation?
I'm just working in a 2D plane using a 1D lidar for altitude at the moment, I can't seem to find much info on 3D navigation.
Thanks for the help!
↧
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 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 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 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’:
/usr/include/boost/bind/bind.hpp:1284:48: required from ‘class boost::_bi::bind_t, 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("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("goal", 1);
^~~~~~~~~~~~~~
move_base_EXPORTS
/home/nano/ws/src/navigation/move_base/src/move_base.cpp:95:34: error: parse error in template argument list
action_goal_pub_ = action_nh.advertise("goal", 1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/nano/ws/src/navigation/move_base/src/move_base.cpp:95:89: error: no matching function for call to ‘ros::NodeHandle::advertise<>(const char [5], int)’
action_goal_pub_ = action_nh.advertise("goal", 1);
^
In file included from /opt/ros/melodic/include/ros/ros.h:45:0,
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:
/opt/ros/melodic/include/ros/node_handle.h:249:15: note: candidate: template ros::Publisher ros::NodeHandle::advertise(const string&, uint32_t, bool)
Publisher advertise(const std::string& topic, uint32_t queue_size, bool latch = false)
^~~~~~~~~
/opt/ros/melodic/include/ros/node_handle.h:249:15: note: template argument deduction/substitution failed:
/home/nano/ws/src/navigation/move_base/src/move_base.cpp:95:89: error: template argument 1 is invalid
action_goal_pub_ = action_nh.advertise("goal", 1);
^
In file included from /opt/ros/melodic/include/ros/ros.h:45:0,
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:
/opt/ros/melodic/include/ros/node_handle.h:315:13: note: candidate: template ros::Publisher ros::NodeHandle::advertise(const string&, uint32_t, const SubscriberStatusCallback&, const SubscriberStatusCallback&, const VoidConstPtr&, bool)
Publisher advertise(const std::string& topic, uint32_t queue_size,
^~~~~~~~~
/opt/ros/melodic/include/ros/node_handle.h:315:13: note: template argument deduction/substitution failed:
/home/nano/ws/src/navigation/move_base/src/move_base.cpp:95:89: error: template argument 1 is invalid
action_goal_pub_ = action_nh.advertise("goal", 1);
^
/home/nano/ws/src/navigation/move_base/src/move_base.cpp:169:10: error: request for member ‘start’ in ‘*((move_base::MoveBase*)this)->move_base::MoveBase::as_’, which is of non-class type ‘move_base::MoveBaseActionServer {aka int}’
as_->start();
^~~~~
/home/nano/ws/src/navigation/move_base/src/move_base.cpp: In member function ‘void move_base::MoveBase::goalCB(const ConstPtr&)’:
/home/nano/ws/src/navigation/move_base/src/move_base.cpp:268:5: error: ‘move_base_msgs’ has not been declared
move_base_msgs::MoveBaseActionGoal action_goal;
^~~~~~~~~~~~~~
/home/nano/ws/src/navigation/move_base/src/move_base.cpp:269:5: error: ‘action_goal’ was not declared in this scope
action_goal.header.stamp = ros::Time::now();
^~~~~~~~~~~
/home/nano/ws/src/navigation/move_base/src/move_base.cpp:269:5: note: suggested alternative: ‘action_goal_pub_’
action_goal.header.stamp = ros::Time::now();
^~~~~~~~~~~
action_goal_pub_
/home/nano/ws/src/navigation/move_base/src/move_base.cpp: In member function ‘bool move_base::MoveBase::planService(nav_msgs::GetPlan::Request&, nav_msgs::GetPlan::Response&)’:
/home/nano/ws/src/navigation/move_base/src/move_base.cpp:342:13: error: request for member ‘isActive’ in ‘*((move_base::MoveBase*)this)->move_base::MoveBase::as_’, which is of non-class type ‘move_base::MoveBaseActionServer {aka int}’
if(as_->isActive()){
^~~~~~~~
/home/nano/ws/src/navigation/move_base/src/move_base.cpp: At global scope:
/home/nano/ws/src/navigation/move_base/src/move_base.cpp:638:34: error: ‘move_base_msgs’ does not name a type; did you mean ‘move_base_EXPORTS’?
void MoveBase::executeCb(const move_base_msgs::MoveBaseGoalConstPtr& move_base_goal)
^~~~~~~~~~~~~~
move_base_EXPORTS
/home/nano/ws/src/navigation/move_base/src/move_base.cpp:638:70: error: expected unqualified-id before ‘&’ token
void MoveBase::executeCb(const move_base_msgs::MoveBaseGoalConstPtr& move_base_goal)
^
/home/nano/ws/src/navigation/move_base/src/move_base.cpp:638:70: error: expected ‘)’ before ‘&’ token
/home/nano/ws/src/navigation/move_base/src/move_base.cpp:638:72: error: expected initializer before ‘move_base_goal’
void MoveBase::executeCb(const move_base_msgs::MoveBaseGoalConstPtr& move_base_goal)
^~~~~~~~~~~~~~
/home/nano/ws/src/navigation/move_base/src/move_base.cpp: In member function ‘bool move_base::MoveBase::executeCycle(geometry_msgs::PoseStamped&, std::vector>>&)’:
/home/nano/ws/src/navigation/move_base/src/move_base.cpp:800:5: error: ‘move_base_msgs’ has not been declared
move_base_msgs::MoveBaseFeedback feedback;
^~~~~~~~~~~~~~
/home/nano/ws/src/navigation/move_base/src/move_base.cpp:801:5: error: ‘feedback’ was not declared in this scope
feedback.base_position = current_position;
^~~~~~~~
/home/nano/ws/src/navigation/move_base/src/move_base.cpp:802:10: error: request for member ‘publishFeedback’ in ‘*((move_base::MoveBase*)this)->move_base::MoveBase::as_’, which is of non-class type ‘move_base::MoveBaseActionServer {aka int}’
as_->publishFeedback(feedback);
^~~~~~~~~~~~~~~
/home/nano/ws/src/navigation/move_base/src/move_base.cpp:848:14: error: request for member ‘setAborted’ in ‘*((move_base::MoveBase*)this)->move_base::MoveBase::as_’, which is of non-class type ‘move_base::MoveBaseActionServer {aka int}’
as_->setAborted(move_base_msgs::MoveBaseResult(), "Failed to pass global plan to the controller.");
^~~~~~~~~~
/home/nano/ws/src/navigation/move_base/src/move_base.cpp:848:25: error: ‘move_base_msgs’ has not been declared
as_->setAborted(move_base_msgs::MoveBaseResult(), "Failed to pass global plan to the controller.");
^~~~~~~~~~~~~~
/home/nano/ws/src/navigation/move_base/src/move_base.cpp:883:16: error: request for member ‘setSucceeded’ in ‘*((move_base::MoveBase*)this)->move_base::MoveBase::as_’, which is of non-class type ‘move_base::MoveBaseActionServer {aka int}’
as_->setSucceeded(move_base_msgs::MoveBaseResult(), "Goal reached.");
^~~~~~~~~~~~
/home/nano/ws/src/navigation/move_base/src/move_base.cpp:883:29: error: ‘move_base_msgs’ has not been declared
as_->setSucceeded(move_base_msgs::MoveBaseResult(), "Goal reached.");
^~~~~~~~~~~~~~
/home/nano/ws/src/navigation/move_base/src/move_base.cpp:968:18: error: request for member ‘setAborted’ in ‘*((move_base::MoveBase*)this)->move_base::MoveBase::as_’, which is of non-class type ‘move_base::MoveBaseActionServer {aka int}’
as_->setAborted(move_base_msgs::MoveBaseResult(), "Failed to find a valid control. Even after executing recovery behaviors.");
^~~~~~~~~~
/home/nano/ws/src/navigation/move_base/src/move_base.cpp:968:29: error: ‘move_base_msgs’ has not been declared
as_->setAborted(move_base_msgs::MoveBaseResult(), "Failed to find a valid control. Even after executing recovery behaviors.");
^~~~~~~~~~~~~~
/home/nano/ws/src/navigation/move_base/src/move_base.cpp:972:18: error: request for member ‘setAborted’ in ‘*((move_base::MoveBase*)this)->move_base::MoveBase::as_’, which is of non-class type ‘move_base::MoveBaseActionServer {aka int}’
as_->setAborted(move_base_msgs::MoveBaseResult(), "Failed to find a valid plan. Even after executing recovery behaviors.");
^~~~~~~~~~
/home/nano/ws/src/navigation/move_base/src/move_base.cpp:972:29: error: ‘move_base_msgs’ has not been declared
as_->setAborted(move_base_msgs::MoveBaseResult(), "Failed to find a valid plan. Even after executing recovery behaviors.");
^~~~~~~~~~~~~~
/home/nano/ws/src/navigation/move_base/src/move_base.cpp:976:18: error: request for member ‘setAborted’ in ‘*((move_base::MoveBase*)this)->move_base::MoveBase::as_’, which is of non-class type ‘move_base::MoveBaseActionServer {aka int}’
as_->setAborted(move_base_msgs::MoveBaseResult(), "Robot is oscillating. Even after executing recovery behaviors.");
^~~~~~~~~~
/home/nano/ws/src/navigation/move_base/src/move_base.cpp:976:29: error: ‘move_base_msgs’ has not been declared
as_->setAborted(move_base_msgs::MoveBaseResult(), "Robot is oscillating. Even after executing recovery behaviors.");
^~~~~~~~~~~~~~
/home/nano/ws/src/navigation/move_base/src/move_base.cpp:989:14: error: request for member ‘setAborted’ in ‘*((move_base::MoveBase*)this)->move_base::MoveBase::as_’, which is of non-class type ‘move_base::MoveBaseActionServer {aka int}’
as_->setAborted(move_base_msgs::MoveBaseResult(), "Reached a case that should not be hit in move_base. This is a bug, please report it.");
^~~~~~~~~~
/home/nano/ws/src/navigation/move_base/src/move_base.cpp:989:25: error: ‘move_base_msgs’ has not been declared
as_->setAborted(move_base_msgs::MoveBaseResult(), "Reached a case that should not be hit in move_base. This is a bug, please report it.");
^~~~~~~~~~~~~~
navigation/move_base/CMakeFiles/move_base.dir/build.make:62: recipe for target 'navigation/move_base/CMakeFiles/move_base.dir/src/move_base.cpp.o' failed
make[2]: *** [navigation/move_base/CMakeFiles/move_base.dir/src/move_base.cpp.o] Error 1
CMakeFiles/Makefile2:11641: recipe for target 'navigation/move_base/CMakeFiles/move_base.dir/all' failed
make[1]: *** [navigation/move_base/CMakeFiles/move_base.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j4 -l4" failed
Adding my CMakeLists.txt
cmake_minimum_required(VERSION 2.8.3)
project(move_base)
find_package(catkin REQUIRED
COMPONENTS
actionlib
base_local_planner
clear_costmap_recovery
cmake_modules
costmap_2d
dynamic_reconfigure
geometry_msgs
message_generation
move_base_msgs
nav_core
nav_msgs
navfn
pluginlib
roscpp
rospy
rotate_recovery
std_srvs
tf2_geometry_msgs
tf2_ros
)
find_package(Eigen3 REQUIRED)
add_definitions(${EIGEN3_DEFINITIONS})
# dynamic reconfigure
generate_dynamic_reconfigure_options(
cfg/MoveBase.cfg
)
catkin_package(
CATKIN_DEPENDS
dynamic_reconfigure
geometry_msgs
move_base_msgs
nav_msgs
roscpp
)
include_directories(
include
${catkin_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
)
# move_base
add_library(move_base
src/move_base.cpp
)
target_link_libraries(move_base
${Boost_LIBRARIES}
${catkin_LIBRARIES}
)
add_dependencies(move_base ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
add_executable(move_base_node
src/move_base_node.cpp
)
add_dependencies(move_base_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
target_link_libraries(move_base_node move_base)
set_target_properties(move_base_node PROPERTIES OUTPUT_NAME move_base)
install(
TARGETS
move_base
move_base_node
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
## Mark cpp header files for installation
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.h"
)
↧
How to compile a non-native Navigation Stack with your workspace?
## Problem (TL;DR) ##
I am running ROS Indigo on Ubuntu 14.04. For historical reasons I had to install PCL 1.8 and remove PCL 1.7. I now need to write a custom global planner, and it seems that I need to link in packages from the Navigation Stack (specifically `navfn`). However, ROS Indigo was built with PCL 1.7, and it's nav stack packages won't compile without it. So I am trying to compile my workspace with the ROS Melodic nav stack, as this was the first navigation stack to support PCL 1.8 and I need some help debugging the errors I am getting.
## Problem (full) ##
As above. My custom planner is largely based on the [Writing A Global Path Planner As Plugin in ROS](http://wiki.ros.org/navigation/Tutorials/Writing%20A%20Global%20Path%20Planner%20As%20Plugin%20in%20ROS) tutorial, with some minor changes to fix problems in the tutorial code.
**IF** I compile the code without linking `navfn`, and if I do not include any nav stack packages in my workspace, my code compiles and the tutorial code successfully plots a path. The problems only occur when I try linking to packages from the navigation stack.
Relevant system information:
- **OS:** Ubuntu 14.04
- **ROS version:** Indigo Igloo
- **PCL version:** PCL 1.8
- **Repository:** (includes all relevant files): [here](https://github.com/msy22/auxiliary_ros_repo/tree/master/src). My custom planner is declared in [sinusoid_path_planner.h](https://github.com/msy22/auxiliary_ros_repo/blob/master/src/sinusoid_path_planner/include/sinusoid_path_planner/sinusoid_path_planner.h). The source code is in [sinusoid_path_planner.cpp](https://github.com/msy22/auxiliary_ros_repo/blob/master/src/sinusoid_path_planner/src/sinusoid_path_planner.cpp) and compilation/linking is determined by the [CMakeLists.txt](https://github.com/msy22/auxiliary_ros_repo/blob/master/src/sinusoid_path_planner/CMakeLists.txt) file.
I believe that in order to use the `navfn` planner from within my custom planner, I need to link it (and some other nav stack packages like `costmap_2d`) in the CMakeLists.txt file, as shown:
find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs sensor_msgs roslaunch nav_core navfn costmap_2d)
However, when I do this, I get the following warning which suggests that the ROS Indigo nav stack won't work without PCL 1.7.
CMake Error at /opt/ros/indigo/share/costmap_2d/cmake/costmap_2dConfig.cmake:106 (message):
Project 'costmap_2d' specifies '/usr/include/pcl-1.7' as an include dir,
which is not found. It does neither exist as an absolute directory nor in
'/opt/ros/indigo//usr/include/pcl-1.7'. Ask the maintainer 'David V. Lu!!
, Michael Ferguson , Aaron Hoy
' to fix it.
Call Stack (most recent call first):
/opt/ros/indigo/share/nav_core/cmake/nav_coreConfig.cmake:165 (find_package)
/opt/ros/indigo/share/catkin/cmake/catkinConfig.cmake:76 (find_package)
sinusoid_path_planner/CMakeLists.txt:14 (find_package)
To get around this, I followed this ROS Answers question [here](http://answers.ros.org/question/289264/how-do-you-upgrade-pcl-to-the-current-release/). I have already changed my CMakeList.txt file to explicitly set the PCL include paths to point to the PCL 1.8 installation. And I added what I think are the necessary packages from the ROS Melodic nav stack to my workspace, specifically `costmap_2d`, `global_planner`, `move_base`, `nav_core`, `navfn`. This will compile and even run, but always fails at some point with a reference to undefined symbols. E.g:
[ INFO] [1560222901.684840650, 1520.648000000]: odom received!
[ INFO] [1560222909.218170347, 1526.300000000]: Publishing navfn path
/home/matt/auxiliary_ros_repo/devel/lib/move_base/move_base: symbol lookup error: /opt/ros/indigo/lib//libtrajectory_planner_ros.so: undefined symbol: _ZNK10costmap_2d12Costmap2DROS12getRobotPoseERN2tf7StampedINS1_9TransformEEE
[move_base-1] process has died [pid 28774, exit code 127, cmd /home/matt/auxiliary_ros_repo/devel/lib/move_base/move_base odom:=odometry/filtered __name:=move_base __log:=/home/matt/.ros/log/151f464e-8bf7-11e9-9284-e8b1fc8ba78b/move_base-1.log].
log file: /home/matt/.ros/log/151f464e-8bf7-11e9-9284-e8b1fc8ba78b/move_base-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done
So my questions are:
1. Do I need to include the entire Melodic nav stack? or just specific packages?
2. What might cause these undefined symbol errors?
3. How do `rosdep depends` and `rqt_dep` read the package dependencies? I'm trying to use these tools to debug the issue, but their documentation is scant, and they don't seem to line up with what the CMakeList.txt file should be including.
↧