File tree Expand file tree Collapse file tree 4 files changed +13
-11
lines changed
admittance_controller/src
gps_sensor_broadcaster/src
imu_sensor_broadcaster/src
range_sensor_broadcaster/src Expand file tree Collapse file tree 4 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -338,7 +338,7 @@ controller_interface::CallbackReturn AdmittanceController::on_configure(
338
338
339
339
// Initialize FTS semantic semantic_component
340
340
force_torque_sensor_ = std::make_unique<semantic_components::ForceTorqueSensor>(
341
- semantic_components::ForceTorqueSensor ( admittance_->parameters_ .ft_sensor .name ) );
341
+ admittance_->parameters_ .ft_sensor .name );
342
342
343
343
// configure admittance rule
344
344
if (
Original file line number Diff line number Diff line change @@ -56,12 +56,16 @@ callback_return_type GPSSensorBroadcaster::on_configure(const rclcpp_lifecycle::
56
56
param_listener_->refresh_dynamic_parameters ();
57
57
params_ = param_listener_->get_params ();
58
58
59
- gps_sensor_ =
60
- params_.read_covariance_from_interface
61
- ? GPSSensorVariant{semantic_components::GPSSensor<GPSSensorOption::WithCovariance>(
62
- params_.sensor_name )}
63
- : GPSSensorVariant{
64
- semantic_components::GPSSensor<GPSSensorOption::WithoutCovariance>(params_.sensor_name )};
59
+ if (params_.read_covariance_from_interface )
60
+ {
61
+ gps_sensor_.emplace <semantic_components::GPSSensor<GPSSensorOption::WithCovariance>>(
62
+ params_.sensor_name );
63
+ }
64
+ else
65
+ {
66
+ gps_sensor_.emplace <semantic_components::GPSSensor<GPSSensorOption::WithoutCovariance>>(
67
+ params_.sensor_name );
68
+ }
65
69
std::visit (
66
70
Visitor{
67
71
[this ](auto & sensor) { state_names_ = sensor.get_state_interface_names (); },
Original file line number Diff line number Diff line change @@ -59,8 +59,7 @@ controller_interface::CallbackReturn IMUSensorBroadcaster::on_configure(
59
59
return CallbackReturn::ERROR;
60
60
}
61
61
62
- imu_sensor_ = std::make_unique<semantic_components::IMUSensor>(
63
- semantic_components::IMUSensor (params_.sensor_name ));
62
+ imu_sensor_ = std::make_unique<semantic_components::IMUSensor>(params_.sensor_name );
64
63
try
65
64
{
66
65
// register ft sensor data publisher
Original file line number Diff line number Diff line change @@ -56,8 +56,7 @@ controller_interface::CallbackReturn RangeSensorBroadcaster::on_configure(
56
56
return CallbackReturn::ERROR;
57
57
}
58
58
59
- range_sensor_ = std::make_unique<semantic_components::RangeSensor>(
60
- semantic_components::RangeSensor (params_.sensor_name ));
59
+ range_sensor_ = std::make_unique<semantic_components::RangeSensor>(params_.sensor_name );
61
60
try
62
61
{
63
62
// register ft sensor data publisher
You can’t perform that action at this time.
0 commit comments