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 use SetupCollisionPair #1171

Open
k-okada opened this issue Jun 29, 2017 · 0 comments
Open

How to use SetupCollisionPair #1171

k-okada opened this issue Jun 29, 2017 · 0 comments

Comments

@k-okada
Copy link
Contributor

k-okada commented Jun 29, 2017

SetupCollisionPair is the tool to automatically calculate possible collision pair, you need three terminal to run.

$ rosrun openhrp3 start_omninames.sh
$ rosrun openhrp3 openhrp-model-loader 
$ SetupCollisionPair --model `rospack find hironx_ros_bridge`/models/kawada-hironx.dae 

This will takes several tens of minutes and get collision pair files

$ cat /tmp/HiroNXcollision_pair.conf
collision_pair: RARM_JOINT1:RARM_JOINT3 RARM_JOINT1:RARM_JOINT4 RARM_JOINT3:RARM_JOINT5 RARM_JOINT3:RHAND_JOINT0 RARM_JOINT4:RHAND_JOINT0 RARM_JOINT4:RHAND_JOINT1 RARM_JOINT4:RHAND_JOINT2 RARM_JOINT4:RHAND_JOINT3 RARM_JOINT5:RHAND_JOINT3 RHAND_JOINT0:RHAND_JOINT2 LARM_JOINT1:LARM_JOINT3 LARM_JOINT1:LARM_JOINT4 LARM_JOINT3:LARM_JOINT5 LARM_JOINT3:LHAND_JOINT2 LARM_JOINT4:LHAND_JOINT0 LARM_JOINT4:LHAND_JOINT1 LARM_JOINT4:LHAND_JOINT2 LARM_JOINT4:LHAND_JOINT3 LARM_JOINT5:LHAND_JOINT1 LHAND_JOINT0:LHAND_JOINT2 RHAND_JOINT3:LHAND_JOINT1 RHAND_JOINT3:LHAND_JOINT3 RHAND_JOINT1:LHAND_JOINT3 RHAND_JOINT1:LHAND_JOINT1 RHAND_JOINT0:LHAND_JOINT3 RHAND_JOINT2:LHAND_JOINT3 RHAND_JOINT2:LHAND_JOINT1 RHAND_JOINT3:LHAND_JOINT0 RHAND_JOINT3:LHAND_JOINT2 RHAND_JOINT1:LHAND_JOINT2 RHAND_JOINT1:LHAND_JOINT0 RHAND_JOINT0:LHAND_JOINT1 RHAND_JOINT1:LARM_JOINT5 RARM_JOINT5:LHAND_JOINT1 RARM_JOINT5:LHAND_JOINT3 RHAND_JOINT3:LARM_JOINT5 RHAND_JOINT2:LHAND_JOINT2 RHAND_JOINT0:LHAND_JOINT2 RHAND_JOINT0:LHAND_JOINT0 RHAND_JOINT2:LHAND_JOINT0 RARM_JOINT5:LHAND_JOINT2 RHAND_JOINT1:LARM_JOINT4 RHAND_JOINT0:LARM_JOINT5 RHAND_JOINT2:LARM_JOINT5 RARM_JOINT4:LHAND_JOINT1 RARM_JOINT4:LHAND_JOINT3 RHAND_JOINT3:LARM_JOINT4 RARM_JOINT5:LHAND_JOINT0 RHAND_JOINT2:LARM_JOINT4 RHAND_JOINT0:LARM_JOINT4 RHAND_JOINT3:LARM_JOINT3 RARM_JOINT3:LHAND_JOINT1 RARM_JOINT3:LHAND_JOINT3 RARM_JOINT5:LARM_JOINT5 RARM_JOINT4:LHAND_JOINT2 RARM_JOINT4:LHAND_JOINT0 RHAND_JOINT1:LARM_JOINT3 RARM_JOINT3:LHAND_JOINT2 RHAND_JOINT3:LARM_JOINT2 RHAND_JOINT0:LARM_JOINT3 RARM_JOINT2:LHAND_JOINT3 RARM_JOINT2:LHAND_JOINT1 RARM_JOINT5:LARM_JOINT4 RARM_JOINT4:LARM_JOINT5 RARM_JOINT3:LHAND_JOINT0 RHAND_JOINT1:LARM_JOINT2 RHAND_JOINT2:LARM_JOINT3 HEAD_JOINT1:RHAND_JOINT3 HEAD_JOINT1:RHAND_JOINT1 RARM_JOINT4:LARM_JOINT4 RARM_JOINT3:LARM_JOINT5 RHAND_JOINT1:LARM_JOINT1 HEAD_JOINT1:LHAND_JOINT1 HEAD_JOINT1:LHAND_JOINT3 RARM_JOINT5:LARM_JOINT3 RHAND_JOINT3:LARM_JOINT1 RARM_JOINT1:LHAND_JOINT1 RHAND_JOINT0:LARM_JOINT2 RARM_JOINT1:LHAND_JOINT3 RARM_JOINT2:LHAND_JOINT2 RARM_JOINT2:LHAND_JOINT0 RHAND_JOINT2:LARM_JOINT2 RHAND_JOINT0:LARM_JOINT1 RARM_JOINT1:LHAND_JOINT0 RARM_JOINT2:LARM_JOINT5 RHAND_JOINT2:LARM_JOINT1 RARM_JOINT5:LARM_JOINT2 RARM_JOINT3:LARM_JOINT4 RARM_JOINT4:LARM_JOINT3 RARM_JOINT1:LHAND_JOINT2 HEAD_JOINT1:RHAND_JOINT2 HEAD_JOINT1:RHAND_JOINT0 HEAD_JOINT1:LHAND_JOINT0 HEAD_JOINT1:LHAND_JOINT2 HEAD_JOINT1:RARM_JOINT5 WAIST:LHAND_JOINT1 RARM_JOINT2:LARM_JOINT4 RARM_JOINT1:LARM_JOINT5 RARM_JOINT3:LARM_JOINT3 WAIST:RHAND_JOINT3 WAIST:LHAND_JOINT3 WAIST:RHAND_JOINT1 HEAD_JOINT1:LARM_JOINT5 RARM_JOINT5:LARM_JOINT1 RARM_JOINT4:LARM_JOINT2 CHEST_JOINT0:RHAND_JOINT1 CHEST_JOINT0:RHAND_JOINT3 WAIST:LHAND_JOINT0 RARM_JOINT4:LARM_JOINT1 CHEST_JOINT0:LHAND_JOINT1 CHEST_JOINT0:LHAND_JOINT3 WAIST:LHAND_JOINT2 RARM_JOINT3:LARM_JOINT2 RARM_JOINT1:LARM_JOINT4 WAIST:RHAND_JOINT0 HEAD_JOINT1:LARM_JOINT4 WAIST:RHAND_JOINT2 HEAD_JOINT1:RARM_JOINT4 RARM_JOINT2:LARM_JOINT3 CHEST_JOINT0:RHAND_JOINT2 LARM_JOINT0:LHAND_JOINT3 CHEST_JOINT0:LHAND_JOINT0 RARM_JOINT0:RHAND_JOINT3 RARM_JOINT0:RHAND_JOINT1 CHEST_JOINT0:RHAND_JOINT0 WAIST:RARM_JOINT5 CHEST_JOINT0:LHAND_JOINT2 LARM_JOINT0:LHAND_JOINT1 HEAD_JOINT1:LARM_JOINT3 RARM_JOINT1:LARM_JOINT3 RARM_JOINT3:LARM_JOINT1 HEAD_JOINT1:RARM_JOINT3 RARM_JOINT2:LARM_JOINT2 WAIST:LARM_JOINT5 LARM_JOINT1:LHAND_JOINT1 LARM_JOINT1:LHAND_JOINT3 CHEST_JOINT0:RARM_JOINT5 WAIST:RARM_JOINT4 WAIST:LARM_JOINT4 RARM_JOINT0:RHAND_JOINT2 RARM_JOINT1:RHAND_JOINT1 RARM_JOINT1:RHAND_JOINT3 HEAD_JOINT1:LARM_JOINT2 RARM_JOINT0:RHAND_JOINT0 RARM_JOINT1:LARM_JOINT2 HEAD_JOINT1:RARM_JOINT2 RARM_JOINT2:LARM_JOINT1 LARM_JOINT0:LHAND_JOINT0 LARM_JOINT0:LHAND_JOINT2 CHEST_JOINT0:LARM_JOINT5 LARM_JOINT2:LHAND_JOINT3 LARM_JOINT1:LHAND_JOINT0 LARM_JOINT2:LHAND_JOINT1 LARM_JOINT0:LARM_JOINT5 LARM_JOINT1:LHAND_JOINT2 RARM_JOINT2:RHAND_JOINT1 HEAD_JOINT1:RARM_JOINT1 HEAD_JOINT1:LARM_JOINT1 HEAD_JOINT0:LARM_JOINT2 RARM_JOINT0:RARM_JOINT5 HEAD_JOINT0:RARM_JOINT2 CHEST_JOINT0:LARM_JOINT4 RARM_JOINT1:RHAND_JOINT0 RARM_JOINT1:RHAND_JOINT2 RARM_JOINT1:LARM_JOINT1 CHEST_JOINT0:RARM_JOINT4 RARM_JOINT2:RHAND_JOINT3 WAIST:LARM_JOINT3 WAIST:RARM_JOINT3 WAIST:RARM_JOINT2 LARM_JOINT0:LARM_JOINT4 LARM_JOINT3:LHAND_JOINT3 LARM_JOINT3:LHAND_JOINT1 LARM_JOINT2:LHAND_JOINT2 WAIST:LARM_JOINT2 LARM_JOINT2:LHAND_JOINT0 LARM_JOINT1:LARM_JOINT5 CHEST_JOINT0:LARM_JOINT3 HEAD_JOINT1:RARM_JOINT0 CHEST_JOINT0:RARM_JOINT3 RARM_JOINT3:RHAND_JOINT3 RARM_JOINT3:RHAND_JOINT1 RARM_JOINT2:RHAND_JOINT2 RARM_JOINT2:RHAND_JOINT0 HEAD_JOINT1:LARM_JOINT0 RARM_JOINT1:RARM_JOINT5 RARM_JOINT0:RARM_JOINT4 LARM_JOINT1:LARM_JOINT4 LARM_JOINT4:LHAND_JOINT3 LARM_JOINT4:LHAND_JOINT1 RARM_JOINT4:RHAND_JOINT3 LARM_JOINT3:LHAND_JOINT2 RARM_JOINT4:RHAND_JOINT1 RARM_JOINT3:RHAND_JOINT0 RARM_JOINT1:RARM_JOINT4 LARM_JOINT3:LARM_JOINT5 RARM_JOINT4:RHAND_JOINT2 RARM_JOINT4:RHAND_JOINT0 LARM_JOINT4:LHAND_JOINT0 LARM_JOINT4:LHAND_JOINT2 RARM_JOINT3:RARM_JOINT5 LARM_JOINT5:LHAND_JOINT1 RARM_JOINT1:RARM_JOINT3 RARM_JOINT5:RHAND_JOINT3 LARM_JOINT1:LARM_JOINT3

