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

Merge with spot_arm urdf from spot_ros2 #144

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

EceChaik
Copy link

@EceChaik EceChaik commented Sep 21, 2023

IMG_20230921_100734

With the spot in the configuration seen in the above image, what follows is the visualization in rviz, with the current spot_arm urdf:

1695283940184

This pull request replaces the arm urdf with the one from the spot_ros2 repo. The resulting visualization in rviz for the same configuration is seen below:
IMG_20230921_100739

Note the hand frame, which is published by Boston Dynamics and how in the new urdf it is aligned with the robot end-effector.

Fixes #143

@heuristicus
Copy link
Owner

Thanks for this. Are the tf frames generated by the new URDF different to those in the existing version?

@EceChaik
Copy link
Author

Good point, I made sure to change the joint names such that they stay the same, but not the links.
So the frames in this will be of different convention, e.g. arm_link_sh0 for the first part of the shoulder, instead of link1

@heuristicus
Copy link
Owner

I think it is probably good to match names with the ros2 repo but it might mean that people using this one will have to change stuff in their code, which is why I ask.

@EceChaik
Copy link
Author

I understand. I leave this up to you guys entirely, I mostly made this because I wanted to see if other people had issues with this urdf for the arm, such as the one in the images I've attached.

@heuristicus
Copy link
Owner

It definitely makes sense to make the switch, since clearly there is an issue with the previous version, but I will need to make an announcement to make sure people know what frames have changed. I think synchronising the frame names with the ros2 version makes sense since people will need to switch over to that eventually and making sure the urdf is the same would likely make things easier.

@heuristicus
Copy link
Owner

heuristicus commented Sep 28, 2023

I've updated the joint names to correspond to the spot_ros2 names (which come from the BD names), and updated the "friendly joint names" to convert to these values.

Original New Action
joint1 arm_sh0 Rotate shoulder
joint2 arm_sh1 Swing shoulder
joint3 arm_el0 Swing elbow
joint4 arm_el1 Rotate elbow
joint5 arm_wr0 Swing wrist
joint6 arm_wr1 Rotate wrist
gripper arm_f1x Open/close gripper

@EceChaik could you please check that the live joint update works correctly with these changes?

@EceChaik
Copy link
Author

Will check, though it might be next week, due to travelling for IROS

@EceChaik
Copy link
Author

I just had to do the above commit, cause the wr0 name was written as wr1.
I can confirm it works fine on the spot robot.

P.S. The only reason I had changed the mass value of the virtual fixed joint 'hr0' to 1e-3 from 1e-6, was for people who might wanna use it for simulation in Gazebo. There, a link of mass as low as 1e-6 will be skipped.

@heuristicus
Copy link
Owner

Great, thank you for confirming. I don't use gazebo so wasn't aware of that requirement. Did you need to use the virtual joint for anything that you were doing? If so I should probably change the mass back.

@EceChaik
Copy link
Author

This repo is not made for simulation so I don't think it matters. On the other hand, the mass value won't affect anything people do with the real robot using this repo, so I guess reverting to 1e-3 is the solution that covers all users.

@trangml-mit
Copy link

Could this be merged into master at this point @heuristicus? The improved arm simulation would be very beneficial to my groups research

@heuristicus
Copy link
Owner

I can merge this but any existing code that relied on specific frames being related to the arm will not function, as per the table above.

Have you tested this for your purposes?

@trangml-mit
Copy link

trangml-mit commented Dec 6, 2023

After some more testing, I've noticed that when using arm ROS service calls with this version of the code, the calls involving the gripper have success False and some error exception printed.

$ rosservice call /spot/gripper_close
success: False
message: "Exception occured while gripper was moving: gripper_command_feedback"

Interestingly, at least some of the commands actually do get executed by the arm and work. The gripper does open and close when these are called.

Additionally arm stow, unstow, and carry seem to be working

$ rosservice call /spot/arm_unstow
success: True
message: "Unstow arm success"

Is this due to the change in the arm frames?

@heuristicus
Copy link
Owner

I can't say whether the arm frame change is the cause. I don't think there is anything that specifically references the arm frames in the gripper command. It's possible that this is related to the spot wrapper in this repo being behind. I've never had access to a robot with an arm so haven't been able to verify the functionality myself.

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.

Spot Arm URDF appears to be faulty
3 participants