kry0sc0pic
MCP Serverkry0sc0picpublic

svan_simple_control

a wrapper on the SVAN M2 xMo keyboard control interface to make it easier to control programatically.

Repository Info

2
Stars
3
Forks
2
Watchers
0
Issues
Python
Language
MIT License
License

About This Server

a wrapper on the SVAN M2 xMo keyboard control interface to make it easier to control programatically.

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

svan_simple_control

setup (simulation)

# cd into workspace
cd ~/xMo/src

# clone package
git clone https://github.com/kry0sc0pic/svan_simple_control.git
# add to build script
cd ~/xMo
echo "catkin build svan_simple_control" >> svan_build.sh
echo "source devel/setup.bash" >> svan_build.sh

# build package
catkin build svan_simple_control
source devel/setup.bash

setup (hardware)

# cd into workspace
cd ~/dev/xMo/src

# clone packages
git clone https://github.com/kry0sc0pic/svan_simple_control.git

# add to build script
cd ~/dev/xMo
echo "catkin build svan_simple_control" >> svan_build.sh
echo "source devel/setup.bash" >> svan_build.sh

# build packages
catkin build svan_simple_control
source devel/setup.bash

# (optional) install dependencies for http bridge
python3 -m pip install --upgrade pip
python3 -m pip install fastapi uvicorn pydantic

running (simulation)

after starting the gazebo simulation launch file and the mcp.py file. run the following in a third terminal

cd ~/xMo
source devel/setup.bash
rosrun svan_simple_control simulation.py

now open 4th terminal are run your script. replace <script> with the filename of the example you want to run.

cd ~/xMo
source devel/setup.bash
python3 src/svan_simple_control/examples/<script>.py

🔴 Important Note

Always be ready to take manual control of the SVAN using the joystick incase something unexpected starts happening.

After the node starts, if some joystick data is published. It will cease sending commands until the node is restarted.

The simple control node differentiates between itself and the joystick command code by publishing a value of 1000.0 at index 7. If the value is not 1000.0 (in case of the joystick command node) it ceases sending any recieved commands.

Make this change to the source on your joystick commander node to prevent operating mode desync. --- [CHANGE HERE]

running (hardware) (without bridge)

if you are having issues subscribing and publishing to SVAN ros topics from a desktop/laptop. Have a look at the HTTP bridge below.

after completing all the startup steps (joystick calibration, sleep calibration, moetus interface launch and starting the mcp.py). run the following commands in two ssh sessions on the SVAN.

in the first ssh session

cd ~/dev/xMo
source devel/setup.bash
rosrun svan_simple_control hardware.py

in the second ssh session

cd ~/dev/xMo
source devel/setup.bash
python3 src/svan_simple_control/examples/<script>.py

running (hardware) (with bridge)

after completing all the startup steps (joystick calibration, sleep calibration, moetus interface launch and starting the mcp.py). run the following commands in two ssh sessions on the SVAN.

in the first ssh session

cd ~/dev/xMo
source devel/setup.bash
rosrun svan_simple_control hardware.py

in the second ssh session

cd ~/dev/xMo
source devel/setup.bash
rosrun svan_simple_control bridge.py

bridge

The HTTP bridge allows sending commands to the SVAN using POST requests to remove the ros dependency for the client machine or work around ROS connection issues.

The documentation can be accessed by running the bridge with rosrun svan_simple_control bridge.py and navigating to /docs in a web browser. The parameter names correspond to the ROS Message Definition below.

message definitions

these are the following variables you can give as part of the SvanCommand message. You can view the source here

  1. command_type (uint8) - what aspect you want to control

    valueaspect
    0OPERATION MODE (trot, push, up, etc.)
    1LINEAR MOVEMENT
    2ROLL ANGLE
    3PITCH ANGLE
    4YAW VELOCITY
    5HEIGHT
  2. operation_mode (uint8) - operation mode to switch to. used when command_type is 0.

    valuemode
    1STOP
    2TWIRL
    3PUSHUP
    4TROT
    5SLEEP
  3. height (uint8) - height profile to set. used when command_type is 5.

    valueheight
    1UP (MAX)
    2DOWN (MIN)

    granular height control is being actively developled

  4. vel_x (float32) (-1.0 - 1.0) - normalised value of velocity in x-axis. postive x-axis is the right of the robot.

  5. vel_y (float32) (-1.0 - 1.0) - normalised value of velcity in y-axis. positive y-axis is the front of the robot.

  6. roll (float32) - normalised roll angle. used when command_type is 2.

    valueroll angle
    -1LEFT
    0CENTER
    1RIGHT
  7. pitch (float32) - normalised pitch angle. used when command_type is 3.

    valueroll angle
    1FRONT
    0CENTER
    -1BACK
  8. yaw (uint8) - yaw direction. used when command_type is 4.

    valuedirection
    0LEFT
    1RIGHT
    2NONE

examples

bridge versions of certain examples are also available. They can be identified with the bridge suffix in the name. They should be used with the HTTP bridge.

rotate

svan rotates around Z-axis.

source: examples/rotate.py

pushup and twirl

svan rotates around Z-axis.

source: examples/pushup_twirl.py

examples (deprecated)

sine wave circle

moves in a circular path while varying height.

source: examples/deprecated/sine_wave_circle.py

hand gesture movement control

author: Atharv Nawale

move and stop the svan using hand gestures. powered by mediapipe.

source: examples/deprecated/hand_control.py

hand gesture height control

author: Dhruv Shah

control the svan's height using gestures. powered by mediapipe.

source: examples/deprecated/height_control.py

Quick Start

1

Clone the repository

git clone https://github.com/kry0sc0pic/svan_simple_control
2

Install dependencies

cd svan_simple_control
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownerkry0sc0pic
Reposvan_simple_control
LanguagePython
LicenseMIT License
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation