|
Mujoco KDL Wrapper
0.5.1
MuJoCo + KDL bridge for robot kinematics and dynamics
|
#include <mj_kdl_wrapper.hpp>
Public Attributes | |
| std::string | path |
| std::string | prefix |
| AttachTarget | attach_to |
| double | pos [3] = { 0, 0, 0 } |
| double | quat [4] = { 0, 0, 0, 1 } |
| std::vector< AttachmentSpec > | attachments |
| std::vector< CtrlModeSpec > | modes = { CtrlModeSpec{} } |
One robot in a scene: a root MJCF (arm, mobile base, ...) with an ordered attachment chain and a placement target.
attachments is applied in order by build_scene(): each entry's attach_to may reference any body, site, or frame in the accumulated spec (root + all prior attachments). This naturally supports: fixed arm, arm+gripper, arm+mount+FT+ gripper, mobile base, mobile manipulator (base root, arm as first attachment), etc.
attach_to selects where the robot root is placed in the scene; the default is the worldbody. Set it to e.g. { AttachKind::Site, "table_mount" } to place the robot on a tabletop site exported by a prior scene object. pos/quat are offsets in the resolved parent frame.
path is the root MJCF passed to build_scene(). prefix must be unique per robot in multi-robot scenes.
modes lists the control modes the robot offers beyond the one its own actuators give (a <position> servo gives POSITION, a <motor> gives TORQUE); by default every robot also gets TORQUE. build_scene() adds one actuator per extra mode on each listed joint and puts each mode in its own actuator group, switched with set_control_mode(). These are the robot's own joints; an attachment's take modes through AttachmentSpec::modes. With no joint list, joints that cannot take modes are skipped. Actuator groups 1-30 are reserved for this: group 1 + 3 * owner + mode, where the owners are the robots in order and then every attachment with modes in order, ten at most. The robot's MJCF must not assign actuator groups itself.
Definition at line 178 of file mj_kdl_wrapper.hpp.
| AttachTarget mj_kdl::RobotSpec::attach_to |
Definition at line 182 of file mj_kdl_wrapper.hpp.
Referenced by TableSceneTest::SetUp(), and TEST().
| std::vector<AttachmentSpec> mj_kdl::RobotSpec::attachments |
Definition at line 185 of file mj_kdl_wrapper.hpp.
Referenced by main(), AttachedArmModesTest::SetUp(), MjcfFtSensorTest::SetUp(), MjcfGripperTest::SetUp(), MjcfPickTest::SetUp(), MjcfTrqCtrlTest::SetUp(), and TEST().
| std::vector<CtrlModeSpec> mj_kdl::RobotSpec::modes = { CtrlModeSpec{} } |
Definition at line 186 of file mj_kdl_wrapper.hpp.
Referenced by main(), JointEdgeCaseTest::SetUp(), MotorWheelModesTest::SetUp(), and TEST().
| std::string mj_kdl::RobotSpec::path |
Definition at line 180 of file mj_kdl_wrapper.hpp.
Referenced by main(), main(), ArmModesTest::SetUp(), AttachedArmModesTest::SetUp(), DualArmTest::SetUp(), JointEdgeCaseTest::SetUp(), MjcfFtSensorTest::SetUp(), MjcfGripperTest::SetUp(), MjcfLoadTest::SetUp(), MjcfPickTest::SetUp(), MjcfPosCtrlTest::SetUp(), MjcfTrqCtrlTest::SetUp(), MotorWheelModesTest::SetUp(), SceneStateTest::SetUp(), TableSceneTest::SetUp(), TEST(), TEST(), TEST(), and TEST().
| double mj_kdl::RobotSpec::pos[3] = { 0, 0, 0 } |
Definition at line 183 of file mj_kdl_wrapper.hpp.
Referenced by main(), main(), DualArmTest::SetUp(), TEST(), and TEST_P().
| std::string mj_kdl::RobotSpec::prefix |
Definition at line 181 of file mj_kdl_wrapper.hpp.
Referenced by main(), DualArmTest::SetUp(), and TEST_P().
| double mj_kdl::RobotSpec::quat[4] = { 0, 0, 0, 1 } |
Definition at line 184 of file mj_kdl_wrapper.hpp.
Referenced by main(), and DualArmTest::SetUp().