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

How to add octomap.bt file as a collision object in MoveIt using Python

asked 2018-12-21 07:23:52 -0500

shyamashi gravatar image

updated 2019-01-05 11:52:21 -0500

Hello all, I am quite new to octomaps. Working on Ubuntu 16.04 and ROS kinetic. I am using the octomap_server package and have generated an octomap.bt file from a real scene obtained from kinect. I am able to visualize the octomap.bt file in Rviz when I run rosrun octomap_server octomap_server_node octomap.bt. I am trying to do obstacle avoidance using MoveIt planners for the franka emika's panda robot for which I run roslaunch panda_moveit_config demo.launch. I have checked the frame_ids and it's all correct. But the panda robot doesnt recognize octomap.bt file as collision objects. See pic. Also I followed the tutorial on MoveIt planning perception and added the parameters as mentioned.

I am using Python and not very familiar with C++. Can anyone suggest some way to add the octomap.bt file to planning scene in MoveIt and make it a collision object?

Thanks in advance

edit1: Picture: not detecting collision

edit 2: Temporary Workaround

  1. rosbag record /ceiling_camera/qhd/points --output-name=ceiling_cam_qhd_points # /ceiling_camera/qhd/points is my pointCloud topic in the file sensors_kinect_pointcloud.yaml as per instructions here
  2. python pointcloud_as_obstacle.py # saves the time filtered pointCloud2 into ceiling_camera_qhd_points_filtered.bag
  3. rosbag play -l --clock ceiling_camera_qhd_points_filtered.bag
  4. roslaunch panda_moveit_config demo_promp.launch

The python file and the launch file can be found here Rviz_MoveIt image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-12-24 20:00:51 -0500

I have been working on something similar and it seems like there is not a clear way to directly import an octomap into the planning scene. It seems like what you want to do is prepare your MoveIt config to accept sensor data (point clouds or depth maps - probably point clouds here?), then publish that data to the appropriate channel. MoveIt will then create an octomap by itself based on that data and the configuration.

The appropriate tutorial is here: http://docs.ros.org/kinetic/api/movei...

edit flag offensive delete link more

Comments

Thanks 4 d reply. This wud work if I connect my Kinect n provide a live feed. As u said d PointCloud topic is subscribed by move_group node and it does 'something' to get the octomap in Rviz planning scene. This wont work if I do a rosbag record of PointClouds n rosbag play -l --clock.

shyamashi gravatar image shyamashi  ( 2018-12-26 14:20:05 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2018-12-21 07:23:52 -0500

Seen: 1,458 times

Last updated: Jan 05 '19