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

Method Sound

turtlebot3_node/src/devices/sound.cpp:24–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22using robotis::turtlebot3::devices::Sound;
23
24Sound::Sound(
25 std::shared_ptr<rclcpp::Node> & nh,
26 std::shared_ptr<DynamixelSDKWrapper> & dxl_sdk_wrapper,
27 const std::string & server_name)
28: Devices(nh, dxl_sdk_wrapper)
29{
30 RCLCPP_INFO(nh_->get_logger(), "Succeeded to create sound server");
31 srv_ = nh_->create_service<turtlebot3_msgs::srv::Sound>(
32 server_name,
33 [this](
34 const std::shared_ptr<turtlebot3_msgs::srv::Sound::Request> request,
35 std::shared_ptr<turtlebot3_msgs::srv::Sound::Response> response) -> void
36 {
37 this->command(static_cast<void *>(request.get()), static_cast<void *>(response.get()));
38 }
39 );
40}
41
42void Sound::command(const void * request, void * response)
43{

Callers

nothing calls this directly

Calls 1

commandMethod · 0.95

Tested by

no test coverage detected