Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vertueux/smov

4 legged extensible open source robot that uses ROS2. Built on top of a Spot Micro.
https://github.com/vertueux/smov

collaborate learn raspberry-pi robot robotics ros ros2 spotmicro ubuntu

Last synced: 13 days ago
JSON representation

4 legged extensible open source robot that uses ROS2. Built on top of a Spot Micro.

Awesome Lists containing this project

README

        

# smov ![SMOV Discord](https://img.shields.io/badge/Discord-server?style=social&logo=discord&label=SMOV&link=https%3A%2F%2Fdiscord.gg%2F4m2SgCmWMr)

ROS2 packages for a 4 legged robot dog.

https://github.com/user-attachments/assets/2a5840eb-2274-431f-872b-dec887a2a64b

> This video shows a use of the `walking_gait` package, which lets you control the robot using a keyboard (to stand up, move forward, stop and possibly turn).

* Click [here](assets/videos) to see more videos of the robot in action.

SMOV can be seen as a starting point for entering the Spot Micro environment using [ROS2](https://www.ros.org/). This is a sort of layer that allows developers to build on top of it, as most packages only deal with controlling the board, LCD and servos, leaving a small SDK to allow the user to do what they want with their robot (motion, etc...).

Join the [Discord server](https://discord.com/invite/4m2SgCmWMr) to stay tuned.

## Features

Control of the robot is centralised in a single executable, the States package. This package, when running, listens to any message sent by a third-party package and applies it to the actual robot. In other words, this modular architecture makes it easy to control the robot and run any application.

The user can easily create another package, use the minimal SDK to control the servos through another executable, and choose what he wants his robot to do, without having to worry about numerical values, LCD control, etc...
You can create your own package to control the robot according to your needs. You might even be able to publish it and share it with your colleagues and other four-legged robot creators.

You can take a look at [the example](#example) and [demos](https://github.com/vertueux/smov_demos) to get a better idea.

## Documentation

You can find the SMOV documentation in the [documentation/](documentation/) subdirectory.

Check out [documentation/README.md](documentation/README.md) for a quick overview.

The documentation is divided into several sections:

* [Collect all the things](documentation/collect_all_the_things.md)
* [Install ROS2](documentation/install_ros2.md)
* [Install libraries](documentation/install_libraries.md)
* [Configure ports](documentation/configure_ports.md)
* [Build the project](documentation/build_the_project.md)
* [Calibrate servos](documentation/calibrate_servos.md)
* [Build a Spot Micro](documentation/build_a_spot_micro.md)
* [Test demos](documentation/test_demos.md)
* [Create your own State package](documentation/create_your_own_state_package.md)

## Compatibility

This package is designed and tested to be compatible with ROS2 Humble and ROS2 Foxy running on a [Raspberry Pi](https://www.raspberrypi.com/). However, the project should be able to run on any platform that ROS2 supports.
> **Note**: x86_64 systems may not be supported as this project has been designed to run on a Raspberry Pi.

| Platform | Hardware | Software | Notes |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| Raspberry Pi | Pi 3 Model B+
Pi 4 Model B
| [Ubuntu 22.04 LTS](https://ubuntu.com/download/raspberry-pi)
[Ubuntu 20.04 LTS](https://ubuntu.com/download/raspberry-pi) | For the time being, the project is only being tested on the Raspberry Pi 3 Model B+ and the Raspberry Pi 4 Model B, but it should be possible to run it on other Raspberry Pis. |

## Example

Here's a simple example showing how the minimal SDK work, inspired by the [State template](https://github.com/vertueux/smov_state):

```cpp
#include
#include

void State::on_start() {
smov::delay(2000); // Delay of 2 seconds (2000ms).

// Set all servos to 60° angle.
for (int i = 0; i < SERVO_MAX_SIZE; i++) {
front_servos.value[i] = 60.0f;
back_servos.value[i] = 60.0f;
}

// Then publishing to the States package to apply them to the real robot.
front_state_publisher->publish(front_servos);
back_state_publisher->publish(back_servos);

// You can end the program manually.
end_program();
}
// This is called every 500ms (But you can change the timeout at DECLARE_STATE_NODE_CLASS).
void State::on_loop() {}

// This is called when the program gets shutdown.
void State::on_quit() {}

// This macro creates the node and the main() input, which spins the node.
DECLARE_STATE_NODE_CLASS("template_state", State, 500ms)
```

## Contributing

There are many ways in which you can participate in this project, for example:

* Submit bugs and feature requests
* Review source code changes
* Review the [documentation](documentation/README.md) and make pull requests for anything from typos to additional and new content

To be able to contribute, you need to take a look at [CONTRIBUTING.md](CONTRIBUTING.md) to find out the conditions.

## Code of Conduct

This project has adopted a Code of Conduct adapted from the [Contributor Covenant](https://www.contributor-covenant.org) to maintain cohesion. Please read the [full text](CODE_OF_CONDUCT.md) so that you can understand what actions will and will not be tolerated.

## Links and References

* The I²C PWM Board repository:
* [Click here](https://github.com/vertueux/i2c_pwm_board)
* SMOV Demos repository:
* [Click here](https://github.com/vertueux/smov_demos)
* SMOV State Template repository:
* [Click here](https://github.com/vertueux/smov_state)
* Spot Micro AI's website:
* [Click here](https://spotmicroai.readthedocs.io/)