| 23 | using robotis::turtlebot3::sensors::SensorState; |
| 24 | |
| 25 | SensorState::SensorState( |
| 26 | std::shared_ptr<rclcpp::Node> & nh, |
| 27 | const std::string & topic_name, |
| 28 | const uint8_t & bumper_forward, |
| 29 | const uint8_t & bumper_backward, |
| 30 | const uint8_t & illumination, |
| 31 | const uint8_t & cliff, |
| 32 | const uint8_t & sonar) |
| 33 | : Sensors(nh), |
| 34 | bumper_forward_(bumper_forward), |
| 35 | bumper_backward_(bumper_backward), |
| 36 | illumination_(illumination), |
| 37 | cliff_(cliff), |
| 38 | sonar_(sonar) |
| 39 | { |
| 40 | pub_ = nh->create_publisher<turtlebot3_msgs::msg::SensorState>(topic_name, this->qos_); |
| 41 | |
| 42 | RCLCPP_INFO(nh_->get_logger(), "Succeeded to create sensor state publisher"); |
| 43 | } |
| 44 | |
| 45 | void SensorState::publish( |
| 46 | const rclcpp::Time & now, |
nothing calls this directly
no outgoing calls
no test coverage detected