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

Can't display occupied voxels octomap using pointcloud2

asked 2018-06-22 12:00:02 -0500

nisur gravatar image

updated 2018-07-16 13:37:00 -0500

Fairly new to this so let me know if there's a better way of doing things!

I'm attempting dynamic collision avoidance with a Kinect V1 and the ur5 moveit package on ROS kinetic. The PC is running Ubuntu 16.04 and i have the following packages installed:

  • camera_pose
  • octomap_mapping
  • octomap_ros
  • OpenNI
  • openni_camera
  • perception_pcl
  • robotiq
  • trac_ik
  • universal_robot
  • ur_modern_driver
  • ur_scripts

I've been following the ROS tutorial on perception/configuration (link below) in an effort to have moveit process the point cloud into an octomap and display the occupied voxels:

And am also aware of this other thread which is extremely similar, however i wasn't able to achieve a working result using just the information here:

I have Openni working so can visualise the pointcloud2 okay in moveit and have completed all the steps in the above, including altering the sensor_manager.launch.yaml files. However when i echo the planning scene topic, /move_group/monitored_planning_scene, i am getting nothing. This is despite trying a number of static transform publishers to arrange everything with respect to /world (I would post images of my tf trees but i dont have enough karma).

The moveit! config files used can be found at: ( )

As requested, the terminal log when i launch ur5 planning:

