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

Sara's profile - activity

2013-09-06 19:57:50 -0500 received badge  Student (source)
2013-01-18 15:49:56 -0500 received badge  Famous Question (source)
2013-01-18 15:49:56 -0500 received badge  Popular Question (source)
2013-01-18 15:49:56 -0500 received badge  Notable Question (source)
2011-07-22 12:49:24 -0500 marked best answer Usarsim sends string data

If its just a mater of converting a std::string to a double, it doesn't get easier than using boost::lexical_cast as follows

#include <boost/lexical_cast.hpp>
...
std::string str; // keep the string here
double result = boost::lexical_cast<double>(str);

have fun

2011-07-19 20:27:00 -0500 answered a question Usarsim sends string data

kikkkkkkkkk

2011-07-19 19:12:03 -0500 commented answer Usarsim sends string data
This is a sample of the string coming from usarsim: data: STA{Time 154829.4375} {FrontSteer 0} {RearSteer 0} {Battery 99999}data: SEN {Type RangeScanner} {Name lms200} {Resolution 0.1744} {FOV 3.1414} {Range 6.76,6.87,7.20,5.31,6.22,7.41,7.59,7.00,6.68,6.58,6.68,7.00,7.59,8.59,10.23,13 - Sara (5 min
2011-07-19 19:11:47 -0500 commented answer Usarsim sends string data
when I do the solution above I get this message: message_traits.h:121:34: error: request for member ‘__getMD5Sum’ in ‘m’, which is of non-class type ‘const double’ Please advise
2011-07-19 18:51:46 -0500 commented answer Usarsim sends string data
The problem is that the string coming from usarsim is about 600 character length. Some of them are text and the other are sensor readings.does your solution above solve the problem?
2011-07-19 18:51:46 -0500 commented answer Usarsim sends string data
The problem is that the string coming from usarsim is about 600 character length. Some of them are text and the other are sensor readings.does your solution above solve the problem?
2011-07-19 18:26:09 -0500 commented answer Usarsim sends string data
Thanks Mak,
2011-07-18 19:28:05 -0500 asked a question Usarsim sends string data

I am trying to implement robot exploration by ROS-Usarsim, the sensor data comes from the Usarsim as a variable length string, How can I receive these data as a double so I can use it for building my map.