.. _program_listing_file__tmp_ws_src_nao_lola_nao_lola_client_include_nao_lola_client_nao_lola_client.hpp: Program Listing for File nao_lola_client.hpp ============================================ |exhale_lsh| :ref:`Return to documentation for file ` (``/tmp/ws/src/nao_lola/nao_lola_client/include/nao_lola_client/nao_lola_client.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp // Copyright 2021 Kenji Brameld // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #ifndef NAO_LOLA_CLIENT__NAO_LOLA_CLIENT_HPP_ #define NAO_LOLA_CLIENT__NAO_LOLA_CLIENT_HPP_ #include #include #include #include "rclcpp/rclcpp.hpp" #include "nao_lola_sensor_msgs/msg/joint_positions.hpp" #include "nao_lola_sensor_msgs/msg/joint_stiffnesses.hpp" #include "nao_lola_sensor_msgs/msg/joint_temperatures.hpp" #include "nao_lola_sensor_msgs/msg/joint_currents.hpp" #include "nao_lola_sensor_msgs/msg/joint_statuses.hpp" #include "nao_lola_sensor_msgs/msg/buttons.hpp" #include "nao_lola_sensor_msgs/msg/accelerometer.hpp" #include "nao_lola_sensor_msgs/msg/gyroscope.hpp" #include "nao_lola_sensor_msgs/msg/angle.hpp" #include "nao_lola_sensor_msgs/msg/sonar.hpp" #include "nao_lola_sensor_msgs/msg/fsr.hpp" #include "nao_lola_sensor_msgs/msg/touch.hpp" #include "nao_lola_sensor_msgs/msg/battery.hpp" #include "nao_lola_sensor_msgs/msg/robot_config.hpp" #include "nao_lola_command_msgs/msg/chest_led.hpp" #include "nao_lola_command_msgs/msg/left_ear_leds.hpp" #include "nao_lola_command_msgs/msg/right_ear_leds.hpp" #include "nao_lola_command_msgs/msg/left_eye_leds.hpp" #include "nao_lola_command_msgs/msg/right_eye_leds.hpp" #include "nao_lola_command_msgs/msg/left_foot_led.hpp" #include "nao_lola_command_msgs/msg/right_foot_led.hpp" #include "nao_lola_command_msgs/msg/head_leds.hpp" #include "nao_lola_command_msgs/msg/sonar_usage.hpp" #include "nao_lola_command_msgs/msg/joint_positions.hpp" #include "nao_lola_command_msgs/msg/joint_stiffnesses.hpp" #include "nao_lola_client/connection.hpp" #include "nao_lola_client/msgpack_packer.hpp" class NaoLolaClient : public rclcpp::Node { public: NaoLolaClient(); virtual ~NaoLolaClient() {} private: void createPublishers(); void createSubscriptions(); rclcpp::Publisher::SharedPtr accelerometer_pub; rclcpp::Publisher::SharedPtr angle_pub; rclcpp::Publisher::SharedPtr buttons_pub; rclcpp::Publisher::SharedPtr fsr_pub; rclcpp::Publisher::SharedPtr gyroscope_pub; rclcpp::Publisher::SharedPtr joint_positions_pub; rclcpp::Publisher::SharedPtr joint_stiffnesses_pub; rclcpp::Publisher::SharedPtr joint_temperatures_pub; rclcpp::Publisher::SharedPtr joint_currents_pub; rclcpp::Publisher::SharedPtr joint_statuses_pub; rclcpp::Publisher::SharedPtr sonar_pub; rclcpp::Publisher::SharedPtr touch_pub; rclcpp::Publisher::SharedPtr battery_pub; rclcpp::Publisher::SharedPtr robot_config_pub; rclcpp::Subscription::SharedPtr joint_positions_sub; rclcpp::Subscription::SharedPtr joint_stiffnesses_sub; rclcpp::Subscription::SharedPtr chest_led_sub; rclcpp::Subscription::SharedPtr left_ear_leds_sub; rclcpp::Subscription::SharedPtr right_ear_leds_sub; rclcpp::Subscription::SharedPtr left_eye_leds_sub; rclcpp::Subscription::SharedPtr right_eye_leds_sub; rclcpp::Subscription::SharedPtr left_foot_led_sub; rclcpp::Subscription::SharedPtr right_foot_led_sub; rclcpp::Subscription::SharedPtr head_leds_sub; rclcpp::Subscription::SharedPtr sonar_usage_sub; std::thread receive_thread_; Connection connection; MsgpackPacker packer; std::mutex packer_mutex; }; #endif // NAO_LOLA_CLIENT__NAO_LOLA_CLIENT_HPP_