Project #2 Go Chase It! for Robotics Software Engineer Nanodegree Program
In this project, I created two ROS packages: my_robot and ball_chaser that will be used on Gazebo. The my_robot package includes the design of the robot, which also includes the differential drive, lidar & camera sensors, and the gazebo world the robot lives in. The ball_chaser package contains two C++ ROS nodes that interact with the robot and makes it chase after a white-colored ball.
drive_bot:
- A server node that will provide a ball_chaser/command_robot ROS service to drive the robot around by controlling its linear x and angular z velocities
- The service publishes a message containing the velocities to the wheel joints
process_image:
- A client node that subscribes to the robot's camera images and analyze them to determine the position of the white ball
- Upon determining the position, the client node requests a service from the
drive_botserver node to drive toward the ball
- Gazebo any version later than v7.0.0
- ROS Kinetic -follow instructions here: ROS Installation Instructions
- GNU make
- Installation for Windows
- Installation for Mac
- make is installed by default for most Linux distros
- C++11 Complier (gcc/g++)
Recommended Virtual Machine Alternative Specs:
- Ubuntu 64-bit Disk Image
- 2 GB of RAM
- 20 GB Disk Space
- 4 Logical Cores
- After installing and meeting the requirements listed above, open up a terminal.
- Create and initialize a catkin workspace:
$ mkdir -p /home/workspace/catkin_ws/src
$ cd /home/workspace/catkin_ws/src
$ catkin_init_workspace
- Clone the project repository & move the
my_robotandball_chaserdirectories into thesrcdirectory:
$ cd /home/workspace/catkin_ws/src
$ git clone https://github.com/jordanjj8/Robotics_Go_Chase_It.git
$ mv Robotics_Go_Chase_It/ball_chaser /home/workspace/catkin_ws/src/ball_chaser
$ mv Robotics_Go_Chase_It/my_robot /home/workspace/catkin_ws/src/my_robot
$ rm -rf Robotics_Go_Chase_It
- Navigate back to the catkin workspace and build the executables:
$ cd /home/workspace/catkin_ws/
$ catkin_make
- Source the setup script and launch the launch file. The robot in Gazebo should open up:
$ cd /home/workspace/catkin_ws/
$ source devel/setup.bash
$ roslaunch my_robot world.launch
- Now open up another terminal and launch the ball_chaser package. This will enable the robot to chase after the white ball:
$ cd /home/workspace/catkin_ws/
$ source devel/setup.bash
$ roslaunch ball_chaser ball_chaser.launch