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

Revision history [back]

Short answer. rospy nodes do not have a direct equivalent to roscpp ros::NodeHandle.

See (almost) duplicate question, answer, and possible workaround here.

Short answer. rospy nodes do not have a direct equivalent to roscpp ros::NodeHandle.

See (almost) duplicate question, answer, and possible workaround here.


Edit:
Yes, for rospy, in order to have rosparam list generate this:

/tester/foo     
/rosdistro     
/roslaunch/uris/host_knxps13_local__35409     
/rosversion   
/run_id

You will need to set the foo as a private parameter of the tester rospy node:

import rospy

rospy.init_node('tester')
rospy.set_param('~foo', 1)
rospy.spin()

Additional info:
http://wiki.ros.org/rospy/Overview/Parameter%20Server http://wiki.ros.org/rospy_tutorials/Tutorials/Parameters

Short answer. rospy nodes do not have a direct equivalent to roscpp ros::NodeHandle.

See (almost) duplicate question, answer, and possible workaround here.


Edit:
Yes, for rospy, in order to have rosparam list generate this:

/tester/foo     
/rosdistro     
/roslaunch/uris/host_knxps13_local__35409     
/rosversion   
/run_id

You will need to set the foo as a private parameter of the tester rospy node:

import rospy

rospy.init_node('tester')
rospy.set_param('~foo', 1)
rospy.spin()

Additional info:
http://wiki.ros.org/rospy/Overview/Parameter%20Server http://wiki.ros.org/rospy/Overview/Parameter%20Server
http://wiki.ros.org/rospy_tutorials/Tutorials/Parameters

Short answer. rospy nodes do not have a direct equivalent to roscpp ros::NodeHandle.

See (almost) duplicate question, answer, and possible workaround here.


Edit:
Yes, for rospy, in order to have rosparam list generate this:

/tester/foo     
/rosdistro     
/roslaunch/uris/host_knxps13_local__35409     
/rosversion   
/run_id

You will need to set the foo as a private parameter of the tester rospy node:

import rospy

rospy.init_node('tester')
rospy.set_param('~foo', 1)
rospy.spin()

Additional info:
http://wiki.ros.org/rospy/Overview/Parameter%20Server
http://wiki.ros.org/rospy_tutorials/Tutorials/Parameters

Short answer. rospy nodes do not have a direct equivalent to roscpp ros::NodeHandle.

See (almost) duplicate question, answer, and possible workaround here.


Edit:
Yes, for rospy, in order to have rosparam list generate this:

/tester/foo     
/rosdistro     
/roslaunch/uris/host_knxps13_local__35409     
/rosversion   
/run_id

You will need to set the foo as a private parameter of the tester rospy node:

import rospy

rospy.init_node('tester')
rospy.set_param('~foo', 1)
rospy.spin()

Additional info:
http://wiki.ros.org/rospy/Overview/Parameter%20Server
http://wiki.ros.org/rospy_tutorials/Tutorials/Parametershttp://wiki.ros.org/rospy_tutorials/Tutorials/Parameters
http://wiki.ros.org/Names#Resolving

Short answer. rospy nodes do not have a direct equivalent to roscpp ros::NodeHandle.

See (almost) duplicate question, answer, question and possible workaround answer - including way to resolve names relative to a rospy node's name - here.


Edit:
Yes, for rospy, in order to have rosparam list generate this:

/tester/foo     
/rosdistro     
/roslaunch/uris/host_knxps13_local__35409     
/rosversion   
/run_id

You will need to set the foo as a private parameter of the tester rospy node:

import rospy

rospy.init_node('tester')
rospy.set_param('~foo', 1)
rospy.spin()

Additional info:
http://wiki.ros.org/rospy/Overview/Parameter%20Server
http://wiki.ros.org/rospy_tutorials/Tutorials/Parameters
http://wiki.ros.org/Names#Resolving