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

rospy nodes

asked 2012-02-23 02:03:11 -0500

cassander gravatar image

The rospy API docs have a list of modules that are part of the rospy library. For someone wanting to write nodes using rospy, which modules in the api docs should he/she be concerned with. The reason I ask is that some of those modules are marked internal only. Does that mean people writing nodes need not be concerned with them?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2012-02-23 05:12:55 -0500

Eric Perko gravatar image

For writing a rospy node, the best documentation of the rospy API is the rospy overview.

The most commonly used rospy functionality is documented there. In general, I would suggest only looking at the autogenerated API docs if you can't find what you are looking for in the overview pages.

edit flag offensive delete link more

answered 2012-02-23 02:16:18 -0500

Lorenz gravatar image

updated 2012-02-23 02:20:47 -0500

In most cases you will not need to import (and use) anything else than just rospy.

edit flag offensive delete link more


had to import rospy.core.is_shutdown(). The API docs don't mention anything about rospy.is_shutdown().

cassander gravatar image cassander  ( 2012-02-23 02:41:40 -0500 )edit

rospy exports is_shutdown. You don't need to import rospy.core.

Lorenz gravatar image Lorenz  ( 2012-02-23 02:43:44 -0500 )edit

@Lorenz Not trying to be pedantic, but if rospy exports 'is_shutdown', shouldn't that be explicitly mentioned in the api docs for rospy?

cassander gravatar image cassander  ( 2012-02-23 04:58:20 -0500 )edit

Using rospy.is_shutdown() as a loop condition is a very common idiom that you'll see if you look through the python tutorials.

Dan Lazewatsky gravatar image Dan Lazewatsky  ( 2012-02-23 05:37:07 -0500 )edit

See Eric Perko's comment. epydoc (the autodoc tool) is not capable of handling namespace remappings of symbols, which is why it lists 'is_shutdown' as 'rospy.core.is_shutdown'. The rospy wiki page has a comprehensive overview of the public API.

kwc gravatar image kwc  ( 2012-02-23 05:44:58 -0500 )edit

Question Tools


Asked: 2012-02-23 02:03:11 -0500

Seen: 656 times

Last updated: Feb 23 '12