Trouble of getting Octomap in MoveIt tutorial

asked 2019-10-31 09:43:19 -0500

yoo00 gravatar image

Hi,

I've been working on a perception pipeline tutorial in ROS Melodic on Ubuntu 18.04. Everything worked fine until I faced this issue; I can't see Octomap in rviz (which is supposed to be showing after launching the demo file as you can see from the above tutorial link). I used the raw code (I haven't changed anything) and I launched the demo using roslaunch moveit_tutorials obstacle_avoidance_demo.launch.

I realized that /move_group/filtered_cloud rostopic is not publishing anything and I guess that is why Octomap is not shown. In this tutorial, I noticed that world frame is not connected to any other frames in the tf tree (everything else is connected) but since Octomap and the sensor both relay on camera_rgb_optical_frame frame, I think it should be okay. I tried different combinations of frame names (e.g., odom, world) but none of them worked for me. I could've pulled an issue directly in MoveIt tutorial but the response there seems not fast enough and I strongly believe that it requires a simple fix to get things fine..

Hope someone could help me out. Thanks in advance!

Best,

--

The code I have is basically the same as the MoveIt tutorial but let me write down the necessary parts here for better understanding.

Firstly, the following is the console output after launching obstacle_avoidance_demo.launch:

SUMMARY
========

PARAMETERS
 * /joint_state_publisher/use_gui: False
 * /move_group/allow_trajectory_execution: True
 * /move_group/controller_list: [{'joints': ['pan...
 * /move_group/hand/planner_configs: ['SBLkConfigDefau...
 * /move_group/initial: [{'pose': 'ready'...
 * /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_fake_contr...
 * /move_group/moveit_manage_controllers: True
 * /move_group/octomap_frame: camera_rgb_optica...
 * /move_group/octomap_resolution: 0.05
 * /move_group/panda_arm/planner_configs: ['SBLkConfigDefau...
 * /move_group/panda_arm_hand/planner_configs: ['SBLkConfigDefau...
 * /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/FMTkConfigDefault/type: geometric::FMT
 * /move_group/planner_configs/KPIECEkConfigDefault/border_fraction: 0.9
 * /move_group/planner_configs/KPIECEkConfigDefault/failed_expansion_score_factor: 0.5
 * /move_group/planner_configs/KPIECEkConfigDefault/goal_bias: 0.05
 * /move_group/planner_configs/KPIECEkConfigDefault/min_valid_path_fraction: 0.5
 * /move_group/planner_configs/KPIECEkConfigDefault/range: 0.0
 * /move_group/planner_configs/KPIECEkConfigDefault/type: geometric::KPIECE
 * /move_group ...
(more)
edit retag flag offensive close merge delete

Comments

1

I meet the same problem. The frame settings have something wrong in tf2.

In obstacle_avoidance_demo.launch

<node pkg="tf2_ros" type="static_transform_publisher" name="to_temp_link" args="0 0.4 -0.6 0 0 0  temp_link panda_link0" />
<node pkg="tf2_ros" type="static_transform_publisher" name="to_panda_base" args="0 0 0 0 0.2 1.92 camera_rgb_optical_frame temp_link" />

These two lines are not correct, since tf2 removes multiple parent frames, and pand_link0 already has a parent world. You should inverse the parent-child relation:

<node pkg="tf2_ros" type="static_transform_publisher" name="to_temp_link" args="0 -0.4 0.6 0 0 0  panda_link0 temp_link" />
<node pkg="tf2_ros" type="static_transform_publisher" name="to_panda_base" args="0 0 0 0.1882209 0.0680271 -1.91357652 temp_link camera_rgb_optical_frame" />

But this just makes me see the right point clouds, I still cannot see the octomap

heinrich gravatar image heinrich  ( 2020-02-10 21:39:38 -0500 )edit

After I changed obstacle_avoidance_demo.launch as you say:

<node pkg="tf2_ros" type="static_transform_publisher" name="to_temp_link" args="0 -0.4 0.6 0 0 0 panda_link0 temp_link"/> 
<node pkg="tf2_ros" type="static_transform_publisher" name="to_panda_base" args="0 0 0 0.1882209 0.0680271 -1.91357652 temp_link camera_rgb_optical_frame"/>

I can see the right octomap ! you are right !

liyou117 gravatar image liyou117  ( 2020-04-09 17:19:36 -0500 )edit

@liyou117, please add your solution as an answer below and marked as solved.

askkvn gravatar image askkvn  ( 2020-04-28 07:43:01 -0500 )edit