Skip to content

Commit cd07164

Browse files
committed
Use best effort communication to subscrible command
1 parent 8077fd8 commit cd07164

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

frootspi_conductor/src/conductor_component.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
#include "frootspi_conductor/conductor_component.hpp"
2222
#include "rclcpp/rclcpp.hpp"
23+
#include "rclcpp/qos.hpp"
2324

2425
namespace frootspi_conductor
2526
{
@@ -31,7 +32,9 @@ Conductor::Conductor(const rclcpp::NodeOptions & options)
3132
using namespace std::placeholders; // for _1, _2, _3...
3233

3334
sub_command_ = create_subscription<RobotCommand>(
34-
"command", 10, std::bind(&Conductor::callback_commands, this, _1));
35+
"command",
36+
rclcpp::QoS(10).best_effort(),
37+
std::bind(&Conductor::callback_commands, this, _1));
3538

3639
pub_target_velocity_ = create_publisher<geometry_msgs::msg::Twist>("target_velocity", 10);
3740
pub_dribble_power_ = create_publisher<frootspi_msgs::msg::DribblePower>("dribble_power", 10);

0 commit comments

Comments
 (0)