Rosanswers logo


I am trying to map an area with a 3D Lidar and Husky. I hope to build an Octomap of the area and use Moveit to plan movements of the UR5 to prevent collisions.

I am following the Husky UR5 Demo and Moveit Perception Tutorial.

I have added a Velodyne VLP-16 (velodyne_simulator from DataspeedInc) to the Husky Model in /opt/ros/indigo/share/husky_description/urdf/husky.urdf.xacro.

I notice that the octomap is displayed in rviz. However, when the Husky is moved, I see a duplicate of obstacles in the octomap (i.e. both the previous and current location). I believe I have set the octomap_frame = "odom".

So I tried octomap_server (roslaunch octomap_server octomap_mapping.launch) and displayed it in rviz (occupied_cells_vis_array). I have set frame_id = "odom" as well. This time, the octomap seems to update and the obstacles are fixed in place.

As such, I wonder if Moveit supports this, and if so, have I configured it incorrectly?

Edit: I have done some digging through the source code "occupancy_map_monitor.cpp" and found that the param octomap_frame is not used. It seems that map_frame_ had previously been set (I believe to /base_link). As I get this msg when launching moveit - Listening to '/velodyne_points' using message filter with target frame '/base_link'

Is there a way to make moveit use octomap_frame?

Thanks in advanced.

I am running on the following:

14.04.1-Ubuntu SMP

ROS Indigo

rviz version 1.11.19

Gazebo version 2.2.3

Moveit version 0.7.13-Alpha

Originally posted by jacoblim20 on ROS Answers with karma: 21 on 2018-10-28

Post score: 2

Original comments

Comment by gvdhoorn on 2018-10-29:
This could be an issue of the MoveIt octomap updater plugin: it only deletes voxels if it can raytrace through them to another occupied voxel that is "behind" the closer one (from the perspective of the sensor).

Comment by jacoblim20 on 2018-10-29:
Thanks gvdhoorn.

I looked at pointcloud_octomap_updater.cpp and noticed that when i run roslaunch husky_ur5_moveit_config husky_ur5_planning_execution.launch sim:=true

i get this msg Listening to '/velodyne_points' using message filter with target frame '/base_link' even if i set "odom"


1 Answer 1


Rosanswers logo

For your reference: https://github.com/ros-planning/moveit/issues/1188

UPDATE by @130s: I haven't verified. I don't even know if the problem persists in newer code base. Just copy-pasting the workaround the author from moveit#1188 verified:

I now understand that the planningscene frame is set to the root link in the URDF/SRDF by default. In my case, this caused the octomap to always update in the frame of my mobile robot. The solution was to add a virtual joint in my SRDF that connects the fixed frame (map) to the root link on my robot.

Originally posted by sdfryc with karma: 18 on 2019-02-26

This answer was ACCEPTED on the original site

Post score: 0


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.