<feat> 1. add config option in control_command.yaml to by-pass strict usb 3.0 check, allow connection even if it is slower than usb 3.0

2. add excute permission for build scripts by default
This commit is contained in:
mt-lifan
2025-10-31 15:06:47 +08:00
parent 8d337abf8e
commit b4adaf355d
5 changed files with 31 additions and 19 deletions
+2 -1
View File
@@ -16,7 +16,7 @@ This driver package provides core functionality for point cloud SLAM application
## 1. Version
Current Version: v0.6.0
Current Version: v0.6.1
## 2. Preparation
@@ -306,6 +306,7 @@ float32 rgb // RGB value
|control_command.yaml | Detailed Description |
|-----------------------|----------------------|
| strict_usb3.0_check | Strict USB3.0 check, if off, allow connection even if usb connection is below usb 3.0 |
| recorddata | Record data in specific format that can be imported into MindCloud(TM) for post-processing. Please be aware that this will consume a lot of storage space. Testing shows 9.5G for 10mins of data. |
| devstatuslog | Device status logging, currently save device status (soc temperature, cpu usage, ram usage, dtof sensor temp .etc) and data tx & rx rate to devstatus.csv under log folder. A new file will be created every time the driver is started. |
| showcamerapose | Display Camera Pose and Field of View. |
+2 -1
View File
@@ -1,4 +1,5 @@
register_keys:
strict_usb3.0_check: 0 # 0: off: 1: on; if off, allow connection even if usb connection is below usb 3.0
streamctrl: 1 # 0: off; 1: on
sendrgb: 1 # 0: off; 1: on
sendimu: 1 # 0: off; 1: on
@@ -17,6 +18,6 @@ register_keys:
custom_save_map: 0
custom_map_mode: 0 # 0: Odometry mode 1: SLAM mode 2: Relocalization mode
custom_init_pos: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0]
relocalization_map_abs_path: "" # must be set or will fail
relocalization_map_abs_path: "" # must be set for Relocalization mode or will fail
mapping_result_dest_dir: "" # "": use default value; other: use custom value
mapping_result_file_name: "" # "": use default value; other: use custom value
Regular → Executable
View File
Regular → Executable
View File
+11 -1
View File
@@ -45,7 +45,7 @@ limitations under the License.
#include <ros/package.h>
#include <ros/ros.h>
#endif
#define ros_driver_version "0.6.0"
#define ros_driver_version "0.6.1"
// Global variable declarations
static device_handle odinDevice = nullptr;
static std::atomic<bool> deviceConnected(false);
@@ -97,6 +97,7 @@ int g_devstatus_log = 0;
int g_pub_intensity_gray = 0;
int g_show_path = 0;
int g_show_camerapose = 0;
int g_strict_usb3_0_check = 0;
std::filesystem::path log_root_dir_;
int g_custom_map_mode = 0;
@@ -502,6 +503,14 @@ bool isUsb3OrHigher(const std::string& vendorId, const std::string& productId) {
#else
ROS_INFO("Detected USB version: %.1f", version);
#endif
if (!g_strict_usb3_0_check) {
#ifdef ROS2
RCLCPP_INFO(rclcpp::get_logger("usb_check"), "Strict USB3.0 check disabled");
#else
ROS_INFO("Strict USB3.0 check disabled");
#endif
return true;
}
return version >= 3.0;
}
@@ -1361,6 +1370,7 @@ int main(int argc, char *argv[])
g_show_path = get_key_value("showpath", 0);
g_show_camerapose = get_key_value("showcamerapose", 0);
g_log_level = get_key_value("log_devel", LOG_LEVEL_INFO);
g_strict_usb3_0_check = get_key_value("strict_usb3.0_check", 1);
auto get_key_str_value = [&](const std::string& key, const std::string& default_value) -> std::string {
auto it = keys_w_str_val.find(key);