oCamS-1MGN-U_User Manual_Getting Started(E)

oCamS-1MGN-U Getting Started
www.withrobot.com Page 22
IMU Data
On Linux system of Ubuntu16.04, the oCamS-1MGN-U and the IMU appear as /dev/video* and
/dev/ttyACM* respectively.
To access to the ttyACM device, a super user privilege is required and it can be obtained
following the procedure describe below.
1. Use a text editor (such as vi or gedit) to create a rule file with the name of 99-
ttyacms.rules.
$ sudo vi /etc/udev/rules.d/99-ttyacms.rules
2. Enter the followings into the rule file:
ATTRS{idVendor}=="04b4" ATTRS{idProduct}=="00f9", MODE="0666",
ENV{ID_MM_DEVICE_IGNORE}="1"
ATTRS{idVendor}=="04b4" ATTRS{idProduct}=="00f8", MODE="0666",
ENV{ID_MM_DEVICE_IGNORE}="1"
3. Apply the udev rule using the following command:
$ sudo udevadm control reload-rules
The IMU data will be sent out as a serial data in ASCII format with 4 selectable modes:
Mode
Message Content
$AMGEUL
Accel(x,y,z), Magnetometer(x,y,z), Gyro(x,y,z), Euler(r,p,h)
$AMGQUA
Accel(x,y,z), Magnetometer(x,y,z), Gyro(x,y,z), Quaternion(x,y,z,w)
$LMGEUL
LinearAccel(x,y,z), Magnetometer(x,y,z), Gyro(x,y,z), Euler(r,p,h)
$LMGQUA
LinearAccel(x,y,z), Magnetometer(x,y,z), Gyro(x,y,z), Quaternion(x,y,z,w)