My problem is the following:
I am using ROS and I am currently trying to read values from a PointCloud of a Kinect sensor. The values are of type PointCloud2 and PointCloud2.data holds the data of the PointCloud and is of type uint8[].
In my project I am currently using python and I have successfully registered and retrieved the data. My issue is that when trying to retrieve them python parses the uint8[] array as strings.
The current part of the script where I have the problem is the follwowing:
def PointCloud(self, PointCloud2):
self.lock.acquire()
for x in PointCloud2.data:
print x
self.lock.release()
I know that in c++ I can do something like
std::cout << static_cast< int >( u );
To get the value of the unsigned integer. Is there a static cast equivalent to python?
In my case print x outputs ASCII characters. How could I retrieve the int value of that?
Cheers,
Panos