Skip to content

art-e-fact/tron1-artefacts

Repository files navigation

Tron Artefacts Workspace

A demo project using the Limx Tron1 Robot with Artefacts, ROS 2, and Gazebo.


Overview

This workspace provides a Tron1 simulation and development environment using a standard ROS 2 workflow.

It supports both ROS 2 Humble (Ubuntu 22.04) and ROS 2 Jazzy (Ubuntu 24.04):

  • Humble: Uses Ignition Fortress
  • Jazzy: Uses Gazebo Harmonic

1. Prerequisites

Install ROS 2

Follow the official installation guide for your Ubuntu version:

Install the ros-{ROS_DISTRO}-desktop package.

Install tools

sudo apt update
sudo apt install python3-pip python3-vcstool python3-colcon-common-extensions python3-rosdep git

2. Setup

Clone this repository

git clone https://github.com/art-e-fact/tron1-artefacts.git
cd tron1-artefacts

Import dependencies

# For Jazzy:
mkdir src && vcs import src < jazzy.repos
# For Humble:
mkdir src && vcs import src < humble.repos

Create Python virtual environment

python3 -m venv --system-site-packages venv
source venv/bin/activate
pip install --upgrade pip && pip install -r requirements.txt

Install ROS dependencies

(Replace .bash with the shell you are using (e.g. .zsh))

source /opt/ros/$ROS_DISTRO/setup.bash
sudo rosdep init  # Only required when using rosdep for the first time
rosdep update
rosdep install --from-paths src --ignore-src -y

Build

(Replace .bash with the shell you are using (e.g. .zsh))

source venv/bin/activate
source /opt/ros/$ROS_DISTRO/setup.bash
colcon build --symlink-install

Alternative Installation Flow with doit

A doit configuration file is provided in this repository as an alternative setup flow. See dodo.py and doit_config.py for details. See below for commands:

# System Dependencies
sudo apt install python3-pip python3-doit git

# Installs dependencies, creates virtual environment, sets up ROS2 packages
doit setup
# Builds all packages in the workspace using colcon
doit build

Other commands:

# Pulls, fetches, and updates all repositories
doit download
# If you want to do a full rebuild cycle:
doit clean
doit setup
doit build

The doit configuration will be removed in a future release.


3. Usage

  • You will need three sessions to run a full simulation: 1. The RL Controller, 2. The simulation, and 3. The custom controller
  1. Run the RL Controller: Do this before the simulation, if you want the robot to start walking, or else it will fall:
export ROBOT_TYPE=PF_TRON1A # Set the robot model type (only PF_TRON1A compatible with artefacts)
export RL_TYPE=isaacgym # or isaaclab
source venv/bin/activate
python3 src/rl-deploy-python/main.py
  1. Run the Simulation
export ROBOT_TYPE=PF_TRON1A
source venv/bin/activate
source install/setup.bash # or e.g. .zsh
ros2 launch pointfoot_gazebo empty_world.launch.py server:=false # or true to run headlessly 
  1. Run the custom controller to move the robot:
export ROBOT_TYPE=PF_TRON1A
source venv/bin/activate
source install/setup.bash
python3 src/limxsdk_python/limxsdk_python/api/goto.py

4. Testing

Local

NOTE: Do not manually launch any processes before running the test. The test script will automatically collect and launch all necessary components. Please ensure that any other active processes (simulators or controllers) are fully terminated beforehand.

  • Test with Artefacts:

    Setup the environment:

    source venv/bin/activate
    source install/setup.bash
    • Relative motion execution test:

      artefacts run move_around
    • Relative command policy comparison:

      artefacts run policy_test
    • Idle drift evaluation:

      artefacts run policy_drift
  • Test with Pytest:

    source venv/bin/activate
    source install/setup.bash
    python3 -m pytest test/test_move.py -v -x

Containerized (Docker)

The tests can be ran with artefacts in a container, either locally, or on the artefacts platform.

  1. Locally (--in-container)

Note: Requires a gpu that is available to Docker.

# "policy_test" can be changed for any of the other tests (e.g policy_drift)
artefacts run --in-container policy_test --gpus=all
  1. On the artefacts platform (run-remote)
# "policy_test" can be changed for any of the other tests (e.g policy_drift)
artefacts run-remote policy_test

Notes

  • Use vcs status src to check repo status across all dependencies.
  • Use vcs pull src to update dependent repos
  • rm -rf build install log followed by colcon build --symlink-install for a clean rebuild

About

A reproducible ROS 2 development workspace for ARTEFACTS tron1 demo project. Includes automated setup scripts to install system dependencies, fetch repositories, and configure the environment for immediate use.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors