multiple rviz2 nodes and robot is out of bounds of costmap

asked 2022-07-28 20:22:43 -0500

Rico_Wag gravatar image

Ubuntu 20.04 LTS

ROS2 Foxy

Navigation2

Hello,

I followed the Automatic Addison ROS2 & Nav2 Tutorial on his site. He has about 5-10 pages describing a more detailed tutorial than in the Nav2 site. I changed a few things to get it to work with my personal maps.

I have a couple problems, but I think they're all related; like one could fix the rest. Firstly, rviz2 is having a problem with the costmap and displaying the map I provide. I think this is due to there being multiple ros2 nodes with the same name, because that is described in the terminal output during the launch. Below is the terminal output that is important, I'd post the whole thing as a txt but I don't have 5 points.

[rviz2-5] [WARN] [1659053593.580478223] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.
[rviz2-5] [WARN] [1659053593.595203736] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.
[rviz2-5] [WARN] [1659053593.681472165] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.

This leads to rviz2 looking weird, where the map is correctly placed how I want it but then there's an outline of the borders that is rotated about the lower-left corner of the map. Again, I'd post a picture but I don't have 5 points yet. Since rviz2 depicts this, I believe this is what is throwing off the costmap. The planner server is saying that that the robot is out of bounds of the costmap because I think it's rotated 90 deg CW, which is depicted in rviz2. I searched for some help about multiple rviz nodes being launched but didn't find anything of use.

[planner_server-10] [WARN] [1659053596.443367934] [nav2_costmap_2d]: Robot is out of bounds of the costmap!
[planner_server-10] [WARN] [1659053597.443415877] [nav2_costmap_2d]: Robot is out of bounds of the costmap!
[planner_server-10] [WARN] [1659053598.443491019] [nav2_costmap_2d]: Robot is out of bounds of the costmap!
[planner_server-10] [WARN] [1659053599.443444337] [nav2_costmap_2d]: Robot is out of bounds of the costmap!
[planner_server-10] [WARN] [1659053600.443372279 ...
(more)
edit retag flag offensive close merge delete

Comments

UPDATE: so I kind of figured out why the costmap was wonky. In my yaml file that was setting up my map

image: blocksworld.pgm # Old file made on Windows Gimp resolution: 0.25 # Resolution of the map, meters/pixel origin: [-145, -90, 0,] # 2-D pose of the lower-left pixel in the map, as (x, y, yaw), with yaw as counterclockwise rotation negate: 0 occupied_thresh: 0.55 free_thresh: 0.1

the origin parameter was screwing everything up. I originally rotated the map 90 deg (origin:[x, y, 90]), but I guess that DOESN'T also rotate the costmap. However! Simply moving the costmap in the x- and y- directions only DOES move the costmap with the map. I don't know why this is, how to rotate the costmap, or why it does move ONLY with the x- and y- params given.

The multiple rviz2 nodes is still in the ...(more)

Rico_Wag gravatar image Rico_Wag  ( 2022-08-05 17:02:54 -0500 )edit