Open rgov opened 2 years ago
Perhaps should remove <build_depend>pkg-config</build_depend>
now that it isn't truly needed.
I haven't forgotten about this. I think 1, 2, and 5 make a lot of sense. I'm looking at refactoring the code significantly to help reduce the number of conditional compilation blocks we're using, and I think that might catch several of your other changes.
@danthony06 For what it's worth, this included the fix to #78 already, and did it in a way that doesn't add a lot more #ifdefs. Is there still any interest in getting this merged?
Sorry, I saw this and your other PR. I'll try to get to it today or Monday.
Ah, sorry, I just noticed you were making the changes for ROS1, not ROS2. Let me see if I can backport the API changes for v12 from the ros2-devel
branch back to master
so that we have a consistent implementation across the two.
This pull request includes a few code cleanup changes. If you would prefer these as separate pull requests, please let me know.
Uses CMake's built-in
find_library
to findlibgps
rather than relying onpkg-config
, which is not populated by default on Debian.Upgrades
package.xml
to version 2 and promotessensor_msgs
andgps_common
to runtime dependencies. Previously, these were only build time dependencies, which means thatros-noetic-gpsd-client
will not auto-installros-noetic-gps-common
and hence the message definitions will not be available (rostopic echo /extended_fix
will error, etc.)Changes
process_data_navsat
to not allocate a newNavSatFix
object each time. Theprocess_data_gps
function did not have this problem.Provides a slightly hacky workaround to the fact that
gps.h
pollutes the global namespace with its macro definitions likeSTATUS_NO_FIX
. This removes the need to hardcode the enum values forNavSatStatus::STATUS_NO_FIX
etc.Removes the hardcoded default port number and instead uses
DEFAULT_GPSD_PORT
.Frees the allocated
gpsmm
instance whenstop()
is called, eliminating an extremely minor memory leak.