Skip to content

Octomap in MoveIt 2 moves with the Robot despite being set to "map" frame. #3539

Closed

Description

@andre-silva9975

Description

I'm experiencing an issue where the octomap generated by MoveIt 2 appears to move along with the robot, even though the MoveIt OccupancyMapUpdater seems to be set up correctly with the map frame as its reference. This leads to a situation where the octomap appears to "stick" to the robot as it moves, rather than remaining static in the global map frame. To isolate the issue, I tested the same scenarion with octomap_server2. In this case, the octomap remains perfectly static in the map frame, even as the robot moves. This suggests the problem is may be specific to how MoveIt 2 processes the octomap internally.

Screencast.from.25-07-2025.11.56.55.webm

ROS Distro

Humble

OS and version

Ubuntu 22.04

Source or binary build?

Source

If binary, which release version?

No response

If source, which branch?

humble

Which RMW are you using?

CycloneDDS

Steps to Reproduce

  1. Launch a TIAGo robot simulation in ROS 2 Humble.
  2. Configure MoveIt 2 to use the PointCloudOctomapUpdater.
  3. Ensure that monitor_->getMapFrame() is set to map and RViz2 fixed frame is set to map.
  4. Move the robot (either manually or via navigation stack).
  5. Observe the octomap in RViz2.

Expected behavior

The octomap should remain fixed in the map frame, accumulating data over time as the robot moves, rather than updating relative to the robot's pose.

Actual behavior

The octomap shifts with the robot, as though it were being published or updated in the robot's local frame (e.g., base_footprint), not in a fixed global frame.

Backtrace or Console output

No response

Activity

  1. added
    bug
    on Jul 25, 2025
  2. added a commit that references this issue on Jul 26, 2025
  3. added a commit that references this issue on Jul 28, 2025
  4. andre-silva9975 commented on Jul 29, 2025

    @andre-silva9975
    Author

    I was able to solve the problem by adding this line in the SRDF of the robot: <virtual_joint child_link="base_footprint" name="virtual_joint" parent_frame="map" type="floating"/>. It seems if the planning frame coming from the root of the robot model is different from the one we set in the octomap_frame, then the octomap generated won't be static. I believe this problem is related to this issue #3531.

  5. adricort commented on Aug 6, 2025

    @adricort

    This was insanely useful @andre-silva9975 , thank you so much, I also had the same problem and solved it by creating the virtual joint:

    <virtual_joint
    name="virtual_joint"
    type="floating"
    parent_frame="world"
    child_link="base_link"
    />

  6. added a commit that references this issue on Aug 12, 2025
  7. added a commit that references this issue on Aug 12, 2025
  8. added a commit that references this issue on Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions