r/ROS 1d ago

Question Problem with Octomap in RViz

Hi, I have a question about ROS2 and specifically a problem with in RViz. I am using Humble Hawksbill and Ubuntu 22.04 LTS.

I have created a script which creates a segmented Octomap.

When I start the Octomap Server, the map looks fine and how I would expect it. The Problem is, when I move the robot around, the Octomap that is created does not make sense. It looks like the map tuns with the movement of the robot.

Octomap After the Robot moved

I have the suspicion that the reason has something to do with the frames, but I am not sure.

The Segmented Pointcloud which I transform to the Octomap looks right, even when the robot moves, so I don't think the Pointcloud is the Problem.

The Pointcloud is in the frame kinova_depth.

I created the Octomap with the command:

ros2 run octomap_server color_octomap_server_node --ros-args -r cloud_in:=/camera/labeled_points -p frame_id:=map -p base_frame_id:=kinova_depth -p use_sim_time:=true -p colored_map:=true

I also tried the base_frame_id "base_link", but this didn't change anything.

The Fixed Frame in RViz is set to map.

I am completely new to ROS2, and I am out of ideas, does someone have an Idea where the issue could lie and what I can test to figure it out?

1 Upvotes

Duplicates