DFKI-NI / grasplan

Grasplan: Simple grasp planning for robots
MIT License
1 stars 2 forks source link

Use interactive markers to change the pose of objects in a planning scene #26

Open jarkenau opened 4 months ago

jarkenau commented 4 months ago

To reduce the time needed to create a planning scene, the use of interactive markers would be nice. I already started, with the current state looking like this:

image

It still has to be integrated into the rqt gui

oscar-lima commented 4 months ago

after a lot of trial and error, here are some steps that worked for me to edit planning scene files on rviz using moveit plugin and interactive markers:

1) assuming you have saved a planning scene locally on your PC 2) do roslaunch mobipick_moveit_config demo.launch 3) click on "Scene Objects" tab, then click on "Import" 4) click on an object name within the "Current Scene Objects" rviz qt window to select an object, e.g. table_1 5) interactive markers should now show

jarkenau commented 4 months ago

I think I found the issue. The default MoveIt! planning frame is mobipick/base_footprint. The simulation provides a mobipick_odom -> mobipick/base_footprint frame from the ekf_localization. I assume the Motion Planning plugin for RViZ has a tf_buffer to store the tf once it get's published, allowing to kill the simulation afterwards.

import rospy
from moveit_commander import RobotCommander

rospy.init_node('get_planning_frame')
robot = RobotCommander()

planning_frame = robot.get_planning_frame()
print("Planning frame:", planning_frame)

prints mobipick/base_footprint

A quick fix is to publish a static transform to base_footprint.

 <node pkg="tf2_ros" type="static_transform_publisher" name="static_transform_publisher" args="0 0 0 0 0 0 map mobipick/base_footprint" />    

Or maybe it would be useful to change the planning frame?

mintar commented 4 months ago

It's interesting that the planning frame is mobipick/base_footprint; I would have assumed that it's map (as I wrote in this comment). But calling robot.get_planning_frame() is exactly the right way to find out, so that's that.

Anyway, if the planning frame is mobipick/base_footprint, then why do you need a map -> mobipick/base_footprint transform? Because map is the global frame in RViz?