-
Notifications
You must be signed in to change notification settings - Fork 24
Arduino MAIN (AutoNOMOS Mini v2)
You can install Ardunio Software from link below:
https://www.arduino.cc/en/Main/Software
Then Download external libraries and codes for the model car from link below:
git clone https://github.com/AutoModelCar/auto_arduino_nano.git
cd auto_arduino_nano
git checkout version-2
Copy the (MPU6050, MsTimer2, I2Cdev) libraries to the arduino-1.6.9/libraries folder.
- Turn off the car.
- Connect the USB port to Arduino nano.
- From toolbar: Tools select Arduino nano and select the correct USB port (e.g :/dev/ttyUSB0)
- Add permission to use the USB Port: sudo chmod 777 /dev/ttyUSB0
- Compile and upload the code.
Main code allows the Arduino board to calculate the yaw angle from MPU6050 through I2C.
Allows the Arduino Board to initialize the I2C device and read the raw data (gyroscopes and accelerometers) from the MPU6050 and convert it to the yaw angle. Then it sends the yaw angle in degrees through the serial port to the Odroid. To read the yaw angle, you should wait at least 10 seconds at the beginning -- then you can read the correct yaw angle in degrees with 115200 baud rate .
Serial.print("ypr\t");//yaw
Serial.println(ypr[0] * 180/M_PI);

Figure 17: Yaw angle in relation to the car’s body
When your yaw angle continuously drifts while the car is not moving or the angles doesn't match with the real world, then you should calibrate the MPU6050 sensor again.
Turn on the lidar and use the IMU_Zero/IMU_Zero.ino code to calibrate the IMU again. It takes about 10 minutes. You should update the lines below in the main.ino code, and test it again.
mpu.setXAccelOffset(-1643);
mpu.setYAccelOffset(589);
mpu.setZAccelOffset(1333);
mpu.setXGyroOffset(418);
mpu.setYGyroOffset(-57);
mpu.setZGyroOffset(69);
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)