FLIR PTU driver crashes
Hi guys.. I am at moment using FLIR PTU driver http://wiki.ros.org/flir_ptu_driver and using it in velocity mode, such that I change the velocity and thereby able to position it.
but when I change the velocity from i.e. 0.6 to 0 as soon 0 is sent to it crashes with this error message:
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::bad_lexical_cast> >'
what(): bad lexical cast: source type value could not be interpreted as target
[ptu/ptu_driver-2] process has died [pid 18566, exit code -6, cmd /home/user/catkin_ws_PTU/devel/lib/flir_ptu_driver/ptu_node state:=/joint_states __name:=ptu_driver __log:=/home/user/.ros/log/9ab9d60e-efeb-11e4-9149-001fc67e59a2/ptu-ptu_driver-2.log].
log file: /home/user/.ros/log/9ab9d60e-efeb-11e4-9149-001fc67e59a2/ptu-ptu_driver-2*.log
I know it receives the message because it stops.. but after that i am not able to communicate with it..
@215: would you please copy/paste such short error messages into your question instead of linking to a pasty site? If the link dies, this question (and any future answers) will become worthless.
It seems to crash because the driver receives empty string when i enter 0, and therefore just crashes since it cannot set the pan tilt speed from a empty string..
The issue must be in in the bool PTU::setSpeed when the PTU starts it has a initial velocity of 0.. Which it also accept without any problem, i can then change it to any speed without problem.. But when i change it to 0, it also goes to 0, but then it tries to it again.. it runs twice..
And because the second command doesn't contain any message it return false, because the buffer is empty and crashes.. So why does it receive 2 messages when "0" is entered
It only seem to be a problem i set the TILt.
The problem doesn't seem consistent.. Sometimes it is the pan other times its is the tilt.
I have the same issue here. After few minutes if left alone, or immediately if I send any command via the serial (e.g.
echo "RT" >> /dev/ttyS0
), the lexical cast is fired. The driver does not handle this, and if I try to not update speed or position when the exception is captured [...][...] the driver still sends random positions and screw up everything. I can't even leave the PTU fixed and get the tf. This is very annoying.