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

Understand end effector setup #1694

Closed
rickstaa opened this issue Oct 16, 2019 · 2 comments
Closed

Understand end effector setup #1694

rickstaa opened this issue Oct 16, 2019 · 2 comments

Comments

@rickstaa
Copy link
Contributor

rickstaa commented Oct 16, 2019

Description

In order to control the gripper of the panda_emika_franka robot, I added an extra virtual link to my the robot srdf and urdf files (See /rickstaa/panda_moveit_config/tree/melodic-devel-panda_autograsp and /rickstaa/franka_ros/tree/melodic-devel-panda_autograsp). This will create the following model:

image

When trying to control the robot however, I noticed that the panda_gripper_center is not automatically set as the end effector of the panda_arm move group. As a result I have to set it using the self.moveit_commander.robot.get_group("panda_arm").set_end_effector_link("panda_gripper_center". After playing around with the moveit_setup_assistant` I came to the following conclusions about using end effectors. Please correct me if I'm wrong.

My conclusion:

  1. An end effector can only be set for a move group that consists of a chain of links.
  2. When in your srdf you set a link as an end effector that is part of the move group itself it gets is set as the end effector by the moveit_commander.
  3. When in the srdf you set a link as the end effector that is not part of the move_group but part of a move_group higher in the chain it is not automatically set. You can, however, control it with the specified link as the end effector after setting it manually in the code using the self.move_group.set_end_effector_link("<YOUR_SPECIFIED_EEF_LINK>").
  4. For move groups containing only links and or joints, you can not set and thus plan w.r.t. an end effector.

Your environment

  • ROS Distro: Melodic
  • OS Version: ubuntu 18.03
  • Source: v1.0.2

Steps to reproduce

import rospy
import moveit_commander
import sys

# Init service node
rospy.init_node("moveit_planner_server")

# initialize moveit_commander and robot commander
moveit_commander.roscpp_initialize(sys.argv)

# Get robot commander
robot = moveit_commander.RobotCommander(robot_description="robot_description", ns="/")

# Get move_group
move_group = robot.get_group("panda_arm")
print(move_group.get_end_effector_link())
move_group.set_end_effector_link("panda_gripper_center")
print(move_group.get_end_effector_link())

Expected behaviour

For the panda_arm group the panda_gripper_center joint should be set as the end effector. Thus manually setting it using `move_group.set_end_effector_link("panda_gripper_center") is not needed.

Actual behaviour

For the panda_arm group the panda_gripper_center link is not set as the end effector (see print statement 1). I therefore need to manually set it using move_group.set_end_effector_link("panda_gripper_center"). After this is done, the end effector is set to be the panda_gripper_center(see print statement 2). Further, I can now successfully control the robot w.r.t. thepanda_gripepr_center`.

Backtrace or Console output

@rhaschke
Copy link
Contributor

  1. An end effector can only be set for a move group that consists of a chain of links.

That's true: Currently the MoveGroupInterface doesn't support Cartesian targets for kinematic trees that have several tips, because we can only set a single PoseTarget.

  1. When in the srdf you set a link as the end effector that is not part of the move_group but part of a move_group higher in the chain it is not automatically set.

The end-effector link should usually be part of the group you are controlling (and if not, it should be rigidly connected to it). If the group is a chain, the end effector link is set automatically to the last link of the chain.

You can, however, control it with the specified link as the end effector after setting it manually in the code using the self.move_group.set_end_effector_link("<YOUR_SPECIFIED_EEF_LINK>").

That's the expected behavior.

If you want panda_gripper_center to become your end effector link by default, you should extend the chain up to this link.

@rickstaa
Copy link
Contributor Author

@rhaschke Thanks a lot for elaborating on my observations. I now have a clear understanding of the moveit_commander.

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

2 participants