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

gazebo_msgs.msg import * ImportError: No module named msg, while trying to roslaunch to psawn urdf robots

asked 2017-12-07 07:48:08 -0500

anwesha.khasnobish gravatar image

updated 2017-12-07 10:38:23 -0500

jayess gravatar image

I am trying to spawn an already built .urdf file using ros launch, according to the tutorial in http://gazebosim.org/tutorials?tut=ro...

I have getting the error:

 rosrun gazebo_ros spawn_model -file `rospack find cnbiros_wheelchair`/model/wheelchair.urdf -urdf -z 1 -model wheelchair
Traceback (most recent call last):
  File "/opt/ros/kinetic/lib/gazebo_ros/spawn_model", line 26, in <module>
    from gazebo_ros import gazebo_interface
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/gazebo_ros/gazebo_interface.py", line 9, in <module>
    from gazebo_msgs.msg import *
ImportError: No module named msg

I have already installed gazebo_msgs using sudo apt-get install ros-kinetic-gazebo-msgs

Please help to solve this.

edit retag flag offensive close merge delete

Comments

I also have the same error in Gazebo version 7.8.1 and ros-kinetic in Virtual Box with Ubuntu 16.04. Have anyone solved it?

Daria gravatar image Daria  ( 2018-01-31 13:59:14 -0500 )edit

I also met the same problem, has any friend already solved it? could you please do me a favour? qq:577750702 Thank U very much!!

Alice_ly gravatar image Alice_ly  ( 2021-01-27 19:45:21 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-04-27 03:34:56 -0500

dharmendra gravatar image
  1. First, make sure gazebo_ros_pkgs is installed.
  2. Build your catkin work-space by using either "catkin_make" or "catkin build" (depends on, which command you used while creating catkin work-space).
  3. source your environment by " $ source ~/catkin_ws/devel/setup.bash " . Note : "catkin_ws" name may differ, if you have used different name for your catkin work-space.
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-12-07 07:48:08 -0500

Seen: 1,139 times

Last updated: Apr 27 '20