Re: [ros-users] XmlRpcValue Array in launch file

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
Delete this message
Reply to this message
Author: Antons Rebguns
Date:  
To: ros-users
Subject: Re: [ros-users] XmlRpcValue Array in launch file
You could use rosparam tag:
http://www.ros.org/wiki/roslaunch/XML/rosparam

E.g. <rosparam param="marker_center">[0.0, 0.0]</rosparam>

Anton

On Sun, Apr 11, 2010 at 2:35 AM, Dejan Pangercic
<>wrote:

> Hi Bill,
>
> according to the documentation here:
> http://www.ros.org/wiki/roslaunch/XML/param, such construct is not
> possible. I circumvent that however with string cpp splitting:
> <param name="pcd_name_position_param" type="string" value="1.5 0.0 0.5" />
>
> And then in your node you'd want a simple parser:
> .....
> geometry_msgs::Point32 pcd_name_position_;
> nh_.param ("pcd_name_position_param", pcd_name_position_param_,
> std::string("1.0 1.0 1.0"));
> std::istringstream iss(pcd_name_position_param_);
> iss >> pcd_name_position_.x >> pcd_name_position_.y >>
> pcd_name_position_.z;
> ROS_DEBUG("pcd_name_position_[0]: %f pcd_name_position_[1]: %f
> pcd_name_position_[2]: %f;",
>                   pcd_name_position_.x, pcd_name_position_.y,
> pcd_name_position_.z);
> ......
> hope this helps, D.
> On Sun, Apr 11, 2010 at 10:53 AM, Bill Morris <>
> wrote:
> > I can't find documentation anywhere for formatting an array properly in
> > the launch file.

> >
> > This does not work
> > <param name="marker_center" value="[0.0, 0.0]"/>
> >
> > This works
> > <rosparam command="load" file="marker.yaml"/>
> >
> > where marker.yaml is
> >
> > marker_center: [0.0,0.0]
> >
> > Any ideas as to what I'm doing wrong?
> >
> > Thanks,
> > -Bill
> >
> > _______________________________________________
> > ros-users mailing list
> >
> > https://code.ros.org/mailman/listinfo/ros-users
> >
>
>
>
> --
> MSc. Dejan Pangercic
> PhD Student/Researcher
> Computer Science IX
> Technische Universität München
> Telephone: +49 (89) 289-17780
> E-Mail:
> WWW: http://ias.cs.tum.edu/people/pangercic
> _______________________________________________
> ros-users mailing list
>
> https://code.ros.org/mailman/listinfo/ros-users
>