MCPcopy Create free account
hub / github.com/ROBOTIS-GIT/turtlebot3 / SensorState

Method SensorState

turtlebot3_node/src/sensors/sensor_state.cpp:25–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23using robotis::turtlebot3::sensors::SensorState;
24
25SensorState::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
45void SensorState::publish(
46 const rclcpp::Time & now,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected