/TennisBallCollector

Description and control of a robot capable cleaning the balls that appear in a tennis court, placing them in the designated places.

Primary LanguagePython

Tennis Ball Collector

This is the repository used for the discipline of Ingènierie Système and robotic modeling at ENSTA Bretagne in 2021. Here, we create a robot capable cleaning the balls that appear in a tennis court, placing them in the designated places.

Launch the simulation

Requirements

In order to run the simulation, you’ll need to install the following dependencies:

Run the simulation

The execution works in two multiple separate parts.

The compilation and setup of the modules can be done as follows

# build packages
colcon build --symlink-install

# load variables
. install/setup.sh

First we launch the simulation world in Gazebo. The robot is spawned in a node with its description and then the mission is launched.

# launch the simulation world
ros2 launch tennis_court tennis_court.launch.py

# launch the robot model
ros2 launch robot_description display.launch.py

# launch the top camera node
ros2 run robot_command camera_top

# launch the control node
ros2 run robot_command command

# launch the waypoint node
ros2 run robot_command waypoint

State representation

The execution of the algorithm implements the following behavior for dealing with the balls.

docs/states.png

Modules

Robot description

The package robot_description describes the robot and all its sensors.

Plugins
  • libgazebo_ros_diff_drive.so : for wheel motion
Publishers
  • /cmd_vel : Twist

Top camera

Runs as camera_top node. This node publishes the positions and identifications for all balls with information of the camera.

Subscribers
  • /zenith_camera/image_raw : Image
Publishers
  • /balls : Float64MultiArray

Waypoint generation

Runs as waypoint_gen node. Node responsible for the generation of a waypoint for the robot at each instant, based on the last known position of the balls.

Subscribers
  • /balls : Float64MultiArray
Publishers
  • /waypoint : Pose

Control node

Run as command node. It takes as input the position of the target and it computes the action necessary to go to it.

Subscribers
  • /waypoint : Pose
  • /robot_state : Pose
Publishers

Group

Members

Yves Jordan NJAMEN, Stéphane NGNEPIEPAYE WEMBE, Bernardo HUMMES FLORES, Yohann GOURRET, Katell LAGATTU

Project Management

The project in Taiga can be found here.

Repository structure

This repository must be cloned inside the src directory of a ROS2 workspace.

tennis_court package

The folder tennis_court is a ROS package containing the world in which the ball cleaning ball.

Le dossier `tennis_court` est un package ROS contenant le monde dans lequel le robot ramasseur de balle devra évoluer ainsi qu’un script permettant de faire apparaître des balles dans la simulation. Ce package ne doit pas être modifié. Consulter le [README](tennis_court/README.md) du package pour plus d’informations.

robot_description package

robot_command package

Documents

The docs folder contains all of the useful documents for the project:

Reports

The reports folder contains the notes taken for the meetings had at the beginning and end of each session. A template followed by the sprint and debriefing notes are found.