Project

General

Profile

Actions

Bug #62

closed

Access to service parameters through ros

Added by Aurélie Clodic almost 10 years ago. Updated almost 10 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-

Description

After some tests of demo ros nodes, i've got an issue concerning the use of rosservice call.
To get the parameters of a service, i use :
aclodic@gupta > rosservice info /demo/SetSpeed
Node: /demo
URI: rosrpc://gupta:40975
Type: demo/SetSpeed
Args: speedRef

Normally to get the type of the parameters of a service i can use (cf 2.7 http://wiki.ros.org/rosservice) rossrv but there it fails :
aclodic@gupta > rosservice type demo/SetSpeed | rossrv show
Unknown srv type [demo/SetSpeed]: Cannot locate message [SetSpeed]:

Then i finally achieve to find a way to call the service with its parameters, but it seems it is not possible to use ENUM :
aclodic@gupta > rosservice call /demo/SetSpeed '{speedRef: {value: FAST}}'
(...)
NameError: (...)

a way to handle it is to do it like that :
aclodic@gupta > rosservice call /demo/SetSpeed '{speedRef: {value: 0}}'
genom_exception: False
genom_exdetail: ''

A last comment is that this sentence : "genom_exception: False" is quite confusing...

ps: would be nice to have access to "Issue" category instead of choosing between "Bug" or "Pull Request" only


Related issues 1 (0 open1 closed)

Copied to genom3-ros - Bug #63: genom_exception in service output may be confusingClosed2014-07-04Actions
Actions #1

Updated by Arnaud Degroote almost 10 years ago

- Do you build the ros/client/ros and install it properly? Does your environment is properly configured ? The SetSpeed.srv seems properly generated and installed.
- the constant for "FAST" is mobilelocointerface_FAST (no proper support of enum in ROS syntax
- Do you suggest that it would be better to use 'genom_success: True | False' (and in False case, have a proper genom_exdetail) or something else ? *

- What do you mean by 'Issue' (different of Bug) ? If you are not sure about the use of the software, the mailing-list is probably a better tool. And the proper section for this bug is genom3-ros.

Actions #2

Updated by Anthony Mallet almost 10 years ago

  • Project changed from genom3 to genom3-ros
Actions #3

Updated by Anthony Mallet almost 10 years ago

  • Copied to Bug #63: genom_exception in service output may be confusing added
Actions #4

Updated by Aurélie Clodic almost 10 years ago

We achieve to access to the parameter by setting correctly ROS_PACKAGE_PATH
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$INSTALL_PATH/share/

aclodic@gupta > rosservice type /demo/SetSpeed | rossrv show
demo/demo_speed speedRef
uint32 demo_SLOW=0
uint32 demo_FAST=1
uint32 value
---
bool genom_exception
string genom_exdetail

However, it seems not possible to access to the parameter through the ENUM.

Actions #5

Updated by Anthony Mallet almost 10 years ago

  • Status changed from New to Rejected
  • ROS_PACKAGE_PATH must be configured correctly for `rossrv show`
  • ros has no proper support for enumerated values, it seems, and it's a ros issue anyway.
Actions

Also available in: Atom PDF