tf::TransformListener for Arduino
Hi, Sorry for the mistakes, as English is not my native language. I have a code having the following lines:
tf::TransformListener listener;
tf::StampedTransform transform;
while (ros.ok())
{
try
{
listener.lookupTransform("/map", "/base_link", ros::Time(0), transform);
}
catch (tf::TransformException ex)
{
ROS_ERROR("Transform problem -> %s", ex.what());
}
}
I need to handle tf::TransformException
without try
and catch
block because this part of code should be executed on Arduino. Appreciate any help.
If your idea is to call TransformListener.lookupTransform() on the Arduino, that is a bad idea. The operation is too heavy for a rs-232 serial link and small cpu unless you have no other choice. Please edit your description and explain more clearly what you think the Arduino needs to do. Publishing sensor data does not require knowing any transforms for the ros system.
Thank you for reply. I have a node that finds robot position, than subscribes to data from topic that contains data from sensors. That data is published by arduino. My thought was to make sure that arduino is started publish data in same time as node, that subscribes to that data is run so no data from sensors is missed.