Skip to content

Adapt dls2 to read a generic robot library #271

Closed

Description

@MMarcus95

A generic gluecode library is created, and the initialization is based on robot name

Activity

  1. self-assigned this
    on Dec 15, 2025
  2. MMarcus95 commented on Dec 24, 2025

    @MMarcus95
    ContributorAuthor

    When getting a new robot urdf:

    add gazebo plugins for blind state, desired commands, base state

      <gazebo>
        <plugin filename="/usr/lib/dls2/hardwares/gazebo_plugins/libgazebo_hw_sim.so" name="gazebo_hw_sim"/>
        <plugin filename="/usr/lib/dls2/hardwares/gazebo_plugins/libgazebo_base_state.so" name="gazebo_base_state"/>
      </gazebo>
    

    add fake sensor to load base_state plugin

      <gazebo reference="base_link">
        <sensor name="base_state" type="imu">
          <always_on>1</always_on>
          <update_rate>500</update_rate>
        </sensor>
      </gazebo>
    

    add gazebo plugins for imu, remember to change the reference to the imu link name

    
        <gazebo reference="imu_link">
        <gravity>true</gravity>
        <sensor name="imu_sensor" type="imu">
          <always_on>true</always_on>
          <update_rate>1000</update_rate>
          <visualize>true</visualize>
          <topic>__default_topic__</topic>
          <plugin filename="/usr/lib/dls2/hardwares/gazebo_plugins/libgazebo_imu.so" name="trunk_imu_plugin">
            <updateRate>0.0</updateRate>
          </plugin>
          <pose>0 0 0 0 0 0</pose>
        </sensor>
      </gazebo>
    

    add contact sensors if there are not there. The name has to be <foot_link_name>_contact. E.g., for left front foot

      <gazebo reference="FL_foot">
        <maxVel>1.0</maxVel>
        <maxContacts>1</maxContacts>
        <sensor name="FL_foot_contact" type="contact">
          <always_on>true</always_on>
          <update_rate>250.0</update_rate>
          <contact>
            <collision>FL_calf_fixed_joint_lump__FL_foot_collision_4</collision>
          </contact>
        </sensor>
        <material>Gazebo/Black</material>
      </gazebo>
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions