File tree Expand file tree Collapse file tree 13 files changed +127
-0
lines changed
Expand file tree Collapse file tree 13 files changed +127
-0
lines changed Original file line number Diff line number Diff line change 1+ cmake_minimum_required (VERSION 3.22 )
2+
3+ project (env_mj_description VERSION 1.0.0)
4+ option (HONOR_INSTALL_PREFIX "Whether to install in CMAKE_INSTALL_PREFIX (for nix)" OFF )
5+
6+ if (HONOR_INSTALL_PREFIX)
7+ set (MC_MUJOCO_SHARE_DESTINATION "${CMAKE_INSTALL_PREFIX} " )
8+ elseif (NOT TARGET mc_mujoco)
9+ find_package (mc_mujoco REQUIRED )
10+ endif ()
11+
12+
13+ function (setup_env_object NAME ENV_OBJECT )
14+ set (YAML_OUT "${CMAKE_CURRENT_BINARY_DIR} /robots/${NAME} .yaml" )
15+ configure_file (robots/${NAME}.in.yaml "${YAML_OUT} " )
16+ install (FILES "${YAML_OUT} " DESTINATION "${MC_MUJOCO_SHARE_DESTINATION} " )
17+ install (FILES "robots/${NAME} .xml"
18+ DESTINATION "${MC_MUJOCO_SHARE_DESTINATION} /${ENV_OBJECT} " )
19+ install (DIRECTORY robots/assets
20+ DESTINATION "${MC_MUJOCO_SHARE_DESTINATION} /${ENV_OBJECT} " )
21+ endfunction ()
22+
23+ setup_env_object (ground env )
24+ setup_env_object (box object )
25+ setup_env_object (longtable object )
26+ setup_env_object (table object )
Original file line number Diff line number Diff line change 1+ ### Credits
2+
3+ - ` marble.png ` : www.mujoco.org
Original file line number Diff line number Diff line change 1+ xmlModelPath : " @MC_MUJOCO_SHARE_DESTINATION@/object/box.xml"
Original file line number Diff line number Diff line change 1+ <mujoco model =" box" >
2+ <asset >
3+ <texture name =" texgeom" type =" cube" builtin =" flat" mark =" cross" width =" 128" height =" 128"
4+ rgb1 =" 0.6 0.6 0.6" rgb2 =" 0.6 0.6 0.6" markrgb =" 1 1 1" />
5+ <material name =' object' texture =" texgeom" texuniform =" true" rgba =" .4 .9 .6 1" />
6+ </asset >
7+
8+ <default >
9+ <default class =" shape" >
10+ <geom type =" box" size =" 0.1105 0.1155 0.05" />
11+ <default class =" collision" >
12+ <geom condim =" 3" group =" 0" rgba =" 0.266754 0.174546 0.0644028 1" />
13+ </default >
14+ <default class =" visual" >
15+ <geom condim =" 3" group =" 1" material =" object" conaffinity =" 0" contype =" 0" />
16+ </default >
17+ </default >
18+ </default >
19+
20+ <worldbody >
21+ <light mode =" targetbodycom" target =" base_link" directional =" false" diffuse =" .8 .8 .8" specular =" 0.3 0.3 0.3" pos =" 0 0 4.0" dir =" 0 0 -1" />
22+ <body name =" base_link" >
23+ <joint name =" root" type =" free" />
24+ <inertial pos =" 0 0 0" mass =" 3" diaginertia =" 0.01584025 0.01471025 0.0255505" />
25+ <geom class =" collision" />
26+ <geom class =" visual" />
27+ </body >
28+ </worldbody >
29+ </mujoco >
Original file line number Diff line number Diff line change 1+ xmlModelPath : " @MC_MUJOCO_SHARE_DESTINATION@/env/ground.xml"
Original file line number Diff line number Diff line change 1+ <mujoco model =" ground" >
2+
3+ <visual >
4+ <headlight diffuse =" 0.6 0.6 0.6" ambient =" 0.3 0.3 0.3" specular =" 0 0 0" />
5+ <rgba haze =" 0.15 0.25 0.35 1" />
6+ </visual >
7+
8+ <asset >
9+ <texture type =" skybox" builtin =" gradient" rgb1 =" 0.3 0.5 0.7" rgb2 =" 0 0 0" width =" 512" height =" 3072" />
10+
11+ <texture name =" texplane" type =" 2d" builtin =" checker" rgb1 =" .2 .3 .4" rgb2 =" .1 0.15 0.2" width =" 512" height =" 512" mark =" cross" markrgb =" .8 .8 .8" />
12+ <material name =" matplane" reflectance =" 0.3" texture =" texplane" texrepeat =" 1 1" texuniform =" true" />
13+ </asset >
14+
15+ <worldbody >
16+ <light pos =" 0 0 2" dir =" 0 0 -1" directional =" true" />
17+ <body name =" base_link" >
18+ <geom name =" floor" pos =" 0 0 0" size =" 0 0 .25" type =" plane" material =" matplane" condim =" 3" group =" 1" />
19+ </body >
20+ </worldbody >
21+ </mujoco >
Original file line number Diff line number Diff line change 1+ xmlModelPath : " @MC_MUJOCO_SHARE_DESTINATION@/object/longtable.xml"
You can’t perform that action at this time.
0 commit comments