ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
1) your code won't work even if param names is correctly set as array of strings. You will have to change
std::vector<std::string> names;
for
XmlRpc::XmlRpcValue names;
XmlRpc value can conditionally contain primitive data values, structures or arrays. If param names is an array it will return an array into the XmlRpcValue type object and the rest of your code will work without modifications...
2) I am not sure if this is possible via command line node arg at all. If you used rosparam set names
it'd be [max, susi]. However, this apparently does not work as rosrun node argument. Maybe the command line parsing is not able to cope with that.
2 | No.2 Revision |
1) your code won't work even if param names is correctly set as array of strings. You will have to change
std::vector<std::string> names;
for
XmlRpc::XmlRpcValue names;
XmlRpc value can conditionally contain primitive data values, structures or arrays. If param names is an array it will return an array into the XmlRpcValue type object and the rest of your code will work without modifications...
2) I am not sure if this it is possible to set parameter array via command line node arg argument at all. It is possibile programmatically or using command line rosparam set
. If you used rosparam set names
it'd be [max, susi]. However, this apparently does not work as rosrun node argument. Maybe the command line parsing is not able to cope with that.
3 | No.3 Revision |
1) your Your code won't should work even if param names is correctly set as array of strings. You will have in groovy and above. If you use fuerte or previous versions you'd need to change change:
std::vector<std::string> names;
for
XmlRpc::XmlRpcValue names;
XmlRpc value can conditionally contain primitive data values, structures or arrays. If param names is an array it will return an array into the XmlRpcValue type object and the rest of your code will work without modifications...
2) I am not sure if it is possible to set parameter array via command line node argument at all. It is possibile programmatically or using command line rosparam set
. If you used rosparam set names
it'd be [max, susi]. However, this apparently does not work as rosrun node argument. Maybe the command line parsing is not able to cope with that.
4 | No.4 Revision |
1) Your code should work in groovy and above. If you use used fuerte or previous versions you'd need to change:
std::vector<std::string> names;
for
XmlRpc::XmlRpcValue names;
XmlRpc value can conditionally contain primitive data values, structures or arrays. If param names is an array it will return an array into the XmlRpcValue type object and the rest of your code will work without modifications...
2) I am not sure if it is possible to set parameter array via command line node argument at all. It is possibile programmatically or using command line rosparam set
. If you used rosparam set names
it'd be [max, susi]. However, this apparently does not work as rosrun node argument. Maybe the command line parsing is not able to cope with that.