you can copy and paste this file to hironx_ ros_bridge/conf/conf.in and run catkin bt --start-with-this -vi to re-generate kawada-hironx.conf

If you successfully reconfigure files, you'll see following message when you start hironx_startup.launch

[co] prop[collision_pair] ->RARM_JOINT1:RARM_JOINT3 RARM_JOINT1:RARM_JOINT4 RARM_JOINT3:RARM_JOINT5 RARM_JOINT3:RHAND_JOINT0 RARM_JOINT4:RHAND_JOINT0 RARM_JOINT4:RHAND_JOINT1 RARM_JOINT4:RHAND_......
[co] check collisions between RARM_JOINT1 and RARM_JOINT3
[co] check collisions between RARM_JOINT1 and RARM_JOINT4
[co] check collisions between RARM_JOINT3 and RARM_JOINT5
[co] check collisions between RARM_JOINT3 and RHAND_JOINT0
[co] check collisions between RARM_JOINT4 and RHAND_JOINT0
[co] check collisions between RARM_JOINT4 and RHAND_JOINT1

if you run openhrp3, you'll see

[rosrun] You have chosen a non-unique executable, please pick one of the following:
1) /opt/ros/indigo/lib/openhrp3/openhrp-model-loader
2) /opt/ros/indigo/share/openhrp3/openhrp-model-loader

there are same file so you can choose either of them.

Cc: @YoheiKakiuchi @yswhynot

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

1 participant