# Looking for documentation/example code for writing Gazebo integration for multi-jointed walking robot

**URL:** <https://discourse.openrobotics.org/t/looking-for-documentation-example-code-for-writing-gazebo-integration-for-multi-jointed-walking-robot/48082>\
**Category:** Gazebo Help\
**Created:** [January 31, 2024, 3:35am UTC](https://discourse.openrobotics.org/t/looking-for-documentation-example-code-for-writing-gazebo-integration-for-multi-jointed-walking-robot/48082 "2024-01-31T03:35:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aentinger](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/aentinger/32/27337_2.png) [@aentinger](https://discourse.openrobotics.org/u/aentinger)\
**Post date:** [January 31, 2024, 3:35am UTC](https://discourse.openrobotics.org/t/looking-for-documentation-example-code-for-writing-gazebo-integration-for-multi-jointed-walking-robot/48082/1 "2024-01-31T03:35:59Z")

</div>

Hi everyone ☕ 👋

I’m working on getting a six-legged hexapod robot simulation running in Gazebo. The real hardware does already exist and even works to some agree but I hope to get faster iteration on the gait algorithm by experimenting inside a simulation.

My setup is ROS **Humble** and GZ **Fortress**.

I have a XACRO / URDF description that can be parsed and instantiated/spawned both in rviz and Gazebo.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/ros/original/2X/d/d77cb560aa1653a82d81aefb1807b39425502e11.png)

What I would like to do now - for a start - is to obtain the current joint position as well as the torque applied to each joint due to gravity - as determined by the simulation and stream it via [ros\_gz\_bridge](https://github.com/gazebosim/ros_gz) back to the gait controller implemented as a ROS node.

In a later stage I would then like to feed target angular velocities from the gait controller ROS node back into the simulation to close the loop.

I’ve spent a couple of hours looking through various available online documentation, github repositories and actual gazebo integrations written by 3rd parties (i.e. [ardupilot\_gazebo](https://github.com/ArduPilot/ardupilot_gazebo)) and I’m not afraid to write my own Gazebo plugin but **honestly I’m failing at a more fundamental level** :

- What is the first next step start on this journey?
- Where can I find the appropriate documentation?
- Is there publicly available example code on dealing with multi-jointed robots under the Humble / Fortress combination?

Since this is quite an unspecific question (i.e. not “How to spawn a robot from a URDF model via ROS launch file”) I hope this is the right place to ask it vs. stackexchange.

Cheers, Alex

---

<div class="post-metadata">

**Author:** ![peci1](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/peci1/32/10145_2.png) [@peci1](https://discourse.openrobotics.org/u/peci1)\
**Post date:** [January 31, 2024, 1:49pm UTC](https://discourse.openrobotics.org/t/looking-for-documentation-example-code-for-writing-gazebo-integration-for-multi-jointed-walking-robot/48082/2 "2024-01-31T13:49:20Z")

</div>

There is an example hexapod model in the [SubT Challenge tech repo (Gazebo Fuel)](https://app.gazebosim.org/OpenRobotics/fuel/models/CTU_CRAS_NORLAB_LILY_SENSOR_CONFIG_1). However, it was designed for Gazebo Dome, so it might need some facelift for Fortress.

The code for the robot is here:

> **[subt/submitted\_models/ctu\_cras\_norlab\_lily\_sensor\_config\_1 at master · osrf/subt](https://github.com/osrf/subt/tree/master/submitted_models/ctu_cras_norlab_lily_sensor_config_1)**
>
> This repostory contains software for the virtual track of the DARPA SubT Challenge. Within this repository you will find Gazebo simulation assets, ROS interfaces, support scripts and plugins, and d...

Detailed setup instructions here:

> <https://github.com/osrf/subt/blob/master/submitted_models/ctu_cras_norlab_lily_sensor_config_1/specifications.md>
