fixed maybe crash

This commit is contained in:
Joe Dong
2024-04-24 14:14:05 +08:00
parent 4a231309ee
commit cd559297ce
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ This command initiates the camera node and enables the colored point cloud.
Once the camera node is running, it will publish data on several ROS topics. Below is a list of the available topics:
- **IMU and Gyro Information:**
- **IMU Data and IMU Information:**
- `camera/accel/imu_info`
- `camera/gyro/imu_info`
- `camera/gyro_accel/sample`
+3
View File
@@ -383,6 +383,9 @@ OB_DEPTH_PRECISION_LEVEL depthPrecisionLevelFromString(
float depthPrecisionFromString(const std::string &depth_precision_level_str) {
// covert 0.8mm to 0.8
if (depth_precision_level_str.size() < 2) {
return 1.0;
}
std::string depth_precision_level_str_num =
depth_precision_level_str.substr(0, depth_precision_level_str.size() - 2);
return std::stof(depth_precision_level_str_num);