-
Notifications
You must be signed in to change notification settings - Fork 24
IMU Calibration
Program IMU_Zero library on Arduino
You can program the arduino from your computer following steps below:
- Turn off the car, disconnect the odroid power cable
- Connect the ardunio usb to your computer
- Open serial port "sudo chmod 777 /dev/ttyUSB0"
- Compile IMU_Zero library and program it on the ardunio
Copy hex file to the odroid and program the code from odroid. upload-hex-file-from-odroid-to-arduino
/opt/arduino-1.8.5/hardware/tools/avr/bin/avrdude -C/opt/arduino-1.8.5/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -carduino -P/dev/ttyArduino -b57600 -D -Uflash:w:/root/IMU_Zero.ino.eightanaloginputs.hex:i
Turn on the car, run the rplidar.launch node:
pkill ros
roslaunch rplidar_ros rplidar.launch
You can use the terminal program minicom to see the output of the arduino board in the odroid terminal window. It should be installed by default. Setup the correct serial port and baud rate first:
minicom -s
Then select 'Serial port setup'. Change 'Serial Device' to /dev/ttyArduino and 'Bps/Par/Bits' to 115200 8N1 (for main.ino) or 9600 8N1 (for initial IMU calibration with IMU_Zero.ino). After that press Enter to go back to main menu. In the 'Screen and keyboard' section you may set the 'Add carriage return' option to Yes. In the main menu select 'Save setup as dfl' and 'Exit from Minicom' to close minicom.
Open minicom again without the setup flag:
minicom
Now you can see the output of the running arduino program. To close the program press Ctrl+A, then Z to open the menu and Q (when pressing X here the configuration will be reset).
Hint: Wait 3 minutes and read the results.
-
Update your main.ino source based on the the numbers
// supply your own gyro offsets here, scaled for min sensitivity mpu.setXAccelOffset(-1643); mpu.setYAccelOffset(589); mpu.setZAccelOffset(1333); // 1688 factory default for my test chip mpu.setXGyroOffset(418); mpu.setYGyroOffset(-57); mpu.setZGyroOffset(69); -
Compile again the main.ino and program it to the arduino
/opt/arduino-1.8.5/hardware/tools/avr/bin/avrdude -C/opt/arduino-1.8.5/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -carduino -P/dev/ttyArduino -b57600 -D -Uflash:w:/root/main.ino.eightanaloginputs.hex:i
Dahlem Center for Machine Learning & Robotics, Freie Universität Berlin
- Home
- Android App
- Autostart
- Bag file Samples
- Compile ROS Packages
- Compile Arduino from Odroid
- Connect to the Odroid
- Cross compile
- Install ROS indigo
- Multiple Machines
- Navigation
- Network
- Visualize Model car's sensor data
- Web Control Center
- Hardware
- Basic Packages version 1.1
- Flashing the eMMC
- Arduino MAIN v1
- Compile Realsense Camera Library
- Patch for Model Car
- Hardware (AutoNOMOS Model v2)
- Basic Packages (AutoNOMOS Model v2)
- Flashing the eMMC (AutoNOMOS Model v2)
- Getting started (AutoNOMOS Model v2)
- Arduino MAIN (AutoNOMOS Model v2)
- Hardware (AutoNOMOS Model v3)
- Basic Packages (AutoNOMOS Model v3)
- Arduino MAIN v3
- Flashing the eMMC (AutoNOMOS Model v3)
- Patch for Realsense IR/Depth Images (AutoNOMOS Model v3)