ethz-asl / ethzasl_xsens_driver

Driver for xsens IMUs
BSD 2-Clause "Simplified" License
102 stars 112 forks source link

Compatibility with both Melodic and Noetic, properly done and tested with Mark III and Mark IV devices #124

Closed peci1 closed 1 year ago

peci1 commented 1 year ago

This PR makes the driver compatible with both Melodic and Noetic. I've tested it with a Mark III device using MTData (MTi-G-28A53G35) and a Mark IV device using MTData2 (MTi-30-2A8G4) on both Melodic and Noetic. I've tested both mtnode and mtdevice (configuration, inspection, echo).

TL;DR: I'm willing to become a maintainer of the ROS 1 version of this package (if it's true it is no longer maintained) and do a binary release into Noetic. This PR is well tested and follows the best practices, while doing minimally invasive changes to the project code (eh, CMakeLists.txt got a cleanup). It fully retains backwards compatibility for existing code (except moving mtdef.py out of the nodes/ directory). It doesn't add or change any functionality or behavior.

I know there are already several PRs adding Noetic support. Yet in my view, none of them is perfect (except this one :-D )

This PR changes the file structure to properly separate library functionality (moved to a Python package) and script/CLI/node functionality (retained in nodes/ directory). To help keeping the Git history of mtdef.py and mtdevice.py, I've split this PR into multiple commits, which are easier reviewed separately:

  1. Do all the py2 -> py23 changes except moving stuff to a package.
  2. Move (with git mv) mtdef.py and mtdevice.py to a Python package (so that Git and Github figure out the files were moved and offer handy links when viewing history and blaming).
  3. Split script functionality from the moved mtdevice.py back to the nodes/mtdevice.py script. Here, the edit history of nodes/mtdevice.py is lost, but I think that the library functionality is more important to retain edit history than just the CLI.