It's a toy project. A gazebo world with some simple models. Robot model in xacro format - that was a bit more tricky.
Finally some code to drive it around, and make it chase a white ball (a pixel really - there is no concept of a ball there). So it just "goes towards the light" :D
To build just run
catkin_make
In the main directory. That should create devel directory. So then source devel/setup.bash
(or .zsh
if that's your fancy ;) ).
In order to run:
- start the world -
roslaunch my_robot world.launch
- start the ball-chasing fun part
roslaunch ball_chaser ball_chaser.launch
- in gazebo switch tool to moving/gragging (2nd one on top toolbar - cross with arrows)
- drag the ball in front of the robot's camera (the black cylinder)
The robot spawns now facing an angle (I wanted to test the lidar), so you have to keep dragging the ball, as he'll catch it pretty soon otherwise :)
Have fun !