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

fhm's profile - activity

2014-11-24 05:35:13 -0500 received badge  Notable Question (source)
2014-11-24 05:35:13 -0500 received badge  Famous Question (source)
2013-07-28 23:01:53 -0500 received badge  Popular Question (source)
2013-07-24 21:49:06 -0500 received badge  Organizer (source)
2013-07-24 21:45:24 -0500 asked a question Different Outcome using rosservice call on two laptops running the same Node

Hi folks,

Been playing around with ROS for some time, but this is my first question on the forum. Let me know if the question needs more adjustments if it isn't clear.

##Introduction to Problem ## I'm currently playing around with this multi-hop communication protocol that runs on ROS called ros-rt-wmp (www.ros.org/wiki/ros-rt-wmp).

I've followed all the instructions and have successfully set up the protocol on two separate laptops in the user space, each running their own ROS Masters. Here is some information on the laptops:

Node R0: ROS Distro: Fuerte; OS Version: Ubuntu 12.04 LTS; Python Version: 2.7.3; GCC Version: 4.6.3

Node R1: ROS Distro: Fuerte; OS Version: Ubuntu 12.04 LTS; Python Version: 2.7.3; GCC Version: 4.6.3

I can successfully publish and receive messages on each laptop.


##Problem## The PROBLEM comes at the section on controlling the ros-rt-wmp node (www.ros.org/wiki/ros-rt-wmp#Controlling_the_ros_rt_wmp):

From R1, I would like to remotely stop a topic called "/topicA" that is transmitting on R0. I use the following command on R1:

$ rosservice call /R1/remote/wmp_control [1,0,0] 1 0 0 /topicA

The output was what I hoped to see: R1 was not receiving anymore data from /topicA running on R0

I tried to use the same remote call on the other laptop. In other words, from R0, I would like to remotely stop a topic called "/topicB" that is transmitting on R1. (note that /topicA and /topicB are essentially the same). I use the following command:

$ rosservice call /R0/remote/wmp_control [0,1,0] 1 0 0 /topicB

However, the following error appears on R0:

Traceback (most recent call last):
  File "/opt/ros/fuerte/bin/rosservice", line 35, in <module>
    rosservice.rosservicemain()
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/rosservice/__init__.py", line 743, in rosservicemain
    _rosservice_cmd_call(argv)
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/rosservice/__init__.py", line 620, in _rosservice_cmd_call
    _rosservice_call(service_name, service_args, verbose=options.verbose, service_class=service_class)
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/rosservice/__init__.py", line 452, in _rosservice_call
    request, response = call_service(service_name, service_args, service_class=service_class)
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/rosservice/__init__.py", line 416, in call_service
    genpy.message.fill_message_args(request, service_args, keys=keys)
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/genpy/message.py", line 515, in fill_message_args
    _fill_message_args(msg, msg_args, keys, '')
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/genpy/message.py", line 473, in _fill_message_args
    _fill_val(msg, f, v, keys, prefix)
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/genpy/message.py", line 404, in _fill_val
    _fill_message_args(def_val, v, keys, prefix=(prefix+f+'.'))
  File "/opt/ros/fuerte/lib/python2.7/dist-packages/genpy/message.py", line 475, in _fill_message_args
    raise ValueError("invalid msg_args type: %s"%str(msg_args))
ValueError: invalid msg_args type: 1

I can't figure out why this command can work on one laptop, but not the other, considering that they were both downloaded from the same source and ... (more)