-
Install the MTi USB Serial Driver
$ git clone https://github.com/xsens/xsens_mt.git $ cd ~/xsens_mt $ make $ sudo modprobe usbserial $ sudo insmod ./xsens_mt.ko
-
Install gps_common
$ sudo apt-get install ros-distro-gps-common
-
Copy the contents of the src folder into your catkin workspace 'src' folder. Make sure the permissions are set to o+rw on your files and directories. For details on creating a catkin workspace environment refer to Creating a catkin ws
-
in your catkin_ws ($CATKIN) folder, execute
$ catkin_make
-
Source the environment for each terminal you work in. If necessary, add the line to your .bashrc
. $CATKIN/devel/setup.bash
-
Initiate the ros core
$ roscore
-
Open a new terminal, type
$ . $CATKIN/devel/setup.bash $ rosrun xsens_driver mtdevice.py -m $sm -f $fs # publish sensor data
where $fs can be 1,5,10,20,40,50,80,100,200 or 400Hz. This configures the MTi to output inertial data and magnetometer data at the set ODR. The maximum supported inertial update rate is 400Hz and for the magnetometer it is 100Hz. The $sm can be set to 1,2 or 3. This can be used to set the sensor to output sensor data or filter outputs.
-
To run the node
$ rosrun xsens_driver mtnode.py _device:=/dev/ttyUSB0 _baudrate:=115200
or
$ rosrun xsens_driver mtnode.py
-
Open a new terminal (do not forget step 3)
$ . $CATKIN/devel/setup.bash $ rostopic echo /mti/sensor/sample
or
$ . $CATKIN/devel/setup.bash $ rostopic echo /mti/sensor/imu