Closed aserbremen closed 2 years ago
I also tried setting the correct port
(/dev/ttyUSB0) or the device_id
(from the xsens mtmanager) in the /param/xsens_mti_node.yaml
of your package which didn't resolve the issue.
I contacted the Xsens support which helped with my problem. After installing the bluespace xsens driver I had to configure the following yaml file: <ros2_ws>/install/bluespace_ai_xsens_mti_driver/share/bluespace_ai_xsens_mti_driver/param/xsens_mti_node.yaml
By setting scan_for_devices
to false
and setting the correct port
(/dev/ttyUSB0
) as well as baudrate (115200
) the ros package found the xsens IMU.
@aserbremen Changing the configurations in the xsens_mti_node.yaml currently requires a rebuild of the package. During a colcon build, this yaml file is copied into the install directory in the ros2_ws. Just and FYI, If you have edited the yaml file in the install directory, it will take the configurations from it, however any future rebuilding of the package (directly or indirectly) will end up replacing the edited file in the install folder with the one from the /param/xsens_mti_node.yaml version. So recommended way currently is to edit the /param/... version and compile the package.
@jollysg thanks for you reply, I will stick to your suggested method. I think it might make sense, setting certain variables, such as scan_for_devices, port, and baudrate, as command line arguments to the launch file. This is not possible at the moment if I understand correctly.
@aserbremen Existing launch file is meant simply to give an example of configurations and help with jump starting the use of the package. The use cases for the sensor can expand enormously with different projects, some may even have multiple IMUs requiring multiple driver nodes. Hence, recommended approach would be to create their own launch file with their custom launch configurations.
Here are the two options you can use:
ros2 run bluespace_ai_xsens_mti_driver xsens_mti_node --ros-args --params-file <param-file-path/file.yaml>
keep in mind, you can also specify the individual parameters using the parameter argument (-p) with the executable.
For eg, ros2 run bluespace_ai_xsens_mti_driver xsens_mti_node --ros-args -p scan_for_devices:=False -p port:=/dev/xxxx -p baudrate:=115200
@jollysg Thanks, I'm new to ros2 and this helped me understand the command line arguments
I tried installing the bluespace_ai_xsens_ros_mti_driver on a Ubuntu 20.04 machine with ros2 foxy. I followed the installlation guidelines and I am also in the correct group (dialout).
When running
ros2 launch bluespace_ai_xsens_mti_driver xsens_mti_node.launch.py
I get the error:
[xsens_mti_node-1] [ERROR] [1636372933.308295039] [xsens_mti_node]: No MTi device found.
The xsens mtmanager can find the MTi-3 device when clicking 'Scan Single Port' ttyUSB0. But the mtmanager cannot find the device when clicking 'Scan All Ports', I don't know if this information might be helpful.