Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Various accessories used for studio configuration packages

License

NotificationsYou must be signed in to change notification settings

PickNikRobotics/picknik_accessories

Repository files navigation

PickNik assets for common objects and attachments.

Using MuJoCo assets:

Themujoco_assets folder in this package can be used in anypicknik_mujoco_ros/MujocoSystem based simulation using theinclude tag in MuJoCo XML.Since MuJoCo XML files all assume that included files are relative to the main XML file (themujoco_model parameter set as part of theros2_control entry in your robot description), shared assets must be moved to the same directory as the top level XML file.To achieve this without duplicating assets, we can place symlinks in the install directory of your package that point back to themujoco_assets folder of this package.Add the following to your CMakeLists.txt to add symlinks to this package's assets:

# Install all XML files in directoryset(PICKNIK_ACCESSORIES_SHARE_DIR"${CMAKE_INSTALL_PREFIX}/../picknik_accessories/share/picknik_accessories/mujoco_assets/")# Destination directoryset(DEST_DIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}/description/")install(DIRECTORY "${PICKNIK_ACCESSORIES_SHARE_DIR}"        DESTINATION "${DEST_DIR}"        FILES_MATCHING PATTERN "*")

Alternatively, if some files in this package conflict with files in your workspace, you can choose specific files to symlink:

# Install individual XML filesset(PICKNIK_ACCESSORIES_SHARE_DIR"${CMAKE_INSTALL_PREFIX}/../picknik_accessories/share/picknik_accessories/mujoco_assets/")# Destination directoryset(DEST_DIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}/description/")set(EXTERNAL_XML_FILES  "${PICKNIK_ACCESSORIES_SHARE_DIR}/ur5e/ur5e_globals.xml"  "${PICKNIK_ACCESSORIES_SHARE_DIR}/ur5e/ur5e.xml"  # Add additional files here if desired)foreach(xml_file IN LISTS EXTERNAL_XML_FILES)  install(FILES "${xml_file}"          DESTINATION "${DEST_DIR}"  )endforeach()

Whether you chose to install all assets or just a selection, the above CMake code will merge the contents ofpicknik_accessories/mujoco_assets/ withyour_package_name/description/ in the install folder, so that XML files in thepicknik_accessories package can be included as if they were within your package.

UR5e Example

Below is a minimal example using the UR5e asset:

<mujoco model="ur5e scene">  <include file="ur5e/ur5e_globals.xml" />  <worldbody>    <light pos="0 0 1.5" dir="0 0 -1" directional="true" />    <geom      name="floor"      pos="0 0 0"      size="0 0 0.05"      type="plane"      material="groundplane"    />    <include file="ur5e/ur5e.xml" />  </worldbody></mujoco>

Note: Since you cannot define global properties within aworldbody tag, the assets must be divided in to two XML files.Theur5e_globals.xml file contains properties that must be defined as global properties outsideworldbody (likedefault andactuator), while theur5e.xml contains onlybody tags (and XML tags that are allowed within abody).

About

Various accessories used for studio configuration packages

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors12

Languages


[8]ページ先頭

©2009-2025 Movatter.jp