extra log msg

This commit is contained in:
Sem van der Hoeven
2023-06-12 15:36:37 +02:00
parent 21683cb92c
commit d451b78e96
2 changed files with 2 additions and 2 deletions

View File

@@ -275,7 +275,7 @@ public:
: (MIN_DISTANCE - std::min(this->lidar_sensor_values[LIDAR_SENSOR_RL], this->lidar_sensor_values[LIDAR_SENSOR_RR]));
collision_prevention_weights[MOVE_DIRECTION_RIGHT] = this->move_direction_allowed[MOVE_DIRECTION_RIGHT] ? 0
: -(MIN_DISTANCE - std::min(this->lidar_sensor_values[LIDAR_SENSOR_RR], this->lidar_sensor_values[LIDAR_SENSOR_FR]));
RCLCPP_INFO(this->get_logger(), "Collision prevention weights: %f, %f, %f, %f", collision_prevention_weights[MOVE_DIRECTION_FRONT], collision_prevention_weights[MOVE_DIRECTION_LEFT], collision_prevention_weights[MOVE_DIRECTION_BACK], collision_prevention_weights[MOVE_DIRECTION_RIGHT]);
apply_collision_weights();
}

View File

@@ -99,7 +99,7 @@ class TestPositionChanger(unittest.TestCase):
if not self.called_positionchanger_service:
future = move_position_client.call_async(request)
future.add_done_callback(self.move_position_callback)
launch_testing.asserts.assertInStdout(proc_output, "Collision prevention front", 'px4_controller-3')
launch_testing.asserts.assertInStderr(proc_output, "Collision prevention front", 'px4_controller-3')
finally:
self.node.destroy_client(move_position_client)
self.node.destroy_publisher(lidar_publisher)