Connect to ROS

From Lofaro Lab Wiki
Jump to: navigation, search

Installing gazebo_ros_pkgs

Install gazebo_ros_pkgs

1) Install Pre-Built Debians

sudo apt-get install ros-hydro-gazebo-ros-pkgs ros-hydro-gazebo-ros-control

2) ROS Hydro

sudo apt-get install -y gazebo

Download source code from github repository:

cd ~/catkin_ws/src
git clone -b hydro-devel

Check for any missing dependencies and automatically install them

rosdep update
rosdep check --from-paths . --ignore-src --rosdistro hydro
rosdep install --from-paths . --ignore-src --rosdistro hydro -y

3) Build packages

cd ~/catkin_ws/

Testing Gazebo with ROS Integration


source /opt/ros/hydro/setup.bash

2) Source catkin setup.bash

source ~/catkin_ws/devel/setup.bash

3) Run roscore in one terminal and rosrun gazebo_ros gazebo in another terminal

rosrun gazebo_ros gazebo

Using roslaunch to start Gazebo, world files and URDF models


roslaunch gazebo_ros empty_world.launch


roslaunch gazebo_ros empty_world.launch