@@ -252,8 +252,8 @@ TEST_F(ScriptCommandInterfaceTest, test_force_mode)
252252 urcl::vector6d_t wrench = { 20 , 0 , 40 , 0 , 0 , 0 };
253253 int32_t force_mode_type = 2 ;
254254 urcl::vector6d_t limits = { 0.1 , 0.1 , 0.1 , 0.785 , 0.785 , 1.57 };
255- float damping = 0.8 ;
256- float gain_scaling = 0.8 ;
255+ double damping = 0.8 ;
256+ double gain_scaling = 0.8 ;
257257 script_command_interface_->startForceMode (&task_frame, &selection_vector, &wrench, force_mode_type, &limits, damping,
258258 gain_scaling);
259259
@@ -301,8 +301,16 @@ TEST_F(ScriptCommandInterfaceTest, test_force_mode)
301301 EXPECT_EQ (received_limits[i], limits[i]);
302302 }
303303
304+ // Test damping return
305+ double received_damping = (double )message[26 ] / script_command_interface_->MULT_JOINTSTATE ;
306+ EXPECT_EQ (received_damping, damping);
307+
308+ // Test Gain scaling return
309+ double received_gain = (double )message[27 ] / script_command_interface_->MULT_JOINTSTATE ;
310+ EXPECT_EQ (received_gain, gain_scaling);
311+
304312 // The rest of the message should be zero
305- int32_t message_sum = std::accumulate (std::begin (message) + 25 , std::end (message), 0 );
313+ int32_t message_sum = std::accumulate (std::begin (message) + 27 , std::end (message), 0 );
306314 int32_t expected_message_sum = 0 ;
307315 EXPECT_EQ (message_sum, expected_message_sum);
308316
0 commit comments