@@ -59,13 +59,13 @@ class GMControllerFixture : public nav2_graceful_controller::GracefulController
5959
6060 nav_msgs::msg::Path getPlan () {return path_handler_->getPlan ();}
6161
62- geometry_msgs::msg::PointStamped createMotionTargetMsg (
62+ std::unique_ptr< geometry_msgs::msg::PointStamped> createMotionTargetMsg (
6363 const geometry_msgs::msg::PoseStamped & motion_target)
6464 {
6565 return nav2_graceful_controller::createMotionTargetMsg (motion_target);
6666 }
6767
68- visualization_msgs::msg::Marker createSlowdownMarker (
68+ std::unique_ptr< visualization_msgs::msg::Marker> createSlowdownMarker (
6969 const geometry_msgs::msg::PoseStamped & motion_target)
7070 {
7171 return nav2_graceful_controller::createSlowdownMarker (
@@ -367,10 +367,10 @@ TEST(GracefulControllerTest, createMotionTargetMsg) {
367367 auto motion_target_msg = controller->createMotionTargetMsg (motion_target);
368368
369369 // Check results
370- EXPECT_EQ (motion_target_msg. header .frame_id , " map" );
371- EXPECT_EQ (motion_target_msg. point .x , 1.0 );
372- EXPECT_EQ (motion_target_msg. point .y , 2.0 );
373- EXPECT_EQ (motion_target_msg. point .z , 0.01 );
370+ EXPECT_EQ (motion_target_msg-> header .frame_id , " map" );
371+ EXPECT_EQ (motion_target_msg-> point .x , 1.0 );
372+ EXPECT_EQ (motion_target_msg-> point .y , 2.0 );
373+ EXPECT_EQ (motion_target_msg-> point .z , 0.01 );
374374}
375375
376376TEST (GracefulControllerTest, createSlowdownMsg) {
@@ -405,24 +405,24 @@ TEST(GracefulControllerTest, createSlowdownMsg) {
405405 auto slowdown_msg = controller->createSlowdownMarker (motion_target);
406406
407407 // Check results
408- EXPECT_EQ (slowdown_msg. header .frame_id , " map" );
409- EXPECT_EQ (slowdown_msg. ns , " slowdown" );
410- EXPECT_EQ (slowdown_msg. id , 0 );
411- EXPECT_EQ (slowdown_msg. type , visualization_msgs::msg::Marker::SPHERE);
412- EXPECT_EQ (slowdown_msg. action , visualization_msgs::msg::Marker::ADD);
413- EXPECT_EQ (slowdown_msg. pose .position .x , 1.0 );
414- EXPECT_EQ (slowdown_msg. pose .position .y , 2.0 );
415- EXPECT_EQ (slowdown_msg. pose .position .z , 0.01 );
416- EXPECT_EQ (slowdown_msg. pose .orientation .x , 0.0 );
417- EXPECT_EQ (slowdown_msg. pose .orientation .y , 0.0 );
418- EXPECT_EQ (slowdown_msg. pose .orientation .z , 0.0 );
419- EXPECT_EQ (slowdown_msg. pose .orientation .w , 1.0 );
420- EXPECT_EQ (slowdown_msg. scale .x , 0.4 );
421- EXPECT_EQ (slowdown_msg. scale .y , 0.4 );
422- EXPECT_EQ (slowdown_msg. scale .z , 0.02 );
423- EXPECT_EQ (slowdown_msg. color .r , 0.0 );
424- EXPECT_EQ (slowdown_msg. color .g , 1.0 );
425- EXPECT_EQ (slowdown_msg. color .b , 0.0 );
408+ EXPECT_EQ (slowdown_msg-> header .frame_id , " map" );
409+ EXPECT_EQ (slowdown_msg-> ns , " slowdown" );
410+ EXPECT_EQ (slowdown_msg-> id , 0 );
411+ EXPECT_EQ (slowdown_msg-> type , visualization_msgs::msg::Marker::SPHERE);
412+ EXPECT_EQ (slowdown_msg-> action , visualization_msgs::msg::Marker::ADD);
413+ EXPECT_EQ (slowdown_msg-> pose .position .x , 1.0 );
414+ EXPECT_EQ (slowdown_msg-> pose .position .y , 2.0 );
415+ EXPECT_EQ (slowdown_msg-> pose .position .z , 0.01 );
416+ EXPECT_EQ (slowdown_msg-> pose .orientation .x , 0.0 );
417+ EXPECT_EQ (slowdown_msg-> pose .orientation .y , 0.0 );
418+ EXPECT_EQ (slowdown_msg-> pose .orientation .z , 0.0 );
419+ EXPECT_EQ (slowdown_msg-> pose .orientation .w , 1.0 );
420+ EXPECT_EQ (slowdown_msg-> scale .x , 0.4 );
421+ EXPECT_EQ (slowdown_msg-> scale .y , 0.4 );
422+ EXPECT_EQ (slowdown_msg-> scale .z , 0.02 );
423+ EXPECT_EQ (slowdown_msg-> color .r , 0.0 );
424+ EXPECT_EQ (slowdown_msg-> color .g , 1.0 );
425+ EXPECT_EQ (slowdown_msg-> color .b , 0.0 );
426426}
427427
428428TEST (GracefulControllerTest, rotateToTarget) {
0 commit comments