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

Default wrist_tform_tool to identity #149

Closed
wants to merge 2 commits into from

Conversation

llee-bdai
Copy link
Collaborator

Turns out ArmCartesianCommand defaults wrist_tform_tool to be some approximately 20cm offset https://dev.bostondynamics.com/protos/bosdyn/api/proto_reference#armcartesiancommand-request

This PR sets the transform to be identity so that when you send a hand pose, it's commanding the wrist to the pose, and not wrist plus some unknown defaulted offset.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 11731269410

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 40.848%

Totals Coverage Status
Change from base Build 11486927459: 0.0%
Covered Lines: 1870
Relevant Lines: 4578

💛 - Coveralls

@@ -496,6 +496,10 @@ def hand_pose(

arm_cartesian_command = arm_command_pb2.ArmCartesianCommand.Request(
root_frame_name=ref_frame,
wrist_tform_tool=geometry_pb2.SE3Pose(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@llee-bdai Is this the function that you recently fixed? I am trying to figure out how much of a breaking change this is.

Copy link

@scastro-bdai scastro-bdai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that this function is called hand_pose but really sets the pose of the arm, and also is called in the arm_pose_cmd_callback of the SpotROS node...

how would you feel about

  1. Renaming this to set_arm_pose()
  2. Actually making this transform an argument of the function instead of hard-coding, but still defaulting it to identity?
  3. Making the above default arg an SE3 and converting it to the protobuf inside this function body?

Copy link
Collaborator

@scastro-bdai i am nervous that renaming from hand_pose() could be a breaking change to external users -- although there already was a breaking change to this function with #145 and there were no complaints 😅
To your third point, we unfortunately can't use spatialmath SE3 in this repo as it's not a dependency. I think a bosdyn SE3Pose could make sense as a default arg

@llee-bdai
Copy link
Collaborator Author

@amessing-bdai pulling you into comments here because wer're all talking about the same thing. To answer your question as to if this is the function I recently fixed, yes, in terms of fixing it by removing ROS1 dependencies and actually using it. This isn't a breaking change for anything internal, but it would be breaking externally, technically.

@scastro-bdai @khughes-bdai

  1. I am not opposed to changing the name. The only reason it is named what it is now is because it has been this way since being written. If we were to rename it, I would agree to set_arm_pose
  2. and 3. I would rather not make this an argument for now until we have a reason to make it an argument. We already have so many args into this function, I would hesitate to add more until we need it.

Copy link
Collaborator

Hmm, since we recently changed the signature already it's probably ok to further change it, but lets make sure this is the last change to the signature and not make this common practice.

Copy link
Collaborator Author

I am also perfectly fine not changing the signature because it's been named this for a while and just very clearly specifying in the function comments that it's to the wr1 link

Copy link
Collaborator

@jbarry-bdai jbarry-bdai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC the offset that it defaults to is the offset from the wrist to the center of the gripper, which is usually the "tool frame" people want.

I think this is probably not a desirable change especially this deep in the code in a repo that lots of people use...

@scastro-bdai
Copy link

IIRC the offset that it defaults to is the offset from the wrist to the center of the gripper, which is usually the "tool frame" people want.

I think this is probably not a desirable change especially this deep in the code in a repo that lots of people use...

I guess as a compromise, should we include the optional offset argument, and default it to the "sanctioned" tool frame?

Copy link
Collaborator

If you want to be explicitly commanding the wr1 link, it might make sense to make a new function called something like wrist_pose. This would eliminate any confusion with the pre-existing hand_pose function and make it clear that it's commanding a different link of the robot. thoughts?

Copy link
Collaborator Author

I'm cool with @khughes-bdai suggestion of adding a whole new wrist pose function. But also, if we add another function, I wouldn't mind just adding in all the extra params required to specify wrist to some offset pose

Copy link
Collaborator Author

On second thought, because this change ends up affecting a lot more than I expected, I am going to close this. Thanks for all the comments

@llee-bdai llee-bdai closed this Nov 9, 2024
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

Successfully merging this pull request may close these issues.

6 participants