ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

ERROR: can't locate node in package [gazebo_ros]

asked 2017-05-31 07:17:57 -0500

Richardaria gravatar image

updated 2017-05-31 20:01:57 -0500

Hello~ I'm new in ROS and am learning it by the tutorials.However,there were some errors when I followed the Tutorial: Using a URDF in Gazebo. Everthing is normal until I ran the the command:

roslaunch rrbot_gazebo rrbot_world.launch

image description

However, it seems I can start gazebo by command line. image description

I have tried sudo apt-get install --reinstall ros-indigo-gazebo-ros,but it didn't work.

This is all the files I have in /opt/ros/indigo/lib/gazebo_ros/.Is there anything wrong?

image description

Thanks a lot for your help!

edit retag flag offensive close merge delete


How did you install gazebo_ros -- from source or from apt-get? What does rospack find gazebo_ros return?

jarvisschultz gravatar image jarvisschultz  ( 2017-05-31 07:31:00 -0500 )edit

It returns this: /opt/ros/indigo/share/gazebo_ros

Should I reinstall Gazebo?

Richardaria gravatar image Richardaria  ( 2017-05-31 07:49:51 -0500 )edit

You could certainly try sudo apt-get install --reinstall ros-indigo-gazebo-ros although, that wouldn't explain what went wrong in the first place. Do you have the missing executables in /opt/ros/indigo/lib/gazebo_ros/ (that's where they should get installed)?

jarvisschultz gravatar image jarvisschultz  ( 2017-05-31 10:33:10 -0500 )edit

I tried sudo apt-get install --reinstall ros-indigo-gazebo-ros.However,the same problem still exist. I have attached a screenshot of all the files I got in /opt/ros/indigo/lib/ga zebo_ros/. Is there any problem? Thanks for your help!

Richardaria gravatar image Richardaria  ( 2017-05-31 19:54:16 -0500 )edit

If that works, then there is likely something wrong with your workspace. Try deleting the build/ and devel/ directories and then re-running catkin_make

jarvisschultz gravatar image jarvisschultz  ( 2017-06-01 14:09:46 -0500 )edit

Also, as a side note, please stop posting images to show information that is fundamentally text (list files in a directory, error messages, terminal commands, etc.). Images are not searchable nor are they copy/paste-able. Please post this type of thing using the preformatted text button.

jarvisschultz gravatar image jarvisschultz  ( 2017-06-01 14:11:38 -0500 )edit

It works just as you said.Thanks a lot. It seems that I have installed gazebo twice.I'm not very familiar with the editor of this website, learning and improving. Thanks for you advice.

Richardaria gravatar image Richardaria  ( 2017-06-01 20:06:20 -0500 )edit

Is your original question resolved? Can you now run your rrobt launch file?

jarvisschultz gravatar image jarvisschultz  ( 2017-06-02 09:43:33 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted

answered 2017-06-01 14:08:36 -0500

updated 2017-06-01 14:09:06 -0500

Do you maybe have an additional copy of gazebo_ros in your workspace? Try using rosrun to manually start one of the missing nodes: (i) start roscore (ii) source /opt/ros/indigo/setup.bash to use just the base install (deactivates your workspace) (iii) rosrun gazebo_ros gzserver

edit flag offensive delete link more

answered 2020-01-31 05:23:47 -0500

harrynick gravatar image

This worked for me:-

sudo chmod +x /file path*(gzserver)

sudo chmod +x /file path*(gzclient)

sudo chmod +x /file path*(spawn_model)

*means location where the files are present

for eg:/home/tom/project_ws/src/gazebo_ros/gazebo_ros/scripts/gzclient

edit flag offensive delete link more


This works for me, too. Thanks!

Jeremy_Liu gravatar image Jeremy_Liu  ( 2022-04-11 23:19:29 -0500 )edit

This works for me, too. Ty!

Hector P gravatar image Hector P  ( 2023-01-19 08:47:50 -0500 )edit

answered 2019-01-28 03:22:31 -0500

lyz gravatar image

I solved this issue by these steps: 1. delete build and devel folders. 2. catkin_make.

edit flag offensive delete link more

Question Tools



Asked: 2017-05-31 07:17:57 -0500

Seen: 6,282 times

Last updated: Jan 31 '20