sudo apt-get remove ros-groovy-simulator-gazebo
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu precise main" > /etc/apt/sources.list.d/ros-latest.list' sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu precise main" > /etc/apt/sources.list.d/gazebo-latest.list'
sudo apt-get update sudo apt-get install gazebo
(Note: As of Gazebo 1.9 you no longer need to setup your .bashrc to always source Gazebo's setup.sh to export necessary paths.)
gzserver
The first time gzserver is executed requires the download of some models and it could take some time, please be patient. Wait until you see a message like Publicized address: … and then execute a gazebo client:
gzclient
Before attempting to install the gazebo_ros_pkgs, make sure the stand-alone Gazebo works by running in terminal:
gazebo
You should see the GUI open with an empty world. Also, test adding a model by clicking on the “Insert” tab on the left and selecting a model to add (then clicking on the simulation to select where to place the model).
mkdir -p ~/catkin_ws/src cd ~/catkin_ws/src catkin_init_workspace cd ~/catkin_ws catkin_make # Don't forget to source every time you open a terminal source ~/catkin_ws/devel/setup.bash
cd ~/catkin_ws/src # This is gazebo_ros_pkgs git clone https://github.com/ros-simulation/gazebo_ros_pkgs.git # ROS control and ROS controllers pkg new in hydro git clone https://github.com/ros-controls/ros_control.git git clone https://github.com/ros-controls/ros_controllers.git git clone https://github.com/ros-controls/control_toolbox.git git clone https://github.com/ros-controls/realtime_tools.git
rosdep update rosdep check --from-paths . --ignore-src --rosdistro groovy rosdep install --from-paths . --ignore-src --rosdistro groovy -y
cd ~/catkin_ws/ catkin_make
${PROJECT_SOURCE_DIR}/devel/lib/libvision_reconfigure.so: error: undefined reference to 'boost::thread::start_thread_noexcept()' ${PROJECT_SOURCE_DIR}/devel/lib/libvision_reconfigure.so: error: undefined reference to 'boost::thread::join_noexcept()'
You can solve the problem following the instruction below:
### Boost Thread link error FIXED By {Adam_Basfop_Cavendish: GetbetterABC@yeah.net} # ERROR description: # ${PROJECT_SOURCE_DIR}/devel/lib/libvision_reconfigure.so: error:\ # undefined reference to 'boost::thread::start_thread_noexcept()' # ${PROJECT_SOURCE_DIR}/devel/lib/libvision_reconfigure.so: error:\ # undefined reference to 'boost::thread::join_noexcept()' # # ERROR raised reason: # Linking only to libboost_thread-mt.so, but not {libboost_thread.so, libboost_thread-mt.so} # # Solution: { target_link_libraries(camera_synchronizer boost_thread) # }(end solusion: Boost Thread link error)
${PROJECT_SOURCE_DIR}/devel/lib/libcontroller_manager.so: error: undefined reference to 'boost::filesystem::path::operator/=(boost::filesystem::path const&)' ${PROJECT_SOURCE_DIR}/devel/lib/libcontroller_manager.so: error: undefined reference to 'boost::filesystem::detail::status(boost::filesystem::path const&, boost::system::error_code*)' ${PROJECT_SOURCE_DIR}/devel/lib/libcontroller_manager.so: error: undefined reference to 'boost::filesystem::path::parent_path() const' ${PROJECT_SOURCE_DIR}/devel/lib/libcontroller_manager.so: error: undefined reference to 'boost::filesystem::path::filename() const' ${PROJECT_SOURCE_DIR}/devel/lib/libcontroller_manager.so: error: undefined reference to 'boost::filesystem::path::codecvt()' ${PROJECT_SOURCE_DIR}/devel/lib/librealtime_tools.so: error: undefined reference to 'boost::thread::start_thread_noexcept()' ${PROJECT_SOURCE_DIR}/devel/lib/librealtime_tools.so: error: undefined reference to 'boost::thread::join_noexcept()'
You can solve the problem following the instruction below:
### Boost thread and filesystem link error FIXED By {Adam_Basfop_Cavendish: GetbetterABC@yeah.net} # ERROR description: # ${PROJECT_SOURCE_DIR}/devel/lib/libcontroller_manager.so: error: \ # undefined reference to 'boost::filesystem::path::operator/=(boost::filesystem::path const&)' # ${PROJECT_SOURCE_DIR}/devel/lib/libcontroller_manager.so: error: \ # undefined reference to 'boost::filesystem::detail::status(boost::filesystem::path const&, boost::system::error_code*)' # ${PROJECT_SOURCE_DIR}/devel/lib/libcontroller_manager.so: error: \ # undefined reference to 'boost::filesystem::path::parent_path() const' # ${PROJECT_SOURCE_DIR}/devel/lib/libcontroller_manager.so: error: \ # undefined reference to 'boost::filesystem::path::filename() const' # ${PROJECT_SOURCE_DIR}/devel/lib/libcontroller_manager.so: error: \ # undefined reference to 'boost::filesystem::path::codecvt()' # ${PROJECT_SOURCE_DIR}/devel/lib/librealtime_tools.so: error: \ # undefined reference to 'boost::thread::start_thread_noexcept()' # ${PROJECT_SOURCE_DIR}/devel/lib/librealtime_tools.so: error: \ # undefined reference to 'boost::thread::join_noexcept()' # # ERROR raised reason: # filesystem: Linking only to libboost_filesystem-mt.so, but not {libboost_filesystem.so, libboost_filesystem-mt.so} # thread: Linking only to libboost_thread-mt.so, but not {libboost_thread.so, libboost_thread-mt.so} # # Solution: { target_link_libraries(${PROJECT_NAME} boost_filesystem boost_thread) target_link_libraries(cm_test boost_thread boost_filesystem) # }(end solusion: Boost thread and filesystem link error)
roscore & rosrun gazebo_ros gazebo
The Gazebo GUI should appear with nothing inside the viewing window.
To verify that the proper ROS connections are setup, view the available ROS topics:
rostopic list
You should see within the lists topics such as:
/gazebo/link_states /gazebo/model_states /gazebo/parameter_descriptions /gazebo/parameter_updates /gazebo/set_link_state /gazebo/set_model_state
You can also verify the Gazebo services exist:
rosservice list
You should see within the list services such as:
/gazebo/apply_body_wrench /gazebo/apply_joint_effort /gazebo/clear_body_wrenches /gazebo/clear_joint_forces /gazebo/delete_model /gazebo/get_joint_properties /gazebo/get_link_properties /gazebo/get_link_state /gazebo/get_loggers /gazebo/get_model_properties /gazebo/get_model_state /gazebo/get_physics_properties /gazebo/get_world_properties /gazebo/pause_physics /gazebo/reset_simulation /gazebo/reset_world /gazebo/set_joint_properties /gazebo/set_link_properties /gazebo/set_link_state /gazebo/set_logger_level /gazebo/set_model_configuration /gazebo/set_model_state /gazebo/set_parameters /gazebo/set_physics_properties /gazebo/spawn_gazebo_model /gazebo/spawn_sdf_model /gazebo/spawn_urdf_model /gazebo/unpause_physics /rosout/get_loggers /rosout/set_logger_level
Other ROS Ways To Start Gazebo
There are several rosrun commands for starting Gazebo:
Launched both the server and client together
Launches the Gazebo server only
Launches the Gazebo client only
Launches the Gazebo server only, in debug mode using GDB
Additionally, you can start Gazebo using roslaunch
Fri, 19 Dec 2014 18:35:13 +0800
When I run sudo apt-get remove ros-groovy-simulator-gazebo, it also wants to remove ros-groovy-desktop-full along with ros-groovy-simulator-gazebo.
Is that right?
Wed, 14 Jan 2015 23:43:23 +0800
Yes, that's right. 'ros-groovy-desktop-full' is just a dummy package that indicates that all groovy packages are installed.
Thu, 15 Jan 2015 02:30:38 +0800
Is it ok to have all those removed? Would it cause any problem if I want to run groovy ROS alongside with Gazebo?