Change the directory to project - cd 1-build-my-world
.
└── 1-build-my-world
├── build.sh # Build Script - Step 1
├── CMakeLists.txt
├── model # Model files
│ ├── area98
│ └── car99
├── README.md
├── run.sh # Run Script - Step 2
├── script # Plugin files
│ └── hello.cpp
└── world # World files
└── my.world
- Make sure you have the following installed:
- ROS
- Cmake
- gcc/g++
- Git
- Clone the project
- Go to the project folder
- Create a build folder
mkdir build && cd build
- Build with cmake
cmake .. && make
- Add the build folder to the Gazebo plugin path:
GAZEBO_PLUGIN_PATH=${GAZEBO_PLUGIN_PATH}:<path_to_build_folder>
. - Go back to the project folder
- Launch Gazebo world
gazebo world/my.world
source build.sh
-> script builds the prodject like above.- Launch the world by using
source run.sh
script.
Use ROS and Gazebo to build a mobile robot for chasing a white ball.
my_robot: This package defines the world and the robot.
ball_chaser: This package contains two ROS nodes for commanding the robot to chase the white ball.
robond@udacity:~/robotics-nanodegree-ws/2-go-chase-robot/src$ tree
.
├── ball_chaser
│ ├── CMakeLists.txt
│ ├── include
│ │ └── ball_chaser
│ ├── launch
│ │ └── ball_chaser.launch
│ ├── my_ball
│ │ ├── model.config
│ │ └── model.sdf
│ ├── package.xml
│ ├── src
│ │ ├── drive_bot.cpp
│ │ └── process_image.cpp
│ └── srv
│ └── DriveToTarget.srv
├── CMakeLists.txt -> /opt/ros/kinetic/share/catkin/cmake/toplevel.cmake
├── my_robot
│ ├── CMakeLists.txt
│ ├── launch
│ │ ├── robot_description.launch
│ │ └── world.launch
│ ├── meshes
│ │ └── hokuyo.dae
│ ├── package.xml
│ ├── urdf
│ │ ├── my_robot.gazebo
│ │ └── my_robot.xacro
│ └── worlds
│ ├── aytest2.world
│ ├── aytest.world
│ ├── cafe.world
│ ├── empty.world
│ ├── my.world
│ └── test.world
└── simple_arm
├── CMakeLists.txt
├── config
│ └── controllers.yaml
├── images
│ └── simulation.png
├── launch
│ ├── robot_control.xml
│ ├── robot_description.xml
│ └── robot_spawn.launch
├── LICENSE
├── meshes
│ └── camera.dae
├── package.xml
├── README.md
├── src
│ ├── arm_mover.cpp
│ ├── look_away.cpp
│ └── simple_mover.cpp
├── srv
│ └── GoToPosition.srv
├── urdf
│ ├── simple_arm.gazebo.xacro
│ └── simple_arm.urdf.xacro
└── worlds
└── willow_garage.world
- Make sure you have the following installed:
- ROS
- Cmake
- gcc/g++
- Git
- Clone the project
- Go to the project folder
- Move back to
catkin_ws\
and build
$ cd ..
$ catkin_make
- Launch the world
$ source devel/setup.bash
$ roslaunch my_robot world.launch
- Open another terminal (Ctrl+Shift+T), and launch the
ball_chaser
package
$ source devel/setup.bash
$ roslaunch ball_chaser ball_chaser.launch
- Pick up the white ball and place in front of the mobile robot. The robot will follow the ball.
source build.sh
-> script builds the prodject like above.- Launch the world by using
source run-my-robot-world.sh
script. - Launch the drive_bot node using
source run-drive-bot-node.sh
script