WIP: Use anchors and aliases for each joint in controller config + cleanup#554
WIP: Use anchors and aliases for each joint in controller config + cleanup#554captain-yoshi wants to merge 3 commits into
Conversation
For consistency with the rest of the config.
fmauch
left a comment
There was a problem hiding this comment.
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.
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.
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.
have you considered using subst_value? I don't believe you'd need to manually rename anything.
There was a problem hiding this comment.
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.2When 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.
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:
prefixto 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.