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

roscpp: set / get vector containing infinity from parameter server

asked 2020-10-20 04:52:36 -0600

d.fenucci gravatar image

Hello everyone,

I would to read a vector containing some infinity components from the ROS parameter server. I have included the following line in the roslaunch:

<rosparam param="my_vector">[0.0, inf, 0.0]</rosparam>

Using the command line rosparam get tool, the vector seems to be loaded correctly in the parameter server, but trying to read it from my node with the following lines:

std::vector<double> v;
ros::param::get("my_vector", v);

returns false.

Is there any built-in way to set / get an infinity value from the parameter server?

Thank you in advance

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-10-20 05:17:36 -0600

gvdhoorn gravatar image

updated 2020-10-20 05:18:29 -0600

Shouldn't it be .inf instead? Your v is a vector<double>.

Related: #q275681.

edit flag offensive delete link more

Comments

Yes, that works! Many thanks

d.fenucci gravatar image d.fenucci  ( 2020-10-20 05:27:53 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2020-10-20 04:52:36 -0600

Seen: 465 times

Last updated: Oct 20 '20