AlexisTM / rtk_ros

Read UBX M8P-2 and publish RTCM messages for mavros from ROS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Got stuck at while loop

gitsr-sys opened this issue · comments

@AlexisTM

Hello,
I know this is an old abandoned package, but I have a quick question regarding the code..

When I ran the node (rosrun rtk_ros rtk_node), the code got stuck at the while loop
https://github.com/AlexisTM/GpsDrivers/blob/master/src/ubx.cpp#L431
during GPSDriverUBX::configure(unsigned &baudrate, OutputMode output_mode) https://github.com/AlexisTM/GpsDrivers/blob/master/src/ubx.cpp#L107 which is ran by the line https://github.com/AlexisTM/rtk_ros/blob/master/rtk_ros/include/rtk_ros/rtk_node.hpp#L102

Is it your intention...?
I seems like not working correctly for the while loop..

I know you are busy, but please have a look for seconds... and please let me know..

Thank you in advance..

Hey, this is the configuration step, solely handled by the gpsdrivers library from https://github.com/PX4/PX4-GPSDrivers

I suppose there is a serial communication issue with your GPS device as it is supposed to return from the while(true) once the data is received. I generally use interceptty to check the serial traffic live.

Regardless, I would suggest you to first update the gpsdrivers library, it has come from a long way over 6 years.

@AlexisTM
Thank you for your answer.
I had a look GPSDriverUBX::receive(unsigned timeout) block, and it seems there is no change... the while loop logic seems the same with yours..

Do you think it can be out of while(true) with return handled??
https://github.com/AlexisTM/GpsDrivers/blob/master/src/ubx.cpp#L477

Yes, it does go out of the while(true) with it.

@AlexisTM
Is there any plan to convert this package for ROS2?