Skip to content

wltjr/turbopi_ros

Repository files navigation

TurboPi ROS

License Build Status Code Quality

This project aims to get all functionality of the TurboPi robot running on ROS 2 Jazzy, along with an RPLidar for SLAM.

TurboPi in Gazebo

Mesh files have been generously provided by Hiwonder and are their property. Mesh files are copyright Hiwonder. All Rights Reserved.

Environment Preparation

The following assumes you have installed all the necessary ROS 2 Jazzy packages, and have sourced the installation before running any ros2 commands.

source /opt/ros/jazzy/setup.bash

You may want to have your development user environment do this on login via ~/.bashrc file; add that command to the end of that file.

Its recommended to have a ros2 workspace in a user directory for development purposes, to build this project, etc; ex ~/ros2_ws/. The following will refer to that directory, and directories created within.

Download

Download and unpack or clone this repositories contents into your ros2 workspace; ex ~/ros2_ws/src/turbopi_ros.

Build and Install

Building is done using colcon which will invoke cmake and run the necessary commands. Run the following command in your ros2 workspace; ex ~/ros2_ws/.

colcon build --symlink-install --packages-select  turbopi_ros

Source install

Make sure to run the following command after install and login. Run the following command in your ros2 workspace; ex ~/ros2_ws/.

source install/setup.bash

You may want to have your development user environment do this on login via ~/.bashrc file; add the following to the end of that file.

source ~/ros2_ws/install/setup.bash

Run

To run on the actual hardware run the following command in your ros2 workspace; ex ~/ros2_ws/.

ros2 launch turbopi_ros turbopi_ros.launch.py

Robot Human Controllers

The primary way to control the robot is using telop_turbopi which is intended to be used with a DUALSHOCK™4 wireless controller.

DUALSHOCK™4

Run the following command to invoke the controller for the DUALSHOCK™4 wireless controller.

ros2 launch turbopi_ros gamepad.launch.py

Button Layout

The primary buttons are the left joystick for driving/movement and the right joystick for the attached camera. All other buttons are not mapped or in use at this time.

Drawing of DUALSHOCK™4

Button Action
A Unused
B Unused
C Unused
D Unused
E Unused
F Unused
G Unused
H Camera - tilt up/down, pan left/right
I Unused
J Unused
K Driving - forward/backward, turn left/right

Alternatives

There are presently alternative two ways to control the robot using teleop twist joy and keyboard. However, they only support robot movement and do not control camera or other peripherals, they just use /cmd_vel topic.

Gamepad

Run the following command to invoke the controller for the gamepad. Sample command is using a Logitech F310, which works with the xbox configuration.

ros2 launch teleop_twist_joy teleop-launch.py joy_config:='xbox'

Keyboard

Run the following command to invoke the controller for the keyboard, which will present a interface for controlling the robot in the same terminal the command is run within.

ros2 run teleop_twist_keyboard teleop_twist_keyboard

Hardware

Credits

Credits and thanks for resources used in this repository, some code and/or project structure, go to the following:

About

TurboPI Robot running ROS 2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published