Skip to content
Snippets Groups Projects
Commit 27945e5d authored by Tommy Persson's avatar Tommy Persson
Browse files

Driver updated to

parent 05d4773a
No related branches found
No related tags found
No related merge requests found
...@@ -2,8 +2,12 @@ ...@@ -2,8 +2,12 @@
Driver to Axis IMU. Driver to Axis IMU.
Use app file: motionloggerudp_0_6-0_mipsisa32r2el.eap
at least.
Usage: Usage:
```bash ```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
...@@ -101,11 +101,13 @@ private: ...@@ -101,11 +101,13 @@ private:
double gtime = bytesToDouble(1); double gtime = bytesToDouble(1);
//float ax, ay, az, gx, gy, gz; //float ax, ay, az, gx, gy, gz;
double ax, ay, az, gx, gy, gz; double ax, ay, az, gx, gy, gz;
gx = bytesToDouble(9); // Should be in rad/s
gy = bytesToDouble(17); gx = bytesToDouble(9)/180.0*M_PI;
gz = bytesToDouble(25); gy = bytesToDouble(17)/180.0*M_PI;
gz = bytesToDouble(25)/180.0*M_PI;
double atime = bytesToDouble(34); double atime = bytesToDouble(34);
// Accel should be in m/s²
ax = bytesToDouble(42); ax = bytesToDouble(42);
ay = bytesToDouble(50); ay = bytesToDouble(50);
az = bytesToDouble(58); az = bytesToDouble(58);
...@@ -265,6 +267,7 @@ int main(int argc, char *argv[]) { ...@@ -265,6 +267,7 @@ int main(int argc, char *argv[]) {
os << "http://" << camera_ip os << "http://" << camera_ip
<< "/local/motionloggerudp/control.cgi?cmd=start&target_ip=" << driver_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; << "&accel_enabled=1&accel_rate_div=" << accel_div << "&gyro_enabled=1&gyro_rate_div=" << gyro_div;
std::string url = os.str(); std::string url = os.str();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment