Commit 69924896 authored by Carlos Mastalli's avatar Carlos Mastalli

[anymal] Added ANYmal b (this is now open-source and legally possible)

parent 238ddb1a
......@@ -6,7 +6,7 @@ Example robot URDFs
This repository includes a set of robot descriptions that are aimed to be used in benchmarking. These source files do not intend to substitute original their repositories.
**Authors:** [Carlos Mastalli](https://cmastalli.github.io/) <br />
**Authors:** [Carlos Mastalli](https://cmastalli.github.io/), Guilhem Saurel <br />
**With additional support from the Gepetto team at LAAS-CNRS.**
[![pipeline status](https://gepgitlab.laas.fr/gepetto/example-robot-data/badges/master/build.svg)](https://gepgitlab.laas.fr/Gepetto/example-robot-data/commits/master)
......@@ -40,6 +40,6 @@ If you have never added robotpkg as a softwares repository, please follow first
## Show the robot
(you will need pinocchio and its python bindings)
(you will need pinocchio and its Python bindings)
`python -m example_robot_data [hyq,talos,talos_arm,talos_legs,icub,solo,solo12,tiago,tiago_no_hand]`
`python -m example_robot_data [hyq,anymal,talos,talos_arm,talos_legs,icub,solo,solo12,tiago,tiago_no_hand]`
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" ?>
<robot name="anymal">
<group name="lf_leg">
<joint name="LF_HAA" />
<joint name="LF_HFE" />
<joint name="LF_KFE" />
<chain base_link="base" tip_link="LF_FOOT" />
</group>
<group name="lh_leg">
<joint name="LH_HAA" />
<joint name="LH_HFE" />
<joint name="LH_KFE" />
<chain base_link="base" tip_link="LH_FOOT" />
</group>
<group name="rf_leg">
<joint name="RF_HAA" />
<joint name="RF_HFE" />
<joint name="RF_KFE" />
<chain base_link="base" tip_link="RF_FOOT" />
</group>
<group name="rh_leg">
<joint name="RH_HAA" />
<joint name="RH_HFE" />
<joint name="RH_KFE" />
<chain base_link="base" tip_link="RH_FOOT" />
</group>
<group name="all_legs">
<group name="lf" />
<group name="rf" />
<group name="lh" />
<group name="rh" />
</group>
<group name="r_legs">
<group name="rf" />
<group name="rh" />
</group>
<group name="l_legs">
<group name="lf" />
<group name="lh" />
</group>
<group name="f_legs">
<group name="lf" />
<group name="rf" />
</group>
<group name="h_legs">
<group name="lh" />
<group name="rh" />
</group>
<group name="ld_legs">
<group name="lf" />
<group name="rh" />
</group>
<group name="rd_legs">
<group name="rf" />
<group name="lh" />
</group>
<end_effector name="lf_foot" parent_link="LF_FOOT" group="lf_leg" />
<end_effector name="rf_foot" parent_link="RF_FOOT" group="rf_leg" />
<end_effector name="lh_foot" parent_link="LH_FOOT" group="lh_leg" />
<end_effector name="rh_foot" parent_link="RH_FOOT" group="rh_leg" />
<group_state name="half_sitting" group="all_legs">
<joint name="root_joint" value="0. 0. 0.4792 0. 0. 0. 1." />
<joint name="LF_HAA" value="-0.1" />
<joint name="LF_HFE" value="0.7" />
<joint name="LF_KFE" value="-1." />
<joint name="RF_HAA" value="0.1" />
<joint name="RF_HFE" value="0.7" />
<joint name="RF_KFE" value="-1." />
<joint name="LH_HAA" value="-0.1" />
<joint name="LH_HFE" value="-0.7" />
<joint name="LH_KFE" value="1." />
<joint name="RH_HAA" value="0.1" />
<joint name="RH_HFE" value="-0.7" />
<joint name="RH_KFE" value="1." />
</group_state>
<disable_collisions link1="LF_HIP" link2="LF_THIGH" reason="Adjacent" />
<disable_collisions link1="LF_HIP" link2="LF_SHANK" reason="Never" />
<disable_collisions link1="LF_HIP" link2="LF_FOOT" reason="Never" />
<disable_collisions link1="LF_HIP" link2="RF_HIP" reason="Never" />
<disable_collisions link1="LF_HIP" link2="RF_THIGH" reason="Never" />
<disable_collisions link1="LF_HIP" link2="RF_SHANK" reason="Never" />
<disable_collisions link1="LF_HIP" link2="RF_FOOT" reason="Never" />
<disable_collisions link1="LF_HIP" link2="LH_HIP" reason="Never" />
<disable_collisions link1="LF_HIP" link2="LH_THIGH" reason="Never" />
<disable_collisions link1="LF_HIP" link2="LH_SHANK" reason="Never" />
<disable_collisions link1="LF_HIP" link2="LH_FOOT" reason="Never" />
<disable_collisions link1="LF_HIP" link2="RH_HIP" reason="Never" />
<disable_collisions link1="LF_HIP" link2="RH_THIGH" reason="Never" />
<disable_collisions link1="LF_HIP" link2="RH_SHANK" reason="Never" />
<disable_collisions link1="LF_HIP" link2="RH_FOOT" reason="Never" />
</robot>
from .robots_loader import (getModelPath, loadHyQ, loadICub, loadSolo, loadTalos, loadTalosArm, loadTalosLegs,
loadTiago, loadTiagoNoHand, loadUR, readParamsFromSrdf)
from .robots_loader import (getModelPath, loadANYmal, loadHyQ, loadICub, loadSolo, loadTalos, loadTalosArm,
loadTalosLegs, loadTiago, loadTiagoNoHand, loadUR, readParamsFromSrdf)
......@@ -2,13 +2,20 @@ from argparse import ArgumentParser
from . import robots_loader
ROBOTS = ['hyq', 'solo', 'solo12', 'talos', 'talos_arm', 'talos_legs', 'tiago', 'tiago_no_hand', 'icub', 'ur5']
ROBOTS = [
'anymal', 'hyq', 'solo', 'solo12', 'talos', 'talos_arm', 'talos_legs', 'tiago', 'tiago_no_hand', 'icub', 'ur5'
]
parser = ArgumentParser()
parser.add_argument('robot', nargs='?', default=ROBOTS[0], choices=ROBOTS)
args = parser.parse_args()
if args.robot == 'anymal':
anymal = robots_loader.loadANYmal()
anymal.initViewer(loadModel=True)
anymal.display(anymal.q0)
if args.robot == 'hyq':
hyq = robots_loader.loadHyQ()
hyq.initViewer(loadModel=True)
......
......@@ -45,6 +45,21 @@ def addFreeFlyerJointLimits(robot):
rmodel.lowerPositionLimit = lb
def loadANYmal():
URDF_FILENAME = "anymal.urdf"
URDF_SUBPATH = "/anymal_b_simple_description/robots/" + URDF_FILENAME
SRDF_FILENAME = "anymal.srdf"
SRDF_SUBPATH = "/anymal_b_simple_description/srdf/" + SRDF_FILENAME
modelPath = getModelPath(URDF_SUBPATH)
# Load URDF file
robot = RobotWrapper.BuildFromURDF(modelPath + URDF_SUBPATH, [modelPath], pinocchio.JointModelFreeFlyer())
# Load SRDF file
readParamsFromSrdf(robot, modelPath + SRDF_SUBPATH, False, False)
# Add the free-flyer joint limits
addFreeFlyerJointLimits(robot)
return robot
def loadTalosArm():
URDF_FILENAME = "talos_left_arm.urdf"
URDF_SUBPATH = "/talos_data/robots/" + URDF_FILENAME
......
......@@ -23,6 +23,12 @@ class RobotTestCase(unittest.TestCase):
self.assertTrue(hasattr(self.ROBOT, "q0"), "It doesn't have q0")
class ANYmalTest(RobotTestCase):
RobotTestCase.ROBOT = example_robot_data.loadANYmal()
RobotTestCase.NQ = 19
RobotTestCase.NV = 18
class HyQTest(RobotTestCase):
RobotTestCase.ROBOT = example_robot_data.loadHyQ()
RobotTestCase.NQ = 19
......@@ -91,8 +97,8 @@ class UR5Test(RobotTestCase):
if __name__ == '__main__':
test_classes_to_run = [
HyQTest, TalosTest, TalosArmTest, TalosArmFloatingTest, TalosLegsTest, ICubTest, SoloTest, Solo12Test,
TiagoTest, TiagoNoHandTest
ANYmalTest, HyQTest, TalosTest, TalosArmTest, TalosArmFloatingTest, TalosLegsTest, ICubTest, SoloTest,
Solo12Test, TiagoTest, TiagoNoHandTest
]
loader = unittest.TestLoader()
suites_list = []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment