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

Accessing float/double list using rosparam

asked 2013-07-03 03:07:16 -0600

Subhasis gravatar image

updated 2013-07-03 03:08:00 -0600

Hi All,

I am having a problem to access a float array using rosparam.

I have my parameters inside a lunch file as given below.

<launch> <node name="target_follow" pkg="target_follow" type="target_follow" respawn="false" output="screen" required="true"> <rosparam> max_height: 1 min_height: 0.4 debug_windows: false debug_messages: false camera_param: [543.848868, 0.0, 297.599352,297.599352, 0.0, 543.745831, 240.206525, 0.0, 0.0, 1.0] </rosparam> </node> </launch>

I am able to access all my parameters by following way.

    ros::param::getCached("/target_follow/max_height", maxHeight);
    ros::param::getCached("/target_follow/min_height", minHeight);
    ros::param::getCached("/target_follow/debug_windows", showDebugWindows);
    ros::param::getCached("/target_follow/debug_messages", showDebugMessages);

can someone suggest me how can I access the list without a nodehandle object;

Regards, Subhasis

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-07-03 05:39:17 -0600

dornhege gravatar image

You'll need to do that as described here.

edit flag offensive delete link more


Thanks. It works fine now.

Subhasis gravatar image Subhasis  ( 2013-07-04 23:36:49 -0600 )edit

Question Tools


Asked: 2013-07-03 03:07:16 -0600

Seen: 6,612 times

Last updated: Jul 03 '13