Skip to content

Instantly share code, notes, and snippets.

@traversaro
Created March 25, 2024 16:27
Show Gist options
  • Save traversaro/0cd565e3bbd716a85f04d6b9abcc4ee7 to your computer and use it in GitHub Desktop.
Save traversaro/0cd565e3bbd716a85f04d6b9abcc4ee7 to your computer and use it in GitHub Desktop.
Minimum Working Example for a model that loads both gz-sim and gazebo classic plugins
<?xml version="1.0"?>
<sdf version="1.7">
<world name="example_world">
<model name="camera_model">
<static>true</static>
<pose>0 0 0.1 0 0 0</pose>
<link name="link">
<visual name="visual">
<geometry>
<box>
<size>0.1 0.1 0.1</size>
</box>
</geometry>
</visual>
<sensor name="camera_sensor" type="camera">
<camera>
<horizontal_fov>1.5708</horizontal_fov>
<image>
<width>640</width>
<height>480</height>
</image>
<clip>
<near>0.1</near>
<far>100</far>
</clip>
</camera>
<always_on>1</always_on>
<update_rate>30</update_rate>
<visualize>true</visualize>
<!-- Gazebo Classic plugin -->
<plugin name="camera_plugin" filename="libCameraPlugin.so">
</plugin>
<!-- gz-sim plugin -->
<plugin filename="gz-sim-camera-video-recorder-system" name="gz::sim::systems::CameraVideoRecorder">
<service>camera/record_video</service>
</plugin>
</sensor>
</link>
</model>
</world>
</sdf>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment