Getting started
Setup
Using a simulation
If you have Aseba Playground, you can use it to simulate a Thymio. Launch the simulation with
asebaplayground
and open the thymio.playground
world that is distributed with Aseba Playground.
Open a console and setup the environment
source <WORKSPACE>/install/setup.bash
export DEVICE="tcp:host=localhost;port=33333"
export SIMULATION=True
C:<WORKSPACE>\install\setup.bat
SET DEVICE="tcp:host=localhost;port=33333"
SET SIMULATION=True
Using a real Thymio
Connect the Thymio to your machine. Open a console and setup the environment
source <WORKSPACE>/install/setup.bash
export DEVICE="ser:name=Thymio"
export SIMULATION=False
C:\<WORKSPACE>\install\setup.bash
SET DEVICE="ser:name=Thymio"
SET SIMULATION=False
Note
There are different ways to specify devices like
DEVICE="ser:device=<SERIAL_DEVICE>"
or DEVICE="ser:port=<SERIAL_PORT>"
.
On Windows you can inspect the device to which a Thymio is connected from the control panel.
For examples, a Thymio connected to COM port #4 can be then specify either
using DEVICE="ser:device=COM4
or DEVICE="ser:port=4
.
On Linux, the usual port is DEVICE="ser:device=/dev/ttyACM0
and
on macOS it is DEVICE=ser:device=/dev/cu.usbmodem14201
.
Running ROS-Aseba
Launch the Aseba-ROS bridge with
# use %DEVICE instead of $DEVICE in a Windows command shell
roslaunch asebaros_examples all_nodes.launch device:=$DEVICE
# use %DEVICE instead of $DEVICE in a Windows command shell
ros2 launch asebaros_examples all_nodes.launch device:=$DEVICE
See ROS-Aseba: examples for more.
Running ROS-Thymio
Launch the Aseba-ROS bridge, the Thymio driver and the Thymio model with
# use %XXX instead of $XXX in a Windows command shell
roslaunch thymio_driver main.launch device:=$DEVICE simulation:=$SIMULATION
# use %XXX instead of $XXX in a Windows command shell
ros2 launch thymio_driver main.launch device:=$DEVICE simulation:=$SIMULATION
In another console, launch rviz to visualize the robot.
# use C:\<WORKSPACE>\install\setup.bat a Windows command shell
source <WORKSPACE>/install/setup.bash
roslaunch thymio_description rviz.launch
# use C:\<WORKSPACE>\install\setup.bat a Windows command shell
source <WORKSPACE>/install/setup.bash
ros2 launch thymio_description rviz.launch.py
Move the robot around and observe how the proximity sensors are displayed in rviz.