Gazebo | Ignition | Community
Ask Your Question

Unable to install or run rospy

asked 2013-07-18 13:22:13 -0600

David Jeang gravatar image

I've just installed the latest drcsim. From what I've read, a way to use python scripts is included in the ros package it comes with, rospy.

However, when I try to use rospy, the terminal does not recognize the command, when I searched for it with which rospy, nothing came up.

For some reason, rospy is not be included in the drcsim package, how do I go about installing it?

edit retag flag offensive close merge delete


Hi, have you sourced the needed files? you have to source the drcsim source /usr/share/drcsim/ in every terminal if this does not source the ros files you might have to source them manually too. source /opt/ros/fuerte/setup.bash

if you are using this frequently you should at the source command to your .bashrc files

evilBiber gravatar imageevilBiber ( 2013-07-19 08:01:56 -0600 )edit

Files were already sourced in the .bashrc files, this is not the issue.

David Jeang gravatar imageDavid Jeang ( 2013-07-20 22:03:48 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2013-07-29 14:00:47 -0600

David Jeang gravatar image

Issue has been resolved. Apparently, latest modifications has changed rospy to rospython, so I can use that to launch my script.

edit flag offensive delete link more

answered 2013-07-22 01:22:07 -0600


I think I misunderstood your problem. This is more a ROS problem than a gazebo one...

There is no Programm called rospy. rospy is a rospackage containing other scripts and libraries... On groovy there is an alias rospython(I don't know if it is there on fuerte too...) which calls a python shell with roslibs loaded...

if it is really not installed the package ros-fuerte-ros-comm holds the rospy package. The drcs package should install this as a dependency so this shouldn't be a Problem.

Ros Python Scripts should simply be located in a scripts folder inside your rospackage. After you created the script you can execute it with the command

rosrun <package> <script_name>

I hope this helps you. if you want to now more about howto build/run ROS-Script you should have a look at some ros tutorials in the ROS wiki... (for example python ros subscriber) You probably want to look at rosbuild not catkin builds... (in some tutorials this can be switched at the top of the tutorials)

I hope this helps you... otherwise you should look into the ros forums...

edit flag offensive delete link more


Problem is, for some reason, it doesn't include the rospy package when I install it.

David Jeang gravatar imageDavid Jeang ( 2013-07-22 13:02:39 -0600 )edit

if you want to search for the package you should do so with: `rospack find rospy` if this really does not show the path to the rospy-package there is something really strange going on! The package should be located at something like `/opt/ros/fuerte/share/rospy`

evilBiber gravatar imageevilBiber ( 2013-07-29 04:17:31 -0600 )edit

Question Tools


Asked: 2013-07-18 13:22:13 -0600

Seen: 3,612 times

Last updated: Jul 29 '13