diff --git a/README.md b/README.md index 3890a54cd0fdc9917f23e2ad85698577b8fdb097..c3656958badabf81473ae0ccab641c99118a5718 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,12 @@ Driver to Axis IMU. +Use app file: motionloggerudp_0_6-0_mipsisa32r2el.eap + +at least. + Usage: ```bash -rosrun axis_imu axis_imu _frame_id:=imu_frame _rate:=100 _root_passwd:=pass _camera_ip:=192.168.7.19 _driver_ip:=192.168.7.160 _port:=5000 +rosrun axis_imu axis_imu _frame_id:=imu_frame _rate:=100 _root_passwd:=pass _camera_ip:=192.168.7.205 _driver_ip:=192.168.7.160 _port:=5000 ``` \ No newline at end of file diff --git a/src/axis_imu.cc b/src/axis_imu.cc index 8e47ef74493555eab0706855050b9e08a1263380..5cfc779502c036ed1df85002611dcfb7846ce426 100644 --- a/src/axis_imu.cc +++ b/src/axis_imu.cc @@ -101,11 +101,13 @@ private: double gtime = bytesToDouble(1); //float ax, ay, az, gx, gy, gz; double ax, ay, az, gx, gy, gz; - gx = bytesToDouble(9); - gy = bytesToDouble(17); - gz = bytesToDouble(25); + // Should be in rad/s + gx = bytesToDouble(9)/180.0*M_PI; + gy = bytesToDouble(17)/180.0*M_PI; + gz = bytesToDouble(25)/180.0*M_PI; double atime = bytesToDouble(34); + // Accel should be in m/s² ax = bytesToDouble(42); ay = bytesToDouble(50); az = bytesToDouble(58); @@ -265,6 +267,7 @@ int main(int argc, char *argv[]) { os << "http://" << camera_ip << "/local/motionloggerudp/control.cgi?cmd=start&target_ip=" << driver_ip + << "&target_port=" << port << "&accel_enabled=1&accel_rate_div=" << accel_div << "&gyro_enabled=1&gyro_rate_div=" << gyro_div; std::string url = os.str();