ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org

Does ObstacleFootprint critic work without SLAM or localization?

Hi, I have a use case where my robot has perfect localization (think motion capture or a perfect simulation). Therefore it doesn’t need SLAM or robot_localization in order to publish mapodom or odombase_link. I publish these outside of nav2_bringup. I used the turtlebot3 simulation example as a starting point and got my robot working with the nav2 stack. It works generally. But when I add the ObstacleFootprint critic, I get the error “No valid trajectories out of 419!” from the DWB controller even when in a wide open area. For the local costmap plugins I have only the static_layer and the inflation _layer. When I omit this critic, everything works (but obstacles are not avoided during control). I do not have any LaserScan or VoxelGrid layers being published. Is ObstacleFootprint not designed to work without either SLAM or robot_localization? How would I go about adding the critic if it doesn’t need either module to work?

I think this should just work. Are you sure that you have defined the footprint correctly? When you visualize the footprint in RViz, does it look ok?

Yes, the footprint visualizes correctly in RViz. I am still investigating, but I think the costmaps are not updating for some reason (another node is pausing them)? In RViz, the global and local costmap topics are valid, but it gives a warning that “no map received”. Nothing echoes on the topic either.

I found the source of my trouble. No message was being broadcast on the /clock topic. I had set all the use_sim_time keys to False in nav2_params.yaml (since I am not using Gazebo). However, nothing was causing the clock to progress so the costmap current_time variable was staying at zero and it was not publishing. I found that to really not use simulation time, I had to open bringup_launch.py and set the default_value keyword of declare_use_sim_time_cmd to false. Then the costmaps publish and the ObstacleFootprint critic works. I have no idea what the use_sim_time keys in nav2_params.yaml accomplish, but they do not seem to have any affect on the /clock topic as it pertains to the costmaps.