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

How to set initial joint positions #21

Open
marc-wittwer opened this issue Jul 8, 2022 · 2 comments
Open

How to set initial joint positions #21

marc-wittwer opened this issue Jul 8, 2022 · 2 comments

Comments

@marc-wittwer
Copy link

marc-wittwer commented Jul 8, 2022

With the current joint position setup of the panda, the gripper is in collision with the arm.

I tried to enable collision checking also for the arm. However, the movegroup fails since the robot is already in self-collision at start time.

Which file do I have to edit to modify the initial joint positions?

I tried modifying the ros2_ws_v2/src/panda_ign_moveit2/panda_description/config/initial_joint_positions.yaml file without success...

Edit: After running the scripts xacro2urdf.sh and xacro2sdf.sh (/ros2_ws_v2/src/panda_ign_moveit2/panda_description/scripts) some files change. After building and sourcing the workspace, the initial position is still in collision.

Image: Gripper in self-collision
image

@AndrejOrsula
Copy link
Owner

Hello,
This is currently not included in this repository.
You could try looking at ros-controls/gz_ros2_control#27 (recommended), but I have not tested it yet. There is/was a way of setting initial states of the simulation for robot (including joint position), but it seemed overly complicated when I last looked into it and did not think it was worth adding. Otherwise, the initial joint configuration can also be set manually through the C++/Python API of Gazebo Sim at the beginning of your application.

@marc-wittwer
Copy link
Author

marc-wittwer commented Jul 8, 2022

Adding this line to the file /ros2_ws_v2/src/panda_ign_moveit2/panda_moveit_config/srdf/panda.srdf.xacro worked as a workaround:

  <disable_collisions link1="${prefix_arm}link5" link2="${prefix_gripper}hand" reason="Never"/>

Afterwards run the script: /ros2_ws_v2/src/panda_ign_moveit2/panda_moveit_config/scripts/xacro2srdf.bash

It basically disables collision checking of the currently colliding links: hand and link5

Thanks for the hint with setting the initial configuration via the gazebo API.

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