ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
The rosrun documentation should help here:
It's also possible to pass a
~parameter
using the following syntax (replace the~
with an_
):rosrun package node _parameter:=value
Example:
rosrun my_package my_node _my_param:=value
2 | No.2 Revision |
The rosrun documentation should help here:
It's also possible to pass a
~parameter
using the following syntax (replace the~
with an_
):rosrun package node _parameter:=value
Example:
rosrun my_package my_node _my_param:=value
Note:
So something like:
rosrun my_package read_topics.py arg1:='/topic1' arg2:='/topic2'
The exact syntax you're using in your example is actually the syntax you'd use for remapping topics from the command line with rosrun
.
And be able to access those inside the python code like for example
subscriber = rospy.Subscriber(arg1, Bool, callback) publisher = rospy.Publisher(arg2, Bool, queue_size=1)
that's not how this would work.
You'd access the parameters as private parameters (Using Parameters in rospy).