| 281 | } |
| 282 | |
| 283 | void writeCSVImu(shared_ptr<std::ofstream> file, sensor_msgs::Imu::ConstPtr imu) { |
| 284 | std::ostringstream ss; |
| 285 | ss << std::setprecision(DOUBLE_PRECISION) << imu->header.stamp.toNSec() << "," << imu->angular_velocity.x << "," |
| 286 | << imu->angular_velocity.y << "," << imu->angular_velocity.z << "," << imu->linear_acceleration.x << "," |
| 287 | << imu->linear_acceleration.y << "," << imu->linear_acceleration.z; |
| 288 | *file << ss.str() << endl; |
| 289 | } |
| 290 | |
| 291 | void writeCSVVicon(shared_ptr<std::ofstream> file, geometry_msgs::TransformStamped::ConstPtr vicon) { |
| 292 | std::ostringstream ss; |