Getting Started

Getting Matlab

The simulation runs in Matlab version 2021a. Unfortunately, Matlab is neither open source nor free, however, if you are a student a lot of universities will supply you with a license for free.

Checkout Matlabs website to find out if you are eligible

Furthermore, the following Toolboxes are required:

  • simscape multibody
  • phased array system toolbox
  • optimization toolbox
  • ros toolbox

Getting the Code

The simulation can be installed from Github by calling

git clone https://github.com/TriPed-Robot/Matlab-Simulation.git

In a terminal, or clicking on the green button labeled Code to download a zip archive.

Using the Library

You can either directly use the library by starting the Simulink package TripedLibrary.slx and dragging the needed files from the Simulink model into your projects.

However, the better solution would be to properly install the library by following the following tutorial.

Trying the Examples

The examples directory contains several examples to familiarise oneself with the robot and play around with it.

Moving the Chassis

This example demonstrates whole-body kinematics, meaning the ability to control the orientation of the body given positions of the leg. To use the example open joy_stick_orientation.slx and connect a gamepad (such as an XBox controller). If you play the Simulink model you will be able to move the TriPeds chassis with your joystick causing the robot to ‘look around’. Alternatively, if you don’t have a joystick you can connect any signal to the roll pitch and yaw inputs of the full-body kinematics block.

Moving the TriPed

This example demonstrates how the TriPed can walk.

This is done via a simple implementation of a three legged spider gait described here. This simple implementation uses only a state machine and is not capable of the dynamic balancing normaly required during operations.

The full gait generator with dynamic balancing can be seen here. However currently it is only accesible to members of the project.

In order to still guarantee stability the movement speed of the robot was bounded aggressively.

Using the left joystick of a connected gamepad is thus still possible to steer the TriPed around the simulation area. Alternatively, if you don’t have a joystick you can directly specify a two-dimensional command velocity to the gait generator. The example can be started by opening and playing joy_stick_walking.slx.

Following Positions

The TriPed is not only able to follow a given command velocity but also to move to a desired position. For the real robot, this requires position estimating techniques such as SLAM, in this case, the simulation itself provides the position feedback.

In the example position_control.slx the TriPed uses a position controller to follow a blue ball around a map. This example needs no external input and will run on its own. new trajectories can be provided by changing the Circular trajectory function block.