ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

octomap_frame in Moveit

asked 2018-10-28 21:44:25 -0600

jacoblim20 gravatar image

updated 2018-11-02 03:54:59 -0600

Hi,

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

edit retag flag offensive close merge delete

Comments

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).

gvdhoorn gravatar image gvdhoorn  ( 2018-10-29 03:15:43 -0600 )edit

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"

jacoblim20 gravatar image jacoblim20  ( 2018-10-29 20:34:52 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-02-26 18:42:48 -0600

sdfryc gravatar image

updated 2023-06-17 05:46:09 -0600

130s gravatar image

For your reference: https://github.com/ros-planning/movei...


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.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2018-10-28 21:44:25 -0600

Seen: 785 times

Last updated: Jun 17 '23