# Can't display occupied voxels octomap using pointcloud2

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: http://docs.ros.org/kinetic/api/movei...

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: https://answers.ros.org/question/1957...

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: ( https://github.com/nis-ur/ur_kinect_m... )

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
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/

SUMMARY
========

PARAMETERS
* /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/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 ...
edit retag close merge delete

Sort by » oldest newest most voted

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

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


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,

Nick

more

Hey!

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.

more

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

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

( 2018-07-16 13:38:55 -0600 )edit
1

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

( 2018-07-16 13:48:44 -0600 )edit

( 2018-07-20 16:51:10 -0600 )edit

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.

more