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

Parameter server dictionary lookups in rosjava

asked 2011-09-28 23:12:51 -0600

Alexandr Buyval gravatar image

updated 2011-09-30 02:04:54 -0600

Mac gravatar image

I've got file robot.yaml with massive of parameters

nxt_robot:
  - type: motor
    name: r_wheel_joint
    port: PORT_A
    desired_frequency: 20.0

  - type: motor
    name: l_wheel_joint
    port: PORT_B
    desired_frequency: 20.0

  - type: ultrasonic
    frame_id: ultrasonic_link
    name: ultrasonic_sensor
    port: PORT_2
    spread_angle: 0.2
    min_range: 0.01
    max_range: 2.5
    desired_frequency: 5.0

In Python I read parameters so:

config = rospy.get_param("~nxt_robot")
for c in config:
    rospy.loginfo("Creating %s with name %s on %s",c['type'],c['name'],c['port'])

How to do it in rosjava?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2011-10-08 04:09:26 -0600

damonkohler gravatar image

It is possible to look up a subtree of parameters in rosjava. It's described with an example on the wiki here: http://www.ros.org/wiki/rosjava/Overview/Parameters

edit flag offensive delete link more
2

answered 2011-09-29 07:55:43 -0600

DimitriProsser gravatar image

From what I've been able to find, rosjava does not support dictionary lookups from the parameter server. C++ also lacks this ability. You can look here for some information on rosjava parameters.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2011-09-28 23:12:51 -0600

Seen: 385 times

Last updated: Oct 08 '11