nvidia@tegra-ubuntu:~/catkin_ws$ roslaunch ur5_moveit_config ur5_moveit_planning_execution.launch sim:=true limited:=true
... logging to /home/nvidia/.ros/log/6ae42ada-891a-11e8-b1d3-62c9d7ce9d78/roslaunch-tegra-ubuntu-7323.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://tegra-ubuntu:38298/


 * /move_group/Manipulator/longest_valid_segment_fraction: 0.005
 * /move_group/Manipulator/planner_configs: ['SBLkConfigDefau...
 * /move_group/Manipulator/projection_evaluator: joints(shoulder_p...
 * /move_group/allow_trajectory_execution: True
 * /move_group/controller_list: [{'action_ns': 'f...
 * /move_group/jiggle_fraction: 0.05
 * /move_group/max_range: 5.0
 * /move_group/max_safe_path_cost: 1
 * /move_group/moveit_controller_manager: moveit_simple_con...
 * /move_group/moveit_manage_controllers: True
 * /move_group/octomap_resolution: 0.025
 * /move_group/planner_configs/BFMTkConfigDefault/balanced: 0
 * /move_group/planner_configs/BFMTkConfigDefault/cache_cc: 1
 * /move_group/planner_configs/BFMTkConfigDefault/extended_fmt: 1
 * /move_group/planner_configs/BFMTkConfigDefault/heuristics: 1
 * /move_group/planner_configs/BFMTkConfigDefault/nearest_k: 1
 * /move_group/planner_configs/BFMTkConfigDefault/num_samples: 1000
 * /move_group/planner_configs/BFMTkConfigDefault/optimality: 1
 * /move_group/planner_configs/BFMTkConfigDefault/radius_multiplier: 1.0
 * /move_group/planner_configs/BFMTkConfigDefault/type: geometric::BFMT
 * /move_group/planner_configs/BKPIECEkConfigDefault/border_fraction: 0.9
 * /move_group/planner_configs/BKPIECEkConfigDefault/failed_expansion_score_factor: 0.5
 * /move_group/planner_configs/BKPIECEkConfigDefault/min_valid_path_fraction: 0.5
 * /move_group/planner_configs/BKPIECEkConfigDefault/range: 0.0
 * /move_group/planner_configs/BKPIECEkConfigDefault/type: geometric::BKPIECE
 * /move_group/planner_configs/BiESTkConfigDefault/range: 0.0
 * /move_group/planner_configs/BiESTkConfigDefault/type: geometric::BiEST
 * /move_group/planner_configs/BiTRRTkConfigDefault/cost_threshold: 1e300
 * /move_group/planner_configs/BiTRRTkConfigDefault/frountier_node_ratio: 0.1
 * /move_group/planner_configs/BiTRRTkConfigDefault/frountier_threshold: 0.0
 * /move_group/planner_configs/BiTRRTkConfigDefault/init_temperature: 100
 * /move_group/planner_configs/BiTRRTkConfigDefault/range: 0.0
 * /move_group/planner_configs/BiTRRTkConfigDefault/temp_change_factor: 0.1
 * /move_group/planner_configs/BiTRRTkConfigDefault/type: geometric::BiTRRT
 * /move_group/planner_configs/ESTkConfigDefault/goal_bias: 0.05
 * /move_group/planner_configs/ESTkConfigDefault/range: 0.0
 * /move_group/planner_configs/ESTkConfigDefault/type: geometric::EST
 * /move_group/planner_configs/FMTkConfigDefault/cache_cc: 1
 * /move_group/planner_configs/FMTkConfigDefault/extended_fmt: 1
 * /move_group/planner_configs/FMTkConfigDefault/heuristics: 0
 * /move_group/planner_configs/FMTkConfigDefault/nearest_k: 1
 * /move_group/planner_configs/FMTkConfigDefault/num_samples: 1000
 * /move_group/planner_configs/FMTkConfigDefault/radius_multiplier: 1.1
 * /move_group/planner_configs ...
edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted

answered 2018-08-05 03:54:43 -0500

nisur gravatar image

Hi, I finally managed to get this fixed, thanks a lot @Thadeu Brito and @aaditya_saraiya for your input. The problem turned out to be something to do with my tf static transform publisher.

Running the transform from the shell, i.e. something like...

rosrun tf static_transform_publisher 1.0 0.0 0.0 0.0 0.0 0.0 1.0 world camera_frame 100

appeared to work fine when i checked rosrun tf view_frames. For some reason though, it didn't communicate properly with the octomap generator regardless of the transform parameters, frame parameters or the 'rate' parameter (100 in the above code). Echoing the move_group/monitored_planning_scene node proved that no info was being published.

As a last resort bit of trial and error I had a go at publishing the transform as part of the launch file, more like...

<node pkg="tf" type="static_transform_publisher" name="link1_broadcaster" args="1 0 0 0 0 0 1 world camera_frame 100" />

and this worked just fine. Not sure why this might be as both ways of doing it look identical? Anyway, this ticket is resolved. Thanks again,


edit flag offensive delete link more

answered 2018-07-20 15:33:29 -0500

updated 2018-07-20 15:34:04 -0500


I just checked your files. I think you have a one specific issue.

  1. Your sensor_manager.launch does not load the sensor_config.yaml file. You can have a look at this file for reference.

Overall, you can check with this folder for reference, as I do have a working Octomap being updated with point clouds.

edit flag offensive delete link more

answered 2018-07-16 10:06:07 -0500

Thadeu Brito gravatar image

Hi @nisur, please post the terminal log message. I guess the problem is the configuration in the YAML file.

edit flag offensive delete link more


Hi Thadeu. As requested i've inserted the code from launching planning/rviz and have included a link to my github page where the moveit_config is hosted. Thanks for your help, let me know if you need any more info

nisur gravatar image nisur  ( 2018-07-16 13:38:55 -0500 )edit

Ok, let me see the tree of frames. With the Kinect too.

Thadeu Brito gravatar image Thadeu Brito  ( 2018-07-16 13:48:44 -0500 )edit

@Thadeu Brito please don't use an answer to leave a comment. This isn't a forum. You can use the "add a comment" button to leave a comment.

jayess gravatar image jayess  ( 2018-07-20 16:51:10 -0500 )edit

answered 2019-06-24 03:06:52 -0500

vk gravatar image

hey, I am new to ros and also trying to have a demo setup on ur5 and Kinect avoiding obstacles. Can anyone help me in this . Advising me Some steps to follow.

Thanks in advance.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2018-06-22 12:00:02 -0500

Seen: 626 times

Last updated: Aug 05 '18