mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-09-11 18:50:19 +08:00
fixed maybe crash
This commit is contained in:
@@ -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`
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user