@@ -52,16 +52,16 @@ TEST_F(SteeringControllersLibraryTest, check_exported_interfaces)
5252 ASSERT_EQ (state_if_conf.names .size (), joint_state_values_.size ());
5353 EXPECT_EQ (
5454 state_if_conf.names [STATE_TRACTION_RIGHT_WHEEL],
55- controller_->rear_wheels_state_names_ [0 ] + " /" + traction_interface_name_);
55+ controller_->traction_joints_state_names_ [0 ] + " /" + traction_interface_name_);
5656 EXPECT_EQ (
5757 state_if_conf.names [STATE_TRACTION_LEFT_WHEEL],
58- controller_->rear_wheels_state_names_ [1 ] + " /" + traction_interface_name_);
58+ controller_->traction_joints_state_names_ [1 ] + " /" + traction_interface_name_);
5959 EXPECT_EQ (
6060 state_if_conf.names [STATE_STEER_RIGHT_WHEEL],
61- controller_->front_wheels_state_names_ [0 ] + " /" + steering_interface_name_);
61+ controller_->steering_joints_state_names_ [0 ] + " /" + steering_interface_name_);
6262 EXPECT_EQ (
6363 state_if_conf.names [STATE_STEER_LEFT_WHEEL],
64- controller_->front_wheels_state_names_ [1 ] + " /" + steering_interface_name_);
64+ controller_->steering_joints_state_names_ [1 ] + " /" + steering_interface_name_);
6565 EXPECT_EQ (state_if_conf.type , controller_interface::interface_configuration_type::INDIVIDUAL);
6666
6767 // check ref itfs
@@ -150,12 +150,12 @@ TEST_F(SteeringControllersLibraryTest, test_both_update_methods_for_ref_timeout)
150150 }
151151
152152 // Wheel velocities should reset to 0
153- EXPECT_EQ (controller_->command_interfaces_ [0 ].get_value (), 0 );
154- EXPECT_EQ (controller_->command_interfaces_ [1 ].get_value (), 0 );
153+ EXPECT_EQ (controller_->command_interfaces_ [0 ].get_optional (). value (), 0 );
154+ EXPECT_EQ (controller_->command_interfaces_ [1 ].get_optional (). value (), 0 );
155155
156156 // Steer angles should not reset
157- EXPECT_NEAR (controller_->command_interfaces_ [2 ].get_value (), 0.575875 , 1e-6 );
158- EXPECT_NEAR (controller_->command_interfaces_ [3 ].get_value (), 0.575875 , 1e-6 );
157+ EXPECT_NEAR (controller_->command_interfaces_ [2 ].get_optional (). value (), 0.575875 , 1e-6 );
158+ EXPECT_NEAR (controller_->command_interfaces_ [3 ].get_optional (). value (), 0.575875 , 1e-6 );
159159
160160 // case 2 position_feedback = true
161161 controller_->params_ .position_feedback = true ;
@@ -197,12 +197,12 @@ TEST_F(SteeringControllersLibraryTest, test_both_update_methods_for_ref_timeout)
197197 }
198198
199199 // Wheel velocities should reset to 0
200- EXPECT_EQ (controller_->command_interfaces_ [0 ].get_value (), 0 );
201- EXPECT_EQ (controller_->command_interfaces_ [1 ].get_value (), 0 );
200+ EXPECT_EQ (controller_->command_interfaces_ [0 ].get_optional (). value (), 0 );
201+ EXPECT_EQ (controller_->command_interfaces_ [1 ].get_optional (). value (), 0 );
202202
203203 // Steer angles should not reset
204- EXPECT_NEAR (controller_->command_interfaces_ [2 ].get_value (), 0.575875 , 1e-6 );
205- EXPECT_NEAR (controller_->command_interfaces_ [3 ].get_value (), 0.575875 , 1e-6 );
204+ EXPECT_NEAR (controller_->command_interfaces_ [2 ].get_optional (). value (), 0.575875 , 1e-6 );
205+ EXPECT_NEAR (controller_->command_interfaces_ [3 ].get_optional (). value (), 0.575875 , 1e-6 );
206206}
207207
208208int main (int argc, char ** argv)
0 commit comments