These are two packages containing a Gazebo environment with a skid-steer drive robot equipped with a camera and a Hokuyo lidar. There is one node for commanding robot joints and a second one for processing the camera image, detecting round objects, and sending the appropriate velocities commands.
The source code is released under an MIT license.
Author/Maintainer: George Sotirchos
The ball-chaser-bot package has been tested under ROS Noetic on Ubuntu 20.04. This is experimental, personal project code, and possibly subject to frequent changes with any need for explanation disclaimed.
- Robot Operating System (ROS) (middleware for robotics),
- opencv-python (Open Source Computer Vision Library)
To build from source, clone the latest version from this repository into your catkin workspace and compile the package using
cd catkin_ws/src
git clone https://github.com/gsotirchos/ball-chaser-bot
cd ../
rosdep install --from-paths . --ignore-src
catkin_make
-
Start the Gazebo environment containing the robot:
roslaunch my_robot world.launch
-
Start the
ball_chaser
and theprocess_image_opencv
nodes:roslaunch ball_chaser ball_chaser.launch
Or to use the "dumb"
process_image
node (without OpenCV):roslaunch ball_chaser ball_chaser.launch use_opencv:=false
-
my_robot/launch/world.launch: A Gazebo simulation is opened with 4-wheeled skid-steer drive robot equipped with a camera and a Hokuyo lidar spawned in an office environment containing some balls, along with an RViz window showing the camera image and the lidar measurements.
-
ball_chaser/launch/ball_chase.launch: Starts the
drive_bot
andprocess_image_opencv
/process_image
nodes.Arguments:
use_opencv
: Whether to use the OpenCV image processing node or the "dumb" one.
Default:true
(Optional)
Provides a service for publishing drive commands to the robots actuators.
-
/cmd_vel
(geometry_msgs/Twist)The requested
linear_x
andangular_z
velocities for the robot wheel joints.
-
~command_robot
(ball_chaser/DriveToTarget)Publishes the requested the requested
linear_x
andangular_z
velocities to/cmd_vel
topic.rosservice call /ball_chaser/command_robot "linear_x: 0.0 angular_z: 0.0" # with the newline
Processes the camera image published at /camera/rgb/image_raw
and requests the appropriate drive commands via the ~command_robot
service.
-
/camera/rgb/image_raw
(sensor_msgs/Image)The robot-mount camera image input.
Please report bugs and request features using the Issue Tracker.
ROS: http://www.ros.org
Gazebo plugin: http://gazebosim.org/tutorials?tut=ros_gzplugins#SkidSteeringDrive
OpenCV: https://docs.opencv.org/master/