Skip to content

Commit

Permalink
fix(hesai): correctly handle return mode when updating parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
mojomex committed Aug 26, 2024
1 parent 5377d1c commit be14ebb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nebula_ros/src/hesai/hesai_ros_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,8 @@ rcl_interfaces::msg::SetParametersResult HesaiRosWrapper::OnParameterChange(
}

if (_return_mode.length() > 0)
new_cfg.return_mode = nebula::drivers::ReturnModeFromString(_return_mode);
new_cfg.return_mode =
nebula::drivers::ReturnModeFromStringHesai(_return_mode, sensor_cfg_ptr_->sensor_model);

auto new_cfg_ptr = std::make_shared<const nebula::drivers::HesaiSensorConfiguration>(new_cfg);
auto status = ValidateAndSetConfig(new_cfg_ptr);
Expand Down

0 comments on commit be14ebb

Please sign in to comment.