xpp icon indicating copy to clipboard operation
xpp copied to clipboard

Adds xpp_anymal

Open ferrolho opened this issue 3 years ago • 5 comments

ANYbotics has (for some time now) made a description of ANYmal B available to the public. As such, I thought it would be appropriate to finally complete the XPP suite with the visualizer for ANYmal.

This PR will allow to visualize ANYmal in Rviz out-of-the-box, provided the robot description has been cloned/downloaded into the catkin workspace.

The PR should not be merged yet, as there are some glitches in the kinematics of the robot: Screenshot from 2020-07-20 14-32-39

The values that need to be reviewed are:

  • hfe_to_haa_z, length_thigh, and length_shank in anymalleg_inverse_kinematics.h
  • base2hip_LF_ in inverse_kinematics_anymal.h

The method GetJointAngles() in anymalleg_inverse_kinematics.cc needs to be modified too, as currrently it is specifically tailored to the Hyq robot.

Finally, a small modification will also have to be made in ethz-adrl/towr. We will need to add

<include file="$(find xpp_anymal)/launch/anymal.launch"></include>

to the launch file towr/towr_ros/launch/towr_ros.launch.

ferrolho avatar Jul 20 '20 13:07 ferrolho

Thanks for following up on this, yeah, i think that's a good idea. I'll see if I find time to look at this during the weekend.

My first thought is, in order to make this easily installable through ROS, we should copy the anymal_b_simple_description into xpp to make the whole code run with one sudo apt install ros-* command and you don't have to clone the description file from git separately in the right place. Of course giving proper attribution to the original repo and anybotics. Would this be okey @remod, @lisler? Or are you actually maybe planning on adding that repo to ROS sometime in the future? In that case we could just include it as a dependency.

awinkler avatar Jul 21 '20 03:07 awinkler

In my post above, I forgot to include a reminder to update the SRBD mass and inertia in towr/towr/include/towr/models/examples/anymal_model.h#L62-L68.

The values below are taken from a nominal configuration of the public model.

mass = 30.421396462
mass_matrix =   1.16485     -0.00137526   -0.00062895
               -0.00137526   2.21088      -0.000189223
               -0.00062895  -0.000189223   2.3175

I am not sure which specific joint configuration you (@awinkler) used to retrieve this information for the old model, so I used an arbitrary "nominal" configuration:

anim

ferrolho avatar Jul 21 '20 08:07 ferrolho

Thanks for following up on this, yeah, i think that's a good idea. I'll see if I find time to look at this during the weekend.

My first thought is, in order to make this easily installable through ROS, we should copy the anymal_b_simple_description into xpp to make the whole code run with one sudo apt install ros-* command and you don't have to clone the description file from git separately in the right place. Of course giving proper attribution to the original repo and anybotics. Would this be okey @remod, @lisler? Or are you actually maybe planning on adding that repo to ROS sometime in the future? In that case we could just include it as a dependency.

Hi @awinkler!

We do not have any plans to release a Debian package of the anymal_b_simple_description package. It is under BSD-3 license, so you can include it in your project if you want :)

remod avatar Jul 22 '20 11:07 remod

Thanks for that input Remo!🙂

awinkler avatar Jul 22 '20 15:07 awinkler

I added most of the elements above (see https://github.com/leggedrobotics/xpp/tree/anymal_integration) and also adapted the towr repo as you suggested (https://github.com/ethz-adrl/towr/tree/anymal_integration). Will merge once the IK is fixed.

I didn't have time to fix the inverse kinematics. As you said, this requires the correct values for the IK from the urdf file. It might even be neccessary to calculate e.g. the shin length by combining some of the values (as there is e.g. this offset of the knee to the rotational axis). But i still think the structure of the IK should be correct and also work in this case, just requires some digging into.

awinkler avatar Aug 01 '20 23:08 awinkler