Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jarkenau opened this issue May 2, 2024 · 3 comments
Assignees

Comments

@jarkenau
Copy link
Member

jarkenau commented May 2, 2024

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

@jarkenau jarkenau self-assigned this May 2, 2024
@oscar-lima
Copy link
Collaborator

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
Copy link
Member Author

jarkenau commented May 6, 2024

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
Copy link
Member

mintar commented May 7, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants