jiminghe / Xsens_MTi_ROS_Driver_and_Ntrip_Client

Xsens MTi ROS Driver and Ntrip Client, modified based on the 2023 official ROS Driver and added Ntrip Client
24 stars 9 forks source link

Changing default port setting to define 1 stop bit #8

Closed arundathi-shanthini closed 4 months ago

arundathi-shanthini commented 4 months ago

This PR proposes a minor change to the default port settings specified in xspublic/xscontroller/iointerface.h. I have changed the default setting specified in this file to PO_OneStopBit instead of PO_TwoStopBits.

As mentioned in this tutorial for Raspberry Pi, most UART port uses 8N1 (1 stop bit), and Xsens has only some old devices that use 2 stop bits so it makes sense for the default behaviour to be 1 stop bit instead of 2 stop bits.

Without this change interfacing the MTi device via UART inevitably fails and results in "No Mti device found. Verify port and baudrate" error.

I have tested this change successfully with the IMU connected via both UART and USB interface to a board carrying a Jetson Orin NX using an MTi-1 device.

jiminghe commented 4 months ago

Thanks, I had already changed in ROS1, but forgot to change in ROS2 somehow.