If needed, install vcs tool:
pip3 install vcstool
git submodule update --init
vcs import src < src/ros2_rust/ros2_rust_humble.repos
On MacOS, we can use docker to cross-compile the code. First, we need to build the docker image:
docker build -t ros2_rust .
docker run --rm --network=host -v $PWD:$PWD -w $PWD -it ros2_rust /bin/bash
You need to source the ros2_rust environment every time you work on a new terminal:
source install/setup.bash
Then, we can build with colcon build
:
colcon build
https://index.ros.org/p/teleop_twist_joy/github-ros2-teleop_twist_joy/
Install with:
sudo apt install ros-humble-teleop-twist-joy
Run with (open new terminal):
sudo su
source /opt/ros/humble/setup.bash
ros2 launch teleop_twist_joy teleop-launch.py joy_config:='xbox'
Remember that every time you need to run ros commands, you need to source the setup.bash file. You need to do that in every new terminal you open.
source /opt/ros/humble/setup.bash
If you want to see if topics are being published:
ros2 topic list
To see topic contents:
ros2 topic echo <topic-name>
- GPI: https://github.com/golemparts/rppal?tab=readme-ov-file#gpio
- PWM: https://docs.rs/pwm-pca9685/latest/pwm_pca9685/
- Linux Embedded: https://docs.rs/linux-embedded-hal/latest/linux_embedded_hal/
- hal = hardware abstraction layer
- I2C = Inter-Integrated Circuit
- cross = https://github.com/cross-rs/cross