ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I made it work doing this
def movebase_client(ns, x, y):
client = actionlib.SimpleActionClient(ns + '/move_base', MoveBaseAction)
client.wait_for_server()
and then when you call the function,
movebase_client('Bot1', 4.0, 4.0)
2 | No.2 Revision |
I made it work doing this
def movebase_client(ns, x, y):
client = actionlib.SimpleActionClient(ns + '/move_base', MoveBaseAction)
client.wait_for_server()
and then when you call the function,
movebase_client('Bot1', 4.0, 4.0)
This, however, does not allow me to change the values in the launch file. For this, I had to use the param server. In the python file, I wrote this:
x = rospy.get_param('~x_position')
y = rospy.get_param('~y_position')
client = actionlib.SimpleActionClient('move_base', MoveBaseAction)
client.wait_for_server()
and then in the launch file I could then change the values doing this:
<node pkg="okg" name="name" type="name.py" output="screen">
<remap from="move_base" to="Bot1/move_base"/>
<param name="~x_position" type="double" value="2.0"/>
<param name="~y_position" type="double" value="2.0"/>
</node>
Thanks, osilva and Geoff.