-
Notifications
You must be signed in to change notification settings - Fork 402
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
WIP: Use anchors and aliases for each joint in controller config + cleanup #554
base: master
Are you sure you want to change the base?
WIP: Use anchors and aliases for each joint in controller config + cleanup #554
Conversation
For consistency with the rest of the config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking the effort diving into this. Please see my comments and if this is going to be merged, all controller files should be handled I think.
*joint1: {trajectory: 0.2, goal: 0.1} | ||
*joint2: {trajectory: 0.2, goal: 0.1} | ||
*joint3: {trajectory: 0.2, goal: 0.1} | ||
*joint4: {trajectory: 0.2, goal: 0.1} | ||
*joint5: {trajectory: 0.2, goal: 0.1} | ||
*joint6: {trajectory: 0.2, goal: 0.1} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure whether using anchors for this really improves things. Yes, it is less code duplication, but in my opinion this is also less readable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If someone uses the prefix below in their urdf:
<xacro:ur3_robot prefix="ur3_"/>
All the joints must be renamed, with anchors/aliases you only need to rename 6 joint names. Would something like this be better ?
*shoulder_pan_joint: {trajectory: 0.2, goal: 0.1}
*shoulder_lift_joint: {trajectory: 0.2, goal: 0.1}
*elbow_joint: {trajectory: 0.2, goal: 0.1}
*wrist_1_joint: {trajectory: 0.2, goal: 0.1}
*wrist_2_joint: {trajectory: 0.2, goal: 0.1}
*wrist_3_joint: {trajectory: 0.2, goal: 0.1}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have you considered using subst_value? I don't believe you'd need to manually rename anything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would work with the /my_controller/joints
because they are values, but I would need to remap the constraints
, gains
and velocity_ff
namespaces:
* /pos_joint_traj_controller/constraints/ur3_elbow_joint/goal: 0.1
* /pos_joint_traj_controller/constraints/ur3_elbow_joint/trajectory: 0.2
* /pos_joint_traj_controller/constraints/ur3_shoulder_lift_joint/goal: 0.1
* /pos_joint_traj_controller/constraints/ur3_shoulder_lift_joint/trajectory: 0.2
* /pos_joint_traj_controller/constraints/ur3_shoulder_pan_joint/goal: 0.1
* /pos_joint_traj_controller/constraints/ur3_shoulder_pan_joint/trajectory: 0.2
* /pos_joint_traj_controller/constraints/ur3_wrist_1_joint/goal: 0.1
* /pos_joint_traj_controller/constraints/ur3_wrist_1_joint/trajectory: 0.2
* /pos_joint_traj_controller/constraints/ur3_wrist_2_joint/goal: 0.1
* /pos_joint_traj_controller/constraints/ur3_wrist_2_joint/trajectory: 0.2
* /pos_joint_traj_controller/constraints/ur3_wrist_3_joint/goal: 0.1
* /pos_joint_traj_controller/constraints/ur3_wrist_3_joint/trajectory: 0.2
When adding new controllers I would have to remap the new controller namespace. With the anchors solution I don't have to bother, it scales well when adding new controllers. I may be missing something...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand what you write here.
But perhaps I also don't fully understand what you're trying to achieve.
Something to keep in mind: anchors et al. are not part of the YAML standard. They never made it past the draft/proposed state of YAML 1.1 (IIRC). |
This PR hasn't made any progress for quite some time and will be closed soon. Please comment if it is still relevant. |
I don't necessarily want to have this closed by a bot, hence commenting on this. |
This PR hasn't made any progress for quite some time and will be closed soon. Please comment if it is still relevant. |
This PR uses anchors and aliases on each robot joint and sets indentation level to 2 spaces (there were mixed indentation). This makes the following benefits:
prefix
to joint names is easier (less search and replace)Only did the changes for the UR3. If you think this change could be merged, I will modify the other UR config files.