diff --git a/cpp_bridge/CMakeLists.txt b/deploy/dds_bridge/CMakeLists.txt similarity index 100% rename from cpp_bridge/CMakeLists.txt rename to deploy/dds_bridge/CMakeLists.txt diff --git a/cpp_bridge/include/go2py/Imu.cpp b/deploy/dds_bridge/include/go2py/Imu.cpp similarity index 100% rename from cpp_bridge/include/go2py/Imu.cpp rename to deploy/dds_bridge/include/go2py/Imu.cpp diff --git a/cpp_bridge/include/go2py/Imu.hpp b/deploy/dds_bridge/include/go2py/Imu.hpp similarity index 100% rename from cpp_bridge/include/go2py/Imu.hpp rename to deploy/dds_bridge/include/go2py/Imu.hpp diff --git a/cpp_bridge/include/go2py/LowCmd.cpp b/deploy/dds_bridge/include/go2py/LowCmd.cpp similarity index 100% rename from cpp_bridge/include/go2py/LowCmd.cpp rename to deploy/dds_bridge/include/go2py/LowCmd.cpp diff --git a/cpp_bridge/include/go2py/LowCmd.hpp b/deploy/dds_bridge/include/go2py/LowCmd.hpp similarity index 100% rename from cpp_bridge/include/go2py/LowCmd.hpp rename to deploy/dds_bridge/include/go2py/LowCmd.hpp diff --git a/cpp_bridge/include/go2py/LowState.cpp b/deploy/dds_bridge/include/go2py/LowState.cpp similarity index 100% rename from cpp_bridge/include/go2py/LowState.cpp rename to deploy/dds_bridge/include/go2py/LowState.cpp diff --git a/cpp_bridge/include/go2py/LowState.hpp b/deploy/dds_bridge/include/go2py/LowState.hpp similarity index 100% rename from cpp_bridge/include/go2py/LowState.hpp rename to deploy/dds_bridge/include/go2py/LowState.hpp diff --git a/cpp_bridge/include/unitree/common/any.hpp b/deploy/dds_bridge/include/unitree/common/any.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/any.hpp rename to deploy/dds_bridge/include/unitree/common/any.hpp diff --git a/cpp_bridge/include/unitree/common/assert.hpp b/deploy/dds_bridge/include/unitree/common/assert.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/assert.hpp rename to deploy/dds_bridge/include/unitree/common/assert.hpp diff --git a/cpp_bridge/include/unitree/common/block_queue.hpp b/deploy/dds_bridge/include/unitree/common/block_queue.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/block_queue.hpp rename to deploy/dds_bridge/include/unitree/common/block_queue.hpp diff --git a/cpp_bridge/include/unitree/common/dds/dds_callback.hpp b/deploy/dds_bridge/include/unitree/common/dds/dds_callback.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/dds/dds_callback.hpp rename to deploy/dds_bridge/include/unitree/common/dds/dds_callback.hpp diff --git a/cpp_bridge/include/unitree/common/dds/dds_easy_model.hpp b/deploy/dds_bridge/include/unitree/common/dds/dds_easy_model.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/dds/dds_easy_model.hpp rename to deploy/dds_bridge/include/unitree/common/dds/dds_easy_model.hpp diff --git a/cpp_bridge/include/unitree/common/dds/dds_entity.hpp b/deploy/dds_bridge/include/unitree/common/dds/dds_entity.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/dds/dds_entity.hpp rename to deploy/dds_bridge/include/unitree/common/dds/dds_entity.hpp diff --git a/cpp_bridge/include/unitree/common/dds/dds_error.hpp b/deploy/dds_bridge/include/unitree/common/dds/dds_error.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/dds/dds_error.hpp rename to deploy/dds_bridge/include/unitree/common/dds/dds_error.hpp diff --git a/cpp_bridge/include/unitree/common/dds/dds_exception.hpp b/deploy/dds_bridge/include/unitree/common/dds/dds_exception.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/dds/dds_exception.hpp rename to deploy/dds_bridge/include/unitree/common/dds/dds_exception.hpp diff --git a/cpp_bridge/include/unitree/common/dds/dds_factory_model.hpp b/deploy/dds_bridge/include/unitree/common/dds/dds_factory_model.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/dds/dds_factory_model.hpp rename to deploy/dds_bridge/include/unitree/common/dds/dds_factory_model.hpp diff --git a/cpp_bridge/include/unitree/common/dds/dds_native.hpp b/deploy/dds_bridge/include/unitree/common/dds/dds_native.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/dds/dds_native.hpp rename to deploy/dds_bridge/include/unitree/common/dds/dds_native.hpp diff --git a/cpp_bridge/include/unitree/common/dds/dds_parameter.hpp b/deploy/dds_bridge/include/unitree/common/dds/dds_parameter.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/dds/dds_parameter.hpp rename to deploy/dds_bridge/include/unitree/common/dds/dds_parameter.hpp diff --git a/cpp_bridge/include/unitree/common/dds/dds_qos.hpp b/deploy/dds_bridge/include/unitree/common/dds/dds_qos.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/dds/dds_qos.hpp rename to deploy/dds_bridge/include/unitree/common/dds/dds_qos.hpp diff --git a/cpp_bridge/include/unitree/common/dds/dds_qos_parameter.hpp b/deploy/dds_bridge/include/unitree/common/dds/dds_qos_parameter.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/dds/dds_qos_parameter.hpp rename to deploy/dds_bridge/include/unitree/common/dds/dds_qos_parameter.hpp diff --git a/cpp_bridge/include/unitree/common/dds/dds_qos_policy.hpp b/deploy/dds_bridge/include/unitree/common/dds/dds_qos_policy.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/dds/dds_qos_policy.hpp rename to deploy/dds_bridge/include/unitree/common/dds/dds_qos_policy.hpp diff --git a/cpp_bridge/include/unitree/common/dds/dds_qos_policy_parameter.hpp b/deploy/dds_bridge/include/unitree/common/dds/dds_qos_policy_parameter.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/dds/dds_qos_policy_parameter.hpp rename to deploy/dds_bridge/include/unitree/common/dds/dds_qos_policy_parameter.hpp diff --git a/cpp_bridge/include/unitree/common/dds/dds_qos_realize.hpp b/deploy/dds_bridge/include/unitree/common/dds/dds_qos_realize.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/dds/dds_qos_realize.hpp rename to deploy/dds_bridge/include/unitree/common/dds/dds_qos_realize.hpp diff --git a/cpp_bridge/include/unitree/common/dds/dds_topic_channel.hpp b/deploy/dds_bridge/include/unitree/common/dds/dds_topic_channel.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/dds/dds_topic_channel.hpp rename to deploy/dds_bridge/include/unitree/common/dds/dds_topic_channel.hpp diff --git a/cpp_bridge/include/unitree/common/dds/dds_traits.hpp b/deploy/dds_bridge/include/unitree/common/dds/dds_traits.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/dds/dds_traits.hpp rename to deploy/dds_bridge/include/unitree/common/dds/dds_traits.hpp diff --git a/cpp_bridge/include/unitree/common/decl.hpp b/deploy/dds_bridge/include/unitree/common/decl.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/decl.hpp rename to deploy/dds_bridge/include/unitree/common/decl.hpp diff --git a/cpp_bridge/include/unitree/common/error.hpp b/deploy/dds_bridge/include/unitree/common/error.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/error.hpp rename to deploy/dds_bridge/include/unitree/common/error.hpp diff --git a/cpp_bridge/include/unitree/common/exception.hpp b/deploy/dds_bridge/include/unitree/common/exception.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/exception.hpp rename to deploy/dds_bridge/include/unitree/common/exception.hpp diff --git a/cpp_bridge/include/unitree/common/filesystem/directory.hpp b/deploy/dds_bridge/include/unitree/common/filesystem/directory.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/filesystem/directory.hpp rename to deploy/dds_bridge/include/unitree/common/filesystem/directory.hpp diff --git a/cpp_bridge/include/unitree/common/filesystem/file.hpp b/deploy/dds_bridge/include/unitree/common/filesystem/file.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/filesystem/file.hpp rename to deploy/dds_bridge/include/unitree/common/filesystem/file.hpp diff --git a/cpp_bridge/include/unitree/common/filesystem/filesystem.hpp b/deploy/dds_bridge/include/unitree/common/filesystem/filesystem.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/filesystem/filesystem.hpp rename to deploy/dds_bridge/include/unitree/common/filesystem/filesystem.hpp diff --git a/cpp_bridge/include/unitree/common/json/json.hpp b/deploy/dds_bridge/include/unitree/common/json/json.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/json/json.hpp rename to deploy/dds_bridge/include/unitree/common/json/json.hpp diff --git a/cpp_bridge/include/unitree/common/json/json_config.hpp b/deploy/dds_bridge/include/unitree/common/json/json_config.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/json/json_config.hpp rename to deploy/dds_bridge/include/unitree/common/json/json_config.hpp diff --git a/cpp_bridge/include/unitree/common/json/jsonize.hpp b/deploy/dds_bridge/include/unitree/common/json/jsonize.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/json/jsonize.hpp rename to deploy/dds_bridge/include/unitree/common/json/jsonize.hpp diff --git a/cpp_bridge/include/unitree/common/lock/lock.hpp b/deploy/dds_bridge/include/unitree/common/lock/lock.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/lock/lock.hpp rename to deploy/dds_bridge/include/unitree/common/lock/lock.hpp diff --git a/cpp_bridge/include/unitree/common/log/log.hpp b/deploy/dds_bridge/include/unitree/common/log/log.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/log/log.hpp rename to deploy/dds_bridge/include/unitree/common/log/log.hpp diff --git a/cpp_bridge/include/unitree/common/log/log_buffer.hpp b/deploy/dds_bridge/include/unitree/common/log/log_buffer.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/log/log_buffer.hpp rename to deploy/dds_bridge/include/unitree/common/log/log_buffer.hpp diff --git a/cpp_bridge/include/unitree/common/log/log_decl.hpp b/deploy/dds_bridge/include/unitree/common/log/log_decl.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/log/log_decl.hpp rename to deploy/dds_bridge/include/unitree/common/log/log_decl.hpp diff --git a/cpp_bridge/include/unitree/common/log/log_initor.hpp b/deploy/dds_bridge/include/unitree/common/log/log_initor.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/log/log_initor.hpp rename to deploy/dds_bridge/include/unitree/common/log/log_initor.hpp diff --git a/cpp_bridge/include/unitree/common/log/log_keeper.hpp b/deploy/dds_bridge/include/unitree/common/log/log_keeper.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/log/log_keeper.hpp rename to deploy/dds_bridge/include/unitree/common/log/log_keeper.hpp diff --git a/cpp_bridge/include/unitree/common/log/log_logger.hpp b/deploy/dds_bridge/include/unitree/common/log/log_logger.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/log/log_logger.hpp rename to deploy/dds_bridge/include/unitree/common/log/log_logger.hpp diff --git a/cpp_bridge/include/unitree/common/log/log_policy.hpp b/deploy/dds_bridge/include/unitree/common/log/log_policy.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/log/log_policy.hpp rename to deploy/dds_bridge/include/unitree/common/log/log_policy.hpp diff --git a/cpp_bridge/include/unitree/common/log/log_store.hpp b/deploy/dds_bridge/include/unitree/common/log/log_store.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/log/log_store.hpp rename to deploy/dds_bridge/include/unitree/common/log/log_store.hpp diff --git a/cpp_bridge/include/unitree/common/log/log_writer.hpp b/deploy/dds_bridge/include/unitree/common/log/log_writer.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/log/log_writer.hpp rename to deploy/dds_bridge/include/unitree/common/log/log_writer.hpp diff --git a/cpp_bridge/include/unitree/common/os.hpp b/deploy/dds_bridge/include/unitree/common/os.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/os.hpp rename to deploy/dds_bridge/include/unitree/common/os.hpp diff --git a/cpp_bridge/include/unitree/common/service/base/service_application.hpp b/deploy/dds_bridge/include/unitree/common/service/base/service_application.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/service/base/service_application.hpp rename to deploy/dds_bridge/include/unitree/common/service/base/service_application.hpp diff --git a/cpp_bridge/include/unitree/common/service/base/service_base.hpp b/deploy/dds_bridge/include/unitree/common/service/base/service_base.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/service/base/service_base.hpp rename to deploy/dds_bridge/include/unitree/common/service/base/service_base.hpp diff --git a/cpp_bridge/include/unitree/common/service/base/service_config.hpp b/deploy/dds_bridge/include/unitree/common/service/base/service_config.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/service/base/service_config.hpp rename to deploy/dds_bridge/include/unitree/common/service/base/service_config.hpp diff --git a/cpp_bridge/include/unitree/common/service/base/service_decl.hpp b/deploy/dds_bridge/include/unitree/common/service/base/service_decl.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/service/base/service_decl.hpp rename to deploy/dds_bridge/include/unitree/common/service/base/service_decl.hpp diff --git a/cpp_bridge/include/unitree/common/service/dds_service.hpp b/deploy/dds_bridge/include/unitree/common/service/dds_service.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/service/dds_service.hpp rename to deploy/dds_bridge/include/unitree/common/service/dds_service.hpp diff --git a/cpp_bridge/include/unitree/common/socket/domain_socket.hpp b/deploy/dds_bridge/include/unitree/common/socket/domain_socket.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/socket/domain_socket.hpp rename to deploy/dds_bridge/include/unitree/common/socket/domain_socket.hpp diff --git a/cpp_bridge/include/unitree/common/socket/socket.hpp b/deploy/dds_bridge/include/unitree/common/socket/socket.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/socket/socket.hpp rename to deploy/dds_bridge/include/unitree/common/socket/socket.hpp diff --git a/cpp_bridge/include/unitree/common/string_tool.hpp b/deploy/dds_bridge/include/unitree/common/string_tool.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/string_tool.hpp rename to deploy/dds_bridge/include/unitree/common/string_tool.hpp diff --git a/cpp_bridge/include/unitree/common/thread/future.hpp b/deploy/dds_bridge/include/unitree/common/thread/future.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/thread/future.hpp rename to deploy/dds_bridge/include/unitree/common/thread/future.hpp diff --git a/cpp_bridge/include/unitree/common/thread/recurrent_thread.hpp b/deploy/dds_bridge/include/unitree/common/thread/recurrent_thread.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/thread/recurrent_thread.hpp rename to deploy/dds_bridge/include/unitree/common/thread/recurrent_thread.hpp diff --git a/cpp_bridge/include/unitree/common/thread/thread.hpp b/deploy/dds_bridge/include/unitree/common/thread/thread.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/thread/thread.hpp rename to deploy/dds_bridge/include/unitree/common/thread/thread.hpp diff --git a/cpp_bridge/include/unitree/common/thread/thread_decl.hpp b/deploy/dds_bridge/include/unitree/common/thread/thread_decl.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/thread/thread_decl.hpp rename to deploy/dds_bridge/include/unitree/common/thread/thread_decl.hpp diff --git a/cpp_bridge/include/unitree/common/thread/thread_pool.hpp b/deploy/dds_bridge/include/unitree/common/thread/thread_pool.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/thread/thread_pool.hpp rename to deploy/dds_bridge/include/unitree/common/thread/thread_pool.hpp diff --git a/cpp_bridge/include/unitree/common/thread/thread_task.hpp b/deploy/dds_bridge/include/unitree/common/thread/thread_task.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/thread/thread_task.hpp rename to deploy/dds_bridge/include/unitree/common/thread/thread_task.hpp diff --git a/cpp_bridge/include/unitree/common/time/sleep.hpp b/deploy/dds_bridge/include/unitree/common/time/sleep.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/time/sleep.hpp rename to deploy/dds_bridge/include/unitree/common/time/sleep.hpp diff --git a/cpp_bridge/include/unitree/common/time/time_tool.hpp b/deploy/dds_bridge/include/unitree/common/time/time_tool.hpp similarity index 100% rename from cpp_bridge/include/unitree/common/time/time_tool.hpp rename to deploy/dds_bridge/include/unitree/common/time/time_tool.hpp diff --git a/cpp_bridge/include/unitree/idl/go2/AudioData_.hpp b/deploy/dds_bridge/include/unitree/idl/go2/AudioData_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/go2/AudioData_.hpp rename to deploy/dds_bridge/include/unitree/idl/go2/AudioData_.hpp diff --git a/cpp_bridge/include/unitree/idl/go2/BmsCmd_.hpp b/deploy/dds_bridge/include/unitree/idl/go2/BmsCmd_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/go2/BmsCmd_.hpp rename to deploy/dds_bridge/include/unitree/idl/go2/BmsCmd_.hpp diff --git a/cpp_bridge/include/unitree/idl/go2/BmsState_.hpp b/deploy/dds_bridge/include/unitree/idl/go2/BmsState_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/go2/BmsState_.hpp rename to deploy/dds_bridge/include/unitree/idl/go2/BmsState_.hpp diff --git a/cpp_bridge/include/unitree/idl/go2/ConfigChangeStatus_.hpp b/deploy/dds_bridge/include/unitree/idl/go2/ConfigChangeStatus_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/go2/ConfigChangeStatus_.hpp rename to deploy/dds_bridge/include/unitree/idl/go2/ConfigChangeStatus_.hpp diff --git a/cpp_bridge/include/unitree/idl/go2/Error_.hpp b/deploy/dds_bridge/include/unitree/idl/go2/Error_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/go2/Error_.hpp rename to deploy/dds_bridge/include/unitree/idl/go2/Error_.hpp diff --git a/cpp_bridge/include/unitree/idl/go2/Go2FrontVideoData_.hpp b/deploy/dds_bridge/include/unitree/idl/go2/Go2FrontVideoData_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/go2/Go2FrontVideoData_.hpp rename to deploy/dds_bridge/include/unitree/idl/go2/Go2FrontVideoData_.hpp diff --git a/cpp_bridge/include/unitree/idl/go2/HeightMap_.hpp b/deploy/dds_bridge/include/unitree/idl/go2/HeightMap_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/go2/HeightMap_.hpp rename to deploy/dds_bridge/include/unitree/idl/go2/HeightMap_.hpp diff --git a/cpp_bridge/include/unitree/idl/go2/IMUState_.hpp b/deploy/dds_bridge/include/unitree/idl/go2/IMUState_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/go2/IMUState_.hpp rename to deploy/dds_bridge/include/unitree/idl/go2/IMUState_.hpp diff --git a/cpp_bridge/include/unitree/idl/go2/InterfaceConfig_.hpp b/deploy/dds_bridge/include/unitree/idl/go2/InterfaceConfig_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/go2/InterfaceConfig_.hpp rename to deploy/dds_bridge/include/unitree/idl/go2/InterfaceConfig_.hpp diff --git a/cpp_bridge/include/unitree/idl/go2/LidarState_.hpp b/deploy/dds_bridge/include/unitree/idl/go2/LidarState_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/go2/LidarState_.hpp rename to deploy/dds_bridge/include/unitree/idl/go2/LidarState_.hpp diff --git a/cpp_bridge/include/unitree/idl/go2/LowCmd_.cpp b/deploy/dds_bridge/include/unitree/idl/go2/LowCmd_.cpp similarity index 100% rename from cpp_bridge/include/unitree/idl/go2/LowCmd_.cpp rename to deploy/dds_bridge/include/unitree/idl/go2/LowCmd_.cpp diff --git a/cpp_bridge/include/unitree/idl/go2/LowCmd_.hpp b/deploy/dds_bridge/include/unitree/idl/go2/LowCmd_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/go2/LowCmd_.hpp rename to deploy/dds_bridge/include/unitree/idl/go2/LowCmd_.hpp diff --git a/cpp_bridge/include/unitree/idl/go2/LowState_.hpp b/deploy/dds_bridge/include/unitree/idl/go2/LowState_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/go2/LowState_.hpp rename to deploy/dds_bridge/include/unitree/idl/go2/LowState_.hpp diff --git a/cpp_bridge/include/unitree/idl/go2/MotorCmd_.hpp b/deploy/dds_bridge/include/unitree/idl/go2/MotorCmd_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/go2/MotorCmd_.hpp rename to deploy/dds_bridge/include/unitree/idl/go2/MotorCmd_.hpp diff --git a/cpp_bridge/include/unitree/idl/go2/MotorState_.hpp b/deploy/dds_bridge/include/unitree/idl/go2/MotorState_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/go2/MotorState_.hpp rename to deploy/dds_bridge/include/unitree/idl/go2/MotorState_.hpp diff --git a/cpp_bridge/include/unitree/idl/go2/PathPoint_.hpp b/deploy/dds_bridge/include/unitree/idl/go2/PathPoint_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/go2/PathPoint_.hpp rename to deploy/dds_bridge/include/unitree/idl/go2/PathPoint_.hpp diff --git a/cpp_bridge/include/unitree/idl/go2/Req_.hpp b/deploy/dds_bridge/include/unitree/idl/go2/Req_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/go2/Req_.hpp rename to deploy/dds_bridge/include/unitree/idl/go2/Req_.hpp diff --git a/cpp_bridge/include/unitree/idl/go2/Res_.hpp b/deploy/dds_bridge/include/unitree/idl/go2/Res_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/go2/Res_.hpp rename to deploy/dds_bridge/include/unitree/idl/go2/Res_.hpp diff --git a/cpp_bridge/include/unitree/idl/go2/SportModeCmd_.hpp b/deploy/dds_bridge/include/unitree/idl/go2/SportModeCmd_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/go2/SportModeCmd_.hpp rename to deploy/dds_bridge/include/unitree/idl/go2/SportModeCmd_.hpp diff --git a/cpp_bridge/include/unitree/idl/go2/SportModeState_.hpp b/deploy/dds_bridge/include/unitree/idl/go2/SportModeState_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/go2/SportModeState_.hpp rename to deploy/dds_bridge/include/unitree/idl/go2/SportModeState_.hpp diff --git a/cpp_bridge/include/unitree/idl/go2/TimeSpec_.hpp b/deploy/dds_bridge/include/unitree/idl/go2/TimeSpec_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/go2/TimeSpec_.hpp rename to deploy/dds_bridge/include/unitree/idl/go2/TimeSpec_.hpp diff --git a/cpp_bridge/include/unitree/idl/go2/UwbState_.hpp b/deploy/dds_bridge/include/unitree/idl/go2/UwbState_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/go2/UwbState_.hpp rename to deploy/dds_bridge/include/unitree/idl/go2/UwbState_.hpp diff --git a/cpp_bridge/include/unitree/idl/go2/UwbSwitch_.hpp b/deploy/dds_bridge/include/unitree/idl/go2/UwbSwitch_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/go2/UwbSwitch_.hpp rename to deploy/dds_bridge/include/unitree/idl/go2/UwbSwitch_.hpp diff --git a/cpp_bridge/include/unitree/idl/go2/WirelessController_.hpp b/deploy/dds_bridge/include/unitree/idl/go2/WirelessController_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/go2/WirelessController_.hpp rename to deploy/dds_bridge/include/unitree/idl/go2/WirelessController_.hpp diff --git a/cpp_bridge/include/unitree/idl/ros2/Header_.hpp b/deploy/dds_bridge/include/unitree/idl/ros2/Header_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/ros2/Header_.hpp rename to deploy/dds_bridge/include/unitree/idl/ros2/Header_.hpp diff --git a/cpp_bridge/include/unitree/idl/ros2/MapMetaData_.hpp b/deploy/dds_bridge/include/unitree/idl/ros2/MapMetaData_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/ros2/MapMetaData_.hpp rename to deploy/dds_bridge/include/unitree/idl/ros2/MapMetaData_.hpp diff --git a/cpp_bridge/include/unitree/idl/ros2/OccupancyGrid_.hpp b/deploy/dds_bridge/include/unitree/idl/ros2/OccupancyGrid_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/ros2/OccupancyGrid_.hpp rename to deploy/dds_bridge/include/unitree/idl/ros2/OccupancyGrid_.hpp diff --git a/cpp_bridge/include/unitree/idl/ros2/Odometry_.hpp b/deploy/dds_bridge/include/unitree/idl/ros2/Odometry_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/ros2/Odometry_.hpp rename to deploy/dds_bridge/include/unitree/idl/ros2/Odometry_.hpp diff --git a/cpp_bridge/include/unitree/idl/ros2/Point32_.hpp b/deploy/dds_bridge/include/unitree/idl/ros2/Point32_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/ros2/Point32_.hpp rename to deploy/dds_bridge/include/unitree/idl/ros2/Point32_.hpp diff --git a/cpp_bridge/include/unitree/idl/ros2/PointCloud2_.hpp b/deploy/dds_bridge/include/unitree/idl/ros2/PointCloud2_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/ros2/PointCloud2_.hpp rename to deploy/dds_bridge/include/unitree/idl/ros2/PointCloud2_.hpp diff --git a/cpp_bridge/include/unitree/idl/ros2/PointField_.hpp b/deploy/dds_bridge/include/unitree/idl/ros2/PointField_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/ros2/PointField_.hpp rename to deploy/dds_bridge/include/unitree/idl/ros2/PointField_.hpp diff --git a/cpp_bridge/include/unitree/idl/ros2/PointStamped_.hpp b/deploy/dds_bridge/include/unitree/idl/ros2/PointStamped_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/ros2/PointStamped_.hpp rename to deploy/dds_bridge/include/unitree/idl/ros2/PointStamped_.hpp diff --git a/cpp_bridge/include/unitree/idl/ros2/Point_.hpp b/deploy/dds_bridge/include/unitree/idl/ros2/Point_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/ros2/Point_.hpp rename to deploy/dds_bridge/include/unitree/idl/ros2/Point_.hpp diff --git a/cpp_bridge/include/unitree/idl/ros2/Pose2D_.hpp b/deploy/dds_bridge/include/unitree/idl/ros2/Pose2D_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/ros2/Pose2D_.hpp rename to deploy/dds_bridge/include/unitree/idl/ros2/Pose2D_.hpp diff --git a/cpp_bridge/include/unitree/idl/ros2/PoseStamped_.hpp b/deploy/dds_bridge/include/unitree/idl/ros2/PoseStamped_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/ros2/PoseStamped_.hpp rename to deploy/dds_bridge/include/unitree/idl/ros2/PoseStamped_.hpp diff --git a/cpp_bridge/include/unitree/idl/ros2/PoseWithCovarianceStamped_.hpp b/deploy/dds_bridge/include/unitree/idl/ros2/PoseWithCovarianceStamped_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/ros2/PoseWithCovarianceStamped_.hpp rename to deploy/dds_bridge/include/unitree/idl/ros2/PoseWithCovarianceStamped_.hpp diff --git a/cpp_bridge/include/unitree/idl/ros2/PoseWithCovariance_.hpp b/deploy/dds_bridge/include/unitree/idl/ros2/PoseWithCovariance_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/ros2/PoseWithCovariance_.hpp rename to deploy/dds_bridge/include/unitree/idl/ros2/PoseWithCovariance_.hpp diff --git a/cpp_bridge/include/unitree/idl/ros2/Pose_.hpp b/deploy/dds_bridge/include/unitree/idl/ros2/Pose_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/ros2/Pose_.hpp rename to deploy/dds_bridge/include/unitree/idl/ros2/Pose_.hpp diff --git a/cpp_bridge/include/unitree/idl/ros2/QuaternionStamped_.hpp b/deploy/dds_bridge/include/unitree/idl/ros2/QuaternionStamped_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/ros2/QuaternionStamped_.hpp rename to deploy/dds_bridge/include/unitree/idl/ros2/QuaternionStamped_.hpp diff --git a/cpp_bridge/include/unitree/idl/ros2/Quaternion_.hpp b/deploy/dds_bridge/include/unitree/idl/ros2/Quaternion_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/ros2/Quaternion_.hpp rename to deploy/dds_bridge/include/unitree/idl/ros2/Quaternion_.hpp diff --git a/cpp_bridge/include/unitree/idl/ros2/String_.hpp b/deploy/dds_bridge/include/unitree/idl/ros2/String_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/ros2/String_.hpp rename to deploy/dds_bridge/include/unitree/idl/ros2/String_.hpp diff --git a/cpp_bridge/include/unitree/idl/ros2/Time_.hpp b/deploy/dds_bridge/include/unitree/idl/ros2/Time_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/ros2/Time_.hpp rename to deploy/dds_bridge/include/unitree/idl/ros2/Time_.hpp diff --git a/cpp_bridge/include/unitree/idl/ros2/TwistStamped_.hpp b/deploy/dds_bridge/include/unitree/idl/ros2/TwistStamped_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/ros2/TwistStamped_.hpp rename to deploy/dds_bridge/include/unitree/idl/ros2/TwistStamped_.hpp diff --git a/cpp_bridge/include/unitree/idl/ros2/TwistWithCovarianceStamped_.hpp b/deploy/dds_bridge/include/unitree/idl/ros2/TwistWithCovarianceStamped_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/ros2/TwistWithCovarianceStamped_.hpp rename to deploy/dds_bridge/include/unitree/idl/ros2/TwistWithCovarianceStamped_.hpp diff --git a/cpp_bridge/include/unitree/idl/ros2/TwistWithCovariance_.hpp b/deploy/dds_bridge/include/unitree/idl/ros2/TwistWithCovariance_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/ros2/TwistWithCovariance_.hpp rename to deploy/dds_bridge/include/unitree/idl/ros2/TwistWithCovariance_.hpp diff --git a/cpp_bridge/include/unitree/idl/ros2/Twist_.hpp b/deploy/dds_bridge/include/unitree/idl/ros2/Twist_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/ros2/Twist_.hpp rename to deploy/dds_bridge/include/unitree/idl/ros2/Twist_.hpp diff --git a/cpp_bridge/include/unitree/idl/ros2/Vector3_.hpp b/deploy/dds_bridge/include/unitree/idl/ros2/Vector3_.hpp similarity index 100% rename from cpp_bridge/include/unitree/idl/ros2/Vector3_.hpp rename to deploy/dds_bridge/include/unitree/idl/ros2/Vector3_.hpp diff --git a/cpp_bridge/include/unitree/robot/b2/back_video/back_video_api.hpp b/deploy/dds_bridge/include/unitree/robot/b2/back_video/back_video_api.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/b2/back_video/back_video_api.hpp rename to deploy/dds_bridge/include/unitree/robot/b2/back_video/back_video_api.hpp diff --git a/cpp_bridge/include/unitree/robot/b2/back_video/back_video_client.hpp b/deploy/dds_bridge/include/unitree/robot/b2/back_video/back_video_client.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/b2/back_video/back_video_client.hpp rename to deploy/dds_bridge/include/unitree/robot/b2/back_video/back_video_client.hpp diff --git a/cpp_bridge/include/unitree/robot/b2/back_video/back_video_error.hpp b/deploy/dds_bridge/include/unitree/robot/b2/back_video/back_video_error.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/b2/back_video/back_video_error.hpp rename to deploy/dds_bridge/include/unitree/robot/b2/back_video/back_video_error.hpp diff --git a/cpp_bridge/include/unitree/robot/b2/config/config_api.hpp b/deploy/dds_bridge/include/unitree/robot/b2/config/config_api.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/b2/config/config_api.hpp rename to deploy/dds_bridge/include/unitree/robot/b2/config/config_api.hpp diff --git a/cpp_bridge/include/unitree/robot/b2/config/config_client.hpp b/deploy/dds_bridge/include/unitree/robot/b2/config/config_client.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/b2/config/config_client.hpp rename to deploy/dds_bridge/include/unitree/robot/b2/config/config_client.hpp diff --git a/cpp_bridge/include/unitree/robot/b2/config/config_error.hpp b/deploy/dds_bridge/include/unitree/robot/b2/config/config_error.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/b2/config/config_error.hpp rename to deploy/dds_bridge/include/unitree/robot/b2/config/config_error.hpp diff --git a/cpp_bridge/include/unitree/robot/b2/front_video/front_video_api.hpp b/deploy/dds_bridge/include/unitree/robot/b2/front_video/front_video_api.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/b2/front_video/front_video_api.hpp rename to deploy/dds_bridge/include/unitree/robot/b2/front_video/front_video_api.hpp diff --git a/cpp_bridge/include/unitree/robot/b2/front_video/front_video_client.hpp b/deploy/dds_bridge/include/unitree/robot/b2/front_video/front_video_client.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/b2/front_video/front_video_client.hpp rename to deploy/dds_bridge/include/unitree/robot/b2/front_video/front_video_client.hpp diff --git a/cpp_bridge/include/unitree/robot/b2/front_video/front_video_error.hpp b/deploy/dds_bridge/include/unitree/robot/b2/front_video/front_video_error.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/b2/front_video/front_video_error.hpp rename to deploy/dds_bridge/include/unitree/robot/b2/front_video/front_video_error.hpp diff --git a/cpp_bridge/include/unitree/robot/b2/motion_switcher/motion_switcher_api.hpp b/deploy/dds_bridge/include/unitree/robot/b2/motion_switcher/motion_switcher_api.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/b2/motion_switcher/motion_switcher_api.hpp rename to deploy/dds_bridge/include/unitree/robot/b2/motion_switcher/motion_switcher_api.hpp diff --git a/cpp_bridge/include/unitree/robot/b2/motion_switcher/motion_switcher_client.hpp b/deploy/dds_bridge/include/unitree/robot/b2/motion_switcher/motion_switcher_client.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/b2/motion_switcher/motion_switcher_client.hpp rename to deploy/dds_bridge/include/unitree/robot/b2/motion_switcher/motion_switcher_client.hpp diff --git a/cpp_bridge/include/unitree/robot/b2/motion_switcher/motion_switcher_error.hpp b/deploy/dds_bridge/include/unitree/robot/b2/motion_switcher/motion_switcher_error.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/b2/motion_switcher/motion_switcher_error.hpp rename to deploy/dds_bridge/include/unitree/robot/b2/motion_switcher/motion_switcher_error.hpp diff --git a/cpp_bridge/include/unitree/robot/b2/robot_state/robot_state_api.hpp b/deploy/dds_bridge/include/unitree/robot/b2/robot_state/robot_state_api.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/b2/robot_state/robot_state_api.hpp rename to deploy/dds_bridge/include/unitree/robot/b2/robot_state/robot_state_api.hpp diff --git a/cpp_bridge/include/unitree/robot/b2/robot_state/robot_state_client.hpp b/deploy/dds_bridge/include/unitree/robot/b2/robot_state/robot_state_client.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/b2/robot_state/robot_state_client.hpp rename to deploy/dds_bridge/include/unitree/robot/b2/robot_state/robot_state_client.hpp diff --git a/cpp_bridge/include/unitree/robot/b2/robot_state/robot_state_error.hpp b/deploy/dds_bridge/include/unitree/robot/b2/robot_state/robot_state_error.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/b2/robot_state/robot_state_error.hpp rename to deploy/dds_bridge/include/unitree/robot/b2/robot_state/robot_state_error.hpp diff --git a/cpp_bridge/include/unitree/robot/b2/sport/sport_api.hpp b/deploy/dds_bridge/include/unitree/robot/b2/sport/sport_api.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/b2/sport/sport_api.hpp rename to deploy/dds_bridge/include/unitree/robot/b2/sport/sport_api.hpp diff --git a/cpp_bridge/include/unitree/robot/b2/sport/sport_client.hpp b/deploy/dds_bridge/include/unitree/robot/b2/sport/sport_client.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/b2/sport/sport_client.hpp rename to deploy/dds_bridge/include/unitree/robot/b2/sport/sport_client.hpp diff --git a/cpp_bridge/include/unitree/robot/b2/sport/sport_error.hpp b/deploy/dds_bridge/include/unitree/robot/b2/sport/sport_error.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/b2/sport/sport_error.hpp rename to deploy/dds_bridge/include/unitree/robot/b2/sport/sport_error.hpp diff --git a/cpp_bridge/include/unitree/robot/channel/channel_factory.hpp b/deploy/dds_bridge/include/unitree/robot/channel/channel_factory.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/channel/channel_factory.hpp rename to deploy/dds_bridge/include/unitree/robot/channel/channel_factory.hpp diff --git a/cpp_bridge/include/unitree/robot/channel/channel_labor.hpp b/deploy/dds_bridge/include/unitree/robot/channel/channel_labor.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/channel/channel_labor.hpp rename to deploy/dds_bridge/include/unitree/robot/channel/channel_labor.hpp diff --git a/cpp_bridge/include/unitree/robot/channel/channel_namer.hpp b/deploy/dds_bridge/include/unitree/robot/channel/channel_namer.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/channel/channel_namer.hpp rename to deploy/dds_bridge/include/unitree/robot/channel/channel_namer.hpp diff --git a/cpp_bridge/include/unitree/robot/channel/channel_publisher.hpp b/deploy/dds_bridge/include/unitree/robot/channel/channel_publisher.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/channel/channel_publisher.hpp rename to deploy/dds_bridge/include/unitree/robot/channel/channel_publisher.hpp diff --git a/cpp_bridge/include/unitree/robot/channel/channel_subscriber.hpp b/deploy/dds_bridge/include/unitree/robot/channel/channel_subscriber.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/channel/channel_subscriber.hpp rename to deploy/dds_bridge/include/unitree/robot/channel/channel_subscriber.hpp diff --git a/cpp_bridge/include/unitree/robot/client/client.hpp b/deploy/dds_bridge/include/unitree/robot/client/client.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/client/client.hpp rename to deploy/dds_bridge/include/unitree/robot/client/client.hpp diff --git a/cpp_bridge/include/unitree/robot/client/client_base.hpp b/deploy/dds_bridge/include/unitree/robot/client/client_base.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/client/client_base.hpp rename to deploy/dds_bridge/include/unitree/robot/client/client_base.hpp diff --git a/cpp_bridge/include/unitree/robot/client/client_stub.hpp b/deploy/dds_bridge/include/unitree/robot/client/client_stub.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/client/client_stub.hpp rename to deploy/dds_bridge/include/unitree/robot/client/client_stub.hpp diff --git a/cpp_bridge/include/unitree/robot/client/lease_client.hpp b/deploy/dds_bridge/include/unitree/robot/client/lease_client.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/client/lease_client.hpp rename to deploy/dds_bridge/include/unitree/robot/client/lease_client.hpp diff --git a/cpp_bridge/include/unitree/robot/future/request_future.hpp b/deploy/dds_bridge/include/unitree/robot/future/request_future.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/future/request_future.hpp rename to deploy/dds_bridge/include/unitree/robot/future/request_future.hpp diff --git a/cpp_bridge/include/unitree/robot/go2/obstacles_avoid/obstacles_avoid_api.hpp b/deploy/dds_bridge/include/unitree/robot/go2/obstacles_avoid/obstacles_avoid_api.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/go2/obstacles_avoid/obstacles_avoid_api.hpp rename to deploy/dds_bridge/include/unitree/robot/go2/obstacles_avoid/obstacles_avoid_api.hpp diff --git a/cpp_bridge/include/unitree/robot/go2/obstacles_avoid/obstacles_avoid_client.hpp b/deploy/dds_bridge/include/unitree/robot/go2/obstacles_avoid/obstacles_avoid_client.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/go2/obstacles_avoid/obstacles_avoid_client.hpp rename to deploy/dds_bridge/include/unitree/robot/go2/obstacles_avoid/obstacles_avoid_client.hpp diff --git a/cpp_bridge/include/unitree/robot/go2/public/jsonize_type.hpp b/deploy/dds_bridge/include/unitree/robot/go2/public/jsonize_type.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/go2/public/jsonize_type.hpp rename to deploy/dds_bridge/include/unitree/robot/go2/public/jsonize_type.hpp diff --git a/cpp_bridge/include/unitree/robot/go2/robot_state/robot_state_api.hpp b/deploy/dds_bridge/include/unitree/robot/go2/robot_state/robot_state_api.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/go2/robot_state/robot_state_api.hpp rename to deploy/dds_bridge/include/unitree/robot/go2/robot_state/robot_state_api.hpp diff --git a/cpp_bridge/include/unitree/robot/go2/robot_state/robot_state_client.hpp b/deploy/dds_bridge/include/unitree/robot/go2/robot_state/robot_state_client.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/go2/robot_state/robot_state_client.hpp rename to deploy/dds_bridge/include/unitree/robot/go2/robot_state/robot_state_client.hpp diff --git a/cpp_bridge/include/unitree/robot/go2/robot_state/robot_state_error.hpp b/deploy/dds_bridge/include/unitree/robot/go2/robot_state/robot_state_error.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/go2/robot_state/robot_state_error.hpp rename to deploy/dds_bridge/include/unitree/robot/go2/robot_state/robot_state_error.hpp diff --git a/cpp_bridge/include/unitree/robot/go2/sport/sport_api.hpp b/deploy/dds_bridge/include/unitree/robot/go2/sport/sport_api.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/go2/sport/sport_api.hpp rename to deploy/dds_bridge/include/unitree/robot/go2/sport/sport_api.hpp diff --git a/cpp_bridge/include/unitree/robot/go2/sport/sport_client.hpp b/deploy/dds_bridge/include/unitree/robot/go2/sport/sport_client.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/go2/sport/sport_client.hpp rename to deploy/dds_bridge/include/unitree/robot/go2/sport/sport_client.hpp diff --git a/cpp_bridge/include/unitree/robot/go2/sport/sport_error.hpp b/deploy/dds_bridge/include/unitree/robot/go2/sport/sport_error.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/go2/sport/sport_error.hpp rename to deploy/dds_bridge/include/unitree/robot/go2/sport/sport_error.hpp diff --git a/cpp_bridge/include/unitree/robot/go2/utrack/utrack_api.hpp b/deploy/dds_bridge/include/unitree/robot/go2/utrack/utrack_api.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/go2/utrack/utrack_api.hpp rename to deploy/dds_bridge/include/unitree/robot/go2/utrack/utrack_api.hpp diff --git a/cpp_bridge/include/unitree/robot/go2/utrack/utrack_client.hpp b/deploy/dds_bridge/include/unitree/robot/go2/utrack/utrack_client.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/go2/utrack/utrack_client.hpp rename to deploy/dds_bridge/include/unitree/robot/go2/utrack/utrack_client.hpp diff --git a/cpp_bridge/include/unitree/robot/go2/video/video_api.hpp b/deploy/dds_bridge/include/unitree/robot/go2/video/video_api.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/go2/video/video_api.hpp rename to deploy/dds_bridge/include/unitree/robot/go2/video/video_api.hpp diff --git a/cpp_bridge/include/unitree/robot/go2/video/video_client.hpp b/deploy/dds_bridge/include/unitree/robot/go2/video/video_client.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/go2/video/video_client.hpp rename to deploy/dds_bridge/include/unitree/robot/go2/video/video_client.hpp diff --git a/cpp_bridge/include/unitree/robot/go2/video/video_error.hpp b/deploy/dds_bridge/include/unitree/robot/go2/video/video_error.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/go2/video/video_error.hpp rename to deploy/dds_bridge/include/unitree/robot/go2/video/video_error.hpp diff --git a/cpp_bridge/include/unitree/robot/go2/vui/vui_api.hpp b/deploy/dds_bridge/include/unitree/robot/go2/vui/vui_api.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/go2/vui/vui_api.hpp rename to deploy/dds_bridge/include/unitree/robot/go2/vui/vui_api.hpp diff --git a/cpp_bridge/include/unitree/robot/go2/vui/vui_client.hpp b/deploy/dds_bridge/include/unitree/robot/go2/vui/vui_client.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/go2/vui/vui_client.hpp rename to deploy/dds_bridge/include/unitree/robot/go2/vui/vui_client.hpp diff --git a/cpp_bridge/include/unitree/robot/go2/vui/vui_error.hpp b/deploy/dds_bridge/include/unitree/robot/go2/vui/vui_error.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/go2/vui/vui_error.hpp rename to deploy/dds_bridge/include/unitree/robot/go2/vui/vui_error.hpp diff --git a/cpp_bridge/include/unitree/robot/internal/internal.hpp b/deploy/dds_bridge/include/unitree/robot/internal/internal.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/internal/internal.hpp rename to deploy/dds_bridge/include/unitree/robot/internal/internal.hpp diff --git a/cpp_bridge/include/unitree/robot/internal/internal_api.hpp b/deploy/dds_bridge/include/unitree/robot/internal/internal_api.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/internal/internal_api.hpp rename to deploy/dds_bridge/include/unitree/robot/internal/internal_api.hpp diff --git a/cpp_bridge/include/unitree/robot/internal/internal_error.hpp b/deploy/dds_bridge/include/unitree/robot/internal/internal_error.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/internal/internal_error.hpp rename to deploy/dds_bridge/include/unitree/robot/internal/internal_error.hpp diff --git a/cpp_bridge/include/unitree/robot/internal/internal_idl_decl/RequestHeader_.hpp b/deploy/dds_bridge/include/unitree/robot/internal/internal_idl_decl/RequestHeader_.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/internal/internal_idl_decl/RequestHeader_.hpp rename to deploy/dds_bridge/include/unitree/robot/internal/internal_idl_decl/RequestHeader_.hpp diff --git a/cpp_bridge/include/unitree/robot/internal/internal_idl_decl/RequestIdentity_.hpp b/deploy/dds_bridge/include/unitree/robot/internal/internal_idl_decl/RequestIdentity_.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/internal/internal_idl_decl/RequestIdentity_.hpp rename to deploy/dds_bridge/include/unitree/robot/internal/internal_idl_decl/RequestIdentity_.hpp diff --git a/cpp_bridge/include/unitree/robot/internal/internal_idl_decl/RequestLease_.hpp b/deploy/dds_bridge/include/unitree/robot/internal/internal_idl_decl/RequestLease_.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/internal/internal_idl_decl/RequestLease_.hpp rename to deploy/dds_bridge/include/unitree/robot/internal/internal_idl_decl/RequestLease_.hpp diff --git a/cpp_bridge/include/unitree/robot/internal/internal_idl_decl/RequestPolicy_.hpp b/deploy/dds_bridge/include/unitree/robot/internal/internal_idl_decl/RequestPolicy_.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/internal/internal_idl_decl/RequestPolicy_.hpp rename to deploy/dds_bridge/include/unitree/robot/internal/internal_idl_decl/RequestPolicy_.hpp diff --git a/cpp_bridge/include/unitree/robot/internal/internal_idl_decl/Request_.hpp b/deploy/dds_bridge/include/unitree/robot/internal/internal_idl_decl/Request_.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/internal/internal_idl_decl/Request_.hpp rename to deploy/dds_bridge/include/unitree/robot/internal/internal_idl_decl/Request_.hpp diff --git a/cpp_bridge/include/unitree/robot/internal/internal_idl_decl/ResponseHeader_.hpp b/deploy/dds_bridge/include/unitree/robot/internal/internal_idl_decl/ResponseHeader_.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/internal/internal_idl_decl/ResponseHeader_.hpp rename to deploy/dds_bridge/include/unitree/robot/internal/internal_idl_decl/ResponseHeader_.hpp diff --git a/cpp_bridge/include/unitree/robot/internal/internal_idl_decl/ResponseStatus_.hpp b/deploy/dds_bridge/include/unitree/robot/internal/internal_idl_decl/ResponseStatus_.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/internal/internal_idl_decl/ResponseStatus_.hpp rename to deploy/dds_bridge/include/unitree/robot/internal/internal_idl_decl/ResponseStatus_.hpp diff --git a/cpp_bridge/include/unitree/robot/internal/internal_idl_decl/Response_.hpp b/deploy/dds_bridge/include/unitree/robot/internal/internal_idl_decl/Response_.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/internal/internal_idl_decl/Response_.hpp rename to deploy/dds_bridge/include/unitree/robot/internal/internal_idl_decl/Response_.hpp diff --git a/cpp_bridge/include/unitree/robot/internal/internal_request_response.hpp b/deploy/dds_bridge/include/unitree/robot/internal/internal_request_response.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/internal/internal_request_response.hpp rename to deploy/dds_bridge/include/unitree/robot/internal/internal_request_response.hpp diff --git a/cpp_bridge/include/unitree/robot/serialize/serialize.hpp b/deploy/dds_bridge/include/unitree/robot/serialize/serialize.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/serialize/serialize.hpp rename to deploy/dds_bridge/include/unitree/robot/serialize/serialize.hpp diff --git a/cpp_bridge/include/unitree/robot/server/lease_server.hpp b/deploy/dds_bridge/include/unitree/robot/server/lease_server.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/server/lease_server.hpp rename to deploy/dds_bridge/include/unitree/robot/server/lease_server.hpp diff --git a/cpp_bridge/include/unitree/robot/server/server.hpp b/deploy/dds_bridge/include/unitree/robot/server/server.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/server/server.hpp rename to deploy/dds_bridge/include/unitree/robot/server/server.hpp diff --git a/cpp_bridge/include/unitree/robot/server/server_base.hpp b/deploy/dds_bridge/include/unitree/robot/server/server_base.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/server/server_base.hpp rename to deploy/dds_bridge/include/unitree/robot/server/server_base.hpp diff --git a/cpp_bridge/include/unitree/robot/server/server_stub.hpp b/deploy/dds_bridge/include/unitree/robot/server/server_stub.hpp similarity index 100% rename from cpp_bridge/include/unitree/robot/server/server_stub.hpp rename to deploy/dds_bridge/include/unitree/robot/server/server_stub.hpp diff --git a/cpp_bridge/include/utils/dds_publisher.hpp b/deploy/dds_bridge/include/utils/dds_publisher.hpp similarity index 100% rename from cpp_bridge/include/utils/dds_publisher.hpp rename to deploy/dds_bridge/include/utils/dds_publisher.hpp diff --git a/cpp_bridge/include/utils/dds_subscriber.hpp b/deploy/dds_bridge/include/utils/dds_subscriber.hpp similarity index 100% rename from cpp_bridge/include/utils/dds_subscriber.hpp rename to deploy/dds_bridge/include/utils/dds_subscriber.hpp diff --git a/cpp_bridge/install.sh b/deploy/dds_bridge/install.sh similarity index 100% rename from cpp_bridge/install.sh rename to deploy/dds_bridge/install.sh diff --git a/cpp_bridge/lib/aarch64/libunitree_sdk2.a b/deploy/dds_bridge/lib/aarch64/libunitree_sdk2.a similarity index 100% rename from cpp_bridge/lib/aarch64/libunitree_sdk2.a rename to deploy/dds_bridge/lib/aarch64/libunitree_sdk2.a diff --git a/cpp_bridge/lib/x86_64/libunitree_sdk2.a b/deploy/dds_bridge/lib/x86_64/libunitree_sdk2.a similarity index 100% rename from cpp_bridge/lib/x86_64/libunitree_sdk2.a rename to deploy/dds_bridge/lib/x86_64/libunitree_sdk2.a diff --git a/cpp_bridge/src/high_level/follow_sin.cpp b/deploy/dds_bridge/src/high_level/follow_sin.cpp similarity index 100% rename from cpp_bridge/src/high_level/follow_sin.cpp rename to deploy/dds_bridge/src/high_level/follow_sin.cpp diff --git a/cpp_bridge/src/high_level/sportmode_test.cpp b/deploy/dds_bridge/src/high_level/sportmode_test.cpp similarity index 100% rename from cpp_bridge/src/high_level/sportmode_test.cpp rename to deploy/dds_bridge/src/high_level/sportmode_test.cpp diff --git a/cpp_bridge/src/lowlevel/bridge.cpp b/deploy/dds_bridge/src/lowlevel/bridge.cpp similarity index 100% rename from cpp_bridge/src/lowlevel/bridge.cpp rename to deploy/dds_bridge/src/lowlevel/bridge.cpp diff --git a/cpp_bridge/src/simple_test.cpp b/deploy/dds_bridge/src/simple_test.cpp similarity index 100% rename from cpp_bridge/src/simple_test.cpp rename to deploy/dds_bridge/src/simple_test.cpp diff --git a/cpp_bridge/thirdparty/include/dds/config.h b/deploy/dds_bridge/thirdparty/include/dds/config.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/config.h rename to deploy/dds_bridge/thirdparty/include/dds/config.h diff --git a/cpp_bridge/thirdparty/include/dds/dds.h b/deploy/dds_bridge/thirdparty/include/dds/dds.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/dds.h rename to deploy/dds_bridge/thirdparty/include/dds/dds.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsc/dds_basic_types.h b/deploy/dds_bridge/thirdparty/include/dds/ddsc/dds_basic_types.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsc/dds_basic_types.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsc/dds_basic_types.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsc/dds_data_allocator.h b/deploy/dds_bridge/thirdparty/include/dds/ddsc/dds_data_allocator.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsc/dds_data_allocator.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsc/dds_data_allocator.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsc/dds_internal_api.h b/deploy/dds_bridge/thirdparty/include/dds/ddsc/dds_internal_api.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsc/dds_internal_api.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsc/dds_internal_api.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsc/dds_loan_api.h b/deploy/dds_bridge/thirdparty/include/dds/ddsc/dds_loan_api.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsc/dds_loan_api.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsc/dds_loan_api.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsc/dds_opcodes.h b/deploy/dds_bridge/thirdparty/include/dds/ddsc/dds_opcodes.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsc/dds_opcodes.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsc/dds_opcodes.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsc/dds_public_alloc.h b/deploy/dds_bridge/thirdparty/include/dds/ddsc/dds_public_alloc.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsc/dds_public_alloc.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsc/dds_public_alloc.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsc/dds_public_error.h b/deploy/dds_bridge/thirdparty/include/dds/ddsc/dds_public_error.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsc/dds_public_error.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsc/dds_public_error.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsc/dds_public_impl.h b/deploy/dds_bridge/thirdparty/include/dds/ddsc/dds_public_impl.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsc/dds_public_impl.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsc/dds_public_impl.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsc/dds_public_listener.h b/deploy/dds_bridge/thirdparty/include/dds/ddsc/dds_public_listener.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsc/dds_public_listener.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsc/dds_public_listener.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsc/dds_public_qos.h b/deploy/dds_bridge/thirdparty/include/dds/ddsc/dds_public_qos.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsc/dds_public_qos.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsc/dds_public_qos.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsc/dds_public_qosdefs.h b/deploy/dds_bridge/thirdparty/include/dds/ddsc/dds_public_qosdefs.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsc/dds_public_qosdefs.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsc/dds_public_qosdefs.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsc/dds_public_status.h b/deploy/dds_bridge/thirdparty/include/dds/ddsc/dds_public_status.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsc/dds_public_status.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsc/dds_public_status.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsc/dds_rhc.h b/deploy/dds_bridge/thirdparty/include/dds/ddsc/dds_rhc.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsc/dds_rhc.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsc/dds_rhc.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsc/dds_statistics.h b/deploy/dds_bridge/thirdparty/include/dds/ddsc/dds_statistics.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsc/dds_statistics.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsc/dds_statistics.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_acknack.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_acknack.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_acknack.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_acknack.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_builtin_topic_if.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_builtin_topic_if.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_builtin_topic_if.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_builtin_topic_if.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_cdrstream.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_cdrstream.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_cdrstream.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_cdrstream.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_cfgelems.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_cfgelems.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_cfgelems.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_cfgelems.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_cfgunits.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_cfgunits.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_cfgunits.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_cfgunits.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_config.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_config.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_config.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_config.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_config_impl.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_config_impl.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_config_impl.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_config_impl.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_deadline.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_deadline.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_deadline.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_deadline.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_deliver_locally.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_deliver_locally.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_deliver_locally.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_deliver_locally.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_domaingv.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_domaingv.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_domaingv.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_domaingv.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_endpoint.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_endpoint.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_endpoint.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_endpoint.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_entity.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_entity.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_entity.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_entity.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_entity_index.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_entity_index.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_entity_index.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_entity_index.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_entity_match.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_entity_match.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_entity_match.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_entity_match.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_guid.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_guid.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_guid.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_guid.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_handshake.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_handshake.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_handshake.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_handshake.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_iid.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_iid.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_iid.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_iid.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_ipaddr.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_ipaddr.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_ipaddr.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_ipaddr.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_keyhash.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_keyhash.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_keyhash.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_keyhash.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_lifespan.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_lifespan.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_lifespan.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_lifespan.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_list_genptr.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_list_genptr.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_list_genptr.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_list_genptr.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_list_tmpl.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_list_tmpl.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_list_tmpl.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_list_tmpl.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_locator.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_locator.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_locator.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_locator.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_mcgroup.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_mcgroup.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_mcgroup.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_mcgroup.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_ownip.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_ownip.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_ownip.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_ownip.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_participant.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_participant.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_participant.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_participant.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_plist.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_plist.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_plist.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_plist.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_plist_generic.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_plist_generic.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_plist_generic.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_plist_generic.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_pmd.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_pmd.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_pmd.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_pmd.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_portmapping.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_portmapping.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_portmapping.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_portmapping.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_proxy_endpoint.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_proxy_endpoint.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_proxy_endpoint.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_proxy_endpoint.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_proxy_participant.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_proxy_participant.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_proxy_participant.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_proxy_participant.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_raweth.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_raweth.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_raweth.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_raweth.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_rhc.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_rhc.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_rhc.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_rhc.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_security_exchange.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_security_exchange.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_security_exchange.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_security_exchange.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_security_msg.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_security_msg.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_security_msg.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_security_msg.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_security_omg.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_security_omg.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_security_omg.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_security_omg.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_security_util.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_security_util.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_security_util.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_security_util.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_serdata.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_serdata.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_serdata.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_serdata.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_serdata_default.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_serdata_default.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_serdata_default.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_serdata_default.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_serdata_plist.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_serdata_plist.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_serdata_plist.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_serdata_plist.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_serdata_pserop.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_serdata_pserop.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_serdata_pserop.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_serdata_pserop.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_sertopic.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_sertopic.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_sertopic.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_sertopic.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_sertype.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_sertype.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_sertype.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_sertype.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_shm_transport.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_shm_transport.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_shm_transport.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_shm_transport.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_ssl.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_ssl.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_ssl.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_ssl.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_statistics.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_statistics.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_statistics.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_statistics.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_tcp.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_tcp.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_tcp.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_tcp.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_threadmon.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_threadmon.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_threadmon.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_threadmon.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_time.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_time.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_time.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_time.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_tkmap.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_tkmap.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_tkmap.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_tkmap.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_topic.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_topic.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_topic.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_topic.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_tran.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_tran.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_tran.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_tran.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_typebuilder.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_typebuilder.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_typebuilder.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_typebuilder.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_typelib.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_typelib.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_typelib.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_typelib.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_typelookup.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_typelookup.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_typelookup.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_typelookup.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_typewrap.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_typewrap.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_typewrap.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_typewrap.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_udp.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_udp.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_udp.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_udp.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_vendor.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_vendor.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_vendor.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_vendor.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_vnet.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_vnet.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_vnet.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_vnet.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_wraddrset.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_wraddrset.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_wraddrset.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_wraddrset.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_xqos.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_xqos.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_xqos.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_xqos.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_xt_impl.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_xt_impl.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_xt_impl.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_xt_impl.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_xt_typeinfo.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_xt_typeinfo.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_xt_typeinfo.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_xt_typeinfo.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_xt_typeinfo.idl b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_xt_typeinfo.idl similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_xt_typeinfo.idl rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_xt_typeinfo.idl diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_xt_typelookup.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_xt_typelookup.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_xt_typelookup.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_xt_typelookup.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_xt_typelookup.idl b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_xt_typelookup.idl similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_xt_typelookup.idl rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_xt_typelookup.idl diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_xt_typemap.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_xt_typemap.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_xt_typemap.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_xt_typemap.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/ddsi_xt_typemap.idl b/deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_xt_typemap.idl similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/ddsi_xt_typemap.idl rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/ddsi_xt_typemap.idl diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/q_addrset.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/q_addrset.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/q_addrset.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/q_addrset.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/q_bitset.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/q_bitset.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/q_bitset.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/q_bitset.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/q_bswap.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/q_bswap.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/q_bswap.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/q_bswap.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/q_ddsi_discovery.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/q_ddsi_discovery.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/q_ddsi_discovery.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/q_ddsi_discovery.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/q_debmon.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/q_debmon.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/q_debmon.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/q_debmon.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/q_feature_check.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/q_feature_check.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/q_feature_check.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/q_feature_check.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/q_freelist.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/q_freelist.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/q_freelist.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/q_freelist.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/q_gc.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/q_gc.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/q_gc.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/q_gc.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/q_hbcontrol.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/q_hbcontrol.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/q_hbcontrol.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/q_hbcontrol.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/q_init.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/q_init.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/q_init.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/q_init.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/q_inverse_uint32_set.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/q_inverse_uint32_set.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/q_inverse_uint32_set.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/q_inverse_uint32_set.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/q_lat_estim.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/q_lat_estim.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/q_lat_estim.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/q_lat_estim.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/q_lease.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/q_lease.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/q_lease.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/q_lease.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/q_log.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/q_log.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/q_log.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/q_log.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/q_misc.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/q_misc.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/q_misc.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/q_misc.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/q_pcap.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/q_pcap.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/q_pcap.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/q_pcap.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/q_protocol.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/q_protocol.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/q_protocol.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/q_protocol.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/q_qosmatch.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/q_qosmatch.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/q_qosmatch.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/q_qosmatch.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/q_radmin.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/q_radmin.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/q_radmin.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/q_radmin.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/q_receive.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/q_receive.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/q_receive.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/q_receive.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/q_rtps.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/q_rtps.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/q_rtps.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/q_rtps.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/q_sockwaitset.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/q_sockwaitset.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/q_sockwaitset.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/q_sockwaitset.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/q_thread.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/q_thread.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/q_thread.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/q_thread.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/q_transmit.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/q_transmit.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/q_transmit.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/q_transmit.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/q_unused.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/q_unused.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/q_unused.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/q_unused.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/q_whc.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/q_whc.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/q_whc.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/q_whc.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/q_xevent.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/q_xevent.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/q_xevent.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/q_xevent.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/q_xmsg.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/q_xmsg.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/q_xmsg.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/q_xmsg.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsi/sysdeps.h b/deploy/dds_bridge/thirdparty/include/dds/ddsi/sysdeps.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsi/sysdeps.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsi/sysdeps.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/align.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/align.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/align.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/align.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/arch.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/arch.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/arch.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/arch.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/atomics.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/atomics.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/atomics.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/atomics.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/atomics/arm.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/atomics/arm.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/atomics/arm.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/atomics/arm.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/atomics/gcc.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/atomics/gcc.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/atomics/gcc.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/atomics/gcc.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/atomics/msvc.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/atomics/msvc.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/atomics/msvc.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/atomics/msvc.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/atomics/sun.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/atomics/sun.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/atomics/sun.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/atomics/sun.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/attributes.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/attributes.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/attributes.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/attributes.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/avl.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/avl.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/avl.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/avl.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/bswap.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/bswap.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/bswap.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/bswap.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/cdtors.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/cdtors.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/cdtors.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/cdtors.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/circlist.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/circlist.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/circlist.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/circlist.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/countargs.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/countargs.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/countargs.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/countargs.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/dynlib.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/dynlib.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/dynlib.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/dynlib.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/endian.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/endian.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/endian.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/endian.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/environ.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/environ.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/environ.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/environ.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/expand_vars.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/expand_vars.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/expand_vars.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/expand_vars.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/fibheap.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/fibheap.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/fibheap.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/fibheap.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/filesystem.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/filesystem.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/filesystem.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/filesystem.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/filesystem/posix.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/filesystem/posix.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/filesystem/posix.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/filesystem/posix.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/filesystem/windows.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/filesystem/windows.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/filesystem/windows.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/filesystem/windows.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/heap.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/heap.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/heap.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/heap.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/hopscotch.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/hopscotch.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/hopscotch.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/hopscotch.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/ifaddrs.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/ifaddrs.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/ifaddrs.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/ifaddrs.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/io.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/io.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/io.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/io.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/iovec.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/iovec.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/iovec.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/iovec.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/log.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/log.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/log.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/log.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/md5.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/md5.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/md5.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/md5.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/mh3.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/mh3.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/mh3.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/mh3.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/misc.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/misc.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/misc.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/misc.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/netstat.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/netstat.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/netstat.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/netstat.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/process.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/process.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/process.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/process.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/random.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/random.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/random.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/random.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/retcode.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/retcode.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/retcode.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/retcode.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/rusage.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/rusage.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/rusage.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/rusage.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/sched.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/sched.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/sched.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/sched.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/sockets.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/sockets.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/sockets.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/sockets.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/sockets/posix.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/sockets/posix.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/sockets/posix.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/sockets/posix.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/sockets/windows.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/sockets/windows.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/sockets/windows.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/sockets/windows.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/static_assert.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/static_assert.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/static_assert.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/static_assert.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/string.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/string.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/string.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/string.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/strtod.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/strtod.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/strtod.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/strtod.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/strtol.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/strtol.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/strtol.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/strtol.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/sync.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/sync.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/sync.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/sync.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/sync/freertos.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/sync/freertos.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/sync/freertos.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/sync/freertos.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/sync/posix.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/sync/posix.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/sync/posix.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/sync/posix.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/sync/windows.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/sync/windows.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/sync/windows.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/sync/windows.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/threads.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/threads.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/threads.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/threads.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/threads/freertos.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/threads/freertos.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/threads/freertos.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/threads/freertos.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/threads/posix.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/threads/posix.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/threads/posix.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/threads/posix.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/threads/windows.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/threads/windows.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/threads/windows.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/threads/windows.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/time.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/time.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/time.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/time.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/time/freertos.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/time/freertos.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/time/freertos.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/time/freertos.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/types.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/types.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/types.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/types.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/types/posix.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/types/posix.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/types/posix.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/types/posix.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/types/vxworks.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/types/vxworks.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/types/vxworks.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/types/vxworks.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/types/windows.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/types/windows.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/types/windows.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/types/windows.h diff --git a/cpp_bridge/thirdparty/include/dds/ddsrt/xmlparser.h b/deploy/dds_bridge/thirdparty/include/dds/ddsrt/xmlparser.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/ddsrt/xmlparser.h rename to deploy/dds_bridge/thirdparty/include/dds/ddsrt/xmlparser.h diff --git a/cpp_bridge/thirdparty/include/dds/export.h b/deploy/dds_bridge/thirdparty/include/dds/export.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/export.h rename to deploy/dds_bridge/thirdparty/include/dds/export.h diff --git a/cpp_bridge/thirdparty/include/dds/features.h b/deploy/dds_bridge/thirdparty/include/dds/features.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/features.h rename to deploy/dds_bridge/thirdparty/include/dds/features.h diff --git a/cpp_bridge/thirdparty/include/dds/version.h b/deploy/dds_bridge/thirdparty/include/dds/version.h similarity index 100% rename from cpp_bridge/thirdparty/include/dds/version.h rename to deploy/dds_bridge/thirdparty/include/dds/version.h diff --git a/cpp_bridge/thirdparty/include/ddsc/dds.h b/deploy/dds_bridge/thirdparty/include/ddsc/dds.h similarity index 100% rename from cpp_bridge/thirdparty/include/ddsc/dds.h rename to deploy/dds_bridge/thirdparty/include/ddsc/dds.h diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/LICENSE b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/LICENSE similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/LICENSE rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/LICENSE diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/BuiltinTopicTypes.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/BuiltinTopicTypes.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/BuiltinTopicTypes.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/BuiltinTopicTypes.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/Duration.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/Duration.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/Duration.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/Duration.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/Entity.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/Entity.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/Entity.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/Entity.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/Exception.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/Exception.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/Exception.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/Exception.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/External.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/External.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/External.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/External.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/InstanceHandle.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/InstanceHandle.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/InstanceHandle.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/InstanceHandle.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/LengthUnlimited.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/LengthUnlimited.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/LengthUnlimited.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/LengthUnlimited.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/Optional.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/Optional.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/Optional.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/Optional.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/QosProvider.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/QosProvider.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/QosProvider.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/QosProvider.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/Reference.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/Reference.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/Reference.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/Reference.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/SafeEnumeration.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/SafeEnumeration.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/SafeEnumeration.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/SafeEnumeration.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/TBuiltinTopicTypes.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/TBuiltinTopicTypes.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/TBuiltinTopicTypes.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/TBuiltinTopicTypes.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/TEntity.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/TEntity.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/TEntity.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/TEntity.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/TEntityQos.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/TEntityQos.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/TEntityQos.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/TEntityQos.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/TInstanceHandle.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/TInstanceHandle.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/TInstanceHandle.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/TInstanceHandle.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/TQosProvider.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/TQosProvider.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/TQosProvider.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/TQosProvider.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/Time.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/Time.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/Time.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/Time.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/Value.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/Value.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/Value.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/Value.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/WeakReference.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/WeakReference.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/WeakReference.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/WeakReference.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/array.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/array.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/array.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/array.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/cond/Condition.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/cond/Condition.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/cond/Condition.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/cond/Condition.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/cond/GuardCondition.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/cond/GuardCondition.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/cond/GuardCondition.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/cond/GuardCondition.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/cond/StatusCondition.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/cond/StatusCondition.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/cond/StatusCondition.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/cond/StatusCondition.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/cond/TCondition.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/cond/TCondition.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/cond/TCondition.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/cond/TCondition.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/cond/TGuardCondition.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/cond/TGuardCondition.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/cond/TGuardCondition.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/cond/TGuardCondition.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/cond/TStatusCondition.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/cond/TStatusCondition.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/cond/TStatusCondition.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/cond/TStatusCondition.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/cond/TWaitSet.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/cond/TWaitSet.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/cond/TWaitSet.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/cond/TWaitSet.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/cond/WaitSet.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/cond/WaitSet.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/cond/WaitSet.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/cond/WaitSet.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/cond/detail/Condition.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/cond/detail/Condition.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/cond/detail/Condition.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/cond/detail/Condition.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/cond/detail/GuardCondition.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/cond/detail/GuardCondition.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/cond/detail/GuardCondition.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/cond/detail/GuardCondition.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/cond/detail/StatusCondition.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/cond/detail/StatusCondition.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/cond/detail/StatusCondition.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/cond/detail/StatusCondition.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/cond/detail/TConditionImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/cond/detail/TConditionImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/cond/detail/TConditionImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/cond/detail/TConditionImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/cond/detail/TGuardConditionImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/cond/detail/TGuardConditionImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/cond/detail/TGuardConditionImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/cond/detail/TGuardConditionImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/cond/detail/TStatusConditionImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/cond/detail/TStatusConditionImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/cond/detail/TStatusConditionImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/cond/detail/TStatusConditionImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/cond/detail/TWaitSetImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/cond/detail/TWaitSetImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/cond/detail/TWaitSetImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/cond/detail/TWaitSetImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/cond/detail/WaitSet.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/cond/detail/WaitSet.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/cond/detail/WaitSet.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/cond/detail/WaitSet.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/conformance.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/conformance.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/conformance.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/conformance.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/ddscore.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/ddscore.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/ddscore.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/ddscore.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/BuiltinTopicTypes.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/BuiltinTopicTypes.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/BuiltinTopicTypes.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/BuiltinTopicTypes.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/Entity.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/Entity.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/Entity.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/Entity.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/InstanceHandle.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/InstanceHandle.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/InstanceHandle.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/InstanceHandle.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/QosProvider.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/QosProvider.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/QosProvider.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/QosProvider.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/ReferenceImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/ReferenceImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/ReferenceImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/ReferenceImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/TEntityImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/TEntityImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/TEntityImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/TEntityImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/TEntityQosImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/TEntityQosImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/TEntityQosImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/TEntityQosImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/TInstanceHandleImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/TInstanceHandleImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/TInstanceHandleImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/TInstanceHandleImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/TQosProviderImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/TQosProviderImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/TQosProviderImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/TQosProviderImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/Value.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/Value.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/Value.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/Value.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/WeakReferenceImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/WeakReferenceImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/WeakReferenceImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/WeakReferenceImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/array.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/array.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/array.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/array.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/conformance.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/conformance.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/conformance.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/conformance.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/ddscore.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/ddscore.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/ddscore.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/ddscore.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/export.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/export.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/export.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/export.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/inttypes.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/inttypes.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/inttypes.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/inttypes.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/macros.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/macros.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/macros.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/macros.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/module_docs.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/module_docs.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/module_docs.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/module_docs.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/old_win_stdint.h b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/old_win_stdint.h similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/old_win_stdint.h rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/old_win_stdint.h diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/ref_traits.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/ref_traits.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/detail/ref_traits.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/detail/ref_traits.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/macros.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/macros.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/macros.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/macros.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/policy/CorePolicy.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/policy/CorePolicy.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/policy/CorePolicy.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/policy/CorePolicy.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/policy/PolicyKind.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/policy/PolicyKind.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/policy/PolicyKind.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/policy/PolicyKind.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/policy/QosPolicyCount.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/policy/QosPolicyCount.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/policy/QosPolicyCount.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/policy/QosPolicyCount.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/policy/TCorePolicy.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/policy/TCorePolicy.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/policy/TCorePolicy.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/policy/TCorePolicy.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/policy/TQosPolicyCount.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/policy/TQosPolicyCount.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/policy/TQosPolicyCount.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/policy/TQosPolicyCount.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/policy/detail/CorePolicy.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/policy/detail/CorePolicy.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/policy/detail/CorePolicy.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/policy/detail/CorePolicy.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/policy/detail/QosPolicyCount.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/policy/detail/QosPolicyCount.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/policy/detail/QosPolicyCount.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/policy/detail/QosPolicyCount.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/policy/detail/TCorePolicyImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/policy/detail/TCorePolicyImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/policy/detail/TCorePolicyImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/policy/detail/TCorePolicyImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/policy/detail/TQosPolicyCountImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/policy/detail/TQosPolicyCountImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/policy/detail/TQosPolicyCountImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/policy/detail/TQosPolicyCountImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/ref_traits.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/ref_traits.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/ref_traits.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/ref_traits.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/refmacros.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/refmacros.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/refmacros.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/refmacros.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/status/State.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/status/State.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/status/State.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/status/State.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/status/Status.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/status/Status.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/status/Status.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/status/Status.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/status/TStatus.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/status/TStatus.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/status/TStatus.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/status/TStatus.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/status/detail/Status.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/status/detail/Status.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/status/detail/Status.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/status/detail/Status.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/status/detail/TStatusImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/status/detail/TStatusImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/status/detail/TStatusImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/status/detail/TStatusImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/types.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/types.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/types.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/types.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/Annotations.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/Annotations.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/Annotations.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/Annotations.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/CollectionTypes.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/CollectionTypes.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/CollectionTypes.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/CollectionTypes.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/DynamicData.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/DynamicData.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/DynamicData.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/DynamicData.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/DynamicType.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/DynamicType.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/DynamicType.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/DynamicType.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/MemberType.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/MemberType.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/MemberType.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/MemberType.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/PrimitiveTypes.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/PrimitiveTypes.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/PrimitiveTypes.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/PrimitiveTypes.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/StructType.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/StructType.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/StructType.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/StructType.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TAnnotation.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TAnnotation.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TAnnotation.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TAnnotation.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TCollectionTypes.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TCollectionTypes.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TCollectionTypes.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TCollectionTypes.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TDynamicData.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TDynamicData.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TDynamicData.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TDynamicData.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TDynamicType.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TDynamicType.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TDynamicType.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TDynamicType.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TMemberType.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TMemberType.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TMemberType.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TMemberType.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TStructType.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TStructType.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TStructType.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TStructType.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TTypeProvider.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TTypeProvider.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TTypeProvider.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TTypeProvider.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TypeKind.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TypeKind.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TypeKind.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TypeKind.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TypeProvider.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TypeProvider.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TypeProvider.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/TypeProvider.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/UnionCase.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/UnionCase.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/UnionCase.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/UnionCase.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/UnionType.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/UnionType.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/UnionType.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/UnionType.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/Annotation.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/Annotation.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/Annotation.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/Annotation.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/CollectionTypes.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/CollectionTypes.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/CollectionTypes.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/CollectionTypes.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/DynamicData.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/DynamicData.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/DynamicData.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/DynamicData.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/DynamicType.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/DynamicType.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/DynamicType.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/DynamicType.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/MemberType.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/MemberType.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/MemberType.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/MemberType.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/PrimitiveTypes.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/PrimitiveTypes.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/PrimitiveTypes.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/PrimitiveTypes.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/StructType.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/StructType.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/StructType.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/StructType.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/TypeProvider.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/TypeProvider.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/TypeProvider.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/TypeProvider.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/UnionCase.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/UnionCase.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/UnionCase.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/UnionCase.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/UnionType.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/UnionType.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/UnionType.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/core/xtypes/detail/UnionType.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/dds.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/dds.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/dds.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/dds.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/domain/DomainParticipant.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/domain/DomainParticipant.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/domain/DomainParticipant.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/domain/DomainParticipant.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/domain/DomainParticipantListener.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/domain/DomainParticipantListener.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/domain/DomainParticipantListener.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/domain/DomainParticipantListener.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/domain/TDomainParticipant.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/domain/TDomainParticipant.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/domain/TDomainParticipant.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/domain/TDomainParticipant.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/domain/ddsdomain.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/domain/ddsdomain.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/domain/ddsdomain.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/domain/ddsdomain.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/domain/detail/DomainParticipant.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/domain/detail/DomainParticipant.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/domain/detail/DomainParticipant.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/domain/detail/DomainParticipant.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/domain/detail/TDomainParticipantImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/domain/detail/TDomainParticipantImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/domain/detail/TDomainParticipantImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/domain/detail/TDomainParticipantImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/domain/detail/ddsdomain.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/domain/detail/ddsdomain.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/domain/detail/ddsdomain.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/domain/detail/ddsdomain.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/domain/discovery.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/domain/discovery.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/domain/discovery.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/domain/discovery.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/domain/find.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/domain/find.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/domain/find.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/domain/find.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/domain/qos/DomainParticipantQos.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/domain/qos/DomainParticipantQos.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/domain/qos/DomainParticipantQos.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/domain/qos/DomainParticipantQos.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/domain/qos/detail/DomainParticipantQos.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/domain/qos/detail/DomainParticipantQos.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/domain/qos/detail/DomainParticipantQos.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/domain/qos/detail/DomainParticipantQos.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/features.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/features.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/features.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/features.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/pub/AnyDataWriter.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/AnyDataWriter.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/pub/AnyDataWriter.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/AnyDataWriter.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/pub/AnyDataWriterListener.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/AnyDataWriterListener.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/pub/AnyDataWriterListener.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/AnyDataWriterListener.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/pub/CoherentSet.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/CoherentSet.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/pub/CoherentSet.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/CoherentSet.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/pub/DataWriter.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/DataWriter.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/pub/DataWriter.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/DataWriter.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/pub/DataWriterListener.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/DataWriterListener.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/pub/DataWriterListener.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/DataWriterListener.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/pub/Publisher.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/Publisher.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/pub/Publisher.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/Publisher.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/pub/PublisherListener.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/PublisherListener.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/pub/PublisherListener.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/PublisherListener.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/pub/SuspendedPublication.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/SuspendedPublication.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/pub/SuspendedPublication.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/SuspendedPublication.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/pub/TAnyDataWriter.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/TAnyDataWriter.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/pub/TAnyDataWriter.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/TAnyDataWriter.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/pub/TCoherentSet.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/TCoherentSet.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/pub/TCoherentSet.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/TCoherentSet.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/pub/TPublisher.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/TPublisher.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/pub/TPublisher.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/TPublisher.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/pub/TSuspendedPublication.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/TSuspendedPublication.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/pub/TSuspendedPublication.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/TSuspendedPublication.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/pub/ddspub.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/ddspub.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/pub/ddspub.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/ddspub.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/pub/detail/AnyDataWriter.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/detail/AnyDataWriter.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/pub/detail/AnyDataWriter.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/detail/AnyDataWriter.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/pub/detail/CoherentSet.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/detail/CoherentSet.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/pub/detail/CoherentSet.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/detail/CoherentSet.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/pub/detail/DataWriter.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/detail/DataWriter.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/pub/detail/DataWriter.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/detail/DataWriter.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/pub/detail/DataWriterImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/detail/DataWriterImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/pub/detail/DataWriterImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/detail/DataWriterImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/pub/detail/Publisher.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/detail/Publisher.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/pub/detail/Publisher.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/detail/Publisher.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/pub/detail/SuspendedPublication.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/detail/SuspendedPublication.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/pub/detail/SuspendedPublication.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/detail/SuspendedPublication.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/pub/detail/TAnyDataWriterImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/detail/TAnyDataWriterImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/pub/detail/TAnyDataWriterImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/detail/TAnyDataWriterImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/pub/detail/TCoherentSetImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/detail/TCoherentSetImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/pub/detail/TCoherentSetImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/detail/TCoherentSetImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/pub/detail/TPublisherImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/detail/TPublisherImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/pub/detail/TPublisherImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/detail/TPublisherImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/pub/detail/TSuspendedPublicationImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/detail/TSuspendedPublicationImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/pub/detail/TSuspendedPublicationImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/detail/TSuspendedPublicationImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/pub/detail/ddspub.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/detail/ddspub.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/pub/detail/ddspub.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/detail/ddspub.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/pub/detail/discovery.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/detail/discovery.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/pub/detail/discovery.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/detail/discovery.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/pub/detail/find.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/detail/find.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/pub/detail/find.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/detail/find.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/pub/discovery.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/discovery.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/pub/discovery.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/discovery.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/pub/find.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/find.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/pub/find.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/find.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/pub/qos/DataWriterQos.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/qos/DataWriterQos.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/pub/qos/DataWriterQos.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/qos/DataWriterQos.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/pub/qos/PublisherQos.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/qos/PublisherQos.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/pub/qos/PublisherQos.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/qos/PublisherQos.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/pub/qos/detail/DataWriterQos.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/qos/detail/DataWriterQos.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/pub/qos/detail/DataWriterQos.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/qos/detail/DataWriterQos.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/pub/qos/detail/PublisherQos.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/qos/detail/PublisherQos.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/pub/qos/detail/PublisherQos.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/pub/qos/detail/PublisherQos.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/AnyDataReader.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/AnyDataReader.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/AnyDataReader.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/AnyDataReader.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/AnyDataReaderListener.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/AnyDataReaderListener.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/AnyDataReaderListener.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/AnyDataReaderListener.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/CoherentAccess.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/CoherentAccess.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/CoherentAccess.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/CoherentAccess.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/DataReader.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/DataReader.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/DataReader.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/DataReader.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/DataReaderListener.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/DataReaderListener.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/DataReaderListener.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/DataReaderListener.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/GenerationCount.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/GenerationCount.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/GenerationCount.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/GenerationCount.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/LoanedSamples.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/LoanedSamples.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/LoanedSamples.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/LoanedSamples.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/Query.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/Query.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/Query.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/Query.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/Rank.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/Rank.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/Rank.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/Rank.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/Sample.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/Sample.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/Sample.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/Sample.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/SampleInfo.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/SampleInfo.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/SampleInfo.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/SampleInfo.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/SampleRef.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/SampleRef.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/SampleRef.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/SampleRef.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/SharedSamples.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/SharedSamples.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/SharedSamples.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/SharedSamples.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/Subscriber.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/Subscriber.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/Subscriber.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/Subscriber.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/SubscriberListener.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/SubscriberListener.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/SubscriberListener.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/SubscriberListener.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/TAnyDataReader.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/TAnyDataReader.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/TAnyDataReader.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/TAnyDataReader.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/TCoherentAccess.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/TCoherentAccess.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/TCoherentAccess.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/TCoherentAccess.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/TDataReader.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/TDataReader.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/TDataReader.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/TDataReader.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/TGenerationCount.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/TGenerationCount.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/TGenerationCount.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/TGenerationCount.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/TQuery.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/TQuery.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/TQuery.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/TQuery.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/TRank.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/TRank.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/TRank.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/TRank.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/TSample.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/TSample.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/TSample.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/TSample.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/TSampleInfo.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/TSampleInfo.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/TSampleInfo.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/TSampleInfo.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/TSampleRef.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/TSampleRef.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/TSampleRef.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/TSampleRef.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/TSubscriber.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/TSubscriber.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/TSubscriber.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/TSubscriber.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/cond/QueryCondition.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/cond/QueryCondition.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/cond/QueryCondition.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/cond/QueryCondition.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/cond/ReadCondition.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/cond/ReadCondition.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/cond/ReadCondition.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/cond/ReadCondition.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/cond/TQueryCondition.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/cond/TQueryCondition.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/cond/TQueryCondition.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/cond/TQueryCondition.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/cond/TReadCondition.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/cond/TReadCondition.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/cond/TReadCondition.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/cond/TReadCondition.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/cond/detail/QueryCondition.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/cond/detail/QueryCondition.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/cond/detail/QueryCondition.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/cond/detail/QueryCondition.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/cond/detail/ReadCondition.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/cond/detail/ReadCondition.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/cond/detail/ReadCondition.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/cond/detail/ReadCondition.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/cond/detail/TQueryConditionImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/cond/detail/TQueryConditionImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/cond/detail/TQueryConditionImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/cond/detail/TQueryConditionImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/cond/detail/TReadConditionImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/cond/detail/TReadConditionImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/cond/detail/TReadConditionImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/cond/detail/TReadConditionImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/ddssub.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/ddssub.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/ddssub.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/ddssub.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/AnyDataReader.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/AnyDataReader.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/AnyDataReader.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/AnyDataReader.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/CoherentAccess.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/CoherentAccess.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/CoherentAccess.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/CoherentAccess.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/DataReader.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/DataReader.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/DataReader.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/DataReader.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/GenerationCount.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/GenerationCount.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/GenerationCount.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/GenerationCount.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/LoanedSamples.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/LoanedSamples.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/LoanedSamples.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/LoanedSamples.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/LoanedSamplesImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/LoanedSamplesImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/LoanedSamplesImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/LoanedSamplesImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/Manipulators.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/Manipulators.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/Manipulators.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/Manipulators.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/Query.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/Query.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/Query.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/Query.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/Rank.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/Rank.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/Rank.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/Rank.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/Sample.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/Sample.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/Sample.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/Sample.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/SampleInfo.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/SampleInfo.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/SampleInfo.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/SampleInfo.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/SampleRef.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/SampleRef.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/SampleRef.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/SampleRef.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/SamplesHolder.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/SamplesHolder.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/SamplesHolder.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/SamplesHolder.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/SharedSamples.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/SharedSamples.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/SharedSamples.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/SharedSamples.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/SharedSamplesImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/SharedSamplesImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/SharedSamplesImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/SharedSamplesImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/Subscriber.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/Subscriber.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/Subscriber.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/Subscriber.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/TAnyDataReaderImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/TAnyDataReaderImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/TAnyDataReaderImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/TAnyDataReaderImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/TCoherentAccessImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/TCoherentAccessImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/TCoherentAccessImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/TCoherentAccessImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/TDataReaderImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/TDataReaderImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/TDataReaderImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/TDataReaderImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/TGenerationCountImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/TGenerationCountImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/TGenerationCountImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/TGenerationCountImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/TQueryImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/TQueryImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/TQueryImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/TQueryImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/TRankImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/TRankImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/TRankImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/TRankImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/TSampleImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/TSampleImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/TSampleImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/TSampleImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/TSampleInfoImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/TSampleInfoImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/TSampleInfoImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/TSampleInfoImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/TSampleRefImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/TSampleRefImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/TSampleRefImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/TSampleRefImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/TSubscriberImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/TSubscriberImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/TSubscriberImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/TSubscriberImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/ddssub.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/ddssub.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/ddssub.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/ddssub.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/discovery.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/discovery.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/discovery.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/discovery.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/find.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/find.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/detail/find.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/detail/find.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/discovery.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/discovery.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/discovery.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/discovery.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/find.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/find.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/find.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/find.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/qos/DataReaderQos.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/qos/DataReaderQos.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/qos/DataReaderQos.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/qos/DataReaderQos.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/qos/SubscriberQos.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/qos/SubscriberQos.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/qos/SubscriberQos.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/qos/SubscriberQos.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/qos/detail/DataReaderQos.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/qos/detail/DataReaderQos.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/qos/detail/DataReaderQos.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/qos/detail/DataReaderQos.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/qos/detail/SubscriberQos.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/qos/detail/SubscriberQos.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/qos/detail/SubscriberQos.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/qos/detail/SubscriberQos.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/status/DataState.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/status/DataState.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/status/DataState.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/status/DataState.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/sub/status/detail/DataStateImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/status/detail/DataStateImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/sub/status/detail/DataStateImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/sub/status/detail/DataStateImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/AnyTopic.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/AnyTopic.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/AnyTopic.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/AnyTopic.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/AnyTopicListener.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/AnyTopicListener.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/AnyTopicListener.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/AnyTopicListener.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/BuiltinTopic.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/BuiltinTopic.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/BuiltinTopic.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/BuiltinTopic.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/BuiltinTopicKey.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/BuiltinTopicKey.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/BuiltinTopicKey.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/BuiltinTopicKey.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/ContentFilteredTopic.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/ContentFilteredTopic.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/ContentFilteredTopic.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/ContentFilteredTopic.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/Filter.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/Filter.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/Filter.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/Filter.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/MultiTopic.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/MultiTopic.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/MultiTopic.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/MultiTopic.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/TAnyTopic.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/TAnyTopic.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/TAnyTopic.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/TAnyTopic.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/TBuiltinTopic.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/TBuiltinTopic.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/TBuiltinTopic.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/TBuiltinTopic.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/TBuiltinTopicKey.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/TBuiltinTopicKey.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/TBuiltinTopicKey.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/TBuiltinTopicKey.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/TContentFilteredTopic.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/TContentFilteredTopic.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/TContentFilteredTopic.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/TContentFilteredTopic.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/TFilter.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/TFilter.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/TFilter.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/TFilter.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/TMultiTopic.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/TMultiTopic.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/TMultiTopic.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/TMultiTopic.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/TTopic.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/TTopic.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/TTopic.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/TTopic.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/TTopicDescription.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/TTopicDescription.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/TTopicDescription.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/TTopicDescription.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/Topic.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/Topic.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/Topic.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/Topic.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/TopicDescription.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/TopicDescription.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/TopicDescription.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/TopicDescription.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/TopicInstance.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/TopicInstance.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/TopicInstance.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/TopicInstance.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/TopicListener.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/TopicListener.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/TopicListener.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/TopicListener.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/TopicTraits.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/TopicTraits.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/TopicTraits.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/TopicTraits.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/ddstopic.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/ddstopic.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/ddstopic.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/ddstopic.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/AnyTopic.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/AnyTopic.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/AnyTopic.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/AnyTopic.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/BuiltinTopic.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/BuiltinTopic.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/BuiltinTopic.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/BuiltinTopic.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/BuiltinTopicKey.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/BuiltinTopicKey.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/BuiltinTopicKey.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/BuiltinTopicKey.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/ContentFilteredTopic.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/ContentFilteredTopic.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/ContentFilteredTopic.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/ContentFilteredTopic.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/Filter.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/Filter.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/Filter.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/Filter.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/MultiTopic.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/MultiTopic.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/MultiTopic.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/MultiTopic.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/TAnyTopicImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/TAnyTopicImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/TAnyTopicImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/TAnyTopicImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/TBuiltinTopicImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/TBuiltinTopicImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/TBuiltinTopicImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/TBuiltinTopicImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/TBuiltinTopicKeyImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/TBuiltinTopicKeyImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/TBuiltinTopicKeyImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/TBuiltinTopicKeyImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/TContentFilteredTopicImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/TContentFilteredTopicImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/TContentFilteredTopicImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/TContentFilteredTopicImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/TFilterImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/TFilterImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/TFilterImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/TFilterImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/TTopicDescriptionImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/TTopicDescriptionImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/TTopicDescriptionImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/TTopicDescriptionImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/TTopicImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/TTopicImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/TTopicImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/TTopicImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/Topic.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/Topic.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/Topic.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/Topic.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/TopicDescription.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/TopicDescription.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/TopicDescription.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/TopicDescription.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/TopicInstanceImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/TopicInstanceImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/TopicInstanceImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/TopicInstanceImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/ddstopic.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/ddstopic.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/ddstopic.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/ddstopic.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/discovery.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/discovery.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/discovery.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/discovery.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/find.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/find.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/detail/find.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/detail/find.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/discovery.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/discovery.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/discovery.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/discovery.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/find.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/find.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/find.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/find.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/qos/TopicQos.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/qos/TopicQos.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/qos/TopicQos.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/qos/TopicQos.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/dds/topic/qos/detail/TopicQos.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/qos/detail/TopicQos.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/dds/topic/qos/detail/TopicQos.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/dds/topic/qos/detail/TopicQos.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/ForwardDeclarations.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/ForwardDeclarations.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/ForwardDeclarations.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/ForwardDeclarations.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/DDScObjectDelegate.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/DDScObjectDelegate.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/DDScObjectDelegate.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/DDScObjectDelegate.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/EntityDelegate.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/EntityDelegate.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/EntityDelegate.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/EntityDelegate.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/EntityRegistry.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/EntityRegistry.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/EntityRegistry.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/EntityRegistry.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/EntitySet.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/EntitySet.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/EntitySet.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/EntitySet.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/InstanceHandleDelegate.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/InstanceHandleDelegate.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/InstanceHandleDelegate.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/InstanceHandleDelegate.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/ListenerDispatcher.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/ListenerDispatcher.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/ListenerDispatcher.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/ListenerDispatcher.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/MiscUtils.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/MiscUtils.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/MiscUtils.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/MiscUtils.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/Missing.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/Missing.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/Missing.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/Missing.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/Mutex.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/Mutex.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/Mutex.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/Mutex.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/ObjectDelegate.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/ObjectDelegate.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/ObjectDelegate.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/ObjectDelegate.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/ObjectSet.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/ObjectSet.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/ObjectSet.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/ObjectSet.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/QosProviderDelegate.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/QosProviderDelegate.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/QosProviderDelegate.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/QosProviderDelegate.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/ReportUtils.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/ReportUtils.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/ReportUtils.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/ReportUtils.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/ScopedLock.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/ScopedLock.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/ScopedLock.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/ScopedLock.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/TimeHelper.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/TimeHelper.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/TimeHelper.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/TimeHelper.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/WeakReferenceSet.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/WeakReferenceSet.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/WeakReferenceSet.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/WeakReferenceSet.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cdr/basic_cdr_ser.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cdr/basic_cdr_ser.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cdr/basic_cdr_ser.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cdr/basic_cdr_ser.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cdr/cdr_enums.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cdr/cdr_enums.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cdr/cdr_enums.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cdr/cdr_enums.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cdr/cdr_stream.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cdr/cdr_stream.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cdr/cdr_stream.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cdr/cdr_stream.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cdr/entity_properties.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cdr/entity_properties.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cdr/entity_properties.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cdr/entity_properties.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cdr/extended_cdr_v1_ser.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cdr/extended_cdr_v1_ser.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cdr/extended_cdr_v1_ser.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cdr/extended_cdr_v1_ser.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cdr/extended_cdr_v2_ser.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cdr/extended_cdr_v2_ser.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cdr/extended_cdr_v2_ser.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cdr/extended_cdr_v2_ser.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cdr/fragchain.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cdr/fragchain.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cdr/fragchain.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cdr/fragchain.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cond/ConditionDelegate.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cond/ConditionDelegate.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cond/ConditionDelegate.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cond/ConditionDelegate.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cond/FunctorHolder.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cond/FunctorHolder.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cond/FunctorHolder.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cond/FunctorHolder.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cond/GuardConditionDelegate.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cond/GuardConditionDelegate.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cond/GuardConditionDelegate.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cond/GuardConditionDelegate.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cond/ShadowParticipant.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cond/ShadowParticipant.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cond/ShadowParticipant.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cond/ShadowParticipant.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cond/StatusConditionDelegate.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cond/StatusConditionDelegate.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cond/StatusConditionDelegate.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cond/StatusConditionDelegate.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cond/WaitSetDelegate.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cond/WaitSetDelegate.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cond/WaitSetDelegate.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/cond/WaitSetDelegate.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/config.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/config.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/config.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/config.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/policy/Policy.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/policy/Policy.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/policy/Policy.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/policy/Policy.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/policy/PolicyDelegate.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/policy/PolicyDelegate.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/policy/PolicyDelegate.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/policy/PolicyDelegate.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/policy/ProprietaryPolicyKind.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/policy/ProprietaryPolicyKind.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/policy/ProprietaryPolicyKind.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/policy/ProprietaryPolicyKind.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/policy/QosPolicyCountDelegate.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/policy/QosPolicyCountDelegate.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/policy/QosPolicyCountDelegate.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/policy/QosPolicyCountDelegate.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/policy/TPolicy.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/policy/TPolicy.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/policy/TPolicy.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/policy/TPolicy.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/status/StatusDelegate.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/status/StatusDelegate.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/status/StatusDelegate.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/status/StatusDelegate.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/type_helpers.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/type_helpers.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/type_helpers.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/core/type_helpers.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/domain/Domain.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/domain/Domain.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/domain/Domain.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/domain/Domain.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/domain/DomainParticipantDelegate.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/domain/DomainParticipantDelegate.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/domain/DomainParticipantDelegate.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/domain/DomainParticipantDelegate.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/domain/DomainParticipantListener.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/domain/DomainParticipantListener.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/domain/DomainParticipantListener.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/domain/DomainParticipantListener.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/domain/DomainParticipantRegistry.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/domain/DomainParticipantRegistry.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/domain/DomainParticipantRegistry.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/domain/DomainParticipantRegistry.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/domain/DomainWrap.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/domain/DomainWrap.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/domain/DomainWrap.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/domain/DomainWrap.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/domain/qos/DomainParticipantQosDelegate.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/domain/qos/DomainParticipantQosDelegate.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/domain/qos/DomainParticipantQosDelegate.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/domain/qos/DomainParticipantQosDelegate.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/pub/AnyDataWriterDelegate.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/pub/AnyDataWriterDelegate.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/pub/AnyDataWriterDelegate.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/pub/AnyDataWriterDelegate.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/pub/CoherentSetDelegate.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/pub/CoherentSetDelegate.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/pub/CoherentSetDelegate.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/pub/CoherentSetDelegate.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/pub/PublisherDelegate.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/pub/PublisherDelegate.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/pub/PublisherDelegate.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/pub/PublisherDelegate.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/pub/SuspendedPublicationDelegate.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/pub/SuspendedPublicationDelegate.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/pub/SuspendedPublicationDelegate.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/pub/SuspendedPublicationDelegate.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/pub/qos/DataWriterQosDelegate.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/pub/qos/DataWriterQosDelegate.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/pub/qos/DataWriterQosDelegate.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/pub/qos/DataWriterQosDelegate.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/pub/qos/PublisherQosDelegate.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/pub/qos/PublisherQosDelegate.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/pub/qos/PublisherQosDelegate.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/pub/qos/PublisherQosDelegate.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/AnyDataReaderDelegate.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/AnyDataReaderDelegate.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/AnyDataReaderDelegate.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/AnyDataReaderDelegate.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/BuiltinSubscriberDelegate.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/BuiltinSubscriberDelegate.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/BuiltinSubscriberDelegate.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/BuiltinSubscriberDelegate.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/CoherentAccessDelegate.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/CoherentAccessDelegate.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/CoherentAccessDelegate.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/CoherentAccessDelegate.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/GenerationCountImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/GenerationCountImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/GenerationCountImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/GenerationCountImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/QueryDelegate.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/QueryDelegate.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/QueryDelegate.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/QueryDelegate.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/RankImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/RankImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/RankImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/RankImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/SampleInfoImpl.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/SampleInfoImpl.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/SampleInfoImpl.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/SampleInfoImpl.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/SubscriberDelegate.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/SubscriberDelegate.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/SubscriberDelegate.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/SubscriberDelegate.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/cond/QueryConditionDelegate.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/cond/QueryConditionDelegate.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/cond/QueryConditionDelegate.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/cond/QueryConditionDelegate.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/cond/ReadConditionDelegate.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/cond/ReadConditionDelegate.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/cond/ReadConditionDelegate.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/cond/ReadConditionDelegate.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/qos/DataReaderQosDelegate.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/qos/DataReaderQosDelegate.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/qos/DataReaderQosDelegate.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/qos/DataReaderQosDelegate.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/qos/SubscriberQosDelegate.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/qos/SubscriberQosDelegate.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/qos/SubscriberQosDelegate.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/sub/qos/SubscriberQosDelegate.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/AnyTopicDelegate.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/AnyTopicDelegate.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/AnyTopicDelegate.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/AnyTopicDelegate.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/AnyTopicListener.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/AnyTopicListener.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/AnyTopicListener.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/AnyTopicListener.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/BuiltinTopic.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/BuiltinTopic.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/BuiltinTopic.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/BuiltinTopic.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/BuiltinTopicCopy.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/BuiltinTopicCopy.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/BuiltinTopicCopy.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/BuiltinTopicCopy.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/BuiltinTopicDelegate.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/BuiltinTopicDelegate.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/BuiltinTopicDelegate.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/BuiltinTopicDelegate.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/BuiltinTopicKeyDelegate.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/BuiltinTopicKeyDelegate.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/BuiltinTopicKeyDelegate.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/BuiltinTopicKeyDelegate.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/BuiltinTopicTraits.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/BuiltinTopicTraits.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/BuiltinTopicTraits.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/BuiltinTopicTraits.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/CDRBlob.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/CDRBlob.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/CDRBlob.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/CDRBlob.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/FilterDelegate.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/FilterDelegate.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/FilterDelegate.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/FilterDelegate.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/TBuiltinTopic.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/TBuiltinTopic.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/TBuiltinTopic.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/TBuiltinTopic.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/TopicDescriptionDelegate.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/TopicDescriptionDelegate.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/TopicDescriptionDelegate.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/TopicDescriptionDelegate.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/TopicListener.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/TopicListener.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/TopicListener.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/TopicListener.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/TopicTraits.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/TopicTraits.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/TopicTraits.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/TopicTraits.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/datatopic.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/datatopic.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/datatopic.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/datatopic.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/discovery.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/discovery.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/discovery.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/discovery.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/find.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/find.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/find.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/find.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/hash.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/hash.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/hash.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/hash.hpp diff --git a/cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/qos/TopicQosDelegate.hpp b/deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/qos/TopicQosDelegate.hpp similarity index 100% rename from cpp_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/qos/TopicQosDelegate.hpp rename to deploy/dds_bridge/thirdparty/include/ddscxx/org/eclipse/cyclonedds/topic/qos/TopicQosDelegate.hpp diff --git a/deploy/ros2_ws/src/lidar_node/CMakeLists.txt b/deploy/perception_ws/src/lidar_node/CMakeLists.txt similarity index 100% rename from deploy/ros2_ws/src/lidar_node/CMakeLists.txt rename to deploy/perception_ws/src/lidar_node/CMakeLists.txt diff --git a/deploy/ros2_ws/src/lidar_node/README.md b/deploy/perception_ws/src/lidar_node/README.md similarity index 100% rename from deploy/ros2_ws/src/lidar_node/README.md rename to deploy/perception_ws/src/lidar_node/README.md diff --git a/deploy/ros2_ws/src/lidar_node/Version.h.in b/deploy/perception_ws/src/lidar_node/Version.h.in similarity index 100% rename from deploy/ros2_ws/src/lidar_node/Version.h.in rename to deploy/perception_ws/src/lidar_node/Version.h.in diff --git a/deploy/ros2_ws/src/lidar_node/config/config.yaml b/deploy/perception_ws/src/lidar_node/config/config.yaml similarity index 100% rename from deploy/ros2_ws/src/lidar_node/config/config.yaml rename to deploy/perception_ws/src/lidar_node/config/config.yaml diff --git a/deploy/ros2_ws/src/lidar_node/launch/dashing_start.py b/deploy/perception_ws/src/lidar_node/launch/dashing_start.py similarity index 100% rename from deploy/ros2_ws/src/lidar_node/launch/dashing_start.py rename to deploy/perception_ws/src/lidar_node/launch/dashing_start.py diff --git a/deploy/ros2_ws/src/lidar_node/launch/start.launch b/deploy/perception_ws/src/lidar_node/launch/start.launch similarity index 100% rename from deploy/ros2_ws/src/lidar_node/launch/start.launch rename to deploy/perception_ws/src/lidar_node/launch/start.launch diff --git a/deploy/ros2_ws/src/lidar_node/launch/start.py b/deploy/perception_ws/src/lidar_node/launch/start.py similarity index 100% rename from deploy/ros2_ws/src/lidar_node/launch/start.py rename to deploy/perception_ws/src/lidar_node/launch/start.py diff --git a/deploy/ros2_ws/src/lidar_node/msg/UdpFrame.msg b/deploy/perception_ws/src/lidar_node/msg/UdpFrame.msg similarity index 100% rename from deploy/ros2_ws/src/lidar_node/msg/UdpFrame.msg rename to deploy/perception_ws/src/lidar_node/msg/UdpFrame.msg diff --git a/deploy/ros2_ws/src/lidar_node/msg/UdpPacket.msg b/deploy/perception_ws/src/lidar_node/msg/UdpPacket.msg similarity index 100% rename from deploy/ros2_ws/src/lidar_node/msg/UdpPacket.msg rename to deploy/perception_ws/src/lidar_node/msg/UdpPacket.msg diff --git a/deploy/ros2_ws/src/lidar_node/msg/msg_ros2/UdpFrame.msg b/deploy/perception_ws/src/lidar_node/msg/msg_ros2/UdpFrame.msg similarity index 100% rename from deploy/ros2_ws/src/lidar_node/msg/msg_ros2/UdpFrame.msg rename to deploy/perception_ws/src/lidar_node/msg/msg_ros2/UdpFrame.msg diff --git a/deploy/ros2_ws/src/lidar_node/msg/msg_ros2/UdpPacket.msg b/deploy/perception_ws/src/lidar_node/msg/msg_ros2/UdpPacket.msg similarity index 100% rename from deploy/ros2_ws/src/lidar_node/msg/msg_ros2/UdpPacket.msg rename to deploy/perception_ws/src/lidar_node/msg/msg_ros2/UdpPacket.msg diff --git a/deploy/ros2_ws/src/lidar_node/node/hesai_ros_driver_node.cc b/deploy/perception_ws/src/lidar_node/node/hesai_ros_driver_node.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/node/hesai_ros_driver_node.cc rename to deploy/perception_ws/src/lidar_node/node/hesai_ros_driver_node.cc diff --git a/deploy/ros2_ws/src/lidar_node/node/hesai_ros_driver_node.cu b/deploy/perception_ws/src/lidar_node/node/hesai_ros_driver_node.cu similarity index 100% rename from deploy/ros2_ws/src/lidar_node/node/hesai_ros_driver_node.cu rename to deploy/perception_ws/src/lidar_node/node/hesai_ros_driver_node.cu diff --git a/deploy/ros2_ws/src/lidar_node/package.xml b/deploy/perception_ws/src/lidar_node/package.xml similarity index 100% rename from deploy/ros2_ws/src/lidar_node/package.xml rename to deploy/perception_ws/src/lidar_node/package.xml diff --git a/deploy/ros2_ws/src/lidar_node/rviz/rviz.rviz b/deploy/perception_ws/src/lidar_node/rviz/rviz.rviz similarity index 100% rename from deploy/ros2_ws/src/lidar_node/rviz/rviz.rviz rename to deploy/perception_ws/src/lidar_node/rviz/rviz.rviz diff --git a/deploy/ros2_ws/src/lidar_node/rviz/rviz2.rviz b/deploy/perception_ws/src/lidar_node/rviz/rviz2.rviz similarity index 100% rename from deploy/ros2_ws/src/lidar_node/rviz/rviz2.rviz rename to deploy/perception_ws/src/lidar_node/rviz/rviz2.rviz diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/CMakeLists.txt b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/CMakeLists.txt similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/CMakeLists.txt rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/CMakeLists.txt diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/LICENSE b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/LICENSE similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/LICENSE rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/LICENSE diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/README.md b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/README.md similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/README.md rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/README.md diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/Version.h.in b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/Version.h.in similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/Version.h.in rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/Version.h.in diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/change notes.md b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/change notes.md similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/change notes.md rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/change notes.md diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/AT128E2X_Angle Correction File.dat b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/AT128E2X_Angle Correction File.dat similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/AT128E2X_Angle Correction File.dat rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/AT128E2X_Angle Correction File.dat diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/FT120C1X_Angle Correction File.dat b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/FT120C1X_Angle Correction File.dat similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/FT120C1X_Angle Correction File.dat rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/FT120C1X_Angle Correction File.dat diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/OT128_Angle Correction File.csv b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/OT128_Angle Correction File.csv similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/OT128_Angle Correction File.csv rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/OT128_Angle Correction File.csv diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/Pandar128E3X_Angle Correction File.csv b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/Pandar128E3X_Angle Correction File.csv similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/Pandar128E3X_Angle Correction File.csv rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/Pandar128E3X_Angle Correction File.csv diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/Pandar40M_Angle Correction File.csv b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/Pandar40M_Angle Correction File.csv similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/Pandar40M_Angle Correction File.csv rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/Pandar40M_Angle Correction File.csv diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/Pandar40P_Angle Correction File.csv b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/Pandar40P_Angle Correction File.csv similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/Pandar40P_Angle Correction File.csv rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/Pandar40P_Angle Correction File.csv diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/Pandar64_Angle Correction File.csv b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/Pandar64_Angle Correction File.csv similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/Pandar64_Angle Correction File.csv rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/Pandar64_Angle Correction File.csv diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/Pandar90E3X_Angle Correction File.csv b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/Pandar90E3X_Angle Correction File.csv similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/Pandar90E3X_Angle Correction File.csv rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/Pandar90E3X_Angle Correction File.csv diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/PandarQT_Angle Correction File.csv b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/PandarQT_Angle Correction File.csv similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/PandarQT_Angle Correction File.csv rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/PandarQT_Angle Correction File.csv diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/PandarXT-16_Angle Correction File.csv b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/PandarXT-16_Angle Correction File.csv similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/PandarXT-16_Angle Correction File.csv rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/PandarXT-16_Angle Correction File.csv diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/PandarXT_Angle Correction File.csv b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/PandarXT_Angle Correction File.csv similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/PandarXT_Angle Correction File.csv rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/PandarXT_Angle Correction File.csv diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/QT128C2X_Angle Correction File.csv b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/QT128C2X_Angle Correction File.csv similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/QT128C2X_Angle Correction File.csv rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/QT128C2X_Angle Correction File.csv diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/QT128C2X_Channel_Cofig.csv b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/QT128C2X_Channel_Cofig.csv similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/QT128C2X_Channel_Cofig.csv rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/QT128C2X_Channel_Cofig.csv diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/XT32M2X_Angle Correction File.csv b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/XT32M2X_Angle Correction File.csv similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/XT32M2X_Angle Correction File.csv rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/angle_correction/XT32M2X_Angle Correction File.csv diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/AT128E2X_Firetime Correction File.csv b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/AT128E2X_Firetime Correction File.csv similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/AT128E2X_Firetime Correction File.csv rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/AT128E2X_Firetime Correction File.csv diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/Pandar128E3X_Firetime Correction File.csv b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/Pandar128E3X_Firetime Correction File.csv similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/Pandar128E3X_Firetime Correction File.csv rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/Pandar128E3X_Firetime Correction File.csv diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/Pandar40E3X_Firetime Correction File.csv b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/Pandar40E3X_Firetime Correction File.csv similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/Pandar40E3X_Firetime Correction File.csv rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/Pandar40E3X_Firetime Correction File.csv diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/Pandar40P_Firetime Correction File.csv b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/Pandar40P_Firetime Correction File.csv similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/Pandar40P_Firetime Correction File.csv rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/Pandar40P_Firetime Correction File.csv diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/Pandar64E3X_Firetime Correction File.csv b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/Pandar64E3X_Firetime Correction File.csv similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/Pandar64E3X_Firetime Correction File.csv rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/Pandar64E3X_Firetime Correction File.csv diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/Pandar64_Firetime Correction File.csv b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/Pandar64_Firetime Correction File.csv similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/Pandar64_Firetime Correction File.csv rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/Pandar64_Firetime Correction File.csv diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/Pandar90_Firetime Correction File.csv b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/Pandar90_Firetime Correction File.csv similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/Pandar90_Firetime Correction File.csv rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/Pandar90_Firetime Correction File.csv diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/PandarXT-16_Firetime Correction File.csv b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/PandarXT-16_Firetime Correction File.csv similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/PandarXT-16_Firetime Correction File.csv rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/PandarXT-16_Firetime Correction File.csv diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/PandarXT_Firetime Correction File.csv b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/PandarXT_Firetime Correction File.csv similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/PandarXT_Firetime Correction File.csv rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/PandarXT_Firetime Correction File.csv diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/QT128C2X_Firetime Correction File.csv b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/QT128C2X_Firetime Correction File.csv similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/QT128C2X_Firetime Correction File.csv rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/correction/firetime_correction/QT128C2X_Firetime Correction File.csv diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/driver/hesai_lidar_sdk.hpp b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/driver/hesai_lidar_sdk.hpp similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/driver/hesai_lidar_sdk.hpp rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/driver/hesai_lidar_sdk.hpp diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/driver/hesai_lidar_sdk_gpu.cuh b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/driver/hesai_lidar_sdk_gpu.cuh similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/driver/hesai_lidar_sdk_gpu.cuh rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/driver/hesai_lidar_sdk_gpu.cuh diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/CMakeLists.txt b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/CMakeLists.txt similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/CMakeLists.txt rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/CMakeLists.txt diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Container/include/blocking_ring.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Container/include/blocking_ring.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Container/include/blocking_ring.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Container/include/blocking_ring.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Container/include/ring.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Container/include/ring.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Container/include/ring.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Container/include/ring.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Container/include/ring_2d_shared.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Container/include/ring_2d_shared.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Container/include/ring_2d_shared.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Container/include/ring_2d_shared.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Container/include/ring_2dex.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Container/include/ring_2dex.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Container/include/ring_2dex.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Container/include/ring_2dex.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Container/src/blocking_ring.cc b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Container/src/blocking_ring.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Container/src/blocking_ring.cc rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Container/src/blocking_ring.cc diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Container/src/ring.cc b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Container/src/ring.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Container/src/ring.cc rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Container/src/ring.cc diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Container/src/ring_2d_shared.cc b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Container/src/ring_2d_shared.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Container/src/ring_2d_shared.cc rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Container/src/ring_2d_shared.cc diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Container/src/ring_2dex.cc b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Container/src/ring_2dex.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Container/src/ring_2dex.cc rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Container/src/ring_2dex.cc diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Lidar/lidar.cc b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Lidar/lidar.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Lidar/lidar.cc rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Lidar/lidar.cc diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Lidar/lidar.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Lidar/lidar.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Lidar/lidar.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Lidar/lidar.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Lidar/lidar_types.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Lidar/lidar_types.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Lidar/lidar_types.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Lidar/lidar_types.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Logger/include/logger.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Logger/include/logger.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Logger/include/logger.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Logger/include/logger.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Logger/src/logger.cc b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Logger/src/logger.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Logger/src/logger.cc rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Logger/src/logger.cc diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcClient/include/client_base.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcClient/include/client_base.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcClient/include/client_base.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcClient/include/client_base.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcClient/include/lidar_communication_header.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcClient/include/lidar_communication_header.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcClient/include/lidar_communication_header.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcClient/include/lidar_communication_header.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcClient/include/ptc_client.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcClient/include/ptc_client.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcClient/include/ptc_client.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcClient/include/ptc_client.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcClient/include/tcp_client.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcClient/include/tcp_client.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcClient/include/tcp_client.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcClient/include/tcp_client.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcClient/include/tcp_ssl_client.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcClient/include/tcp_ssl_client.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcClient/include/tcp_ssl_client.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcClient/include/tcp_ssl_client.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcClient/src/ptc_client.cc b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcClient/src/ptc_client.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcClient/src/ptc_client.cc rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcClient/src/ptc_client.cc diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcClient/src/tcp_client.cc b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcClient/src/tcp_client.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcClient/src/tcp_client.cc rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcClient/src/tcp_client.cc diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcClient/src/tcp_ssl_client.cc b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcClient/src/tcp_ssl_client.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcClient/src/tcp_ssl_client.cc rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcClient/src/tcp_ssl_client.cc diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcParser/include/general_ptc_parser.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcParser/include/general_ptc_parser.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcParser/include/general_ptc_parser.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcParser/include/general_ptc_parser.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcParser/include/ptc_1_0_parser.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcParser/include/ptc_1_0_parser.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcParser/include/ptc_1_0_parser.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcParser/include/ptc_1_0_parser.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcParser/include/ptc_2_0_parser.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcParser/include/ptc_2_0_parser.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcParser/include/ptc_2_0_parser.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcParser/include/ptc_2_0_parser.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcParser/ptc_parser.cc b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcParser/ptc_parser.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcParser/ptc_parser.cc rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcParser/ptc_parser.cc diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcParser/ptc_parser.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcParser/ptc_parser.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcParser/ptc_parser.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcParser/ptc_parser.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcParser/src/general_ptc_parser.cc b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcParser/src/general_ptc_parser.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcParser/src/general_ptc_parser.cc rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcParser/src/general_ptc_parser.cc diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcParser/src/ptc_1_0_parser.cc b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcParser/src/ptc_1_0_parser.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcParser/src/ptc_1_0_parser.cc rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcParser/src/ptc_1_0_parser.cc diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcParser/src/ptc_2_0_parser.cc b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcParser/src/ptc_2_0_parser.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcParser/src/ptc_2_0_parser.cc rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/PtcParser/src/ptc_2_0_parser.cc diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Source/include/pcap_saver.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Source/include/pcap_saver.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Source/include/pcap_saver.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Source/include/pcap_saver.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Source/include/pcap_source.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Source/include/pcap_source.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Source/include/pcap_source.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Source/include/pcap_source.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Source/include/socket_source.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Source/include/socket_source.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Source/include/socket_source.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Source/include/socket_source.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Source/include/source.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Source/include/source.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Source/include/source.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Source/include/source.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Source/src/pcap_saver.cc b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Source/src/pcap_saver.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Source/src/pcap_saver.cc rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Source/src/pcap_saver.cc diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Source/src/pcap_source.cc b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Source/src/pcap_source.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Source/src/pcap_source.cc rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Source/src/pcap_source.cc diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Source/src/socket_source.cc b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Source/src/socket_source.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Source/src/socket_source.cc rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Source/src/socket_source.cc diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Source/src/source.cc b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Source/src/source.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Source/src/source.cc rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/Source/src/source.cc diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/general_parser.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/general_parser.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/general_parser.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/general_parser.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp1_4_parser.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp1_4_parser.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp1_4_parser.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp1_4_parser.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp2_4_parser.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp2_4_parser.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp2_4_parser.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp2_4_parser.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp2_5_parser.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp2_5_parser.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp2_5_parser.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp2_5_parser.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp3_1_parser.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp3_1_parser.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp3_1_parser.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp3_1_parser.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp3_2_parser.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp3_2_parser.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp3_2_parser.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp3_2_parser.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp4_3_parser.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp4_3_parser.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp4_3_parser.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp4_3_parser.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp6_1_parser.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp6_1_parser.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp6_1_parser.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp6_1_parser.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp7_2_parser.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp7_2_parser.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp7_2_parser.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp7_2_parser.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp_p40_parser.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp_p40_parser.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp_p40_parser.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp_p40_parser.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp_p64_parser.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp_p64_parser.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp_p64_parser.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/include/udp_p64_parser.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/general_parser.cc b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/general_parser.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/general_parser.cc rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/general_parser.cc diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp1_4_parser.cc b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp1_4_parser.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp1_4_parser.cc rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp1_4_parser.cc diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp2_4_parser.cc b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp2_4_parser.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp2_4_parser.cc rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp2_4_parser.cc diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp2_5_parser.cc b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp2_5_parser.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp2_5_parser.cc rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp2_5_parser.cc diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp3_1_parser.cc b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp3_1_parser.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp3_1_parser.cc rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp3_1_parser.cc diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp3_2_parser.cc b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp3_2_parser.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp3_2_parser.cc rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp3_2_parser.cc diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp4_3_parser.cc b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp4_3_parser.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp4_3_parser.cc rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp4_3_parser.cc diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp6_1_parser.cc b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp6_1_parser.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp6_1_parser.cc rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp6_1_parser.cc diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp7_2_parser.cc b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp7_2_parser.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp7_2_parser.cc rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp7_2_parser.cc diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp_p40_parser.cc b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp_p40_parser.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp_p40_parser.cc rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp_p40_parser.cc diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp_p64_parser.cc b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp_p64_parser.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp_p64_parser.cc rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/src/udp_p64_parser.cc diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/udp_parser.cc b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/udp_parser.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/udp_parser.cc rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/udp_parser.cc diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/udp_parser.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/udp_parser.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/udp_parser.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParser/udp_parser.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/general_parser_gpu.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/general_parser_gpu.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/general_parser_gpu.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/general_parser_gpu.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/nvbuffer.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/nvbuffer.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/nvbuffer.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/nvbuffer.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/return_code.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/return_code.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/return_code.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/return_code.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/safe_call.cuh b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/safe_call.cuh similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/safe_call.cuh rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/safe_call.cuh diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp1_4_parser_gpu.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp1_4_parser_gpu.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp1_4_parser_gpu.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp1_4_parser_gpu.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp2_5_parser_gpu.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp2_5_parser_gpu.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp2_5_parser_gpu.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp2_5_parser_gpu.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp3_1_parser_gpu.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp3_1_parser_gpu.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp3_1_parser_gpu.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp3_1_parser_gpu.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp3_2_parser_gpu.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp3_2_parser_gpu.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp3_2_parser_gpu.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp3_2_parser_gpu.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp4_3_parser_gpu.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp4_3_parser_gpu.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp4_3_parser_gpu.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp4_3_parser_gpu.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp6_1_parser_gpu.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp6_1_parser_gpu.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp6_1_parser_gpu.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp6_1_parser_gpu.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp7_2_parser_gpu.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp7_2_parser_gpu.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp7_2_parser_gpu.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp7_2_parser_gpu.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp_p40_parser_gpu.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp_p40_parser_gpu.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp_p40_parser_gpu.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp_p40_parser_gpu.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp_p64_parser_gpu.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp_p64_parser_gpu.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp_p64_parser_gpu.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/include/udp_p64_parser_gpu.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/buffer.cu b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/buffer.cu similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/buffer.cu rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/buffer.cu diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/general_parser_gpu.cu b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/general_parser_gpu.cu similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/general_parser_gpu.cu rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/general_parser_gpu.cu diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp1_4_parser_gpu.cu b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp1_4_parser_gpu.cu similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp1_4_parser_gpu.cu rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp1_4_parser_gpu.cu diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp2_5_parser_gpu.cu b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp2_5_parser_gpu.cu similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp2_5_parser_gpu.cu rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp2_5_parser_gpu.cu diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp3_1_parser_gpu.cu b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp3_1_parser_gpu.cu similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp3_1_parser_gpu.cu rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp3_1_parser_gpu.cu diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp3_2_parser_gpu.cu b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp3_2_parser_gpu.cu similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp3_2_parser_gpu.cu rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp3_2_parser_gpu.cu diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp4_3_parser_gpu.cu b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp4_3_parser_gpu.cu similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp4_3_parser_gpu.cu rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp4_3_parser_gpu.cu diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp6_1_parser_gpu.cu b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp6_1_parser_gpu.cu similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp6_1_parser_gpu.cu rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp6_1_parser_gpu.cu diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp7_2_parser_gpu.cu b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp7_2_parser_gpu.cu similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp7_2_parser_gpu.cu rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp7_2_parser_gpu.cu diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp_p40_parser_gpu.cu b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp_p40_parser_gpu.cu similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp_p40_parser_gpu.cu rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp_p40_parser_gpu.cu diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp_p64_parser_gpu.cu b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp_p64_parser_gpu.cu similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp_p64_parser_gpu.cu rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/src/udp_p64_parser_gpu.cu diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/udp_parser_gpu.cu b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/udp_parser_gpu.cu similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/udp_parser_gpu.cu rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/udp_parser_gpu.cu diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/udp_parser_gpu.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/udp_parser_gpu.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/udp_parser_gpu.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpParserGpu/udp_parser_gpu.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/fault_message.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/fault_message.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/fault_message.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/fault_message.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_header.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_header.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_header.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_header.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_p40.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_p40.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_p40.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_p40.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_p64.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_p64.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_p64.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_p64.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_v1_4.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_v1_4.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_v1_4.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_v1_4.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_v2_4.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_v2_4.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_v2_4.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_v2_4.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_v2_5.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_v2_5.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_v2_5.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_v2_5.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_v3_1.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_v3_1.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_v3_1.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_v3_1.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_v3_2.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_v3_2.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_v3_2.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_v3_2.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_v4_3.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_v4_3.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_v4_3.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_v4_3.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_v6_1.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_v6_1.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_v6_1.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_v6_1.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_v7_2.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_v7_2.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_v7_2.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/UdpProtocol/udp_protocol_v7_2.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/driver_param.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/driver_param.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/driver_param.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/driver_param.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/include/auto_tick_count.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/include/auto_tick_count.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/include/auto_tick_count.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/include/auto_tick_count.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/include/plat_utils.h b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/include/plat_utils.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/include/plat_utils.h rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/include/plat_utils.h diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/src/auto_tick_count.cc b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/src/auto_tick_count.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/src/auto_tick_count.cc rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/src/auto_tick_count.cc diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/src/plat_utils.cc b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/src/plat_utils.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/src/plat_utils.cc rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/libhesai/src/plat_utils.cc diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/test/test.cc b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/test/test.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/test/test.cc rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/test/test.cc diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/test/test.cu b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/test/test.cu similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/test/test.cu rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/test/test.cu diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/tool/CMakeLists.txt b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/tool/CMakeLists.txt similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/tool/CMakeLists.txt rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/tool/CMakeLists.txt diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/tool/Version.h.in b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/tool/Version.h.in similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/tool/Version.h.in rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/tool/Version.h.in diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/tool/packet_loss_tool.cc b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/tool/packet_loss_tool.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/tool/packet_loss_tool.cc rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/tool/packet_loss_tool.cc diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/tool/pcl_tool.cc b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/tool/pcl_tool.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/tool/pcl_tool.cc rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/tool/pcl_tool.cc diff --git a/deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/tool/pcl_tool.cu b/deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/tool/pcl_tool.cu similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/tool/pcl_tool.cu rename to deploy/perception_ws/src/lidar_node/src/driver/HesaiLidar_SDK_2.0/tool/pcl_tool.cu diff --git a/deploy/ros2_ws/src/lidar_node/src/manager/node_manager.cc b/deploy/perception_ws/src/lidar_node/src/manager/node_manager.cc similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/manager/node_manager.cc rename to deploy/perception_ws/src/lidar_node/src/manager/node_manager.cc diff --git a/deploy/ros2_ws/src/lidar_node/src/manager/node_manager.cu b/deploy/perception_ws/src/lidar_node/src/manager/node_manager.cu similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/manager/node_manager.cu rename to deploy/perception_ws/src/lidar_node/src/manager/node_manager.cu diff --git a/deploy/ros2_ws/src/lidar_node/src/manager/node_manager.h b/deploy/perception_ws/src/lidar_node/src/manager/node_manager.h similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/manager/node_manager.h rename to deploy/perception_ws/src/lidar_node/src/manager/node_manager.h diff --git a/deploy/ros2_ws/src/lidar_node/src/manager/source_driver_ros1.hpp b/deploy/perception_ws/src/lidar_node/src/manager/source_driver_ros1.hpp similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/manager/source_driver_ros1.hpp rename to deploy/perception_ws/src/lidar_node/src/manager/source_driver_ros1.hpp diff --git a/deploy/ros2_ws/src/lidar_node/src/manager/source_driver_ros2.hpp b/deploy/perception_ws/src/lidar_node/src/manager/source_driver_ros2.hpp similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/manager/source_driver_ros2.hpp rename to deploy/perception_ws/src/lidar_node/src/manager/source_driver_ros2.hpp diff --git a/deploy/ros2_ws/src/lidar_node/src/utility/yaml_reader.hpp b/deploy/perception_ws/src/lidar_node/src/utility/yaml_reader.hpp similarity index 100% rename from deploy/ros2_ws/src/lidar_node/src/utility/yaml_reader.hpp rename to deploy/perception_ws/src/lidar_node/src/utility/yaml_reader.hpp diff --git a/deploy/robot_ws/install/.colcon_install_layout b/deploy/robot_ws/install/.colcon_install_layout new file mode 100644 index 0000000..3aad533 --- /dev/null +++ b/deploy/robot_ws/install/.colcon_install_layout @@ -0,0 +1 @@ +isolated diff --git a/deploy/robot_ws/install/COLCON_IGNORE b/deploy/robot_ws/install/COLCON_IGNORE new file mode 100644 index 0000000..e69de29 diff --git a/deploy/robot_ws/install/_local_setup_util_ps1.py b/deploy/robot_ws/install/_local_setup_util_ps1.py new file mode 100644 index 0000000..83abe63 --- /dev/null +++ b/deploy/robot_ws/install/_local_setup_util_ps1.py @@ -0,0 +1,407 @@ +# Copyright 2016-2019 Dirk Thomas +# Licensed under the Apache License, Version 2.0 + +import argparse +from collections import OrderedDict +import os +from pathlib import Path +import sys + + +FORMAT_STR_COMMENT_LINE = '# {comment}' +FORMAT_STR_SET_ENV_VAR = 'Set-Item -Path "Env:{name}" -Value "{value}"' +FORMAT_STR_USE_ENV_VAR = '$env:{name}' +FORMAT_STR_INVOKE_SCRIPT = '_colcon_prefix_powershell_source_script "{script_path}"' +FORMAT_STR_REMOVE_LEADING_SEPARATOR = '' +FORMAT_STR_REMOVE_TRAILING_SEPARATOR = '' + +DSV_TYPE_APPEND_NON_DUPLICATE = 'append-non-duplicate' +DSV_TYPE_PREPEND_NON_DUPLICATE = 'prepend-non-duplicate' +DSV_TYPE_PREPEND_NON_DUPLICATE_IF_EXISTS = 'prepend-non-duplicate-if-exists' +DSV_TYPE_SET = 'set' +DSV_TYPE_SET_IF_UNSET = 'set-if-unset' +DSV_TYPE_SOURCE = 'source' + + +def main(argv=sys.argv[1:]): # noqa: D103 + parser = argparse.ArgumentParser( + description='Output shell commands for the packages in topological ' + 'order') + parser.add_argument( + 'primary_extension', + help='The file extension of the primary shell') + parser.add_argument( + 'additional_extension', nargs='?', + help='The additional file extension to be considered') + parser.add_argument( + '--merged-install', action='store_true', + help='All install prefixes are merged into a single location') + args = parser.parse_args(argv) + + packages = get_packages(Path(__file__).parent, args.merged_install) + + ordered_packages = order_packages(packages) + for pkg_name in ordered_packages: + if _include_comments(): + print( + FORMAT_STR_COMMENT_LINE.format_map( + {'comment': 'Package: ' + pkg_name})) + prefix = os.path.abspath(os.path.dirname(__file__)) + if not args.merged_install: + prefix = os.path.join(prefix, pkg_name) + for line in get_commands( + pkg_name, prefix, args.primary_extension, + args.additional_extension + ): + print(line) + + for line in _remove_ending_separators(): + print(line) + + +def get_packages(prefix_path, merged_install): + """ + Find packages based on colcon-specific files created during installation. + + :param Path prefix_path: The install prefix path of all packages + :param bool merged_install: The flag if the packages are all installed + directly in the prefix or if each package is installed in a subdirectory + named after the package + :returns: A mapping from the package name to the set of runtime + dependencies + :rtype: dict + """ + packages = {} + # since importing colcon_core isn't feasible here the following constant + # must match colcon_core.location.get_relative_package_index_path() + subdirectory = 'share/colcon-core/packages' + if merged_install: + # return if workspace is empty + if not (prefix_path / subdirectory).is_dir(): + return packages + # find all files in the subdirectory + for p in (prefix_path / subdirectory).iterdir(): + if not p.is_file(): + continue + if p.name.startswith('.'): + continue + add_package_runtime_dependencies(p, packages) + else: + # for each subdirectory look for the package specific file + for p in prefix_path.iterdir(): + if not p.is_dir(): + continue + if p.name.startswith('.'): + continue + p = p / subdirectory / p.name + if p.is_file(): + add_package_runtime_dependencies(p, packages) + + # remove unknown dependencies + pkg_names = set(packages.keys()) + for k in packages.keys(): + packages[k] = {d for d in packages[k] if d in pkg_names} + + return packages + + +def add_package_runtime_dependencies(path, packages): + """ + Check the path and if it exists extract the packages runtime dependencies. + + :param Path path: The resource file containing the runtime dependencies + :param dict packages: A mapping from package names to the sets of runtime + dependencies to add to + """ + content = path.read_text() + dependencies = set(content.split(os.pathsep) if content else []) + packages[path.name] = dependencies + + +def order_packages(packages): + """ + Order packages topologically. + + :param dict packages: A mapping from package name to the set of runtime + dependencies + :returns: The package names + :rtype: list + """ + # select packages with no dependencies in alphabetical order + to_be_ordered = list(packages.keys()) + ordered = [] + while to_be_ordered: + pkg_names_without_deps = [ + name for name in to_be_ordered if not packages[name]] + if not pkg_names_without_deps: + reduce_cycle_set(packages) + raise RuntimeError( + 'Circular dependency between: ' + ', '.join(sorted(packages))) + pkg_names_without_deps.sort() + pkg_name = pkg_names_without_deps[0] + to_be_ordered.remove(pkg_name) + ordered.append(pkg_name) + # remove item from dependency lists + for k in list(packages.keys()): + if pkg_name in packages[k]: + packages[k].remove(pkg_name) + return ordered + + +def reduce_cycle_set(packages): + """ + Reduce the set of packages to the ones part of the circular dependency. + + :param dict packages: A mapping from package name to the set of runtime + dependencies which is modified in place + """ + last_depended = None + while len(packages) > 0: + # get all remaining dependencies + depended = set() + for pkg_name, dependencies in packages.items(): + depended = depended.union(dependencies) + # remove all packages which are not dependent on + for name in list(packages.keys()): + if name not in depended: + del packages[name] + if last_depended: + # if remaining packages haven't changed return them + if last_depended == depended: + return packages.keys() + # otherwise reduce again + last_depended = depended + + +def _include_comments(): + # skipping comment lines when COLCON_TRACE is not set speeds up the + # processing especially on Windows + return bool(os.environ.get('COLCON_TRACE')) + + +def get_commands(pkg_name, prefix, primary_extension, additional_extension): + commands = [] + package_dsv_path = os.path.join(prefix, 'share', pkg_name, 'package.dsv') + if os.path.exists(package_dsv_path): + commands += process_dsv_file( + package_dsv_path, prefix, primary_extension, additional_extension) + return commands + + +def process_dsv_file( + dsv_path, prefix, primary_extension=None, additional_extension=None +): + commands = [] + if _include_comments(): + commands.append(FORMAT_STR_COMMENT_LINE.format_map({'comment': dsv_path})) + with open(dsv_path, 'r') as h: + content = h.read() + lines = content.splitlines() + + basenames = OrderedDict() + for i, line in enumerate(lines): + # skip over empty or whitespace-only lines + if not line.strip(): + continue + # skip over comments + if line.startswith('#'): + continue + try: + type_, remainder = line.split(';', 1) + except ValueError: + raise RuntimeError( + "Line %d in '%s' doesn't contain a semicolon separating the " + 'type from the arguments' % (i + 1, dsv_path)) + if type_ != DSV_TYPE_SOURCE: + # handle non-source lines + try: + commands += handle_dsv_types_except_source( + type_, remainder, prefix) + except RuntimeError as e: + raise RuntimeError( + "Line %d in '%s' %s" % (i + 1, dsv_path, e)) from e + else: + # group remaining source lines by basename + path_without_ext, ext = os.path.splitext(remainder) + if path_without_ext not in basenames: + basenames[path_without_ext] = set() + assert ext.startswith('.') + ext = ext[1:] + if ext in (primary_extension, additional_extension): + basenames[path_without_ext].add(ext) + + # add the dsv extension to each basename if the file exists + for basename, extensions in basenames.items(): + if not os.path.isabs(basename): + basename = os.path.join(prefix, basename) + if os.path.exists(basename + '.dsv'): + extensions.add('dsv') + + for basename, extensions in basenames.items(): + if not os.path.isabs(basename): + basename = os.path.join(prefix, basename) + if 'dsv' in extensions: + # process dsv files recursively + commands += process_dsv_file( + basename + '.dsv', prefix, primary_extension=primary_extension, + additional_extension=additional_extension) + elif primary_extension in extensions and len(extensions) == 1: + # source primary-only files + commands += [ + FORMAT_STR_INVOKE_SCRIPT.format_map({ + 'prefix': prefix, + 'script_path': basename + '.' + primary_extension})] + elif additional_extension in extensions: + # source non-primary files + commands += [ + FORMAT_STR_INVOKE_SCRIPT.format_map({ + 'prefix': prefix, + 'script_path': basename + '.' + additional_extension})] + + return commands + + +def handle_dsv_types_except_source(type_, remainder, prefix): + commands = [] + if type_ in (DSV_TYPE_SET, DSV_TYPE_SET_IF_UNSET): + try: + env_name, value = remainder.split(';', 1) + except ValueError: + raise RuntimeError( + "doesn't contain a semicolon separating the environment name " + 'from the value') + try_prefixed_value = os.path.join(prefix, value) if value else prefix + if os.path.exists(try_prefixed_value): + value = try_prefixed_value + if type_ == DSV_TYPE_SET: + commands += _set(env_name, value) + elif type_ == DSV_TYPE_SET_IF_UNSET: + commands += _set_if_unset(env_name, value) + else: + assert False + elif type_ in ( + DSV_TYPE_APPEND_NON_DUPLICATE, + DSV_TYPE_PREPEND_NON_DUPLICATE, + DSV_TYPE_PREPEND_NON_DUPLICATE_IF_EXISTS + ): + try: + env_name_and_values = remainder.split(';') + except ValueError: + raise RuntimeError( + "doesn't contain a semicolon separating the environment name " + 'from the values') + env_name = env_name_and_values[0] + values = env_name_and_values[1:] + for value in values: + if not value: + value = prefix + elif not os.path.isabs(value): + value = os.path.join(prefix, value) + if ( + type_ == DSV_TYPE_PREPEND_NON_DUPLICATE_IF_EXISTS and + not os.path.exists(value) + ): + comment = f'skip extending {env_name} with not existing ' \ + f'path: {value}' + if _include_comments(): + commands.append( + FORMAT_STR_COMMENT_LINE.format_map({'comment': comment})) + elif type_ == DSV_TYPE_APPEND_NON_DUPLICATE: + commands += _append_unique_value(env_name, value) + else: + commands += _prepend_unique_value(env_name, value) + else: + raise RuntimeError( + 'contains an unknown environment hook type: ' + type_) + return commands + + +env_state = {} + + +def _append_unique_value(name, value): + global env_state + if name not in env_state: + if os.environ.get(name): + env_state[name] = set(os.environ[name].split(os.pathsep)) + else: + env_state[name] = set() + # append even if the variable has not been set yet, in case a shell script sets the + # same variable without the knowledge of this Python script. + # later _remove_ending_separators() will cleanup any unintentional leading separator + extend = FORMAT_STR_USE_ENV_VAR.format_map({'name': name}) + os.pathsep + line = FORMAT_STR_SET_ENV_VAR.format_map( + {'name': name, 'value': extend + value}) + if value not in env_state[name]: + env_state[name].add(value) + else: + if not _include_comments(): + return [] + line = FORMAT_STR_COMMENT_LINE.format_map({'comment': line}) + return [line] + + +def _prepend_unique_value(name, value): + global env_state + if name not in env_state: + if os.environ.get(name): + env_state[name] = set(os.environ[name].split(os.pathsep)) + else: + env_state[name] = set() + # prepend even if the variable has not been set yet, in case a shell script sets the + # same variable without the knowledge of this Python script. + # later _remove_ending_separators() will cleanup any unintentional trailing separator + extend = os.pathsep + FORMAT_STR_USE_ENV_VAR.format_map({'name': name}) + line = FORMAT_STR_SET_ENV_VAR.format_map( + {'name': name, 'value': value + extend}) + if value not in env_state[name]: + env_state[name].add(value) + else: + if not _include_comments(): + return [] + line = FORMAT_STR_COMMENT_LINE.format_map({'comment': line}) + return [line] + + +# generate commands for removing prepended underscores +def _remove_ending_separators(): + # do nothing if the shell extension does not implement the logic + if FORMAT_STR_REMOVE_TRAILING_SEPARATOR is None: + return [] + + global env_state + commands = [] + for name in env_state: + # skip variables that already had values before this script started prepending + if name in os.environ: + continue + commands += [ + FORMAT_STR_REMOVE_LEADING_SEPARATOR.format_map({'name': name}), + FORMAT_STR_REMOVE_TRAILING_SEPARATOR.format_map({'name': name})] + return commands + + +def _set(name, value): + global env_state + env_state[name] = value + line = FORMAT_STR_SET_ENV_VAR.format_map( + {'name': name, 'value': value}) + return [line] + + +def _set_if_unset(name, value): + global env_state + line = FORMAT_STR_SET_ENV_VAR.format_map( + {'name': name, 'value': value}) + if env_state.get(name, os.environ.get(name)): + line = FORMAT_STR_COMMENT_LINE.format_map({'comment': line}) + return [line] + + +if __name__ == '__main__': # pragma: no cover + try: + rc = main() + except RuntimeError as e: + print(str(e), file=sys.stderr) + rc = 1 + sys.exit(rc) diff --git a/deploy/robot_ws/install/_local_setup_util_sh.py b/deploy/robot_ws/install/_local_setup_util_sh.py new file mode 100644 index 0000000..ff31198 --- /dev/null +++ b/deploy/robot_ws/install/_local_setup_util_sh.py @@ -0,0 +1,407 @@ +# Copyright 2016-2019 Dirk Thomas +# Licensed under the Apache License, Version 2.0 + +import argparse +from collections import OrderedDict +import os +from pathlib import Path +import sys + + +FORMAT_STR_COMMENT_LINE = '# {comment}' +FORMAT_STR_SET_ENV_VAR = 'export {name}="{value}"' +FORMAT_STR_USE_ENV_VAR = '${name}' +FORMAT_STR_INVOKE_SCRIPT = 'COLCON_CURRENT_PREFIX="{prefix}" _colcon_prefix_sh_source_script "{script_path}"' +FORMAT_STR_REMOVE_LEADING_SEPARATOR = 'if [ "$(echo -n ${name} | head -c 1)" = ":" ]; then export {name}=${{{name}#?}} ; fi' +FORMAT_STR_REMOVE_TRAILING_SEPARATOR = 'if [ "$(echo -n ${name} | tail -c 1)" = ":" ]; then export {name}=${{{name}%?}} ; fi' + +DSV_TYPE_APPEND_NON_DUPLICATE = 'append-non-duplicate' +DSV_TYPE_PREPEND_NON_DUPLICATE = 'prepend-non-duplicate' +DSV_TYPE_PREPEND_NON_DUPLICATE_IF_EXISTS = 'prepend-non-duplicate-if-exists' +DSV_TYPE_SET = 'set' +DSV_TYPE_SET_IF_UNSET = 'set-if-unset' +DSV_TYPE_SOURCE = 'source' + + +def main(argv=sys.argv[1:]): # noqa: D103 + parser = argparse.ArgumentParser( + description='Output shell commands for the packages in topological ' + 'order') + parser.add_argument( + 'primary_extension', + help='The file extension of the primary shell') + parser.add_argument( + 'additional_extension', nargs='?', + help='The additional file extension to be considered') + parser.add_argument( + '--merged-install', action='store_true', + help='All install prefixes are merged into a single location') + args = parser.parse_args(argv) + + packages = get_packages(Path(__file__).parent, args.merged_install) + + ordered_packages = order_packages(packages) + for pkg_name in ordered_packages: + if _include_comments(): + print( + FORMAT_STR_COMMENT_LINE.format_map( + {'comment': 'Package: ' + pkg_name})) + prefix = os.path.abspath(os.path.dirname(__file__)) + if not args.merged_install: + prefix = os.path.join(prefix, pkg_name) + for line in get_commands( + pkg_name, prefix, args.primary_extension, + args.additional_extension + ): + print(line) + + for line in _remove_ending_separators(): + print(line) + + +def get_packages(prefix_path, merged_install): + """ + Find packages based on colcon-specific files created during installation. + + :param Path prefix_path: The install prefix path of all packages + :param bool merged_install: The flag if the packages are all installed + directly in the prefix or if each package is installed in a subdirectory + named after the package + :returns: A mapping from the package name to the set of runtime + dependencies + :rtype: dict + """ + packages = {} + # since importing colcon_core isn't feasible here the following constant + # must match colcon_core.location.get_relative_package_index_path() + subdirectory = 'share/colcon-core/packages' + if merged_install: + # return if workspace is empty + if not (prefix_path / subdirectory).is_dir(): + return packages + # find all files in the subdirectory + for p in (prefix_path / subdirectory).iterdir(): + if not p.is_file(): + continue + if p.name.startswith('.'): + continue + add_package_runtime_dependencies(p, packages) + else: + # for each subdirectory look for the package specific file + for p in prefix_path.iterdir(): + if not p.is_dir(): + continue + if p.name.startswith('.'): + continue + p = p / subdirectory / p.name + if p.is_file(): + add_package_runtime_dependencies(p, packages) + + # remove unknown dependencies + pkg_names = set(packages.keys()) + for k in packages.keys(): + packages[k] = {d for d in packages[k] if d in pkg_names} + + return packages + + +def add_package_runtime_dependencies(path, packages): + """ + Check the path and if it exists extract the packages runtime dependencies. + + :param Path path: The resource file containing the runtime dependencies + :param dict packages: A mapping from package names to the sets of runtime + dependencies to add to + """ + content = path.read_text() + dependencies = set(content.split(os.pathsep) if content else []) + packages[path.name] = dependencies + + +def order_packages(packages): + """ + Order packages topologically. + + :param dict packages: A mapping from package name to the set of runtime + dependencies + :returns: The package names + :rtype: list + """ + # select packages with no dependencies in alphabetical order + to_be_ordered = list(packages.keys()) + ordered = [] + while to_be_ordered: + pkg_names_without_deps = [ + name for name in to_be_ordered if not packages[name]] + if not pkg_names_without_deps: + reduce_cycle_set(packages) + raise RuntimeError( + 'Circular dependency between: ' + ', '.join(sorted(packages))) + pkg_names_without_deps.sort() + pkg_name = pkg_names_without_deps[0] + to_be_ordered.remove(pkg_name) + ordered.append(pkg_name) + # remove item from dependency lists + for k in list(packages.keys()): + if pkg_name in packages[k]: + packages[k].remove(pkg_name) + return ordered + + +def reduce_cycle_set(packages): + """ + Reduce the set of packages to the ones part of the circular dependency. + + :param dict packages: A mapping from package name to the set of runtime + dependencies which is modified in place + """ + last_depended = None + while len(packages) > 0: + # get all remaining dependencies + depended = set() + for pkg_name, dependencies in packages.items(): + depended = depended.union(dependencies) + # remove all packages which are not dependent on + for name in list(packages.keys()): + if name not in depended: + del packages[name] + if last_depended: + # if remaining packages haven't changed return them + if last_depended == depended: + return packages.keys() + # otherwise reduce again + last_depended = depended + + +def _include_comments(): + # skipping comment lines when COLCON_TRACE is not set speeds up the + # processing especially on Windows + return bool(os.environ.get('COLCON_TRACE')) + + +def get_commands(pkg_name, prefix, primary_extension, additional_extension): + commands = [] + package_dsv_path = os.path.join(prefix, 'share', pkg_name, 'package.dsv') + if os.path.exists(package_dsv_path): + commands += process_dsv_file( + package_dsv_path, prefix, primary_extension, additional_extension) + return commands + + +def process_dsv_file( + dsv_path, prefix, primary_extension=None, additional_extension=None +): + commands = [] + if _include_comments(): + commands.append(FORMAT_STR_COMMENT_LINE.format_map({'comment': dsv_path})) + with open(dsv_path, 'r') as h: + content = h.read() + lines = content.splitlines() + + basenames = OrderedDict() + for i, line in enumerate(lines): + # skip over empty or whitespace-only lines + if not line.strip(): + continue + # skip over comments + if line.startswith('#'): + continue + try: + type_, remainder = line.split(';', 1) + except ValueError: + raise RuntimeError( + "Line %d in '%s' doesn't contain a semicolon separating the " + 'type from the arguments' % (i + 1, dsv_path)) + if type_ != DSV_TYPE_SOURCE: + # handle non-source lines + try: + commands += handle_dsv_types_except_source( + type_, remainder, prefix) + except RuntimeError as e: + raise RuntimeError( + "Line %d in '%s' %s" % (i + 1, dsv_path, e)) from e + else: + # group remaining source lines by basename + path_without_ext, ext = os.path.splitext(remainder) + if path_without_ext not in basenames: + basenames[path_without_ext] = set() + assert ext.startswith('.') + ext = ext[1:] + if ext in (primary_extension, additional_extension): + basenames[path_without_ext].add(ext) + + # add the dsv extension to each basename if the file exists + for basename, extensions in basenames.items(): + if not os.path.isabs(basename): + basename = os.path.join(prefix, basename) + if os.path.exists(basename + '.dsv'): + extensions.add('dsv') + + for basename, extensions in basenames.items(): + if not os.path.isabs(basename): + basename = os.path.join(prefix, basename) + if 'dsv' in extensions: + # process dsv files recursively + commands += process_dsv_file( + basename + '.dsv', prefix, primary_extension=primary_extension, + additional_extension=additional_extension) + elif primary_extension in extensions and len(extensions) == 1: + # source primary-only files + commands += [ + FORMAT_STR_INVOKE_SCRIPT.format_map({ + 'prefix': prefix, + 'script_path': basename + '.' + primary_extension})] + elif additional_extension in extensions: + # source non-primary files + commands += [ + FORMAT_STR_INVOKE_SCRIPT.format_map({ + 'prefix': prefix, + 'script_path': basename + '.' + additional_extension})] + + return commands + + +def handle_dsv_types_except_source(type_, remainder, prefix): + commands = [] + if type_ in (DSV_TYPE_SET, DSV_TYPE_SET_IF_UNSET): + try: + env_name, value = remainder.split(';', 1) + except ValueError: + raise RuntimeError( + "doesn't contain a semicolon separating the environment name " + 'from the value') + try_prefixed_value = os.path.join(prefix, value) if value else prefix + if os.path.exists(try_prefixed_value): + value = try_prefixed_value + if type_ == DSV_TYPE_SET: + commands += _set(env_name, value) + elif type_ == DSV_TYPE_SET_IF_UNSET: + commands += _set_if_unset(env_name, value) + else: + assert False + elif type_ in ( + DSV_TYPE_APPEND_NON_DUPLICATE, + DSV_TYPE_PREPEND_NON_DUPLICATE, + DSV_TYPE_PREPEND_NON_DUPLICATE_IF_EXISTS + ): + try: + env_name_and_values = remainder.split(';') + except ValueError: + raise RuntimeError( + "doesn't contain a semicolon separating the environment name " + 'from the values') + env_name = env_name_and_values[0] + values = env_name_and_values[1:] + for value in values: + if not value: + value = prefix + elif not os.path.isabs(value): + value = os.path.join(prefix, value) + if ( + type_ == DSV_TYPE_PREPEND_NON_DUPLICATE_IF_EXISTS and + not os.path.exists(value) + ): + comment = f'skip extending {env_name} with not existing ' \ + f'path: {value}' + if _include_comments(): + commands.append( + FORMAT_STR_COMMENT_LINE.format_map({'comment': comment})) + elif type_ == DSV_TYPE_APPEND_NON_DUPLICATE: + commands += _append_unique_value(env_name, value) + else: + commands += _prepend_unique_value(env_name, value) + else: + raise RuntimeError( + 'contains an unknown environment hook type: ' + type_) + return commands + + +env_state = {} + + +def _append_unique_value(name, value): + global env_state + if name not in env_state: + if os.environ.get(name): + env_state[name] = set(os.environ[name].split(os.pathsep)) + else: + env_state[name] = set() + # append even if the variable has not been set yet, in case a shell script sets the + # same variable without the knowledge of this Python script. + # later _remove_ending_separators() will cleanup any unintentional leading separator + extend = FORMAT_STR_USE_ENV_VAR.format_map({'name': name}) + os.pathsep + line = FORMAT_STR_SET_ENV_VAR.format_map( + {'name': name, 'value': extend + value}) + if value not in env_state[name]: + env_state[name].add(value) + else: + if not _include_comments(): + return [] + line = FORMAT_STR_COMMENT_LINE.format_map({'comment': line}) + return [line] + + +def _prepend_unique_value(name, value): + global env_state + if name not in env_state: + if os.environ.get(name): + env_state[name] = set(os.environ[name].split(os.pathsep)) + else: + env_state[name] = set() + # prepend even if the variable has not been set yet, in case a shell script sets the + # same variable without the knowledge of this Python script. + # later _remove_ending_separators() will cleanup any unintentional trailing separator + extend = os.pathsep + FORMAT_STR_USE_ENV_VAR.format_map({'name': name}) + line = FORMAT_STR_SET_ENV_VAR.format_map( + {'name': name, 'value': value + extend}) + if value not in env_state[name]: + env_state[name].add(value) + else: + if not _include_comments(): + return [] + line = FORMAT_STR_COMMENT_LINE.format_map({'comment': line}) + return [line] + + +# generate commands for removing prepended underscores +def _remove_ending_separators(): + # do nothing if the shell extension does not implement the logic + if FORMAT_STR_REMOVE_TRAILING_SEPARATOR is None: + return [] + + global env_state + commands = [] + for name in env_state: + # skip variables that already had values before this script started prepending + if name in os.environ: + continue + commands += [ + FORMAT_STR_REMOVE_LEADING_SEPARATOR.format_map({'name': name}), + FORMAT_STR_REMOVE_TRAILING_SEPARATOR.format_map({'name': name})] + return commands + + +def _set(name, value): + global env_state + env_state[name] = value + line = FORMAT_STR_SET_ENV_VAR.format_map( + {'name': name, 'value': value}) + return [line] + + +def _set_if_unset(name, value): + global env_state + line = FORMAT_STR_SET_ENV_VAR.format_map( + {'name': name, 'value': value}) + if env_state.get(name, os.environ.get(name)): + line = FORMAT_STR_COMMENT_LINE.format_map({'comment': line}) + return [line] + + +if __name__ == '__main__': # pragma: no cover + try: + rc = main() + except RuntimeError as e: + print(str(e), file=sys.stderr) + rc = 1 + sys.exit(rc) diff --git a/deploy/robot_ws/install/go2py_node/lib/go2py_node/bridge b/deploy/robot_ws/install/go2py_node/lib/go2py_node/bridge new file mode 100755 index 0000000..71d6ee2 Binary files /dev/null and b/deploy/robot_ws/install/go2py_node/lib/go2py_node/bridge differ diff --git a/deploy/robot_ws/install/go2py_node/share/ament_index/resource_index/package_run_dependencies/go2py_node b/deploy/robot_ws/install/go2py_node/share/ament_index/resource_index/package_run_dependencies/go2py_node new file mode 100644 index 0000000..ce14ac7 --- /dev/null +++ b/deploy/robot_ws/install/go2py_node/share/ament_index/resource_index/package_run_dependencies/go2py_node @@ -0,0 +1 @@ +unitree_go;unitree_api;rclcpp;std_msgs;rosbag2_cpp;ament_lint_auto;ament_lint_common \ No newline at end of file diff --git a/deploy/robot_ws/install/go2py_node/share/ament_index/resource_index/packages/go2py_node b/deploy/robot_ws/install/go2py_node/share/ament_index/resource_index/packages/go2py_node new file mode 100644 index 0000000..e69de29 diff --git a/deploy/robot_ws/install/go2py_node/share/ament_index/resource_index/parent_prefix_path/go2py_node b/deploy/robot_ws/install/go2py_node/share/ament_index/resource_index/parent_prefix_path/go2py_node new file mode 100644 index 0000000..e053138 --- /dev/null +++ b/deploy/robot_ws/install/go2py_node/share/ament_index/resource_index/parent_prefix_path/go2py_node @@ -0,0 +1 @@ +/home/unitree/locomotion/Go2Py/deploy/ros2_ws/install/go2py_node:/home/unitree/locomotion/Go2Py/deploy/ros2_ws/install/unitree_go:/home/unitree/locomotion/Go2Py/deploy/ros2_ws/install/unitree_api:/home/unitree/locomotion/Go2Py/deploy/ros2_ws/install/hesai_ros_driver:/home/unitree/locomotion/unitree_ros2/cyclonedds_ws/install/unitree_go:/home/unitree/locomotion/unitree_ros2/cyclonedds_ws/install/unitree_api:/home/unitree/locomotion/unitree_ros2/cyclonedds_ws/install/rmw_cyclonedds_cpp:/opt/ros/foxy \ No newline at end of file diff --git a/deploy/robot_ws/install/go2py_node/share/colcon-core/packages/go2py_node b/deploy/robot_ws/install/go2py_node/share/colcon-core/packages/go2py_node new file mode 100644 index 0000000..006e304 --- /dev/null +++ b/deploy/robot_ws/install/go2py_node/share/colcon-core/packages/go2py_node @@ -0,0 +1 @@ +rclcpp:rosbag2_cpp:std_msgs:unitree_api:unitree_go \ No newline at end of file diff --git a/deploy/robot_ws/install/go2py_node/share/go2py_node/cmake/go2py_nodeConfig-version.cmake b/deploy/robot_ws/install/go2py_node/share/go2py_node/cmake/go2py_nodeConfig-version.cmake new file mode 100644 index 0000000..7beb732 --- /dev/null +++ b/deploy/robot_ws/install/go2py_node/share/go2py_node/cmake/go2py_nodeConfig-version.cmake @@ -0,0 +1,14 @@ +# generated from ament/cmake/core/templates/nameConfig-version.cmake.in +set(PACKAGE_VERSION "0.0.0") + +set(PACKAGE_VERSION_EXACT False) +set(PACKAGE_VERSION_COMPATIBLE False) + +if("${PACKAGE_FIND_VERSION}" VERSION_EQUAL "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_EXACT True) + set(PACKAGE_VERSION_COMPATIBLE True) +endif() + +if("${PACKAGE_FIND_VERSION}" VERSION_LESS "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_COMPATIBLE True) +endif() diff --git a/deploy/robot_ws/install/go2py_node/share/go2py_node/cmake/go2py_nodeConfig.cmake b/deploy/robot_ws/install/go2py_node/share/go2py_node/cmake/go2py_nodeConfig.cmake new file mode 100644 index 0000000..bbfd2f5 --- /dev/null +++ b/deploy/robot_ws/install/go2py_node/share/go2py_node/cmake/go2py_nodeConfig.cmake @@ -0,0 +1,42 @@ +# generated from ament/cmake/core/templates/nameConfig.cmake.in + +# prevent multiple inclusion +if(_go2py_node_CONFIG_INCLUDED) + # ensure to keep the found flag the same + if(NOT DEFINED go2py_node_FOUND) + # explicitly set it to FALSE, otherwise CMake will set it to TRUE + set(go2py_node_FOUND FALSE) + elseif(NOT go2py_node_FOUND) + # use separate condition to avoid uninitialized variable warning + set(go2py_node_FOUND FALSE) + endif() + return() +endif() +set(_go2py_node_CONFIG_INCLUDED TRUE) + +# output package information +if(NOT go2py_node_FIND_QUIETLY) + message(STATUS "Found go2py_node: 0.0.0 (${go2py_node_DIR})") +endif() + +# warn when using a deprecated package +if(NOT "" STREQUAL "") + set(_msg "Package 'go2py_node' is deprecated") + # append custom deprecation text if available + if(NOT "" STREQUAL "TRUE") + set(_msg "${_msg} ()") + endif() + # optionally quiet the deprecation message + if(NOT ${go2py_node_DEPRECATED_QUIET}) + message(DEPRECATION "${_msg}") + endif() +endif() + +# flag package as ament-based to distinguish it after being find_package()-ed +set(go2py_node_FOUND_AMENT_PACKAGE TRUE) + +# include all config extra files +set(_extras "") +foreach(_extra ${_extras}) + include("${go2py_node_DIR}/${_extra}") +endforeach() diff --git a/deploy/robot_ws/install/go2py_node/share/go2py_node/environment/ament_prefix_path.dsv b/deploy/robot_ws/install/go2py_node/share/go2py_node/environment/ament_prefix_path.dsv new file mode 100644 index 0000000..79d4c95 --- /dev/null +++ b/deploy/robot_ws/install/go2py_node/share/go2py_node/environment/ament_prefix_path.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;AMENT_PREFIX_PATH; diff --git a/deploy/robot_ws/install/go2py_node/share/go2py_node/environment/ament_prefix_path.sh b/deploy/robot_ws/install/go2py_node/share/go2py_node/environment/ament_prefix_path.sh new file mode 100644 index 0000000..02e441b --- /dev/null +++ b/deploy/robot_ws/install/go2py_node/share/go2py_node/environment/ament_prefix_path.sh @@ -0,0 +1,4 @@ +# copied from +# ament_cmake_core/cmake/environment_hooks/environment/ament_prefix_path.sh + +ament_prepend_unique_value AMENT_PREFIX_PATH "$AMENT_CURRENT_PREFIX" diff --git a/deploy/robot_ws/install/go2py_node/share/go2py_node/environment/path.dsv b/deploy/robot_ws/install/go2py_node/share/go2py_node/environment/path.dsv new file mode 100644 index 0000000..b94426a --- /dev/null +++ b/deploy/robot_ws/install/go2py_node/share/go2py_node/environment/path.dsv @@ -0,0 +1 @@ +prepend-non-duplicate-if-exists;PATH;bin diff --git a/deploy/robot_ws/install/go2py_node/share/go2py_node/environment/path.sh b/deploy/robot_ws/install/go2py_node/share/go2py_node/environment/path.sh new file mode 100644 index 0000000..e59b749 --- /dev/null +++ b/deploy/robot_ws/install/go2py_node/share/go2py_node/environment/path.sh @@ -0,0 +1,5 @@ +# copied from ament_cmake_core/cmake/environment_hooks/environment/path.sh + +if [ -d "$AMENT_CURRENT_PREFIX/bin" ]; then + ament_prepend_unique_value PATH "$AMENT_CURRENT_PREFIX/bin" +fi diff --git a/deploy/robot_ws/install/go2py_node/share/go2py_node/hook/cmake_prefix_path.dsv b/deploy/robot_ws/install/go2py_node/share/go2py_node/hook/cmake_prefix_path.dsv new file mode 100644 index 0000000..e119f32 --- /dev/null +++ b/deploy/robot_ws/install/go2py_node/share/go2py_node/hook/cmake_prefix_path.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;CMAKE_PREFIX_PATH; diff --git a/deploy/robot_ws/install/go2py_node/share/go2py_node/hook/cmake_prefix_path.ps1 b/deploy/robot_ws/install/go2py_node/share/go2py_node/hook/cmake_prefix_path.ps1 new file mode 100644 index 0000000..d03facc --- /dev/null +++ b/deploy/robot_ws/install/go2py_node/share/go2py_node/hook/cmake_prefix_path.ps1 @@ -0,0 +1,3 @@ +# generated from colcon_powershell/shell/template/hook_prepend_value.ps1.em + +colcon_prepend_unique_value CMAKE_PREFIX_PATH "$env:COLCON_CURRENT_PREFIX" diff --git a/deploy/robot_ws/install/go2py_node/share/go2py_node/hook/cmake_prefix_path.sh b/deploy/robot_ws/install/go2py_node/share/go2py_node/hook/cmake_prefix_path.sh new file mode 100644 index 0000000..a948e68 --- /dev/null +++ b/deploy/robot_ws/install/go2py_node/share/go2py_node/hook/cmake_prefix_path.sh @@ -0,0 +1,3 @@ +# generated from colcon_core/shell/template/hook_prepend_value.sh.em + +_colcon_prepend_unique_value CMAKE_PREFIX_PATH "$COLCON_CURRENT_PREFIX" diff --git a/deploy/robot_ws/install/go2py_node/share/go2py_node/local_setup.bash b/deploy/robot_ws/install/go2py_node/share/go2py_node/local_setup.bash new file mode 100644 index 0000000..49782f2 --- /dev/null +++ b/deploy/robot_ws/install/go2py_node/share/go2py_node/local_setup.bash @@ -0,0 +1,46 @@ +# generated from ament_package/template/package_level/local_setup.bash.in + +# source local_setup.sh from same directory as this file +_this_path=$(builtin cd "`dirname "${BASH_SOURCE[0]}"`" && pwd) +# provide AMENT_CURRENT_PREFIX to shell script +AMENT_CURRENT_PREFIX=$(builtin cd "`dirname "${BASH_SOURCE[0]}"`/../.." && pwd) +# store AMENT_CURRENT_PREFIX to restore it before each environment hook +_package_local_setup_AMENT_CURRENT_PREFIX=$AMENT_CURRENT_PREFIX + +# trace output +if [ -n "$AMENT_TRACE_SETUP_FILES" ]; then + echo "# . \"$_this_path/local_setup.sh\"" +fi +. "$_this_path/local_setup.sh" +unset _this_path + +# unset AMENT_ENVIRONMENT_HOOKS +# if not appending to them for return +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + unset AMENT_ENVIRONMENT_HOOKS +fi + +# restore AMENT_CURRENT_PREFIX before evaluating the environment hooks +AMENT_CURRENT_PREFIX=$_package_local_setup_AMENT_CURRENT_PREFIX +# list all environment hooks of this package + +# source all shell-specific environment hooks of this package +# if not returning them +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + _package_local_setup_IFS=$IFS + IFS=":" + for _hook in $AMENT_ENVIRONMENT_HOOKS; do + # restore AMENT_CURRENT_PREFIX for each environment hook + AMENT_CURRENT_PREFIX=$_package_local_setup_AMENT_CURRENT_PREFIX + # restore IFS before sourcing other files + IFS=$_package_local_setup_IFS + . "$_hook" + done + unset _hook + IFS=$_package_local_setup_IFS + unset _package_local_setup_IFS + unset AMENT_ENVIRONMENT_HOOKS +fi + +unset _package_local_setup_AMENT_CURRENT_PREFIX +unset AMENT_CURRENT_PREFIX diff --git a/deploy/robot_ws/install/go2py_node/share/go2py_node/local_setup.dsv b/deploy/robot_ws/install/go2py_node/share/go2py_node/local_setup.dsv new file mode 100644 index 0000000..aaca281 --- /dev/null +++ b/deploy/robot_ws/install/go2py_node/share/go2py_node/local_setup.dsv @@ -0,0 +1,2 @@ +source;share/go2py_node/environment/ament_prefix_path.sh +source;share/go2py_node/environment/path.sh diff --git a/deploy/robot_ws/install/go2py_node/share/go2py_node/local_setup.sh b/deploy/robot_ws/install/go2py_node/share/go2py_node/local_setup.sh new file mode 100644 index 0000000..12d43c3 --- /dev/null +++ b/deploy/robot_ws/install/go2py_node/share/go2py_node/local_setup.sh @@ -0,0 +1,133 @@ +# generated from ament_package/template/package_level/local_setup.sh.in + +# since this file is sourced use either the provided AMENT_CURRENT_PREFIX +# or fall back to the destination set at configure time +: ${AMENT_CURRENT_PREFIX:="/home/unitree/locomotion/Go2Py/deploy/ros2_ws/install/go2py_node"} +if [ ! -d "$AMENT_CURRENT_PREFIX" ]; then + if [ -z "$COLCON_CURRENT_PREFIX" ]; then + echo "The compile time prefix path '$AMENT_CURRENT_PREFIX' doesn't " \ + "exist. Consider sourcing a different extension than '.sh'." 1>&2 + else + AMENT_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" + fi +fi + +# function to append values to environment variables +# using colons as separators and avoiding leading separators +ament_append_value() { + # arguments + _listname="$1" + _value="$2" + #echo "listname $_listname" + #eval echo "list value \$$_listname" + #echo "value $_value" + + # avoid leading separator + eval _values=\"\$$_listname\" + if [ -z "$_values" ]; then + eval export $_listname=\"$_value\" + #eval echo "set list \$$_listname" + else + # field separator must not be a colon + _ament_append_value_IFS=$IFS + unset IFS + eval export $_listname=\"\$$_listname:$_value\" + #eval echo "append list \$$_listname" + IFS=$_ament_append_value_IFS + unset _ament_append_value_IFS + fi + unset _values + + unset _value + unset _listname +} + +# function to prepend non-duplicate values to environment variables +# using colons as separators and avoiding trailing separators +ament_prepend_unique_value() { + # arguments + _listname="$1" + _value="$2" + #echo "listname $_listname" + #eval echo "list value \$$_listname" + #echo "value $_value" + + # check if the list contains the value + eval _values=\"\$$_listname\" + _duplicate= + _ament_prepend_unique_value_IFS=$IFS + IFS=":" + if [ "$AMENT_SHELL" = "zsh" ]; then + ament_zsh_to_array _values + fi + for _item in $_values; do + # ignore empty strings + if [ -z "$_item" ]; then + continue + fi + if [ "$_item" = "$_value" ]; then + _duplicate=1 + fi + done + unset _item + + # prepend only non-duplicates + if [ -z "$_duplicate" ]; then + # avoid trailing separator + if [ -z "$_values" ]; then + eval export $_listname=\"$_value\" + #eval echo "set list \$$_listname" + else + # field separator must not be a colon + unset IFS + eval export $_listname=\"$_value:\$$_listname\" + #eval echo "prepend list \$$_listname" + fi + fi + IFS=$_ament_prepend_unique_value_IFS + unset _ament_prepend_unique_value_IFS + unset _duplicate + unset _values + + unset _value + unset _listname +} + +# unset AMENT_ENVIRONMENT_HOOKS +# if not appending to them for return +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + unset AMENT_ENVIRONMENT_HOOKS +fi + +# list all environment hooks of this package +ament_append_value AMENT_ENVIRONMENT_HOOKS "$AMENT_CURRENT_PREFIX/share/go2py_node/environment/ament_prefix_path.sh" +ament_append_value AMENT_ENVIRONMENT_HOOKS "$AMENT_CURRENT_PREFIX/share/go2py_node/environment/path.sh" + +# source all shell-specific environment hooks of this package +# if not returning them +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + _package_local_setup_IFS=$IFS + IFS=":" + if [ "$AMENT_SHELL" = "zsh" ]; then + ament_zsh_to_array AMENT_ENVIRONMENT_HOOKS + fi + for _hook in $AMENT_ENVIRONMENT_HOOKS; do + if [ -f "$_hook" ]; then + # restore IFS before sourcing other files + IFS=$_package_local_setup_IFS + # trace output + if [ -n "$AMENT_TRACE_SETUP_FILES" ]; then + echo "# . \"$_hook\"" + fi + . "$_hook" + fi + done + unset _hook + IFS=$_package_local_setup_IFS + unset _package_local_setup_IFS + unset AMENT_ENVIRONMENT_HOOKS +fi + +# reset AMENT_CURRENT_PREFIX after each package +# allowing to source multiple package-level setup files +unset AMENT_CURRENT_PREFIX diff --git a/deploy/robot_ws/install/go2py_node/share/go2py_node/local_setup.zsh b/deploy/robot_ws/install/go2py_node/share/go2py_node/local_setup.zsh new file mode 100644 index 0000000..fe161be --- /dev/null +++ b/deploy/robot_ws/install/go2py_node/share/go2py_node/local_setup.zsh @@ -0,0 +1,59 @@ +# generated from ament_package/template/package_level/local_setup.zsh.in + +AMENT_SHELL=zsh + +# source local_setup.sh from same directory as this file +_this_path=$(builtin cd -q "`dirname "${(%):-%N}"`" > /dev/null && pwd) +# provide AMENT_CURRENT_PREFIX to shell script +AMENT_CURRENT_PREFIX=$(builtin cd -q "`dirname "${(%):-%N}"`/../.." > /dev/null && pwd) +# store AMENT_CURRENT_PREFIX to restore it before each environment hook +_package_local_setup_AMENT_CURRENT_PREFIX=$AMENT_CURRENT_PREFIX + +# function to convert array-like strings into arrays +# to wordaround SH_WORD_SPLIT not being set +ament_zsh_to_array() { + local _listname=$1 + local _dollar="$" + local _split="{=" + local _to_array="(\"$_dollar$_split$_listname}\")" + eval $_listname=$_to_array +} + +# trace output +if [ -n "$AMENT_TRACE_SETUP_FILES" ]; then + echo "# . \"$_this_path/local_setup.sh\"" +fi +# the package-level local_setup file unsets AMENT_CURRENT_PREFIX +. "$_this_path/local_setup.sh" +unset _this_path + +# unset AMENT_ENVIRONMENT_HOOKS +# if not appending to them for return +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + unset AMENT_ENVIRONMENT_HOOKS +fi + +# restore AMENT_CURRENT_PREFIX before evaluating the environment hooks +AMENT_CURRENT_PREFIX=$_package_local_setup_AMENT_CURRENT_PREFIX +# list all environment hooks of this package + +# source all shell-specific environment hooks of this package +# if not returning them +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + _package_local_setup_IFS=$IFS + IFS=":" + for _hook in $AMENT_ENVIRONMENT_HOOKS; do + # restore AMENT_CURRENT_PREFIX for each environment hook + AMENT_CURRENT_PREFIX=$_package_local_setup_AMENT_CURRENT_PREFIX + # restore IFS before sourcing other files + IFS=$_package_local_setup_IFS + . "$_hook" + done + unset _hook + IFS=$_package_local_setup_IFS + unset _package_local_setup_IFS + unset AMENT_ENVIRONMENT_HOOKS +fi + +unset _package_local_setup_AMENT_CURRENT_PREFIX +unset AMENT_CURRENT_PREFIX diff --git a/deploy/robot_ws/install/go2py_node/share/go2py_node/package.bash b/deploy/robot_ws/install/go2py_node/share/go2py_node/package.bash new file mode 100644 index 0000000..a6bf720 --- /dev/null +++ b/deploy/robot_ws/install/go2py_node/share/go2py_node/package.bash @@ -0,0 +1,39 @@ +# generated from colcon_bash/shell/template/package.bash.em + +# This script extends the environment for this package. + +# a bash script is able to determine its own path if necessary +if [ -z "$COLCON_CURRENT_PREFIX" ]; then + # the prefix is two levels up from the package specific share directory + _colcon_package_bash_COLCON_CURRENT_PREFIX="$(builtin cd "`dirname "${BASH_SOURCE[0]}"`/../.." > /dev/null && pwd)" +else + _colcon_package_bash_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" +fi + +# function to source another script with conditional trace output +# first argument: the path of the script +# additional arguments: arguments to the script +_colcon_package_bash_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo "# . \"$1\"" + fi + . "$@" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# source sh script of this package +_colcon_package_bash_source_script "$_colcon_package_bash_COLCON_CURRENT_PREFIX/share/go2py_node/package.sh" + +# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced scripts +COLCON_CURRENT_PREFIX="$_colcon_package_bash_COLCON_CURRENT_PREFIX" + +# source bash hooks +_colcon_package_bash_source_script "$COLCON_CURRENT_PREFIX/share/go2py_node/local_setup.bash" + +unset COLCON_CURRENT_PREFIX + +unset _colcon_package_bash_source_script +unset _colcon_package_bash_COLCON_CURRENT_PREFIX diff --git a/deploy/robot_ws/install/go2py_node/share/go2py_node/package.dsv b/deploy/robot_ws/install/go2py_node/share/go2py_node/package.dsv new file mode 100644 index 0000000..2a99b11 --- /dev/null +++ b/deploy/robot_ws/install/go2py_node/share/go2py_node/package.dsv @@ -0,0 +1,8 @@ +source;share/go2py_node/hook/cmake_prefix_path.ps1 +source;share/go2py_node/hook/cmake_prefix_path.dsv +source;share/go2py_node/hook/cmake_prefix_path.sh +source;share/go2py_node/local_setup.bash +source;share/go2py_node/local_setup.dsv +source;share/go2py_node/local_setup.ps1 +source;share/go2py_node/local_setup.sh +source;share/go2py_node/local_setup.zsh diff --git a/deploy/robot_ws/install/go2py_node/share/go2py_node/package.ps1 b/deploy/robot_ws/install/go2py_node/share/go2py_node/package.ps1 new file mode 100644 index 0000000..5b7f9fc --- /dev/null +++ b/deploy/robot_ws/install/go2py_node/share/go2py_node/package.ps1 @@ -0,0 +1,116 @@ +# generated from colcon_powershell/shell/template/package.ps1.em + +# function to append a value to a variable +# which uses colons as separators +# duplicates as well as leading separators are avoided +# first argument: the name of the result variable +# second argument: the value to be prepended +function colcon_append_unique_value { + param ( + $_listname, + $_value + ) + + # get values from variable + if (Test-Path Env:$_listname) { + $_values=(Get-Item env:$_listname).Value + } else { + $_values="" + } + $_duplicate="" + # start with no values + $_all_values="" + # iterate over existing values in the variable + if ($_values) { + $_values.Split(";") | ForEach { + # not an empty string + if ($_) { + # not a duplicate of _value + if ($_ -eq $_value) { + $_duplicate="1" + } + if ($_all_values) { + $_all_values="${_all_values};$_" + } else { + $_all_values="$_" + } + } + } + } + # append only non-duplicates + if (!$_duplicate) { + # avoid leading separator + if ($_all_values) { + $_all_values="${_all_values};${_value}" + } else { + $_all_values="${_value}" + } + } + + # export the updated variable + Set-Item env:\$_listname -Value "$_all_values" +} + +# function to prepend a value to a variable +# which uses colons as separators +# duplicates as well as trailing separators are avoided +# first argument: the name of the result variable +# second argument: the value to be prepended +function colcon_prepend_unique_value { + param ( + $_listname, + $_value + ) + + # get values from variable + if (Test-Path Env:$_listname) { + $_values=(Get-Item env:$_listname).Value + } else { + $_values="" + } + # start with the new value + $_all_values="$_value" + # iterate over existing values in the variable + if ($_values) { + $_values.Split(";") | ForEach { + # not an empty string + if ($_) { + # not a duplicate of _value + if ($_ -ne $_value) { + # keep non-duplicate values + $_all_values="${_all_values};$_" + } + } + } + } + # export the updated variable + Set-Item env:\$_listname -Value "$_all_values" +} + +# function to source another script with conditional trace output +# first argument: the path of the script +# additional arguments: arguments to the script +function colcon_package_source_powershell_script { + param ( + $_colcon_package_source_powershell_script + ) + # source script with conditional trace output + if (Test-Path $_colcon_package_source_powershell_script) { + if ($env:COLCON_TRACE) { + echo ". '$_colcon_package_source_powershell_script'" + } + . "$_colcon_package_source_powershell_script" + } else { + Write-Error "not found: '$_colcon_package_source_powershell_script'" + } +} + + +# a powershell script is able to determine its own path +# the prefix is two levels up from the package specific share directory +$env:COLCON_CURRENT_PREFIX=(Get-Item $PSCommandPath).Directory.Parent.Parent.FullName + +colcon_package_source_powershell_script "$env:COLCON_CURRENT_PREFIX\share/go2py_node/hook/cmake_prefix_path.ps1" +colcon_package_source_powershell_script "$env:COLCON_CURRENT_PREFIX\share/go2py_node/local_setup.ps1" + +Remove-Item Env:\COLCON_CURRENT_PREFIX diff --git a/deploy/robot_ws/install/go2py_node/share/go2py_node/package.sh b/deploy/robot_ws/install/go2py_node/share/go2py_node/package.sh new file mode 100644 index 0000000..eb4eb87 --- /dev/null +++ b/deploy/robot_ws/install/go2py_node/share/go2py_node/package.sh @@ -0,0 +1,87 @@ +# generated from colcon_core/shell/template/package.sh.em + +# This script extends the environment for this package. + +# function to prepend a value to a variable +# which uses colons as separators +# duplicates as well as trailing separators are avoided +# first argument: the name of the result variable +# second argument: the value to be prepended +_colcon_prepend_unique_value() { + # arguments + _listname="$1" + _value="$2" + + # get values from variable + eval _values=\"\$$_listname\" + # backup the field separator + _colcon_prepend_unique_value_IFS=$IFS + IFS=":" + # start with the new value + _all_values="$_value" + # workaround SH_WORD_SPLIT not being set in zsh + if [ "$(command -v colcon_zsh_convert_to_array)" ]; then + colcon_zsh_convert_to_array _values + fi + # iterate over existing values in the variable + for _item in $_values; do + # ignore empty strings + if [ -z "$_item" ]; then + continue + fi + # ignore duplicates of _value + if [ "$_item" = "$_value" ]; then + continue + fi + # keep non-duplicate values + _all_values="$_all_values:$_item" + done + unset _item + # restore the field separator + IFS=$_colcon_prepend_unique_value_IFS + unset _colcon_prepend_unique_value_IFS + # export the updated variable + eval export $_listname=\"$_all_values\" + unset _all_values + unset _values + + unset _value + unset _listname +} + +# since a plain shell script can't determine its own path when being sourced +# either use the provided COLCON_CURRENT_PREFIX +# or fall back to the build time prefix (if it exists) +_colcon_package_sh_COLCON_CURRENT_PREFIX="/home/unitree/locomotion/Go2Py/deploy/ros2_ws/install/go2py_node" +if [ -z "$COLCON_CURRENT_PREFIX" ]; then + if [ ! -d "$_colcon_package_sh_COLCON_CURRENT_PREFIX" ]; then + echo "The build time path \"$_colcon_package_sh_COLCON_CURRENT_PREFIX\" doesn't exist. Either source a script for a different shell or set the environment variable \"COLCON_CURRENT_PREFIX\" explicitly." 1>&2 + unset _colcon_package_sh_COLCON_CURRENT_PREFIX + return 1 + fi + COLCON_CURRENT_PREFIX="$_colcon_package_sh_COLCON_CURRENT_PREFIX" +fi +unset _colcon_package_sh_COLCON_CURRENT_PREFIX + +# function to source another script with conditional trace output +# first argument: the path of the script +# additional arguments: arguments to the script +_colcon_package_sh_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo "# . \"$1\"" + fi + . "$@" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# source sh hooks +_colcon_package_sh_source_script "$COLCON_CURRENT_PREFIX/share/go2py_node/hook/cmake_prefix_path.sh" +_colcon_package_sh_source_script "$COLCON_CURRENT_PREFIX/share/go2py_node/local_setup.sh" + +unset _colcon_package_sh_source_script +unset COLCON_CURRENT_PREFIX + +# do not unset _colcon_prepend_unique_value since it might be used by non-primary shell hooks diff --git a/deploy/robot_ws/install/go2py_node/share/go2py_node/package.xml b/deploy/robot_ws/install/go2py_node/share/go2py_node/package.xml new file mode 100644 index 0000000..edb456d --- /dev/null +++ b/deploy/robot_ws/install/go2py_node/share/go2py_node/package.xml @@ -0,0 +1,24 @@ + + + + go2py_node + 0.0.0 + TODO: Package description + zeen + TODO: License declaration + + ament_cmake + + unitree_go + unitree_api + rclcpp + std_msgs + rosbag2_cpp + + ament_lint_auto + ament_lint_common + + + ament_cmake + + diff --git a/deploy/robot_ws/install/go2py_node/share/go2py_node/package.zsh b/deploy/robot_ws/install/go2py_node/share/go2py_node/package.zsh new file mode 100644 index 0000000..650d599 --- /dev/null +++ b/deploy/robot_ws/install/go2py_node/share/go2py_node/package.zsh @@ -0,0 +1,50 @@ +# generated from colcon_zsh/shell/template/package.zsh.em + +# This script extends the environment for this package. + +# a zsh script is able to determine its own path if necessary +if [ -z "$COLCON_CURRENT_PREFIX" ]; then + # the prefix is two levels up from the package specific share directory + _colcon_package_zsh_COLCON_CURRENT_PREFIX="$(builtin cd -q "`dirname "${(%):-%N}"`/../.." > /dev/null && pwd)" +else + _colcon_package_zsh_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" +fi + +# function to source another script with conditional trace output +# first argument: the path of the script +# additional arguments: arguments to the script +_colcon_package_zsh_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo "# . \"$1\"" + fi + . "$@" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# function to convert array-like strings into arrays +# to workaround SH_WORD_SPLIT not being set +colcon_zsh_convert_to_array() { + local _listname=$1 + local _dollar="$" + local _split="{=" + local _to_array="(\"$_dollar$_split$_listname}\")" + eval $_listname=$_to_array +} + +# source sh script of this package +_colcon_package_zsh_source_script "$_colcon_package_zsh_COLCON_CURRENT_PREFIX/share/go2py_node/package.sh" +unset convert_zsh_to_array + +# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced scripts +COLCON_CURRENT_PREFIX="$_colcon_package_zsh_COLCON_CURRENT_PREFIX" + +# source zsh hooks +_colcon_package_zsh_source_script "$COLCON_CURRENT_PREFIX/share/go2py_node/local_setup.zsh" + +unset COLCON_CURRENT_PREFIX + +unset _colcon_package_zsh_source_script +unset _colcon_package_zsh_COLCON_CURRENT_PREFIX diff --git a/deploy/robot_ws/install/local_setup.bash b/deploy/robot_ws/install/local_setup.bash new file mode 100644 index 0000000..03f0025 --- /dev/null +++ b/deploy/robot_ws/install/local_setup.bash @@ -0,0 +1,121 @@ +# generated from colcon_bash/shell/template/prefix.bash.em + +# This script extends the environment with all packages contained in this +# prefix path. + +# a bash script is able to determine its own path if necessary +if [ -z "$COLCON_CURRENT_PREFIX" ]; then + _colcon_prefix_bash_COLCON_CURRENT_PREFIX="$(builtin cd "`dirname "${BASH_SOURCE[0]}"`" > /dev/null && pwd)" +else + _colcon_prefix_bash_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" +fi + +# function to prepend a value to a variable +# which uses colons as separators +# duplicates as well as trailing separators are avoided +# first argument: the name of the result variable +# second argument: the value to be prepended +_colcon_prefix_bash_prepend_unique_value() { + # arguments + _listname="$1" + _value="$2" + + # get values from variable + eval _values=\"\$$_listname\" + # backup the field separator + _colcon_prefix_bash_prepend_unique_value_IFS="$IFS" + IFS=":" + # start with the new value + _all_values="$_value" + _contained_value="" + # iterate over existing values in the variable + for _item in $_values; do + # ignore empty strings + if [ -z "$_item" ]; then + continue + fi + # ignore duplicates of _value + if [ "$_item" = "$_value" ]; then + _contained_value=1 + continue + fi + # keep non-duplicate values + _all_values="$_all_values:$_item" + done + unset _item + if [ -z "$_contained_value" ]; then + if [ -n "$COLCON_TRACE" ]; then + if [ "$_all_values" = "$_value" ]; then + echo "export $_listname=$_value" + else + echo "export $_listname=$_value:\$$_listname" + fi + fi + fi + unset _contained_value + # restore the field separator + IFS="$_colcon_prefix_bash_prepend_unique_value_IFS" + unset _colcon_prefix_bash_prepend_unique_value_IFS + # export the updated variable + eval export $_listname=\"$_all_values\" + unset _all_values + unset _values + + unset _value + unset _listname +} + +# add this prefix to the COLCON_PREFIX_PATH +_colcon_prefix_bash_prepend_unique_value COLCON_PREFIX_PATH "$_colcon_prefix_bash_COLCON_CURRENT_PREFIX" +unset _colcon_prefix_bash_prepend_unique_value + +# check environment variable for custom Python executable +if [ -n "$COLCON_PYTHON_EXECUTABLE" ]; then + if [ ! -f "$COLCON_PYTHON_EXECUTABLE" ]; then + echo "error: COLCON_PYTHON_EXECUTABLE '$COLCON_PYTHON_EXECUTABLE' doesn't exist" + return 1 + fi + _colcon_python_executable="$COLCON_PYTHON_EXECUTABLE" +else + # try the Python executable known at configure time + _colcon_python_executable="/usr/bin/python3" + # if it doesn't exist try a fall back + if [ ! -f "$_colcon_python_executable" ]; then + if ! /usr/bin/env python3 --version > /dev/null 2> /dev/null; then + echo "error: unable to find python3 executable" + return 1 + fi + _colcon_python_executable=`/usr/bin/env python3 -c "import sys; print(sys.executable)"` + fi +fi + +# function to source another script with conditional trace output +# first argument: the path of the script +_colcon_prefix_sh_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo "# . \"$1\"" + fi + . "$1" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# get all commands in topological order +_colcon_ordered_commands="$($_colcon_python_executable "$_colcon_prefix_bash_COLCON_CURRENT_PREFIX/_local_setup_util_sh.py" sh bash)" +unset _colcon_python_executable +if [ -n "$COLCON_TRACE" ]; then + echo "$(declare -f _colcon_prefix_sh_source_script)" + echo "# Execute generated script:" + echo "# <<<" + echo "${_colcon_ordered_commands}" + echo "# >>>" + echo "unset _colcon_prefix_sh_source_script" +fi +eval "${_colcon_ordered_commands}" +unset _colcon_ordered_commands + +unset _colcon_prefix_sh_source_script + +unset _colcon_prefix_bash_COLCON_CURRENT_PREFIX diff --git a/deploy/robot_ws/install/local_setup.ps1 b/deploy/robot_ws/install/local_setup.ps1 new file mode 100644 index 0000000..6f68c8d --- /dev/null +++ b/deploy/robot_ws/install/local_setup.ps1 @@ -0,0 +1,55 @@ +# generated from colcon_powershell/shell/template/prefix.ps1.em + +# This script extends the environment with all packages contained in this +# prefix path. + +# check environment variable for custom Python executable +if ($env:COLCON_PYTHON_EXECUTABLE) { + if (!(Test-Path "$env:COLCON_PYTHON_EXECUTABLE" -PathType Leaf)) { + echo "error: COLCON_PYTHON_EXECUTABLE '$env:COLCON_PYTHON_EXECUTABLE' doesn't exist" + exit 1 + } + $_colcon_python_executable="$env:COLCON_PYTHON_EXECUTABLE" +} else { + # use the Python executable known at configure time + $_colcon_python_executable="/usr/bin/python3" + # if it doesn't exist try a fall back + if (!(Test-Path "$_colcon_python_executable" -PathType Leaf)) { + if (!(Get-Command "python3" -ErrorAction SilentlyContinue)) { + echo "error: unable to find python3 executable" + exit 1 + } + $_colcon_python_executable="python3" + } +} + +# function to source another script with conditional trace output +# first argument: the path of the script +function _colcon_prefix_powershell_source_script { + param ( + $_colcon_prefix_powershell_source_script_param + ) + # source script with conditional trace output + if (Test-Path $_colcon_prefix_powershell_source_script_param) { + if ($env:COLCON_TRACE) { + echo ". '$_colcon_prefix_powershell_source_script_param'" + } + . "$_colcon_prefix_powershell_source_script_param" + } else { + Write-Error "not found: '$_colcon_prefix_powershell_source_script_param'" + } +} + +# get all commands in topological order +$_colcon_ordered_commands = & "$_colcon_python_executable" "$(Split-Path $PSCommandPath -Parent)/_local_setup_util_ps1.py" ps1 + +# execute all commands in topological order +if ($env:COLCON_TRACE) { + echo "Execute generated script:" + echo "<<<" + $_colcon_ordered_commands.Split([Environment]::NewLine, [StringSplitOptions]::RemoveEmptyEntries) | Write-Output + echo ">>>" +} +if ($_colcon_ordered_commands) { + $_colcon_ordered_commands.Split([Environment]::NewLine, [StringSplitOptions]::RemoveEmptyEntries) | Invoke-Expression +} diff --git a/deploy/robot_ws/install/local_setup.sh b/deploy/robot_ws/install/local_setup.sh new file mode 100644 index 0000000..9345c15 --- /dev/null +++ b/deploy/robot_ws/install/local_setup.sh @@ -0,0 +1,137 @@ +# generated from colcon_core/shell/template/prefix.sh.em + +# This script extends the environment with all packages contained in this +# prefix path. + +# since a plain shell script can't determine its own path when being sourced +# either use the provided COLCON_CURRENT_PREFIX +# or fall back to the build time prefix (if it exists) +_colcon_prefix_sh_COLCON_CURRENT_PREFIX="/home/unitree/locomotion/Go2Py/deploy/ros2_ws/install" +if [ -z "$COLCON_CURRENT_PREFIX" ]; then + if [ ! -d "$_colcon_prefix_sh_COLCON_CURRENT_PREFIX" ]; then + echo "The build time path \"$_colcon_prefix_sh_COLCON_CURRENT_PREFIX\" doesn't exist. Either source a script for a different shell or set the environment variable \"COLCON_CURRENT_PREFIX\" explicitly." 1>&2 + unset _colcon_prefix_sh_COLCON_CURRENT_PREFIX + return 1 + fi +else + _colcon_prefix_sh_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" +fi + +# function to prepend a value to a variable +# which uses colons as separators +# duplicates as well as trailing separators are avoided +# first argument: the name of the result variable +# second argument: the value to be prepended +_colcon_prefix_sh_prepend_unique_value() { + # arguments + _listname="$1" + _value="$2" + + # get values from variable + eval _values=\"\$$_listname\" + # backup the field separator + _colcon_prefix_sh_prepend_unique_value_IFS="$IFS" + IFS=":" + # start with the new value + _all_values="$_value" + _contained_value="" + # iterate over existing values in the variable + for _item in $_values; do + # ignore empty strings + if [ -z "$_item" ]; then + continue + fi + # ignore duplicates of _value + if [ "$_item" = "$_value" ]; then + _contained_value=1 + continue + fi + # keep non-duplicate values + _all_values="$_all_values:$_item" + done + unset _item + if [ -z "$_contained_value" ]; then + if [ -n "$COLCON_TRACE" ]; then + if [ "$_all_values" = "$_value" ]; then + echo "export $_listname=$_value" + else + echo "export $_listname=$_value:\$$_listname" + fi + fi + fi + unset _contained_value + # restore the field separator + IFS="$_colcon_prefix_sh_prepend_unique_value_IFS" + unset _colcon_prefix_sh_prepend_unique_value_IFS + # export the updated variable + eval export $_listname=\"$_all_values\" + unset _all_values + unset _values + + unset _value + unset _listname +} + +# add this prefix to the COLCON_PREFIX_PATH +_colcon_prefix_sh_prepend_unique_value COLCON_PREFIX_PATH "$_colcon_prefix_sh_COLCON_CURRENT_PREFIX" +unset _colcon_prefix_sh_prepend_unique_value + +# check environment variable for custom Python executable +if [ -n "$COLCON_PYTHON_EXECUTABLE" ]; then + if [ ! -f "$COLCON_PYTHON_EXECUTABLE" ]; then + echo "error: COLCON_PYTHON_EXECUTABLE '$COLCON_PYTHON_EXECUTABLE' doesn't exist" + return 1 + fi + _colcon_python_executable="$COLCON_PYTHON_EXECUTABLE" +else + # try the Python executable known at configure time + _colcon_python_executable="/usr/bin/python3" + # if it doesn't exist try a fall back + if [ ! -f "$_colcon_python_executable" ]; then + if ! /usr/bin/env python3 --version > /dev/null 2> /dev/null; then + echo "error: unable to find python3 executable" + return 1 + fi + _colcon_python_executable=`/usr/bin/env python3 -c "import sys; print(sys.executable)"` + fi +fi + +# function to source another script with conditional trace output +# first argument: the path of the script +_colcon_prefix_sh_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo "# . \"$1\"" + fi + . "$1" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# get all commands in topological order +_colcon_ordered_commands="$($_colcon_python_executable "$_colcon_prefix_sh_COLCON_CURRENT_PREFIX/_local_setup_util_sh.py" sh)" +unset _colcon_python_executable +if [ -n "$COLCON_TRACE" ]; then + echo "_colcon_prefix_sh_source_script() { + if [ -f \"\$1\" ]; then + if [ -n \"\$COLCON_TRACE\" ]; then + echo \"# . \\\"\$1\\\"\" + fi + . \"\$1\" + else + echo \"not found: \\\"\$1\\\"\" 1>&2 + fi + }" + echo "# Execute generated script:" + echo "# <<<" + echo "${_colcon_ordered_commands}" + echo "# >>>" + echo "unset _colcon_prefix_sh_source_script" +fi +eval "${_colcon_ordered_commands}" +unset _colcon_ordered_commands + +unset _colcon_prefix_sh_source_script + +unset _colcon_prefix_sh_COLCON_CURRENT_PREFIX diff --git a/deploy/robot_ws/install/local_setup.zsh b/deploy/robot_ws/install/local_setup.zsh new file mode 100644 index 0000000..b648710 --- /dev/null +++ b/deploy/robot_ws/install/local_setup.zsh @@ -0,0 +1,134 @@ +# generated from colcon_zsh/shell/template/prefix.zsh.em + +# This script extends the environment with all packages contained in this +# prefix path. + +# a zsh script is able to determine its own path if necessary +if [ -z "$COLCON_CURRENT_PREFIX" ]; then + _colcon_prefix_zsh_COLCON_CURRENT_PREFIX="$(builtin cd -q "`dirname "${(%):-%N}"`" > /dev/null && pwd)" +else + _colcon_prefix_zsh_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" +fi + +# function to convert array-like strings into arrays +# to workaround SH_WORD_SPLIT not being set +_colcon_prefix_zsh_convert_to_array() { + local _listname=$1 + local _dollar="$" + local _split="{=" + local _to_array="(\"$_dollar$_split$_listname}\")" + eval $_listname=$_to_array +} + +# function to prepend a value to a variable +# which uses colons as separators +# duplicates as well as trailing separators are avoided +# first argument: the name of the result variable +# second argument: the value to be prepended +_colcon_prefix_zsh_prepend_unique_value() { + # arguments + _listname="$1" + _value="$2" + + # get values from variable + eval _values=\"\$$_listname\" + # backup the field separator + _colcon_prefix_zsh_prepend_unique_value_IFS="$IFS" + IFS=":" + # start with the new value + _all_values="$_value" + _contained_value="" + # workaround SH_WORD_SPLIT not being set + _colcon_prefix_zsh_convert_to_array _values + # iterate over existing values in the variable + for _item in $_values; do + # ignore empty strings + if [ -z "$_item" ]; then + continue + fi + # ignore duplicates of _value + if [ "$_item" = "$_value" ]; then + _contained_value=1 + continue + fi + # keep non-duplicate values + _all_values="$_all_values:$_item" + done + unset _item + if [ -z "$_contained_value" ]; then + if [ -n "$COLCON_TRACE" ]; then + if [ "$_all_values" = "$_value" ]; then + echo "export $_listname=$_value" + else + echo "export $_listname=$_value:\$$_listname" + fi + fi + fi + unset _contained_value + # restore the field separator + IFS="$_colcon_prefix_zsh_prepend_unique_value_IFS" + unset _colcon_prefix_zsh_prepend_unique_value_IFS + # export the updated variable + eval export $_listname=\"$_all_values\" + unset _all_values + unset _values + + unset _value + unset _listname +} + +# add this prefix to the COLCON_PREFIX_PATH +_colcon_prefix_zsh_prepend_unique_value COLCON_PREFIX_PATH "$_colcon_prefix_zsh_COLCON_CURRENT_PREFIX" +unset _colcon_prefix_zsh_prepend_unique_value +unset _colcon_prefix_zsh_convert_to_array + +# check environment variable for custom Python executable +if [ -n "$COLCON_PYTHON_EXECUTABLE" ]; then + if [ ! -f "$COLCON_PYTHON_EXECUTABLE" ]; then + echo "error: COLCON_PYTHON_EXECUTABLE '$COLCON_PYTHON_EXECUTABLE' doesn't exist" + return 1 + fi + _colcon_python_executable="$COLCON_PYTHON_EXECUTABLE" +else + # try the Python executable known at configure time + _colcon_python_executable="/usr/bin/python3" + # if it doesn't exist try a fall back + if [ ! -f "$_colcon_python_executable" ]; then + if ! /usr/bin/env python3 --version > /dev/null 2> /dev/null; then + echo "error: unable to find python3 executable" + return 1 + fi + _colcon_python_executable=`/usr/bin/env python3 -c "import sys; print(sys.executable)"` + fi +fi + +# function to source another script with conditional trace output +# first argument: the path of the script +_colcon_prefix_sh_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo "# . \"$1\"" + fi + . "$1" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# get all commands in topological order +_colcon_ordered_commands="$($_colcon_python_executable "$_colcon_prefix_zsh_COLCON_CURRENT_PREFIX/_local_setup_util_sh.py" sh zsh)" +unset _colcon_python_executable +if [ -n "$COLCON_TRACE" ]; then + echo "$(declare -f _colcon_prefix_sh_source_script)" + echo "# Execute generated script:" + echo "# <<<" + echo "${_colcon_ordered_commands}" + echo "# >>>" + echo "unset _colcon_prefix_sh_source_script" +fi +eval "${_colcon_ordered_commands}" +unset _colcon_ordered_commands + +unset _colcon_prefix_sh_source_script + +unset _colcon_prefix_zsh_COLCON_CURRENT_PREFIX diff --git a/deploy/robot_ws/install/setup.bash b/deploy/robot_ws/install/setup.bash new file mode 100644 index 0000000..a687872 --- /dev/null +++ b/deploy/robot_ws/install/setup.bash @@ -0,0 +1,34 @@ +# generated from colcon_bash/shell/template/prefix_chain.bash.em + +# This script extends the environment with the environment of other prefix +# paths which were sourced when this file was generated as well as all packages +# contained in this prefix path. + +# function to source another script with conditional trace output +# first argument: the path of the script +_colcon_prefix_chain_bash_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo "# . \"$1\"" + fi + . "$1" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# source chained prefixes +# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced script +COLCON_CURRENT_PREFIX="/opt/ros/foxy" +_colcon_prefix_chain_bash_source_script "$COLCON_CURRENT_PREFIX/local_setup.bash" +# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced script +COLCON_CURRENT_PREFIX="/home/unitree/locomotion/unitree_ros2/cyclonedds_ws/install" +_colcon_prefix_chain_bash_source_script "$COLCON_CURRENT_PREFIX/local_setup.bash" + +# source this prefix +# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced script +COLCON_CURRENT_PREFIX="$(builtin cd "`dirname "${BASH_SOURCE[0]}"`" > /dev/null && pwd)" +_colcon_prefix_chain_bash_source_script "$COLCON_CURRENT_PREFIX/local_setup.bash" + +unset COLCON_CURRENT_PREFIX +unset _colcon_prefix_chain_bash_source_script diff --git a/deploy/robot_ws/install/setup.ps1 b/deploy/robot_ws/install/setup.ps1 new file mode 100644 index 0000000..a2b9119 --- /dev/null +++ b/deploy/robot_ws/install/setup.ps1 @@ -0,0 +1,30 @@ +# generated from colcon_powershell/shell/template/prefix_chain.ps1.em + +# This script extends the environment with the environment of other prefix +# paths which were sourced when this file was generated as well as all packages +# contained in this prefix path. + +# function to source another script with conditional trace output +# first argument: the path of the script +function _colcon_prefix_chain_powershell_source_script { + param ( + $_colcon_prefix_chain_powershell_source_script_param + ) + # source script with conditional trace output + if (Test-Path $_colcon_prefix_chain_powershell_source_script_param) { + if ($env:COLCON_TRACE) { + echo ". '$_colcon_prefix_chain_powershell_source_script_param'" + } + . "$_colcon_prefix_chain_powershell_source_script_param" + } else { + Write-Error "not found: '$_colcon_prefix_chain_powershell_source_script_param'" + } +} + +# source chained prefixes +_colcon_prefix_chain_powershell_source_script "/opt/ros/foxy\local_setup.ps1" +_colcon_prefix_chain_powershell_source_script "/home/unitree/locomotion/unitree_ros2/cyclonedds_ws/install\local_setup.ps1" + +# source this prefix +$env:COLCON_CURRENT_PREFIX=(Split-Path $PSCommandPath -Parent) +_colcon_prefix_chain_powershell_source_script "$env:COLCON_CURRENT_PREFIX\local_setup.ps1" diff --git a/deploy/robot_ws/install/setup.sh b/deploy/robot_ws/install/setup.sh new file mode 100644 index 0000000..2a294d5 --- /dev/null +++ b/deploy/robot_ws/install/setup.sh @@ -0,0 +1,49 @@ +# generated from colcon_core/shell/template/prefix_chain.sh.em + +# This script extends the environment with the environment of other prefix +# paths which were sourced when this file was generated as well as all packages +# contained in this prefix path. + +# since a plain shell script can't determine its own path when being sourced +# either use the provided COLCON_CURRENT_PREFIX +# or fall back to the build time prefix (if it exists) +_colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX=/home/unitree/locomotion/Go2Py/deploy/ros2_ws/install +if [ ! -z "$COLCON_CURRENT_PREFIX" ]; then + _colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" +elif [ ! -d "$_colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX" ]; then + echo "The build time path \"$_colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX\" doesn't exist. Either source a script for a different shell or set the environment variable \"COLCON_CURRENT_PREFIX\" explicitly." 1>&2 + unset _colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX + return 1 +fi + +# function to source another script with conditional trace output +# first argument: the path of the script +_colcon_prefix_chain_sh_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo "# . \"$1\"" + fi + . "$1" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# source chained prefixes +# setting COLCON_CURRENT_PREFIX avoids relying on the build time prefix of the sourced script +COLCON_CURRENT_PREFIX="/opt/ros/foxy" +_colcon_prefix_chain_sh_source_script "$COLCON_CURRENT_PREFIX/local_setup.sh" + +# setting COLCON_CURRENT_PREFIX avoids relying on the build time prefix of the sourced script +COLCON_CURRENT_PREFIX="/home/unitree/locomotion/unitree_ros2/cyclonedds_ws/install" +_colcon_prefix_chain_sh_source_script "$COLCON_CURRENT_PREFIX/local_setup.sh" + + +# source this prefix +# setting COLCON_CURRENT_PREFIX avoids relying on the build time prefix of the sourced script +COLCON_CURRENT_PREFIX="$_colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX" +_colcon_prefix_chain_sh_source_script "$COLCON_CURRENT_PREFIX/local_setup.sh" + +unset _colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX +unset _colcon_prefix_chain_sh_source_script +unset COLCON_CURRENT_PREFIX diff --git a/deploy/robot_ws/install/setup.zsh b/deploy/robot_ws/install/setup.zsh new file mode 100644 index 0000000..de47bbf --- /dev/null +++ b/deploy/robot_ws/install/setup.zsh @@ -0,0 +1,34 @@ +# generated from colcon_zsh/shell/template/prefix_chain.zsh.em + +# This script extends the environment with the environment of other prefix +# paths which were sourced when this file was generated as well as all packages +# contained in this prefix path. + +# function to source another script with conditional trace output +# first argument: the path of the script +_colcon_prefix_chain_zsh_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo "# . \"$1\"" + fi + . "$1" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# source chained prefixes +# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced script +COLCON_CURRENT_PREFIX="/opt/ros/foxy" +_colcon_prefix_chain_zsh_source_script "$COLCON_CURRENT_PREFIX/local_setup.zsh" +# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced script +COLCON_CURRENT_PREFIX="/home/unitree/locomotion/unitree_ros2/cyclonedds_ws/install" +_colcon_prefix_chain_zsh_source_script "$COLCON_CURRENT_PREFIX/local_setup.zsh" + +# source this prefix +# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced script +COLCON_CURRENT_PREFIX="$(builtin cd -q "`dirname "${(%):-%N}"`" > /dev/null && pwd)" +_colcon_prefix_chain_zsh_source_script "$COLCON_CURRENT_PREFIX/local_setup.zsh" + +unset COLCON_CURRENT_PREFIX +unset _colcon_prefix_chain_zsh_source_script diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__builder.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__builder.hpp new file mode 100644 index 0000000..b41c8e6 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__builder.hpp @@ -0,0 +1,87 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from unitree_api:msg/Request.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST__BUILDER_HPP_ +#define UNITREE_API__MSG__DETAIL__REQUEST__BUILDER_HPP_ + +#include "unitree_api/msg/detail/request__struct.hpp" +#include +#include +#include + + +namespace unitree_api +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Request_binary +{ +public: + explicit Init_Request_binary(::unitree_api::msg::Request & msg) + : msg_(msg) + {} + ::unitree_api::msg::Request binary(::unitree_api::msg::Request::_binary_type arg) + { + msg_.binary = std::move(arg); + return std::move(msg_); + } + +private: + ::unitree_api::msg::Request msg_; +}; + +class Init_Request_parameter +{ +public: + explicit Init_Request_parameter(::unitree_api::msg::Request & msg) + : msg_(msg) + {} + Init_Request_binary parameter(::unitree_api::msg::Request::_parameter_type arg) + { + msg_.parameter = std::move(arg); + return Init_Request_binary(msg_); + } + +private: + ::unitree_api::msg::Request msg_; +}; + +class Init_Request_header +{ +public: + Init_Request_header() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_Request_parameter header(::unitree_api::msg::Request::_header_type arg) + { + msg_.header = std::move(arg); + return Init_Request_parameter(msg_); + } + +private: + ::unitree_api::msg::Request msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::unitree_api::msg::Request>() +{ + return unitree_api::msg::builder::Init_Request_header(); +} + +} // namespace unitree_api + +#endif // UNITREE_API__MSG__DETAIL__REQUEST__BUILDER_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__functions.c b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__functions.c new file mode 100644 index 0000000..a815295 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__functions.c @@ -0,0 +1,288 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from unitree_api:msg/Request.idl +// generated code does not contain a copyright notice +#include "unitree_api/msg/detail/request__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `header` +#include "unitree_api/msg/detail/request_header__functions.h" +// Member `parameter` +#include "rosidl_runtime_c/string_functions.h" +// Member `binary` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +bool +unitree_api__msg__Request__init(unitree_api__msg__Request * msg) +{ + if (!msg) { + return false; + } + // header + if (!unitree_api__msg__RequestHeader__init(&msg->header)) { + unitree_api__msg__Request__fini(msg); + return false; + } + // parameter + if (!rosidl_runtime_c__String__init(&msg->parameter)) { + unitree_api__msg__Request__fini(msg); + return false; + } + // binary + if (!rosidl_runtime_c__uint8__Sequence__init(&msg->binary, 0)) { + unitree_api__msg__Request__fini(msg); + return false; + } + return true; +} + +void +unitree_api__msg__Request__fini(unitree_api__msg__Request * msg) +{ + if (!msg) { + return; + } + // header + unitree_api__msg__RequestHeader__fini(&msg->header); + // parameter + rosidl_runtime_c__String__fini(&msg->parameter); + // binary + rosidl_runtime_c__uint8__Sequence__fini(&msg->binary); +} + +bool +unitree_api__msg__Request__are_equal(const unitree_api__msg__Request * lhs, const unitree_api__msg__Request * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // header + if (!unitree_api__msg__RequestHeader__are_equal( + &(lhs->header), &(rhs->header))) + { + return false; + } + // parameter + if (!rosidl_runtime_c__String__are_equal( + &(lhs->parameter), &(rhs->parameter))) + { + return false; + } + // binary + if (!rosidl_runtime_c__uint8__Sequence__are_equal( + &(lhs->binary), &(rhs->binary))) + { + return false; + } + return true; +} + +bool +unitree_api__msg__Request__copy( + const unitree_api__msg__Request * input, + unitree_api__msg__Request * output) +{ + if (!input || !output) { + return false; + } + // header + if (!unitree_api__msg__RequestHeader__copy( + &(input->header), &(output->header))) + { + return false; + } + // parameter + if (!rosidl_runtime_c__String__copy( + &(input->parameter), &(output->parameter))) + { + return false; + } + // binary + if (!rosidl_runtime_c__uint8__Sequence__copy( + &(input->binary), &(output->binary))) + { + return false; + } + return true; +} + +unitree_api__msg__Request * +unitree_api__msg__Request__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_api__msg__Request * msg = (unitree_api__msg__Request *)allocator.allocate(sizeof(unitree_api__msg__Request), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(unitree_api__msg__Request)); + bool success = unitree_api__msg__Request__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +unitree_api__msg__Request__destroy(unitree_api__msg__Request * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + unitree_api__msg__Request__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +unitree_api__msg__Request__Sequence__init(unitree_api__msg__Request__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_api__msg__Request * data = NULL; + + if (size) { + data = (unitree_api__msg__Request *)allocator.zero_allocate(size, sizeof(unitree_api__msg__Request), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = unitree_api__msg__Request__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + unitree_api__msg__Request__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +unitree_api__msg__Request__Sequence__fini(unitree_api__msg__Request__Sequence * array) +{ + if (!array) { + return; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + + if (array->data) { + // ensure that data and capacity values are consistent + assert(array->capacity > 0); + // finalize all array elements + for (size_t i = 0; i < array->capacity; ++i) { + unitree_api__msg__Request__fini(&array->data[i]); + } + allocator.deallocate(array->data, allocator.state); + array->data = NULL; + array->size = 0; + array->capacity = 0; + } else { + // ensure that data, size, and capacity values are consistent + assert(0 == array->size); + assert(0 == array->capacity); + } +} + +unitree_api__msg__Request__Sequence * +unitree_api__msg__Request__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_api__msg__Request__Sequence * array = (unitree_api__msg__Request__Sequence *)allocator.allocate(sizeof(unitree_api__msg__Request__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = unitree_api__msg__Request__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +unitree_api__msg__Request__Sequence__destroy(unitree_api__msg__Request__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + unitree_api__msg__Request__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +unitree_api__msg__Request__Sequence__are_equal(const unitree_api__msg__Request__Sequence * lhs, const unitree_api__msg__Request__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!unitree_api__msg__Request__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +unitree_api__msg__Request__Sequence__copy( + const unitree_api__msg__Request__Sequence * input, + unitree_api__msg__Request__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(unitree_api__msg__Request); + unitree_api__msg__Request * data = + (unitree_api__msg__Request *)realloc(output->data, allocation_size); + if (!data) { + return false; + } + for (size_t i = output->capacity; i < input->size; ++i) { + if (!unitree_api__msg__Request__init(&data[i])) { + /* free currently allocated and return false */ + for (; i-- > output->capacity; ) { + unitree_api__msg__Request__fini(&data[i]); + } + free(data); + return false; + } + } + output->data = data; + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!unitree_api__msg__Request__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__functions.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__functions.h new file mode 100644 index 0000000..fd22ad0 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from unitree_api:msg/Request.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST__FUNCTIONS_H_ +#define UNITREE_API__MSG__DETAIL__REQUEST__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_api/msg/rosidl_generator_c__visibility_control.h" + +#include "unitree_api/msg/detail/request__struct.h" + +/// Initialize msg/Request message. +/** + * If the init function is called twice for the same message without + * calling fini inbetween previously allocated memory will be leaked. + * \param[in,out] msg The previously allocated message pointer. + * Fields without a default value will not be initialized by this function. + * You might want to call memset(msg, 0, sizeof( + * unitree_api__msg__Request + * )) before or use + * unitree_api__msg__Request__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__Request__init(unitree_api__msg__Request * msg); + +/// Finalize msg/Request message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +void +unitree_api__msg__Request__fini(unitree_api__msg__Request * msg); + +/// Create msg/Request message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * unitree_api__msg__Request__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +unitree_api__msg__Request * +unitree_api__msg__Request__create(); + +/// Destroy msg/Request message. +/** + * It calls + * unitree_api__msg__Request__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +void +unitree_api__msg__Request__destroy(unitree_api__msg__Request * msg); + +/// Check for msg/Request message equality. +/** + * \param[in] lhs The message on the left hand size of the equality operator. + * \param[in] rhs The message on the right hand size of the equality operator. + * \return true if messages are equal, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__Request__are_equal(const unitree_api__msg__Request * lhs, const unitree_api__msg__Request * rhs); + +/// Copy a msg/Request message. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source message pointer. + * \param[out] output The target message pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer is null + * or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__Request__copy( + const unitree_api__msg__Request * input, + unitree_api__msg__Request * output); + +/// Initialize array of msg/Request messages. +/** + * It allocates the memory for the number of elements and calls + * unitree_api__msg__Request__init() + * for each element of the array. + * \param[in,out] array The allocated array pointer. + * \param[in] size The size / capacity of the array. + * \return true if initialization was successful, otherwise false + * If the array pointer is valid and the size is zero it is guaranteed + # to return true. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__Request__Sequence__init(unitree_api__msg__Request__Sequence * array, size_t size); + +/// Finalize array of msg/Request messages. +/** + * It calls + * unitree_api__msg__Request__fini() + * for each element of the array and frees the memory for the number of + * elements. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +void +unitree_api__msg__Request__Sequence__fini(unitree_api__msg__Request__Sequence * array); + +/// Create array of msg/Request messages. +/** + * It allocates the memory for the array and calls + * unitree_api__msg__Request__Sequence__init(). + * \param[in] size The size / capacity of the array. + * \return The pointer to the initialized array if successful, otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +unitree_api__msg__Request__Sequence * +unitree_api__msg__Request__Sequence__create(size_t size); + +/// Destroy array of msg/Request messages. +/** + * It calls + * unitree_api__msg__Request__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +void +unitree_api__msg__Request__Sequence__destroy(unitree_api__msg__Request__Sequence * array); + +/// Check for msg/Request message array equality. +/** + * \param[in] lhs The message array on the left hand size of the equality operator. + * \param[in] rhs The message array on the right hand size of the equality operator. + * \return true if message arrays are equal in size and content, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__Request__Sequence__are_equal(const unitree_api__msg__Request__Sequence * lhs, const unitree_api__msg__Request__Sequence * rhs); + +/// Copy an array of msg/Request messages. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source array pointer. + * \param[out] output The target array pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer + * is null or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__Request__Sequence__copy( + const unitree_api__msg__Request__Sequence * input, + unitree_api__msg__Request__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST__FUNCTIONS_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__rosidl_typesupport_fastrtps_c.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 0000000..4765adc --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,36 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from unitree_api:msg/Request.idl +// generated code does not contain a copyright notice +#ifndef UNITREE_API__MSG__DETAIL__REQUEST__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define UNITREE_API__MSG__DETAIL__REQUEST__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_api/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_api +size_t get_serialized_size_unitree_api__msg__Request( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_api +size_t max_serialized_size_unitree_api__msg__Request( + bool & full_bounded, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_api +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, unitree_api, msg, Request)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__rosidl_typesupport_fastrtps_cpp.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 0000000..1796b89 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,79 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from unitree_api:msg/Request.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define UNITREE_API__MSG__DETAIL__REQUEST__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_api/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "unitree_api/msg/detail/request__struct.hpp" + +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-parameter" +# ifdef __clang__ +# pragma clang diagnostic ignored "-Wdeprecated-register" +# pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +# endif +#endif +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif + +#include "fastcdr/Cdr.h" + +namespace unitree_api +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +cdr_serialize( + const unitree_api::msg::Request & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + unitree_api::msg::Request & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +get_serialized_size( + const unitree_api::msg::Request & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +max_serialized_size_Request( + bool & full_bounded, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace unitree_api + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, unitree_api, msg, Request)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__rosidl_typesupport_introspection_c.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__rosidl_typesupport_introspection_c.h new file mode 100644 index 0000000..084587c --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from unitree_api:msg/Request.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define UNITREE_API__MSG__DETAIL__REQUEST__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_api/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_api +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_api, msg, Request)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__rosidl_typesupport_introspection_cpp.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 0000000..a880f48 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from unitree_api:msg/Request.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define UNITREE_API__MSG__DETAIL__REQUEST__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +// TODO(dirk-thomas) these visibility macros should be message package specific +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_api, msg, Request)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__struct.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__struct.h new file mode 100644 index 0000000..5325d3e --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__struct.h @@ -0,0 +1,50 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from unitree_api:msg/Request.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST__STRUCT_H_ +#define UNITREE_API__MSG__DETAIL__REQUEST__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'header' +#include "unitree_api/msg/detail/request_header__struct.h" +// Member 'parameter' +#include "rosidl_runtime_c/string.h" +// Member 'binary' +#include "rosidl_runtime_c/primitives_sequence.h" + +// Struct defined in msg/Request in the package unitree_api. +typedef struct unitree_api__msg__Request +{ + unitree_api__msg__RequestHeader header; + rosidl_runtime_c__String parameter; + rosidl_runtime_c__uint8__Sequence binary; +} unitree_api__msg__Request; + +// Struct for a sequence of unitree_api__msg__Request. +typedef struct unitree_api__msg__Request__Sequence +{ + unitree_api__msg__Request * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} unitree_api__msg__Request__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST__STRUCT_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__struct.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__struct.hpp new file mode 100644 index 0000000..d6ca5ea --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__struct.hpp @@ -0,0 +1,160 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from unitree_api:msg/Request.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST__STRUCT_HPP_ +#define UNITREE_API__MSG__DETAIL__REQUEST__STRUCT_HPP_ + +#include +#include +#include +#include +#include +#include +#include + + +// Include directives for member types +// Member 'header' +#include "unitree_api/msg/detail/request_header__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__unitree_api__msg__Request __attribute__((deprecated)) +#else +# define DEPRECATED__unitree_api__msg__Request __declspec(deprecated) +#endif + +namespace unitree_api +{ + +namespace msg +{ + +// message struct +template +struct Request_ +{ + using Type = Request_; + + explicit Request_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : header(_init) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->parameter = ""; + } + } + + explicit Request_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : header(_alloc, _init), + parameter(_alloc) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->parameter = ""; + } + } + + // field types and members + using _header_type = + unitree_api::msg::RequestHeader_; + _header_type header; + using _parameter_type = + std::basic_string, typename ContainerAllocator::template rebind::other>; + _parameter_type parameter; + using _binary_type = + std::vector::other>; + _binary_type binary; + + // setters for named parameter idiom + Type & set__header( + const unitree_api::msg::RequestHeader_ & _arg) + { + this->header = _arg; + return *this; + } + Type & set__parameter( + const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + { + this->parameter = _arg; + return *this; + } + Type & set__binary( + const std::vector::other> & _arg) + { + this->binary = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + unitree_api::msg::Request_ *; + using ConstRawPtr = + const unitree_api::msg::Request_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr const>; + + // pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead + // NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly + typedef DEPRECATED__unitree_api__msg__Request + std::shared_ptr> + Ptr; + typedef DEPRECATED__unitree_api__msg__Request + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Request_ & other) const + { + if (this->header != other.header) { + return false; + } + if (this->parameter != other.parameter) { + return false; + } + if (this->binary != other.binary) { + return false; + } + return true; + } + bool operator!=(const Request_ & other) const + { + return !this->operator==(other); + } +}; // struct Request_ + +// alias to use template instance with default allocator +using Request = + unitree_api::msg::Request_>; + +// constant definitions + +} // namespace msg + +} // namespace unitree_api + +#endif // UNITREE_API__MSG__DETAIL__REQUEST__STRUCT_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__traits.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__traits.hpp new file mode 100644 index 0000000..205fa6f --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__traits.hpp @@ -0,0 +1,46 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from unitree_api:msg/Request.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST__TRAITS_HPP_ +#define UNITREE_API__MSG__DETAIL__REQUEST__TRAITS_HPP_ + +#include "unitree_api/msg/detail/request__struct.hpp" +#include +#include +#include + +// Include directives for member types +// Member 'header' +#include "unitree_api/msg/detail/request_header__traits.hpp" + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "unitree_api::msg::Request"; +} + +template<> +inline const char * name() +{ + return "unitree_api/msg/Request"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UNITREE_API__MSG__DETAIL__REQUEST__TRAITS_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__type_support.c b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__type_support.c new file mode 100644 index 0000000..9e0cfdf --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__type_support.c @@ -0,0 +1,123 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from unitree_api:msg/Request.idl +// generated code does not contain a copyright notice + +#include +#include "unitree_api/msg/detail/request__rosidl_typesupport_introspection_c.h" +#include "unitree_api/msg/rosidl_typesupport_introspection_c__visibility_control.h" +#include "rosidl_typesupport_introspection_c/field_types.h" +#include "rosidl_typesupport_introspection_c/identifier.h" +#include "rosidl_typesupport_introspection_c/message_introspection.h" +#include "unitree_api/msg/detail/request__functions.h" +#include "unitree_api/msg/detail/request__struct.h" + + +// Include directives for member types +// Member `header` +#include "unitree_api/msg/request_header.h" +// Member `header` +#include "unitree_api/msg/detail/request_header__rosidl_typesupport_introspection_c.h" +// Member `parameter` +#include "rosidl_runtime_c/string_functions.h" +// Member `binary` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void Request__rosidl_typesupport_introspection_c__Request_init_function( + void * message_memory, enum rosidl_runtime_c__message_initialization _init) +{ + // TODO(karsten1987): initializers are not yet implemented for typesupport c + // see https://github.com/ros2/ros2/issues/397 + (void) _init; + unitree_api__msg__Request__init(message_memory); +} + +void Request__rosidl_typesupport_introspection_c__Request_fini_function(void * message_memory) +{ + unitree_api__msg__Request__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember Request__rosidl_typesupport_introspection_c__Request_message_member_array[3] = { + { + "header", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_api__msg__Request, header), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "parameter", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_api__msg__Request, parameter), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "binary", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_api__msg__Request, binary), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers Request__rosidl_typesupport_introspection_c__Request_message_members = { + "unitree_api__msg", // message namespace + "Request", // message name + 3, // number of fields + sizeof(unitree_api__msg__Request), + Request__rosidl_typesupport_introspection_c__Request_message_member_array, // message members + Request__rosidl_typesupport_introspection_c__Request_init_function, // function to initialize message memory (memory has to be allocated) + Request__rosidl_typesupport_introspection_c__Request_fini_function // function to terminate message instance (will not free memory) +}; + +// this is not const since it must be initialized on first access +// since C does not allow non-integral compile-time constants +static rosidl_message_type_support_t Request__rosidl_typesupport_introspection_c__Request_message_type_support_handle = { + 0, + &Request__rosidl_typesupport_introspection_c__Request_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_api +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_api, msg, Request)() { + Request__rosidl_typesupport_introspection_c__Request_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_api, msg, RequestHeader)(); + if (!Request__rosidl_typesupport_introspection_c__Request_message_type_support_handle.typesupport_identifier) { + Request__rosidl_typesupport_introspection_c__Request_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &Request__rosidl_typesupport_introspection_c__Request_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__type_support.cpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__type_support.cpp new file mode 100644 index 0000000..fb8fc8c --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__type_support.cpp @@ -0,0 +1,164 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from unitree_api:msg/Request.idl +// generated code does not contain a copyright notice + +#include "array" +#include "cstddef" +#include "string" +#include "vector" +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_cpp/message_type_support.hpp" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_api/msg/detail/request__struct.hpp" +#include "rosidl_typesupport_introspection_cpp/field_types.hpp" +#include "rosidl_typesupport_introspection_cpp/identifier.hpp" +#include "rosidl_typesupport_introspection_cpp/message_introspection.hpp" +#include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +namespace unitree_api +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Request_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) unitree_api::msg::Request(_init); +} + +void Request_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Request(); +} + +size_t size_function__Request__binary(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__Request__binary(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__Request__binary(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void resize_function__Request__binary(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Request_message_member_array[3] = { + { + "header", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_api::msg::Request, header), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "parameter", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_api::msg::Request, parameter), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "binary", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_api::msg::Request, binary), // bytes offset in struct + nullptr, // default value + size_function__Request__binary, // size() function pointer + get_const_function__Request__binary, // get_const(index) function pointer + get_function__Request__binary, // get(index) function pointer + resize_function__Request__binary // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers Request_message_members = { + "unitree_api::msg", // message namespace + "Request", // message name + 3, // number of fields + sizeof(unitree_api::msg::Request), + Request_message_member_array, // message members + Request_init_function, // function to initialize message memory (memory has to be allocated) + Request_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Request_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Request_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace unitree_api + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::unitree_api::msg::rosidl_typesupport_introspection_cpp::Request_message_type_support_handle; +} + +} // namespace rosidl_typesupport_introspection_cpp + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_api, msg, Request)() { + return &::unitree_api::msg::rosidl_typesupport_introspection_cpp::Request_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__type_support.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__type_support.h new file mode 100644 index 0000000..d662fff --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from unitree_api:msg/Request.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST__TYPE_SUPPORT_H_ +#define UNITREE_API__MSG__DETAIL__REQUEST__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_api/msg/rosidl_generator_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rosidl_runtime_c/message_type_support_struct.h" + +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + unitree_api, + msg, + Request +)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST__TYPE_SUPPORT_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__type_support.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__type_support.hpp new file mode 100644 index 0000000..02a5188 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from unitree_api:msg/Request.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST__TYPE_SUPPORT_HPP_ +#define UNITREE_API__MSG__DETAIL__REQUEST__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_api/msg/rosidl_generator_cpp__visibility_control.hpp" + +#include "rosidl_typesupport_cpp/message_type_support.hpp" + +#ifdef __cplusplus +extern "C" +{ +#endif +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_CPP_PUBLIC_unitree_api +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + unitree_api, + msg, + Request +)(); +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST__TYPE_SUPPORT_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__builder.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__builder.hpp new file mode 100644 index 0000000..193c4b0 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__builder.hpp @@ -0,0 +1,87 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from unitree_api:msg/RequestHeader.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_HEADER__BUILDER_HPP_ +#define UNITREE_API__MSG__DETAIL__REQUEST_HEADER__BUILDER_HPP_ + +#include "unitree_api/msg/detail/request_header__struct.hpp" +#include +#include +#include + + +namespace unitree_api +{ + +namespace msg +{ + +namespace builder +{ + +class Init_RequestHeader_policy +{ +public: + explicit Init_RequestHeader_policy(::unitree_api::msg::RequestHeader & msg) + : msg_(msg) + {} + ::unitree_api::msg::RequestHeader policy(::unitree_api::msg::RequestHeader::_policy_type arg) + { + msg_.policy = std::move(arg); + return std::move(msg_); + } + +private: + ::unitree_api::msg::RequestHeader msg_; +}; + +class Init_RequestHeader_lease +{ +public: + explicit Init_RequestHeader_lease(::unitree_api::msg::RequestHeader & msg) + : msg_(msg) + {} + Init_RequestHeader_policy lease(::unitree_api::msg::RequestHeader::_lease_type arg) + { + msg_.lease = std::move(arg); + return Init_RequestHeader_policy(msg_); + } + +private: + ::unitree_api::msg::RequestHeader msg_; +}; + +class Init_RequestHeader_identity +{ +public: + Init_RequestHeader_identity() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_RequestHeader_lease identity(::unitree_api::msg::RequestHeader::_identity_type arg) + { + msg_.identity = std::move(arg); + return Init_RequestHeader_lease(msg_); + } + +private: + ::unitree_api::msg::RequestHeader msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::unitree_api::msg::RequestHeader>() +{ + return unitree_api::msg::builder::Init_RequestHeader_identity(); +} + +} // namespace unitree_api + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_HEADER__BUILDER_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__functions.c b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__functions.c new file mode 100644 index 0000000..8025f44 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__functions.c @@ -0,0 +1,288 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from unitree_api:msg/RequestHeader.idl +// generated code does not contain a copyright notice +#include "unitree_api/msg/detail/request_header__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `identity` +#include "unitree_api/msg/detail/request_identity__functions.h" +// Member `lease` +#include "unitree_api/msg/detail/request_lease__functions.h" +// Member `policy` +#include "unitree_api/msg/detail/request_policy__functions.h" + +bool +unitree_api__msg__RequestHeader__init(unitree_api__msg__RequestHeader * msg) +{ + if (!msg) { + return false; + } + // identity + if (!unitree_api__msg__RequestIdentity__init(&msg->identity)) { + unitree_api__msg__RequestHeader__fini(msg); + return false; + } + // lease + if (!unitree_api__msg__RequestLease__init(&msg->lease)) { + unitree_api__msg__RequestHeader__fini(msg); + return false; + } + // policy + if (!unitree_api__msg__RequestPolicy__init(&msg->policy)) { + unitree_api__msg__RequestHeader__fini(msg); + return false; + } + return true; +} + +void +unitree_api__msg__RequestHeader__fini(unitree_api__msg__RequestHeader * msg) +{ + if (!msg) { + return; + } + // identity + unitree_api__msg__RequestIdentity__fini(&msg->identity); + // lease + unitree_api__msg__RequestLease__fini(&msg->lease); + // policy + unitree_api__msg__RequestPolicy__fini(&msg->policy); +} + +bool +unitree_api__msg__RequestHeader__are_equal(const unitree_api__msg__RequestHeader * lhs, const unitree_api__msg__RequestHeader * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // identity + if (!unitree_api__msg__RequestIdentity__are_equal( + &(lhs->identity), &(rhs->identity))) + { + return false; + } + // lease + if (!unitree_api__msg__RequestLease__are_equal( + &(lhs->lease), &(rhs->lease))) + { + return false; + } + // policy + if (!unitree_api__msg__RequestPolicy__are_equal( + &(lhs->policy), &(rhs->policy))) + { + return false; + } + return true; +} + +bool +unitree_api__msg__RequestHeader__copy( + const unitree_api__msg__RequestHeader * input, + unitree_api__msg__RequestHeader * output) +{ + if (!input || !output) { + return false; + } + // identity + if (!unitree_api__msg__RequestIdentity__copy( + &(input->identity), &(output->identity))) + { + return false; + } + // lease + if (!unitree_api__msg__RequestLease__copy( + &(input->lease), &(output->lease))) + { + return false; + } + // policy + if (!unitree_api__msg__RequestPolicy__copy( + &(input->policy), &(output->policy))) + { + return false; + } + return true; +} + +unitree_api__msg__RequestHeader * +unitree_api__msg__RequestHeader__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_api__msg__RequestHeader * msg = (unitree_api__msg__RequestHeader *)allocator.allocate(sizeof(unitree_api__msg__RequestHeader), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(unitree_api__msg__RequestHeader)); + bool success = unitree_api__msg__RequestHeader__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +unitree_api__msg__RequestHeader__destroy(unitree_api__msg__RequestHeader * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + unitree_api__msg__RequestHeader__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +unitree_api__msg__RequestHeader__Sequence__init(unitree_api__msg__RequestHeader__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_api__msg__RequestHeader * data = NULL; + + if (size) { + data = (unitree_api__msg__RequestHeader *)allocator.zero_allocate(size, sizeof(unitree_api__msg__RequestHeader), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = unitree_api__msg__RequestHeader__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + unitree_api__msg__RequestHeader__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +unitree_api__msg__RequestHeader__Sequence__fini(unitree_api__msg__RequestHeader__Sequence * array) +{ + if (!array) { + return; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + + if (array->data) { + // ensure that data and capacity values are consistent + assert(array->capacity > 0); + // finalize all array elements + for (size_t i = 0; i < array->capacity; ++i) { + unitree_api__msg__RequestHeader__fini(&array->data[i]); + } + allocator.deallocate(array->data, allocator.state); + array->data = NULL; + array->size = 0; + array->capacity = 0; + } else { + // ensure that data, size, and capacity values are consistent + assert(0 == array->size); + assert(0 == array->capacity); + } +} + +unitree_api__msg__RequestHeader__Sequence * +unitree_api__msg__RequestHeader__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_api__msg__RequestHeader__Sequence * array = (unitree_api__msg__RequestHeader__Sequence *)allocator.allocate(sizeof(unitree_api__msg__RequestHeader__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = unitree_api__msg__RequestHeader__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +unitree_api__msg__RequestHeader__Sequence__destroy(unitree_api__msg__RequestHeader__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + unitree_api__msg__RequestHeader__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +unitree_api__msg__RequestHeader__Sequence__are_equal(const unitree_api__msg__RequestHeader__Sequence * lhs, const unitree_api__msg__RequestHeader__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!unitree_api__msg__RequestHeader__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +unitree_api__msg__RequestHeader__Sequence__copy( + const unitree_api__msg__RequestHeader__Sequence * input, + unitree_api__msg__RequestHeader__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(unitree_api__msg__RequestHeader); + unitree_api__msg__RequestHeader * data = + (unitree_api__msg__RequestHeader *)realloc(output->data, allocation_size); + if (!data) { + return false; + } + for (size_t i = output->capacity; i < input->size; ++i) { + if (!unitree_api__msg__RequestHeader__init(&data[i])) { + /* free currently allocated and return false */ + for (; i-- > output->capacity; ) { + unitree_api__msg__RequestHeader__fini(&data[i]); + } + free(data); + return false; + } + } + output->data = data; + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!unitree_api__msg__RequestHeader__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__functions.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__functions.h new file mode 100644 index 0000000..1c6c6b8 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from unitree_api:msg/RequestHeader.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_HEADER__FUNCTIONS_H_ +#define UNITREE_API__MSG__DETAIL__REQUEST_HEADER__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_api/msg/rosidl_generator_c__visibility_control.h" + +#include "unitree_api/msg/detail/request_header__struct.h" + +/// Initialize msg/RequestHeader message. +/** + * If the init function is called twice for the same message without + * calling fini inbetween previously allocated memory will be leaked. + * \param[in,out] msg The previously allocated message pointer. + * Fields without a default value will not be initialized by this function. + * You might want to call memset(msg, 0, sizeof( + * unitree_api__msg__RequestHeader + * )) before or use + * unitree_api__msg__RequestHeader__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__RequestHeader__init(unitree_api__msg__RequestHeader * msg); + +/// Finalize msg/RequestHeader message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +void +unitree_api__msg__RequestHeader__fini(unitree_api__msg__RequestHeader * msg); + +/// Create msg/RequestHeader message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * unitree_api__msg__RequestHeader__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +unitree_api__msg__RequestHeader * +unitree_api__msg__RequestHeader__create(); + +/// Destroy msg/RequestHeader message. +/** + * It calls + * unitree_api__msg__RequestHeader__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +void +unitree_api__msg__RequestHeader__destroy(unitree_api__msg__RequestHeader * msg); + +/// Check for msg/RequestHeader message equality. +/** + * \param[in] lhs The message on the left hand size of the equality operator. + * \param[in] rhs The message on the right hand size of the equality operator. + * \return true if messages are equal, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__RequestHeader__are_equal(const unitree_api__msg__RequestHeader * lhs, const unitree_api__msg__RequestHeader * rhs); + +/// Copy a msg/RequestHeader message. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source message pointer. + * \param[out] output The target message pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer is null + * or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__RequestHeader__copy( + const unitree_api__msg__RequestHeader * input, + unitree_api__msg__RequestHeader * output); + +/// Initialize array of msg/RequestHeader messages. +/** + * It allocates the memory for the number of elements and calls + * unitree_api__msg__RequestHeader__init() + * for each element of the array. + * \param[in,out] array The allocated array pointer. + * \param[in] size The size / capacity of the array. + * \return true if initialization was successful, otherwise false + * If the array pointer is valid and the size is zero it is guaranteed + # to return true. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__RequestHeader__Sequence__init(unitree_api__msg__RequestHeader__Sequence * array, size_t size); + +/// Finalize array of msg/RequestHeader messages. +/** + * It calls + * unitree_api__msg__RequestHeader__fini() + * for each element of the array and frees the memory for the number of + * elements. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +void +unitree_api__msg__RequestHeader__Sequence__fini(unitree_api__msg__RequestHeader__Sequence * array); + +/// Create array of msg/RequestHeader messages. +/** + * It allocates the memory for the array and calls + * unitree_api__msg__RequestHeader__Sequence__init(). + * \param[in] size The size / capacity of the array. + * \return The pointer to the initialized array if successful, otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +unitree_api__msg__RequestHeader__Sequence * +unitree_api__msg__RequestHeader__Sequence__create(size_t size); + +/// Destroy array of msg/RequestHeader messages. +/** + * It calls + * unitree_api__msg__RequestHeader__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +void +unitree_api__msg__RequestHeader__Sequence__destroy(unitree_api__msg__RequestHeader__Sequence * array); + +/// Check for msg/RequestHeader message array equality. +/** + * \param[in] lhs The message array on the left hand size of the equality operator. + * \param[in] rhs The message array on the right hand size of the equality operator. + * \return true if message arrays are equal in size and content, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__RequestHeader__Sequence__are_equal(const unitree_api__msg__RequestHeader__Sequence * lhs, const unitree_api__msg__RequestHeader__Sequence * rhs); + +/// Copy an array of msg/RequestHeader messages. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source array pointer. + * \param[out] output The target array pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer + * is null or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__RequestHeader__Sequence__copy( + const unitree_api__msg__RequestHeader__Sequence * input, + unitree_api__msg__RequestHeader__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_HEADER__FUNCTIONS_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__rosidl_typesupport_fastrtps_c.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 0000000..ad8b061 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,36 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from unitree_api:msg/RequestHeader.idl +// generated code does not contain a copyright notice +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_HEADER__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define UNITREE_API__MSG__DETAIL__REQUEST_HEADER__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_api/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_api +size_t get_serialized_size_unitree_api__msg__RequestHeader( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_api +size_t max_serialized_size_unitree_api__msg__RequestHeader( + bool & full_bounded, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_api +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, unitree_api, msg, RequestHeader)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_HEADER__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__rosidl_typesupport_fastrtps_cpp.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 0000000..2da1080 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,79 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from unitree_api:msg/RequestHeader.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_HEADER__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define UNITREE_API__MSG__DETAIL__REQUEST_HEADER__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_api/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "unitree_api/msg/detail/request_header__struct.hpp" + +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-parameter" +# ifdef __clang__ +# pragma clang diagnostic ignored "-Wdeprecated-register" +# pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +# endif +#endif +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif + +#include "fastcdr/Cdr.h" + +namespace unitree_api +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +cdr_serialize( + const unitree_api::msg::RequestHeader & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + unitree_api::msg::RequestHeader & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +get_serialized_size( + const unitree_api::msg::RequestHeader & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +max_serialized_size_RequestHeader( + bool & full_bounded, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace unitree_api + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, unitree_api, msg, RequestHeader)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_HEADER__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__rosidl_typesupport_introspection_c.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__rosidl_typesupport_introspection_c.h new file mode 100644 index 0000000..4ced6ee --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from unitree_api:msg/RequestHeader.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_HEADER__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define UNITREE_API__MSG__DETAIL__REQUEST_HEADER__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_api/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_api +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_api, msg, RequestHeader)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_HEADER__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__rosidl_typesupport_introspection_cpp.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 0000000..050bc93 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from unitree_api:msg/RequestHeader.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_HEADER__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define UNITREE_API__MSG__DETAIL__REQUEST_HEADER__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +// TODO(dirk-thomas) these visibility macros should be message package specific +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_api, msg, RequestHeader)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_HEADER__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__struct.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__struct.h new file mode 100644 index 0000000..974ea38 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__struct.h @@ -0,0 +1,50 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from unitree_api:msg/RequestHeader.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_HEADER__STRUCT_H_ +#define UNITREE_API__MSG__DETAIL__REQUEST_HEADER__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'identity' +#include "unitree_api/msg/detail/request_identity__struct.h" +// Member 'lease' +#include "unitree_api/msg/detail/request_lease__struct.h" +// Member 'policy' +#include "unitree_api/msg/detail/request_policy__struct.h" + +// Struct defined in msg/RequestHeader in the package unitree_api. +typedef struct unitree_api__msg__RequestHeader +{ + unitree_api__msg__RequestIdentity identity; + unitree_api__msg__RequestLease lease; + unitree_api__msg__RequestPolicy policy; +} unitree_api__msg__RequestHeader; + +// Struct for a sequence of unitree_api__msg__RequestHeader. +typedef struct unitree_api__msg__RequestHeader__Sequence +{ + unitree_api__msg__RequestHeader * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} unitree_api__msg__RequestHeader__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_HEADER__STRUCT_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__struct.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__struct.hpp new file mode 100644 index 0000000..13ed133 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__struct.hpp @@ -0,0 +1,159 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from unitree_api:msg/RequestHeader.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_HEADER__STRUCT_HPP_ +#define UNITREE_API__MSG__DETAIL__REQUEST_HEADER__STRUCT_HPP_ + +#include +#include +#include +#include +#include +#include +#include + + +// Include directives for member types +// Member 'identity' +#include "unitree_api/msg/detail/request_identity__struct.hpp" +// Member 'lease' +#include "unitree_api/msg/detail/request_lease__struct.hpp" +// Member 'policy' +#include "unitree_api/msg/detail/request_policy__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__unitree_api__msg__RequestHeader __attribute__((deprecated)) +#else +# define DEPRECATED__unitree_api__msg__RequestHeader __declspec(deprecated) +#endif + +namespace unitree_api +{ + +namespace msg +{ + +// message struct +template +struct RequestHeader_ +{ + using Type = RequestHeader_; + + explicit RequestHeader_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : identity(_init), + lease(_init), + policy(_init) + { + (void)_init; + } + + explicit RequestHeader_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : identity(_alloc, _init), + lease(_alloc, _init), + policy(_alloc, _init) + { + (void)_init; + } + + // field types and members + using _identity_type = + unitree_api::msg::RequestIdentity_; + _identity_type identity; + using _lease_type = + unitree_api::msg::RequestLease_; + _lease_type lease; + using _policy_type = + unitree_api::msg::RequestPolicy_; + _policy_type policy; + + // setters for named parameter idiom + Type & set__identity( + const unitree_api::msg::RequestIdentity_ & _arg) + { + this->identity = _arg; + return *this; + } + Type & set__lease( + const unitree_api::msg::RequestLease_ & _arg) + { + this->lease = _arg; + return *this; + } + Type & set__policy( + const unitree_api::msg::RequestPolicy_ & _arg) + { + this->policy = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + unitree_api::msg::RequestHeader_ *; + using ConstRawPtr = + const unitree_api::msg::RequestHeader_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr const>; + + // pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead + // NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly + typedef DEPRECATED__unitree_api__msg__RequestHeader + std::shared_ptr> + Ptr; + typedef DEPRECATED__unitree_api__msg__RequestHeader + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const RequestHeader_ & other) const + { + if (this->identity != other.identity) { + return false; + } + if (this->lease != other.lease) { + return false; + } + if (this->policy != other.policy) { + return false; + } + return true; + } + bool operator!=(const RequestHeader_ & other) const + { + return !this->operator==(other); + } +}; // struct RequestHeader_ + +// alias to use template instance with default allocator +using RequestHeader = + unitree_api::msg::RequestHeader_>; + +// constant definitions + +} // namespace msg + +} // namespace unitree_api + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_HEADER__STRUCT_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__traits.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__traits.hpp new file mode 100644 index 0000000..32a9b1f --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__traits.hpp @@ -0,0 +1,50 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from unitree_api:msg/RequestHeader.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_HEADER__TRAITS_HPP_ +#define UNITREE_API__MSG__DETAIL__REQUEST_HEADER__TRAITS_HPP_ + +#include "unitree_api/msg/detail/request_header__struct.hpp" +#include +#include +#include + +// Include directives for member types +// Member 'identity' +#include "unitree_api/msg/detail/request_identity__traits.hpp" +// Member 'lease' +#include "unitree_api/msg/detail/request_lease__traits.hpp" +// Member 'policy' +#include "unitree_api/msg/detail/request_policy__traits.hpp" + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "unitree_api::msg::RequestHeader"; +} + +template<> +inline const char * name() +{ + return "unitree_api/msg/RequestHeader"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value && has_fixed_size::value && has_fixed_size::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value && has_bounded_size::value && has_bounded_size::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_HEADER__TRAITS_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__type_support.c b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__type_support.c new file mode 100644 index 0000000..2181cd3 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__type_support.c @@ -0,0 +1,131 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from unitree_api:msg/RequestHeader.idl +// generated code does not contain a copyright notice + +#include +#include "unitree_api/msg/detail/request_header__rosidl_typesupport_introspection_c.h" +#include "unitree_api/msg/rosidl_typesupport_introspection_c__visibility_control.h" +#include "rosidl_typesupport_introspection_c/field_types.h" +#include "rosidl_typesupport_introspection_c/identifier.h" +#include "rosidl_typesupport_introspection_c/message_introspection.h" +#include "unitree_api/msg/detail/request_header__functions.h" +#include "unitree_api/msg/detail/request_header__struct.h" + + +// Include directives for member types +// Member `identity` +#include "unitree_api/msg/request_identity.h" +// Member `identity` +#include "unitree_api/msg/detail/request_identity__rosidl_typesupport_introspection_c.h" +// Member `lease` +#include "unitree_api/msg/request_lease.h" +// Member `lease` +#include "unitree_api/msg/detail/request_lease__rosidl_typesupport_introspection_c.h" +// Member `policy` +#include "unitree_api/msg/request_policy.h" +// Member `policy` +#include "unitree_api/msg/detail/request_policy__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void RequestHeader__rosidl_typesupport_introspection_c__RequestHeader_init_function( + void * message_memory, enum rosidl_runtime_c__message_initialization _init) +{ + // TODO(karsten1987): initializers are not yet implemented for typesupport c + // see https://github.com/ros2/ros2/issues/397 + (void) _init; + unitree_api__msg__RequestHeader__init(message_memory); +} + +void RequestHeader__rosidl_typesupport_introspection_c__RequestHeader_fini_function(void * message_memory) +{ + unitree_api__msg__RequestHeader__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember RequestHeader__rosidl_typesupport_introspection_c__RequestHeader_message_member_array[3] = { + { + "identity", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_api__msg__RequestHeader, identity), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "lease", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_api__msg__RequestHeader, lease), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "policy", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_api__msg__RequestHeader, policy), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers RequestHeader__rosidl_typesupport_introspection_c__RequestHeader_message_members = { + "unitree_api__msg", // message namespace + "RequestHeader", // message name + 3, // number of fields + sizeof(unitree_api__msg__RequestHeader), + RequestHeader__rosidl_typesupport_introspection_c__RequestHeader_message_member_array, // message members + RequestHeader__rosidl_typesupport_introspection_c__RequestHeader_init_function, // function to initialize message memory (memory has to be allocated) + RequestHeader__rosidl_typesupport_introspection_c__RequestHeader_fini_function // function to terminate message instance (will not free memory) +}; + +// this is not const since it must be initialized on first access +// since C does not allow non-integral compile-time constants +static rosidl_message_type_support_t RequestHeader__rosidl_typesupport_introspection_c__RequestHeader_message_type_support_handle = { + 0, + &RequestHeader__rosidl_typesupport_introspection_c__RequestHeader_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_api +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_api, msg, RequestHeader)() { + RequestHeader__rosidl_typesupport_introspection_c__RequestHeader_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_api, msg, RequestIdentity)(); + RequestHeader__rosidl_typesupport_introspection_c__RequestHeader_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_api, msg, RequestLease)(); + RequestHeader__rosidl_typesupport_introspection_c__RequestHeader_message_member_array[2].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_api, msg, RequestPolicy)(); + if (!RequestHeader__rosidl_typesupport_introspection_c__RequestHeader_message_type_support_handle.typesupport_identifier) { + RequestHeader__rosidl_typesupport_introspection_c__RequestHeader_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &RequestHeader__rosidl_typesupport_introspection_c__RequestHeader_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__type_support.cpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__type_support.cpp new file mode 100644 index 0000000..bca9335 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__type_support.cpp @@ -0,0 +1,137 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from unitree_api:msg/RequestHeader.idl +// generated code does not contain a copyright notice + +#include "array" +#include "cstddef" +#include "string" +#include "vector" +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_cpp/message_type_support.hpp" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_api/msg/detail/request_header__struct.hpp" +#include "rosidl_typesupport_introspection_cpp/field_types.hpp" +#include "rosidl_typesupport_introspection_cpp/identifier.hpp" +#include "rosidl_typesupport_introspection_cpp/message_introspection.hpp" +#include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +namespace unitree_api +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void RequestHeader_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) unitree_api::msg::RequestHeader(_init); +} + +void RequestHeader_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~RequestHeader(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember RequestHeader_message_member_array[3] = { + { + "identity", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_api::msg::RequestHeader, identity), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "lease", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_api::msg::RequestHeader, lease), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "policy", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_api::msg::RequestHeader, policy), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers RequestHeader_message_members = { + "unitree_api::msg", // message namespace + "RequestHeader", // message name + 3, // number of fields + sizeof(unitree_api::msg::RequestHeader), + RequestHeader_message_member_array, // message members + RequestHeader_init_function, // function to initialize message memory (memory has to be allocated) + RequestHeader_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t RequestHeader_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &RequestHeader_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace unitree_api + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::unitree_api::msg::rosidl_typesupport_introspection_cpp::RequestHeader_message_type_support_handle; +} + +} // namespace rosidl_typesupport_introspection_cpp + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_api, msg, RequestHeader)() { + return &::unitree_api::msg::rosidl_typesupport_introspection_cpp::RequestHeader_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__type_support.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__type_support.h new file mode 100644 index 0000000..413960d --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from unitree_api:msg/RequestHeader.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_HEADER__TYPE_SUPPORT_H_ +#define UNITREE_API__MSG__DETAIL__REQUEST_HEADER__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_api/msg/rosidl_generator_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rosidl_runtime_c/message_type_support_struct.h" + +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + unitree_api, + msg, + RequestHeader +)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_HEADER__TYPE_SUPPORT_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__type_support.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__type_support.hpp new file mode 100644 index 0000000..1209f3a --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_header__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from unitree_api:msg/RequestHeader.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_HEADER__TYPE_SUPPORT_HPP_ +#define UNITREE_API__MSG__DETAIL__REQUEST_HEADER__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_api/msg/rosidl_generator_cpp__visibility_control.hpp" + +#include "rosidl_typesupport_cpp/message_type_support.hpp" + +#ifdef __cplusplus +extern "C" +{ +#endif +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_CPP_PUBLIC_unitree_api +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + unitree_api, + msg, + RequestHeader +)(); +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_HEADER__TYPE_SUPPORT_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__builder.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__builder.hpp new file mode 100644 index 0000000..6b1652f --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__builder.hpp @@ -0,0 +1,71 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from unitree_api:msg/RequestIdentity.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_IDENTITY__BUILDER_HPP_ +#define UNITREE_API__MSG__DETAIL__REQUEST_IDENTITY__BUILDER_HPP_ + +#include "unitree_api/msg/detail/request_identity__struct.hpp" +#include +#include +#include + + +namespace unitree_api +{ + +namespace msg +{ + +namespace builder +{ + +class Init_RequestIdentity_api_id +{ +public: + explicit Init_RequestIdentity_api_id(::unitree_api::msg::RequestIdentity & msg) + : msg_(msg) + {} + ::unitree_api::msg::RequestIdentity api_id(::unitree_api::msg::RequestIdentity::_api_id_type arg) + { + msg_.api_id = std::move(arg); + return std::move(msg_); + } + +private: + ::unitree_api::msg::RequestIdentity msg_; +}; + +class Init_RequestIdentity_id +{ +public: + Init_RequestIdentity_id() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_RequestIdentity_api_id id(::unitree_api::msg::RequestIdentity::_id_type arg) + { + msg_.id = std::move(arg); + return Init_RequestIdentity_api_id(msg_); + } + +private: + ::unitree_api::msg::RequestIdentity msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::unitree_api::msg::RequestIdentity>() +{ + return unitree_api::msg::builder::Init_RequestIdentity_id(); +} + +} // namespace unitree_api + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_IDENTITY__BUILDER_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__functions.c b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__functions.c new file mode 100644 index 0000000..50b7ce6 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__functions.c @@ -0,0 +1,239 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from unitree_api:msg/RequestIdentity.idl +// generated code does not contain a copyright notice +#include "unitree_api/msg/detail/request_identity__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +unitree_api__msg__RequestIdentity__init(unitree_api__msg__RequestIdentity * msg) +{ + if (!msg) { + return false; + } + // id + // api_id + return true; +} + +void +unitree_api__msg__RequestIdentity__fini(unitree_api__msg__RequestIdentity * msg) +{ + if (!msg) { + return; + } + // id + // api_id +} + +bool +unitree_api__msg__RequestIdentity__are_equal(const unitree_api__msg__RequestIdentity * lhs, const unitree_api__msg__RequestIdentity * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // id + if (lhs->id != rhs->id) { + return false; + } + // api_id + if (lhs->api_id != rhs->api_id) { + return false; + } + return true; +} + +bool +unitree_api__msg__RequestIdentity__copy( + const unitree_api__msg__RequestIdentity * input, + unitree_api__msg__RequestIdentity * output) +{ + if (!input || !output) { + return false; + } + // id + output->id = input->id; + // api_id + output->api_id = input->api_id; + return true; +} + +unitree_api__msg__RequestIdentity * +unitree_api__msg__RequestIdentity__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_api__msg__RequestIdentity * msg = (unitree_api__msg__RequestIdentity *)allocator.allocate(sizeof(unitree_api__msg__RequestIdentity), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(unitree_api__msg__RequestIdentity)); + bool success = unitree_api__msg__RequestIdentity__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +unitree_api__msg__RequestIdentity__destroy(unitree_api__msg__RequestIdentity * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + unitree_api__msg__RequestIdentity__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +unitree_api__msg__RequestIdentity__Sequence__init(unitree_api__msg__RequestIdentity__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_api__msg__RequestIdentity * data = NULL; + + if (size) { + data = (unitree_api__msg__RequestIdentity *)allocator.zero_allocate(size, sizeof(unitree_api__msg__RequestIdentity), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = unitree_api__msg__RequestIdentity__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + unitree_api__msg__RequestIdentity__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +unitree_api__msg__RequestIdentity__Sequence__fini(unitree_api__msg__RequestIdentity__Sequence * array) +{ + if (!array) { + return; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + + if (array->data) { + // ensure that data and capacity values are consistent + assert(array->capacity > 0); + // finalize all array elements + for (size_t i = 0; i < array->capacity; ++i) { + unitree_api__msg__RequestIdentity__fini(&array->data[i]); + } + allocator.deallocate(array->data, allocator.state); + array->data = NULL; + array->size = 0; + array->capacity = 0; + } else { + // ensure that data, size, and capacity values are consistent + assert(0 == array->size); + assert(0 == array->capacity); + } +} + +unitree_api__msg__RequestIdentity__Sequence * +unitree_api__msg__RequestIdentity__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_api__msg__RequestIdentity__Sequence * array = (unitree_api__msg__RequestIdentity__Sequence *)allocator.allocate(sizeof(unitree_api__msg__RequestIdentity__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = unitree_api__msg__RequestIdentity__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +unitree_api__msg__RequestIdentity__Sequence__destroy(unitree_api__msg__RequestIdentity__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + unitree_api__msg__RequestIdentity__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +unitree_api__msg__RequestIdentity__Sequence__are_equal(const unitree_api__msg__RequestIdentity__Sequence * lhs, const unitree_api__msg__RequestIdentity__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!unitree_api__msg__RequestIdentity__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +unitree_api__msg__RequestIdentity__Sequence__copy( + const unitree_api__msg__RequestIdentity__Sequence * input, + unitree_api__msg__RequestIdentity__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(unitree_api__msg__RequestIdentity); + unitree_api__msg__RequestIdentity * data = + (unitree_api__msg__RequestIdentity *)realloc(output->data, allocation_size); + if (!data) { + return false; + } + for (size_t i = output->capacity; i < input->size; ++i) { + if (!unitree_api__msg__RequestIdentity__init(&data[i])) { + /* free currently allocated and return false */ + for (; i-- > output->capacity; ) { + unitree_api__msg__RequestIdentity__fini(&data[i]); + } + free(data); + return false; + } + } + output->data = data; + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!unitree_api__msg__RequestIdentity__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__functions.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__functions.h new file mode 100644 index 0000000..fc84c7d --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from unitree_api:msg/RequestIdentity.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_IDENTITY__FUNCTIONS_H_ +#define UNITREE_API__MSG__DETAIL__REQUEST_IDENTITY__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_api/msg/rosidl_generator_c__visibility_control.h" + +#include "unitree_api/msg/detail/request_identity__struct.h" + +/// Initialize msg/RequestIdentity message. +/** + * If the init function is called twice for the same message without + * calling fini inbetween previously allocated memory will be leaked. + * \param[in,out] msg The previously allocated message pointer. + * Fields without a default value will not be initialized by this function. + * You might want to call memset(msg, 0, sizeof( + * unitree_api__msg__RequestIdentity + * )) before or use + * unitree_api__msg__RequestIdentity__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__RequestIdentity__init(unitree_api__msg__RequestIdentity * msg); + +/// Finalize msg/RequestIdentity message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +void +unitree_api__msg__RequestIdentity__fini(unitree_api__msg__RequestIdentity * msg); + +/// Create msg/RequestIdentity message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * unitree_api__msg__RequestIdentity__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +unitree_api__msg__RequestIdentity * +unitree_api__msg__RequestIdentity__create(); + +/// Destroy msg/RequestIdentity message. +/** + * It calls + * unitree_api__msg__RequestIdentity__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +void +unitree_api__msg__RequestIdentity__destroy(unitree_api__msg__RequestIdentity * msg); + +/// Check for msg/RequestIdentity message equality. +/** + * \param[in] lhs The message on the left hand size of the equality operator. + * \param[in] rhs The message on the right hand size of the equality operator. + * \return true if messages are equal, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__RequestIdentity__are_equal(const unitree_api__msg__RequestIdentity * lhs, const unitree_api__msg__RequestIdentity * rhs); + +/// Copy a msg/RequestIdentity message. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source message pointer. + * \param[out] output The target message pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer is null + * or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__RequestIdentity__copy( + const unitree_api__msg__RequestIdentity * input, + unitree_api__msg__RequestIdentity * output); + +/// Initialize array of msg/RequestIdentity messages. +/** + * It allocates the memory for the number of elements and calls + * unitree_api__msg__RequestIdentity__init() + * for each element of the array. + * \param[in,out] array The allocated array pointer. + * \param[in] size The size / capacity of the array. + * \return true if initialization was successful, otherwise false + * If the array pointer is valid and the size is zero it is guaranteed + # to return true. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__RequestIdentity__Sequence__init(unitree_api__msg__RequestIdentity__Sequence * array, size_t size); + +/// Finalize array of msg/RequestIdentity messages. +/** + * It calls + * unitree_api__msg__RequestIdentity__fini() + * for each element of the array and frees the memory for the number of + * elements. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +void +unitree_api__msg__RequestIdentity__Sequence__fini(unitree_api__msg__RequestIdentity__Sequence * array); + +/// Create array of msg/RequestIdentity messages. +/** + * It allocates the memory for the array and calls + * unitree_api__msg__RequestIdentity__Sequence__init(). + * \param[in] size The size / capacity of the array. + * \return The pointer to the initialized array if successful, otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +unitree_api__msg__RequestIdentity__Sequence * +unitree_api__msg__RequestIdentity__Sequence__create(size_t size); + +/// Destroy array of msg/RequestIdentity messages. +/** + * It calls + * unitree_api__msg__RequestIdentity__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +void +unitree_api__msg__RequestIdentity__Sequence__destroy(unitree_api__msg__RequestIdentity__Sequence * array); + +/// Check for msg/RequestIdentity message array equality. +/** + * \param[in] lhs The message array on the left hand size of the equality operator. + * \param[in] rhs The message array on the right hand size of the equality operator. + * \return true if message arrays are equal in size and content, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__RequestIdentity__Sequence__are_equal(const unitree_api__msg__RequestIdentity__Sequence * lhs, const unitree_api__msg__RequestIdentity__Sequence * rhs); + +/// Copy an array of msg/RequestIdentity messages. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source array pointer. + * \param[out] output The target array pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer + * is null or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__RequestIdentity__Sequence__copy( + const unitree_api__msg__RequestIdentity__Sequence * input, + unitree_api__msg__RequestIdentity__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_IDENTITY__FUNCTIONS_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__rosidl_typesupport_fastrtps_c.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 0000000..dd273e9 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,36 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from unitree_api:msg/RequestIdentity.idl +// generated code does not contain a copyright notice +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_IDENTITY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define UNITREE_API__MSG__DETAIL__REQUEST_IDENTITY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_api/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_api +size_t get_serialized_size_unitree_api__msg__RequestIdentity( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_api +size_t max_serialized_size_unitree_api__msg__RequestIdentity( + bool & full_bounded, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_api +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, unitree_api, msg, RequestIdentity)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_IDENTITY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__rosidl_typesupport_fastrtps_cpp.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 0000000..c33157f --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,79 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from unitree_api:msg/RequestIdentity.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_IDENTITY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define UNITREE_API__MSG__DETAIL__REQUEST_IDENTITY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_api/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "unitree_api/msg/detail/request_identity__struct.hpp" + +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-parameter" +# ifdef __clang__ +# pragma clang diagnostic ignored "-Wdeprecated-register" +# pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +# endif +#endif +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif + +#include "fastcdr/Cdr.h" + +namespace unitree_api +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +cdr_serialize( + const unitree_api::msg::RequestIdentity & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + unitree_api::msg::RequestIdentity & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +get_serialized_size( + const unitree_api::msg::RequestIdentity & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +max_serialized_size_RequestIdentity( + bool & full_bounded, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace unitree_api + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, unitree_api, msg, RequestIdentity)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_IDENTITY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__rosidl_typesupport_introspection_c.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__rosidl_typesupport_introspection_c.h new file mode 100644 index 0000000..40c528b --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from unitree_api:msg/RequestIdentity.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_IDENTITY__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define UNITREE_API__MSG__DETAIL__REQUEST_IDENTITY__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_api/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_api +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_api, msg, RequestIdentity)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_IDENTITY__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__rosidl_typesupport_introspection_cpp.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 0000000..c997198 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from unitree_api:msg/RequestIdentity.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_IDENTITY__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define UNITREE_API__MSG__DETAIL__REQUEST_IDENTITY__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +// TODO(dirk-thomas) these visibility macros should be message package specific +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_api, msg, RequestIdentity)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_IDENTITY__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__struct.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__struct.h new file mode 100644 index 0000000..61cb375 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__struct.h @@ -0,0 +1,41 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from unitree_api:msg/RequestIdentity.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_IDENTITY__STRUCT_H_ +#define UNITREE_API__MSG__DETAIL__REQUEST_IDENTITY__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Struct defined in msg/RequestIdentity in the package unitree_api. +typedef struct unitree_api__msg__RequestIdentity +{ + int64_t id; + int64_t api_id; +} unitree_api__msg__RequestIdentity; + +// Struct for a sequence of unitree_api__msg__RequestIdentity. +typedef struct unitree_api__msg__RequestIdentity__Sequence +{ + unitree_api__msg__RequestIdentity * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} unitree_api__msg__RequestIdentity__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_IDENTITY__STRUCT_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__struct.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__struct.hpp new file mode 100644 index 0000000..b5d44ed --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__struct.hpp @@ -0,0 +1,144 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from unitree_api:msg/RequestIdentity.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_IDENTITY__STRUCT_HPP_ +#define UNITREE_API__MSG__DETAIL__REQUEST_IDENTITY__STRUCT_HPP_ + +#include +#include +#include +#include +#include +#include +#include + + +#ifndef _WIN32 +# define DEPRECATED__unitree_api__msg__RequestIdentity __attribute__((deprecated)) +#else +# define DEPRECATED__unitree_api__msg__RequestIdentity __declspec(deprecated) +#endif + +namespace unitree_api +{ + +namespace msg +{ + +// message struct +template +struct RequestIdentity_ +{ + using Type = RequestIdentity_; + + explicit RequestIdentity_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->id = 0ll; + this->api_id = 0ll; + } + } + + explicit RequestIdentity_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + (void)_alloc; + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->id = 0ll; + this->api_id = 0ll; + } + } + + // field types and members + using _id_type = + int64_t; + _id_type id; + using _api_id_type = + int64_t; + _api_id_type api_id; + + // setters for named parameter idiom + Type & set__id( + const int64_t & _arg) + { + this->id = _arg; + return *this; + } + Type & set__api_id( + const int64_t & _arg) + { + this->api_id = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + unitree_api::msg::RequestIdentity_ *; + using ConstRawPtr = + const unitree_api::msg::RequestIdentity_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr const>; + + // pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead + // NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly + typedef DEPRECATED__unitree_api__msg__RequestIdentity + std::shared_ptr> + Ptr; + typedef DEPRECATED__unitree_api__msg__RequestIdentity + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const RequestIdentity_ & other) const + { + if (this->id != other.id) { + return false; + } + if (this->api_id != other.api_id) { + return false; + } + return true; + } + bool operator!=(const RequestIdentity_ & other) const + { + return !this->operator==(other); + } +}; // struct RequestIdentity_ + +// alias to use template instance with default allocator +using RequestIdentity = + unitree_api::msg::RequestIdentity_>; + +// constant definitions + +} // namespace msg + +} // namespace unitree_api + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_IDENTITY__STRUCT_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__traits.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__traits.hpp new file mode 100644 index 0000000..67968dc --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__traits.hpp @@ -0,0 +1,42 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from unitree_api:msg/RequestIdentity.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_IDENTITY__TRAITS_HPP_ +#define UNITREE_API__MSG__DETAIL__REQUEST_IDENTITY__TRAITS_HPP_ + +#include "unitree_api/msg/detail/request_identity__struct.hpp" +#include +#include +#include + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "unitree_api::msg::RequestIdentity"; +} + +template<> +inline const char * name() +{ + return "unitree_api/msg/RequestIdentity"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_IDENTITY__TRAITS_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__type_support.c b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__type_support.c new file mode 100644 index 0000000..e0863ab --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__type_support.c @@ -0,0 +1,96 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from unitree_api:msg/RequestIdentity.idl +// generated code does not contain a copyright notice + +#include +#include "unitree_api/msg/detail/request_identity__rosidl_typesupport_introspection_c.h" +#include "unitree_api/msg/rosidl_typesupport_introspection_c__visibility_control.h" +#include "rosidl_typesupport_introspection_c/field_types.h" +#include "rosidl_typesupport_introspection_c/identifier.h" +#include "rosidl_typesupport_introspection_c/message_introspection.h" +#include "unitree_api/msg/detail/request_identity__functions.h" +#include "unitree_api/msg/detail/request_identity__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void RequestIdentity__rosidl_typesupport_introspection_c__RequestIdentity_init_function( + void * message_memory, enum rosidl_runtime_c__message_initialization _init) +{ + // TODO(karsten1987): initializers are not yet implemented for typesupport c + // see https://github.com/ros2/ros2/issues/397 + (void) _init; + unitree_api__msg__RequestIdentity__init(message_memory); +} + +void RequestIdentity__rosidl_typesupport_introspection_c__RequestIdentity_fini_function(void * message_memory) +{ + unitree_api__msg__RequestIdentity__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember RequestIdentity__rosidl_typesupport_introspection_c__RequestIdentity_message_member_array[2] = { + { + "id", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT64, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_api__msg__RequestIdentity, id), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "api_id", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT64, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_api__msg__RequestIdentity, api_id), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers RequestIdentity__rosidl_typesupport_introspection_c__RequestIdentity_message_members = { + "unitree_api__msg", // message namespace + "RequestIdentity", // message name + 2, // number of fields + sizeof(unitree_api__msg__RequestIdentity), + RequestIdentity__rosidl_typesupport_introspection_c__RequestIdentity_message_member_array, // message members + RequestIdentity__rosidl_typesupport_introspection_c__RequestIdentity_init_function, // function to initialize message memory (memory has to be allocated) + RequestIdentity__rosidl_typesupport_introspection_c__RequestIdentity_fini_function // function to terminate message instance (will not free memory) +}; + +// this is not const since it must be initialized on first access +// since C does not allow non-integral compile-time constants +static rosidl_message_type_support_t RequestIdentity__rosidl_typesupport_introspection_c__RequestIdentity_message_type_support_handle = { + 0, + &RequestIdentity__rosidl_typesupport_introspection_c__RequestIdentity_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_api +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_api, msg, RequestIdentity)() { + if (!RequestIdentity__rosidl_typesupport_introspection_c__RequestIdentity_message_type_support_handle.typesupport_identifier) { + RequestIdentity__rosidl_typesupport_introspection_c__RequestIdentity_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &RequestIdentity__rosidl_typesupport_introspection_c__RequestIdentity_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__type_support.cpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__type_support.cpp new file mode 100644 index 0000000..4040655 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__type_support.cpp @@ -0,0 +1,122 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from unitree_api:msg/RequestIdentity.idl +// generated code does not contain a copyright notice + +#include "array" +#include "cstddef" +#include "string" +#include "vector" +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_cpp/message_type_support.hpp" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_api/msg/detail/request_identity__struct.hpp" +#include "rosidl_typesupport_introspection_cpp/field_types.hpp" +#include "rosidl_typesupport_introspection_cpp/identifier.hpp" +#include "rosidl_typesupport_introspection_cpp/message_introspection.hpp" +#include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +namespace unitree_api +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void RequestIdentity_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) unitree_api::msg::RequestIdentity(_init); +} + +void RequestIdentity_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~RequestIdentity(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember RequestIdentity_message_member_array[2] = { + { + "id", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT64, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_api::msg::RequestIdentity, id), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "api_id", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT64, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_api::msg::RequestIdentity, api_id), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers RequestIdentity_message_members = { + "unitree_api::msg", // message namespace + "RequestIdentity", // message name + 2, // number of fields + sizeof(unitree_api::msg::RequestIdentity), + RequestIdentity_message_member_array, // message members + RequestIdentity_init_function, // function to initialize message memory (memory has to be allocated) + RequestIdentity_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t RequestIdentity_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &RequestIdentity_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace unitree_api + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::unitree_api::msg::rosidl_typesupport_introspection_cpp::RequestIdentity_message_type_support_handle; +} + +} // namespace rosidl_typesupport_introspection_cpp + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_api, msg, RequestIdentity)() { + return &::unitree_api::msg::rosidl_typesupport_introspection_cpp::RequestIdentity_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__type_support.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__type_support.h new file mode 100644 index 0000000..1e0dae5 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from unitree_api:msg/RequestIdentity.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_IDENTITY__TYPE_SUPPORT_H_ +#define UNITREE_API__MSG__DETAIL__REQUEST_IDENTITY__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_api/msg/rosidl_generator_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rosidl_runtime_c/message_type_support_struct.h" + +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + unitree_api, + msg, + RequestIdentity +)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_IDENTITY__TYPE_SUPPORT_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__type_support.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__type_support.hpp new file mode 100644 index 0000000..760a84e --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_identity__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from unitree_api:msg/RequestIdentity.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_IDENTITY__TYPE_SUPPORT_HPP_ +#define UNITREE_API__MSG__DETAIL__REQUEST_IDENTITY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_api/msg/rosidl_generator_cpp__visibility_control.hpp" + +#include "rosidl_typesupport_cpp/message_type_support.hpp" + +#ifdef __cplusplus +extern "C" +{ +#endif +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_CPP_PUBLIC_unitree_api +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + unitree_api, + msg, + RequestIdentity +)(); +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_IDENTITY__TYPE_SUPPORT_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__builder.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__builder.hpp new file mode 100644 index 0000000..e1a77fc --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__builder.hpp @@ -0,0 +1,55 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from unitree_api:msg/RequestLease.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_LEASE__BUILDER_HPP_ +#define UNITREE_API__MSG__DETAIL__REQUEST_LEASE__BUILDER_HPP_ + +#include "unitree_api/msg/detail/request_lease__struct.hpp" +#include +#include +#include + + +namespace unitree_api +{ + +namespace msg +{ + +namespace builder +{ + +class Init_RequestLease_id +{ +public: + Init_RequestLease_id() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + ::unitree_api::msg::RequestLease id(::unitree_api::msg::RequestLease::_id_type arg) + { + msg_.id = std::move(arg); + return std::move(msg_); + } + +private: + ::unitree_api::msg::RequestLease msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::unitree_api::msg::RequestLease>() +{ + return unitree_api::msg::builder::Init_RequestLease_id(); +} + +} // namespace unitree_api + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_LEASE__BUILDER_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__functions.c b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__functions.c new file mode 100644 index 0000000..101bb8e --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__functions.c @@ -0,0 +1,231 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from unitree_api:msg/RequestLease.idl +// generated code does not contain a copyright notice +#include "unitree_api/msg/detail/request_lease__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +unitree_api__msg__RequestLease__init(unitree_api__msg__RequestLease * msg) +{ + if (!msg) { + return false; + } + // id + return true; +} + +void +unitree_api__msg__RequestLease__fini(unitree_api__msg__RequestLease * msg) +{ + if (!msg) { + return; + } + // id +} + +bool +unitree_api__msg__RequestLease__are_equal(const unitree_api__msg__RequestLease * lhs, const unitree_api__msg__RequestLease * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // id + if (lhs->id != rhs->id) { + return false; + } + return true; +} + +bool +unitree_api__msg__RequestLease__copy( + const unitree_api__msg__RequestLease * input, + unitree_api__msg__RequestLease * output) +{ + if (!input || !output) { + return false; + } + // id + output->id = input->id; + return true; +} + +unitree_api__msg__RequestLease * +unitree_api__msg__RequestLease__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_api__msg__RequestLease * msg = (unitree_api__msg__RequestLease *)allocator.allocate(sizeof(unitree_api__msg__RequestLease), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(unitree_api__msg__RequestLease)); + bool success = unitree_api__msg__RequestLease__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +unitree_api__msg__RequestLease__destroy(unitree_api__msg__RequestLease * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + unitree_api__msg__RequestLease__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +unitree_api__msg__RequestLease__Sequence__init(unitree_api__msg__RequestLease__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_api__msg__RequestLease * data = NULL; + + if (size) { + data = (unitree_api__msg__RequestLease *)allocator.zero_allocate(size, sizeof(unitree_api__msg__RequestLease), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = unitree_api__msg__RequestLease__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + unitree_api__msg__RequestLease__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +unitree_api__msg__RequestLease__Sequence__fini(unitree_api__msg__RequestLease__Sequence * array) +{ + if (!array) { + return; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + + if (array->data) { + // ensure that data and capacity values are consistent + assert(array->capacity > 0); + // finalize all array elements + for (size_t i = 0; i < array->capacity; ++i) { + unitree_api__msg__RequestLease__fini(&array->data[i]); + } + allocator.deallocate(array->data, allocator.state); + array->data = NULL; + array->size = 0; + array->capacity = 0; + } else { + // ensure that data, size, and capacity values are consistent + assert(0 == array->size); + assert(0 == array->capacity); + } +} + +unitree_api__msg__RequestLease__Sequence * +unitree_api__msg__RequestLease__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_api__msg__RequestLease__Sequence * array = (unitree_api__msg__RequestLease__Sequence *)allocator.allocate(sizeof(unitree_api__msg__RequestLease__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = unitree_api__msg__RequestLease__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +unitree_api__msg__RequestLease__Sequence__destroy(unitree_api__msg__RequestLease__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + unitree_api__msg__RequestLease__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +unitree_api__msg__RequestLease__Sequence__are_equal(const unitree_api__msg__RequestLease__Sequence * lhs, const unitree_api__msg__RequestLease__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!unitree_api__msg__RequestLease__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +unitree_api__msg__RequestLease__Sequence__copy( + const unitree_api__msg__RequestLease__Sequence * input, + unitree_api__msg__RequestLease__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(unitree_api__msg__RequestLease); + unitree_api__msg__RequestLease * data = + (unitree_api__msg__RequestLease *)realloc(output->data, allocation_size); + if (!data) { + return false; + } + for (size_t i = output->capacity; i < input->size; ++i) { + if (!unitree_api__msg__RequestLease__init(&data[i])) { + /* free currently allocated and return false */ + for (; i-- > output->capacity; ) { + unitree_api__msg__RequestLease__fini(&data[i]); + } + free(data); + return false; + } + } + output->data = data; + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!unitree_api__msg__RequestLease__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__functions.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__functions.h new file mode 100644 index 0000000..50d8c29 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from unitree_api:msg/RequestLease.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_LEASE__FUNCTIONS_H_ +#define UNITREE_API__MSG__DETAIL__REQUEST_LEASE__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_api/msg/rosidl_generator_c__visibility_control.h" + +#include "unitree_api/msg/detail/request_lease__struct.h" + +/// Initialize msg/RequestLease message. +/** + * If the init function is called twice for the same message without + * calling fini inbetween previously allocated memory will be leaked. + * \param[in,out] msg The previously allocated message pointer. + * Fields without a default value will not be initialized by this function. + * You might want to call memset(msg, 0, sizeof( + * unitree_api__msg__RequestLease + * )) before or use + * unitree_api__msg__RequestLease__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__RequestLease__init(unitree_api__msg__RequestLease * msg); + +/// Finalize msg/RequestLease message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +void +unitree_api__msg__RequestLease__fini(unitree_api__msg__RequestLease * msg); + +/// Create msg/RequestLease message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * unitree_api__msg__RequestLease__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +unitree_api__msg__RequestLease * +unitree_api__msg__RequestLease__create(); + +/// Destroy msg/RequestLease message. +/** + * It calls + * unitree_api__msg__RequestLease__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +void +unitree_api__msg__RequestLease__destroy(unitree_api__msg__RequestLease * msg); + +/// Check for msg/RequestLease message equality. +/** + * \param[in] lhs The message on the left hand size of the equality operator. + * \param[in] rhs The message on the right hand size of the equality operator. + * \return true if messages are equal, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__RequestLease__are_equal(const unitree_api__msg__RequestLease * lhs, const unitree_api__msg__RequestLease * rhs); + +/// Copy a msg/RequestLease message. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source message pointer. + * \param[out] output The target message pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer is null + * or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__RequestLease__copy( + const unitree_api__msg__RequestLease * input, + unitree_api__msg__RequestLease * output); + +/// Initialize array of msg/RequestLease messages. +/** + * It allocates the memory for the number of elements and calls + * unitree_api__msg__RequestLease__init() + * for each element of the array. + * \param[in,out] array The allocated array pointer. + * \param[in] size The size / capacity of the array. + * \return true if initialization was successful, otherwise false + * If the array pointer is valid and the size is zero it is guaranteed + # to return true. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__RequestLease__Sequence__init(unitree_api__msg__RequestLease__Sequence * array, size_t size); + +/// Finalize array of msg/RequestLease messages. +/** + * It calls + * unitree_api__msg__RequestLease__fini() + * for each element of the array and frees the memory for the number of + * elements. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +void +unitree_api__msg__RequestLease__Sequence__fini(unitree_api__msg__RequestLease__Sequence * array); + +/// Create array of msg/RequestLease messages. +/** + * It allocates the memory for the array and calls + * unitree_api__msg__RequestLease__Sequence__init(). + * \param[in] size The size / capacity of the array. + * \return The pointer to the initialized array if successful, otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +unitree_api__msg__RequestLease__Sequence * +unitree_api__msg__RequestLease__Sequence__create(size_t size); + +/// Destroy array of msg/RequestLease messages. +/** + * It calls + * unitree_api__msg__RequestLease__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +void +unitree_api__msg__RequestLease__Sequence__destroy(unitree_api__msg__RequestLease__Sequence * array); + +/// Check for msg/RequestLease message array equality. +/** + * \param[in] lhs The message array on the left hand size of the equality operator. + * \param[in] rhs The message array on the right hand size of the equality operator. + * \return true if message arrays are equal in size and content, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__RequestLease__Sequence__are_equal(const unitree_api__msg__RequestLease__Sequence * lhs, const unitree_api__msg__RequestLease__Sequence * rhs); + +/// Copy an array of msg/RequestLease messages. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source array pointer. + * \param[out] output The target array pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer + * is null or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__RequestLease__Sequence__copy( + const unitree_api__msg__RequestLease__Sequence * input, + unitree_api__msg__RequestLease__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_LEASE__FUNCTIONS_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__rosidl_typesupport_fastrtps_c.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 0000000..6f33d15 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,36 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from unitree_api:msg/RequestLease.idl +// generated code does not contain a copyright notice +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_LEASE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define UNITREE_API__MSG__DETAIL__REQUEST_LEASE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_api/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_api +size_t get_serialized_size_unitree_api__msg__RequestLease( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_api +size_t max_serialized_size_unitree_api__msg__RequestLease( + bool & full_bounded, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_api +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, unitree_api, msg, RequestLease)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_LEASE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__rosidl_typesupport_fastrtps_cpp.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 0000000..c5cbd21 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,79 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from unitree_api:msg/RequestLease.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_LEASE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define UNITREE_API__MSG__DETAIL__REQUEST_LEASE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_api/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "unitree_api/msg/detail/request_lease__struct.hpp" + +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-parameter" +# ifdef __clang__ +# pragma clang diagnostic ignored "-Wdeprecated-register" +# pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +# endif +#endif +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif + +#include "fastcdr/Cdr.h" + +namespace unitree_api +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +cdr_serialize( + const unitree_api::msg::RequestLease & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + unitree_api::msg::RequestLease & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +get_serialized_size( + const unitree_api::msg::RequestLease & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +max_serialized_size_RequestLease( + bool & full_bounded, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace unitree_api + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, unitree_api, msg, RequestLease)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_LEASE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__rosidl_typesupport_introspection_c.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__rosidl_typesupport_introspection_c.h new file mode 100644 index 0000000..1fc3f11 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from unitree_api:msg/RequestLease.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_LEASE__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define UNITREE_API__MSG__DETAIL__REQUEST_LEASE__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_api/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_api +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_api, msg, RequestLease)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_LEASE__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__rosidl_typesupport_introspection_cpp.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 0000000..1780367 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from unitree_api:msg/RequestLease.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_LEASE__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define UNITREE_API__MSG__DETAIL__REQUEST_LEASE__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +// TODO(dirk-thomas) these visibility macros should be message package specific +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_api, msg, RequestLease)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_LEASE__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__struct.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__struct.h new file mode 100644 index 0000000..bdc3174 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__struct.h @@ -0,0 +1,40 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from unitree_api:msg/RequestLease.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_LEASE__STRUCT_H_ +#define UNITREE_API__MSG__DETAIL__REQUEST_LEASE__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Struct defined in msg/RequestLease in the package unitree_api. +typedef struct unitree_api__msg__RequestLease +{ + int64_t id; +} unitree_api__msg__RequestLease; + +// Struct for a sequence of unitree_api__msg__RequestLease. +typedef struct unitree_api__msg__RequestLease__Sequence +{ + unitree_api__msg__RequestLease * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} unitree_api__msg__RequestLease__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_LEASE__STRUCT_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__struct.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__struct.hpp new file mode 100644 index 0000000..f07dd09 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__struct.hpp @@ -0,0 +1,130 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from unitree_api:msg/RequestLease.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_LEASE__STRUCT_HPP_ +#define UNITREE_API__MSG__DETAIL__REQUEST_LEASE__STRUCT_HPP_ + +#include +#include +#include +#include +#include +#include +#include + + +#ifndef _WIN32 +# define DEPRECATED__unitree_api__msg__RequestLease __attribute__((deprecated)) +#else +# define DEPRECATED__unitree_api__msg__RequestLease __declspec(deprecated) +#endif + +namespace unitree_api +{ + +namespace msg +{ + +// message struct +template +struct RequestLease_ +{ + using Type = RequestLease_; + + explicit RequestLease_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->id = 0ll; + } + } + + explicit RequestLease_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + (void)_alloc; + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->id = 0ll; + } + } + + // field types and members + using _id_type = + int64_t; + _id_type id; + + // setters for named parameter idiom + Type & set__id( + const int64_t & _arg) + { + this->id = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + unitree_api::msg::RequestLease_ *; + using ConstRawPtr = + const unitree_api::msg::RequestLease_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr const>; + + // pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead + // NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly + typedef DEPRECATED__unitree_api__msg__RequestLease + std::shared_ptr> + Ptr; + typedef DEPRECATED__unitree_api__msg__RequestLease + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const RequestLease_ & other) const + { + if (this->id != other.id) { + return false; + } + return true; + } + bool operator!=(const RequestLease_ & other) const + { + return !this->operator==(other); + } +}; // struct RequestLease_ + +// alias to use template instance with default allocator +using RequestLease = + unitree_api::msg::RequestLease_>; + +// constant definitions + +} // namespace msg + +} // namespace unitree_api + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_LEASE__STRUCT_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__traits.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__traits.hpp new file mode 100644 index 0000000..2bc3ad2 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__traits.hpp @@ -0,0 +1,42 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from unitree_api:msg/RequestLease.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_LEASE__TRAITS_HPP_ +#define UNITREE_API__MSG__DETAIL__REQUEST_LEASE__TRAITS_HPP_ + +#include "unitree_api/msg/detail/request_lease__struct.hpp" +#include +#include +#include + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "unitree_api::msg::RequestLease"; +} + +template<> +inline const char * name() +{ + return "unitree_api/msg/RequestLease"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_LEASE__TRAITS_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__type_support.c b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__type_support.c new file mode 100644 index 0000000..3e2e1c3 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__type_support.c @@ -0,0 +1,81 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from unitree_api:msg/RequestLease.idl +// generated code does not contain a copyright notice + +#include +#include "unitree_api/msg/detail/request_lease__rosidl_typesupport_introspection_c.h" +#include "unitree_api/msg/rosidl_typesupport_introspection_c__visibility_control.h" +#include "rosidl_typesupport_introspection_c/field_types.h" +#include "rosidl_typesupport_introspection_c/identifier.h" +#include "rosidl_typesupport_introspection_c/message_introspection.h" +#include "unitree_api/msg/detail/request_lease__functions.h" +#include "unitree_api/msg/detail/request_lease__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void RequestLease__rosidl_typesupport_introspection_c__RequestLease_init_function( + void * message_memory, enum rosidl_runtime_c__message_initialization _init) +{ + // TODO(karsten1987): initializers are not yet implemented for typesupport c + // see https://github.com/ros2/ros2/issues/397 + (void) _init; + unitree_api__msg__RequestLease__init(message_memory); +} + +void RequestLease__rosidl_typesupport_introspection_c__RequestLease_fini_function(void * message_memory) +{ + unitree_api__msg__RequestLease__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember RequestLease__rosidl_typesupport_introspection_c__RequestLease_message_member_array[1] = { + { + "id", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT64, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_api__msg__RequestLease, id), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers RequestLease__rosidl_typesupport_introspection_c__RequestLease_message_members = { + "unitree_api__msg", // message namespace + "RequestLease", // message name + 1, // number of fields + sizeof(unitree_api__msg__RequestLease), + RequestLease__rosidl_typesupport_introspection_c__RequestLease_message_member_array, // message members + RequestLease__rosidl_typesupport_introspection_c__RequestLease_init_function, // function to initialize message memory (memory has to be allocated) + RequestLease__rosidl_typesupport_introspection_c__RequestLease_fini_function // function to terminate message instance (will not free memory) +}; + +// this is not const since it must be initialized on first access +// since C does not allow non-integral compile-time constants +static rosidl_message_type_support_t RequestLease__rosidl_typesupport_introspection_c__RequestLease_message_type_support_handle = { + 0, + &RequestLease__rosidl_typesupport_introspection_c__RequestLease_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_api +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_api, msg, RequestLease)() { + if (!RequestLease__rosidl_typesupport_introspection_c__RequestLease_message_type_support_handle.typesupport_identifier) { + RequestLease__rosidl_typesupport_introspection_c__RequestLease_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &RequestLease__rosidl_typesupport_introspection_c__RequestLease_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__type_support.cpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__type_support.cpp new file mode 100644 index 0000000..0fb2579 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__type_support.cpp @@ -0,0 +1,107 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from unitree_api:msg/RequestLease.idl +// generated code does not contain a copyright notice + +#include "array" +#include "cstddef" +#include "string" +#include "vector" +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_cpp/message_type_support.hpp" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_api/msg/detail/request_lease__struct.hpp" +#include "rosidl_typesupport_introspection_cpp/field_types.hpp" +#include "rosidl_typesupport_introspection_cpp/identifier.hpp" +#include "rosidl_typesupport_introspection_cpp/message_introspection.hpp" +#include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +namespace unitree_api +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void RequestLease_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) unitree_api::msg::RequestLease(_init); +} + +void RequestLease_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~RequestLease(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember RequestLease_message_member_array[1] = { + { + "id", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT64, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_api::msg::RequestLease, id), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers RequestLease_message_members = { + "unitree_api::msg", // message namespace + "RequestLease", // message name + 1, // number of fields + sizeof(unitree_api::msg::RequestLease), + RequestLease_message_member_array, // message members + RequestLease_init_function, // function to initialize message memory (memory has to be allocated) + RequestLease_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t RequestLease_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &RequestLease_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace unitree_api + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::unitree_api::msg::rosidl_typesupport_introspection_cpp::RequestLease_message_type_support_handle; +} + +} // namespace rosidl_typesupport_introspection_cpp + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_api, msg, RequestLease)() { + return &::unitree_api::msg::rosidl_typesupport_introspection_cpp::RequestLease_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__type_support.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__type_support.h new file mode 100644 index 0000000..226b055 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from unitree_api:msg/RequestLease.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_LEASE__TYPE_SUPPORT_H_ +#define UNITREE_API__MSG__DETAIL__REQUEST_LEASE__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_api/msg/rosidl_generator_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rosidl_runtime_c/message_type_support_struct.h" + +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + unitree_api, + msg, + RequestLease +)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_LEASE__TYPE_SUPPORT_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__type_support.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__type_support.hpp new file mode 100644 index 0000000..a5a577a --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_lease__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from unitree_api:msg/RequestLease.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_LEASE__TYPE_SUPPORT_HPP_ +#define UNITREE_API__MSG__DETAIL__REQUEST_LEASE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_api/msg/rosidl_generator_cpp__visibility_control.hpp" + +#include "rosidl_typesupport_cpp/message_type_support.hpp" + +#ifdef __cplusplus +extern "C" +{ +#endif +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_CPP_PUBLIC_unitree_api +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + unitree_api, + msg, + RequestLease +)(); +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_LEASE__TYPE_SUPPORT_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__builder.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__builder.hpp new file mode 100644 index 0000000..a84b681 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__builder.hpp @@ -0,0 +1,71 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from unitree_api:msg/RequestPolicy.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_POLICY__BUILDER_HPP_ +#define UNITREE_API__MSG__DETAIL__REQUEST_POLICY__BUILDER_HPP_ + +#include "unitree_api/msg/detail/request_policy__struct.hpp" +#include +#include +#include + + +namespace unitree_api +{ + +namespace msg +{ + +namespace builder +{ + +class Init_RequestPolicy_noreply +{ +public: + explicit Init_RequestPolicy_noreply(::unitree_api::msg::RequestPolicy & msg) + : msg_(msg) + {} + ::unitree_api::msg::RequestPolicy noreply(::unitree_api::msg::RequestPolicy::_noreply_type arg) + { + msg_.noreply = std::move(arg); + return std::move(msg_); + } + +private: + ::unitree_api::msg::RequestPolicy msg_; +}; + +class Init_RequestPolicy_priority +{ +public: + Init_RequestPolicy_priority() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_RequestPolicy_noreply priority(::unitree_api::msg::RequestPolicy::_priority_type arg) + { + msg_.priority = std::move(arg); + return Init_RequestPolicy_noreply(msg_); + } + +private: + ::unitree_api::msg::RequestPolicy msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::unitree_api::msg::RequestPolicy>() +{ + return unitree_api::msg::builder::Init_RequestPolicy_priority(); +} + +} // namespace unitree_api + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_POLICY__BUILDER_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__functions.c b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__functions.c new file mode 100644 index 0000000..8cf1965 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__functions.c @@ -0,0 +1,239 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from unitree_api:msg/RequestPolicy.idl +// generated code does not contain a copyright notice +#include "unitree_api/msg/detail/request_policy__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +unitree_api__msg__RequestPolicy__init(unitree_api__msg__RequestPolicy * msg) +{ + if (!msg) { + return false; + } + // priority + // noreply + return true; +} + +void +unitree_api__msg__RequestPolicy__fini(unitree_api__msg__RequestPolicy * msg) +{ + if (!msg) { + return; + } + // priority + // noreply +} + +bool +unitree_api__msg__RequestPolicy__are_equal(const unitree_api__msg__RequestPolicy * lhs, const unitree_api__msg__RequestPolicy * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // priority + if (lhs->priority != rhs->priority) { + return false; + } + // noreply + if (lhs->noreply != rhs->noreply) { + return false; + } + return true; +} + +bool +unitree_api__msg__RequestPolicy__copy( + const unitree_api__msg__RequestPolicy * input, + unitree_api__msg__RequestPolicy * output) +{ + if (!input || !output) { + return false; + } + // priority + output->priority = input->priority; + // noreply + output->noreply = input->noreply; + return true; +} + +unitree_api__msg__RequestPolicy * +unitree_api__msg__RequestPolicy__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_api__msg__RequestPolicy * msg = (unitree_api__msg__RequestPolicy *)allocator.allocate(sizeof(unitree_api__msg__RequestPolicy), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(unitree_api__msg__RequestPolicy)); + bool success = unitree_api__msg__RequestPolicy__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +unitree_api__msg__RequestPolicy__destroy(unitree_api__msg__RequestPolicy * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + unitree_api__msg__RequestPolicy__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +unitree_api__msg__RequestPolicy__Sequence__init(unitree_api__msg__RequestPolicy__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_api__msg__RequestPolicy * data = NULL; + + if (size) { + data = (unitree_api__msg__RequestPolicy *)allocator.zero_allocate(size, sizeof(unitree_api__msg__RequestPolicy), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = unitree_api__msg__RequestPolicy__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + unitree_api__msg__RequestPolicy__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +unitree_api__msg__RequestPolicy__Sequence__fini(unitree_api__msg__RequestPolicy__Sequence * array) +{ + if (!array) { + return; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + + if (array->data) { + // ensure that data and capacity values are consistent + assert(array->capacity > 0); + // finalize all array elements + for (size_t i = 0; i < array->capacity; ++i) { + unitree_api__msg__RequestPolicy__fini(&array->data[i]); + } + allocator.deallocate(array->data, allocator.state); + array->data = NULL; + array->size = 0; + array->capacity = 0; + } else { + // ensure that data, size, and capacity values are consistent + assert(0 == array->size); + assert(0 == array->capacity); + } +} + +unitree_api__msg__RequestPolicy__Sequence * +unitree_api__msg__RequestPolicy__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_api__msg__RequestPolicy__Sequence * array = (unitree_api__msg__RequestPolicy__Sequence *)allocator.allocate(sizeof(unitree_api__msg__RequestPolicy__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = unitree_api__msg__RequestPolicy__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +unitree_api__msg__RequestPolicy__Sequence__destroy(unitree_api__msg__RequestPolicy__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + unitree_api__msg__RequestPolicy__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +unitree_api__msg__RequestPolicy__Sequence__are_equal(const unitree_api__msg__RequestPolicy__Sequence * lhs, const unitree_api__msg__RequestPolicy__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!unitree_api__msg__RequestPolicy__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +unitree_api__msg__RequestPolicy__Sequence__copy( + const unitree_api__msg__RequestPolicy__Sequence * input, + unitree_api__msg__RequestPolicy__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(unitree_api__msg__RequestPolicy); + unitree_api__msg__RequestPolicy * data = + (unitree_api__msg__RequestPolicy *)realloc(output->data, allocation_size); + if (!data) { + return false; + } + for (size_t i = output->capacity; i < input->size; ++i) { + if (!unitree_api__msg__RequestPolicy__init(&data[i])) { + /* free currently allocated and return false */ + for (; i-- > output->capacity; ) { + unitree_api__msg__RequestPolicy__fini(&data[i]); + } + free(data); + return false; + } + } + output->data = data; + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!unitree_api__msg__RequestPolicy__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__functions.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__functions.h new file mode 100644 index 0000000..af9c364 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from unitree_api:msg/RequestPolicy.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_POLICY__FUNCTIONS_H_ +#define UNITREE_API__MSG__DETAIL__REQUEST_POLICY__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_api/msg/rosidl_generator_c__visibility_control.h" + +#include "unitree_api/msg/detail/request_policy__struct.h" + +/// Initialize msg/RequestPolicy message. +/** + * If the init function is called twice for the same message without + * calling fini inbetween previously allocated memory will be leaked. + * \param[in,out] msg The previously allocated message pointer. + * Fields without a default value will not be initialized by this function. + * You might want to call memset(msg, 0, sizeof( + * unitree_api__msg__RequestPolicy + * )) before or use + * unitree_api__msg__RequestPolicy__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__RequestPolicy__init(unitree_api__msg__RequestPolicy * msg); + +/// Finalize msg/RequestPolicy message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +void +unitree_api__msg__RequestPolicy__fini(unitree_api__msg__RequestPolicy * msg); + +/// Create msg/RequestPolicy message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * unitree_api__msg__RequestPolicy__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +unitree_api__msg__RequestPolicy * +unitree_api__msg__RequestPolicy__create(); + +/// Destroy msg/RequestPolicy message. +/** + * It calls + * unitree_api__msg__RequestPolicy__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +void +unitree_api__msg__RequestPolicy__destroy(unitree_api__msg__RequestPolicy * msg); + +/// Check for msg/RequestPolicy message equality. +/** + * \param[in] lhs The message on the left hand size of the equality operator. + * \param[in] rhs The message on the right hand size of the equality operator. + * \return true if messages are equal, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__RequestPolicy__are_equal(const unitree_api__msg__RequestPolicy * lhs, const unitree_api__msg__RequestPolicy * rhs); + +/// Copy a msg/RequestPolicy message. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source message pointer. + * \param[out] output The target message pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer is null + * or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__RequestPolicy__copy( + const unitree_api__msg__RequestPolicy * input, + unitree_api__msg__RequestPolicy * output); + +/// Initialize array of msg/RequestPolicy messages. +/** + * It allocates the memory for the number of elements and calls + * unitree_api__msg__RequestPolicy__init() + * for each element of the array. + * \param[in,out] array The allocated array pointer. + * \param[in] size The size / capacity of the array. + * \return true if initialization was successful, otherwise false + * If the array pointer is valid and the size is zero it is guaranteed + # to return true. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__RequestPolicy__Sequence__init(unitree_api__msg__RequestPolicy__Sequence * array, size_t size); + +/// Finalize array of msg/RequestPolicy messages. +/** + * It calls + * unitree_api__msg__RequestPolicy__fini() + * for each element of the array and frees the memory for the number of + * elements. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +void +unitree_api__msg__RequestPolicy__Sequence__fini(unitree_api__msg__RequestPolicy__Sequence * array); + +/// Create array of msg/RequestPolicy messages. +/** + * It allocates the memory for the array and calls + * unitree_api__msg__RequestPolicy__Sequence__init(). + * \param[in] size The size / capacity of the array. + * \return The pointer to the initialized array if successful, otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +unitree_api__msg__RequestPolicy__Sequence * +unitree_api__msg__RequestPolicy__Sequence__create(size_t size); + +/// Destroy array of msg/RequestPolicy messages. +/** + * It calls + * unitree_api__msg__RequestPolicy__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +void +unitree_api__msg__RequestPolicy__Sequence__destroy(unitree_api__msg__RequestPolicy__Sequence * array); + +/// Check for msg/RequestPolicy message array equality. +/** + * \param[in] lhs The message array on the left hand size of the equality operator. + * \param[in] rhs The message array on the right hand size of the equality operator. + * \return true if message arrays are equal in size and content, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__RequestPolicy__Sequence__are_equal(const unitree_api__msg__RequestPolicy__Sequence * lhs, const unitree_api__msg__RequestPolicy__Sequence * rhs); + +/// Copy an array of msg/RequestPolicy messages. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source array pointer. + * \param[out] output The target array pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer + * is null or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__RequestPolicy__Sequence__copy( + const unitree_api__msg__RequestPolicy__Sequence * input, + unitree_api__msg__RequestPolicy__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_POLICY__FUNCTIONS_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__rosidl_typesupport_fastrtps_c.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 0000000..ea36c92 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,36 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from unitree_api:msg/RequestPolicy.idl +// generated code does not contain a copyright notice +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_POLICY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define UNITREE_API__MSG__DETAIL__REQUEST_POLICY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_api/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_api +size_t get_serialized_size_unitree_api__msg__RequestPolicy( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_api +size_t max_serialized_size_unitree_api__msg__RequestPolicy( + bool & full_bounded, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_api +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, unitree_api, msg, RequestPolicy)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_POLICY__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__rosidl_typesupport_fastrtps_cpp.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 0000000..4e31ff1 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,79 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from unitree_api:msg/RequestPolicy.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_POLICY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define UNITREE_API__MSG__DETAIL__REQUEST_POLICY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_api/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "unitree_api/msg/detail/request_policy__struct.hpp" + +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-parameter" +# ifdef __clang__ +# pragma clang diagnostic ignored "-Wdeprecated-register" +# pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +# endif +#endif +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif + +#include "fastcdr/Cdr.h" + +namespace unitree_api +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +cdr_serialize( + const unitree_api::msg::RequestPolicy & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + unitree_api::msg::RequestPolicy & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +get_serialized_size( + const unitree_api::msg::RequestPolicy & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +max_serialized_size_RequestPolicy( + bool & full_bounded, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace unitree_api + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, unitree_api, msg, RequestPolicy)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_POLICY__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__rosidl_typesupport_introspection_c.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__rosidl_typesupport_introspection_c.h new file mode 100644 index 0000000..ef048e6 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from unitree_api:msg/RequestPolicy.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_POLICY__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define UNITREE_API__MSG__DETAIL__REQUEST_POLICY__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_api/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_api +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_api, msg, RequestPolicy)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_POLICY__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__rosidl_typesupport_introspection_cpp.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 0000000..1058feb --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from unitree_api:msg/RequestPolicy.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_POLICY__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define UNITREE_API__MSG__DETAIL__REQUEST_POLICY__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +// TODO(dirk-thomas) these visibility macros should be message package specific +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_api, msg, RequestPolicy)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_POLICY__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__struct.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__struct.h new file mode 100644 index 0000000..6e7c438 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__struct.h @@ -0,0 +1,41 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from unitree_api:msg/RequestPolicy.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_POLICY__STRUCT_H_ +#define UNITREE_API__MSG__DETAIL__REQUEST_POLICY__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Struct defined in msg/RequestPolicy in the package unitree_api. +typedef struct unitree_api__msg__RequestPolicy +{ + int32_t priority; + bool noreply; +} unitree_api__msg__RequestPolicy; + +// Struct for a sequence of unitree_api__msg__RequestPolicy. +typedef struct unitree_api__msg__RequestPolicy__Sequence +{ + unitree_api__msg__RequestPolicy * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} unitree_api__msg__RequestPolicy__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_POLICY__STRUCT_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__struct.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__struct.hpp new file mode 100644 index 0000000..3203121 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__struct.hpp @@ -0,0 +1,144 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from unitree_api:msg/RequestPolicy.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_POLICY__STRUCT_HPP_ +#define UNITREE_API__MSG__DETAIL__REQUEST_POLICY__STRUCT_HPP_ + +#include +#include +#include +#include +#include +#include +#include + + +#ifndef _WIN32 +# define DEPRECATED__unitree_api__msg__RequestPolicy __attribute__((deprecated)) +#else +# define DEPRECATED__unitree_api__msg__RequestPolicy __declspec(deprecated) +#endif + +namespace unitree_api +{ + +namespace msg +{ + +// message struct +template +struct RequestPolicy_ +{ + using Type = RequestPolicy_; + + explicit RequestPolicy_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->priority = 0l; + this->noreply = false; + } + } + + explicit RequestPolicy_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + (void)_alloc; + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->priority = 0l; + this->noreply = false; + } + } + + // field types and members + using _priority_type = + int32_t; + _priority_type priority; + using _noreply_type = + bool; + _noreply_type noreply; + + // setters for named parameter idiom + Type & set__priority( + const int32_t & _arg) + { + this->priority = _arg; + return *this; + } + Type & set__noreply( + const bool & _arg) + { + this->noreply = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + unitree_api::msg::RequestPolicy_ *; + using ConstRawPtr = + const unitree_api::msg::RequestPolicy_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr const>; + + // pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead + // NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly + typedef DEPRECATED__unitree_api__msg__RequestPolicy + std::shared_ptr> + Ptr; + typedef DEPRECATED__unitree_api__msg__RequestPolicy + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const RequestPolicy_ & other) const + { + if (this->priority != other.priority) { + return false; + } + if (this->noreply != other.noreply) { + return false; + } + return true; + } + bool operator!=(const RequestPolicy_ & other) const + { + return !this->operator==(other); + } +}; // struct RequestPolicy_ + +// alias to use template instance with default allocator +using RequestPolicy = + unitree_api::msg::RequestPolicy_>; + +// constant definitions + +} // namespace msg + +} // namespace unitree_api + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_POLICY__STRUCT_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__traits.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__traits.hpp new file mode 100644 index 0000000..29bdc50 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__traits.hpp @@ -0,0 +1,42 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from unitree_api:msg/RequestPolicy.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_POLICY__TRAITS_HPP_ +#define UNITREE_API__MSG__DETAIL__REQUEST_POLICY__TRAITS_HPP_ + +#include "unitree_api/msg/detail/request_policy__struct.hpp" +#include +#include +#include + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "unitree_api::msg::RequestPolicy"; +} + +template<> +inline const char * name() +{ + return "unitree_api/msg/RequestPolicy"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_POLICY__TRAITS_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__type_support.c b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__type_support.c new file mode 100644 index 0000000..c8df052 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__type_support.c @@ -0,0 +1,96 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from unitree_api:msg/RequestPolicy.idl +// generated code does not contain a copyright notice + +#include +#include "unitree_api/msg/detail/request_policy__rosidl_typesupport_introspection_c.h" +#include "unitree_api/msg/rosidl_typesupport_introspection_c__visibility_control.h" +#include "rosidl_typesupport_introspection_c/field_types.h" +#include "rosidl_typesupport_introspection_c/identifier.h" +#include "rosidl_typesupport_introspection_c/message_introspection.h" +#include "unitree_api/msg/detail/request_policy__functions.h" +#include "unitree_api/msg/detail/request_policy__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void RequestPolicy__rosidl_typesupport_introspection_c__RequestPolicy_init_function( + void * message_memory, enum rosidl_runtime_c__message_initialization _init) +{ + // TODO(karsten1987): initializers are not yet implemented for typesupport c + // see https://github.com/ros2/ros2/issues/397 + (void) _init; + unitree_api__msg__RequestPolicy__init(message_memory); +} + +void RequestPolicy__rosidl_typesupport_introspection_c__RequestPolicy_fini_function(void * message_memory) +{ + unitree_api__msg__RequestPolicy__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember RequestPolicy__rosidl_typesupport_introspection_c__RequestPolicy_message_member_array[2] = { + { + "priority", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_api__msg__RequestPolicy, priority), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "noreply", // name + rosidl_typesupport_introspection_c__ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_api__msg__RequestPolicy, noreply), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers RequestPolicy__rosidl_typesupport_introspection_c__RequestPolicy_message_members = { + "unitree_api__msg", // message namespace + "RequestPolicy", // message name + 2, // number of fields + sizeof(unitree_api__msg__RequestPolicy), + RequestPolicy__rosidl_typesupport_introspection_c__RequestPolicy_message_member_array, // message members + RequestPolicy__rosidl_typesupport_introspection_c__RequestPolicy_init_function, // function to initialize message memory (memory has to be allocated) + RequestPolicy__rosidl_typesupport_introspection_c__RequestPolicy_fini_function // function to terminate message instance (will not free memory) +}; + +// this is not const since it must be initialized on first access +// since C does not allow non-integral compile-time constants +static rosidl_message_type_support_t RequestPolicy__rosidl_typesupport_introspection_c__RequestPolicy_message_type_support_handle = { + 0, + &RequestPolicy__rosidl_typesupport_introspection_c__RequestPolicy_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_api +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_api, msg, RequestPolicy)() { + if (!RequestPolicy__rosidl_typesupport_introspection_c__RequestPolicy_message_type_support_handle.typesupport_identifier) { + RequestPolicy__rosidl_typesupport_introspection_c__RequestPolicy_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &RequestPolicy__rosidl_typesupport_introspection_c__RequestPolicy_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__type_support.cpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__type_support.cpp new file mode 100644 index 0000000..c12f08f --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__type_support.cpp @@ -0,0 +1,122 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from unitree_api:msg/RequestPolicy.idl +// generated code does not contain a copyright notice + +#include "array" +#include "cstddef" +#include "string" +#include "vector" +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_cpp/message_type_support.hpp" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_api/msg/detail/request_policy__struct.hpp" +#include "rosidl_typesupport_introspection_cpp/field_types.hpp" +#include "rosidl_typesupport_introspection_cpp/identifier.hpp" +#include "rosidl_typesupport_introspection_cpp/message_introspection.hpp" +#include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +namespace unitree_api +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void RequestPolicy_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) unitree_api::msg::RequestPolicy(_init); +} + +void RequestPolicy_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~RequestPolicy(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember RequestPolicy_message_member_array[2] = { + { + "priority", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_api::msg::RequestPolicy, priority), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "noreply", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_BOOLEAN, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_api::msg::RequestPolicy, noreply), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers RequestPolicy_message_members = { + "unitree_api::msg", // message namespace + "RequestPolicy", // message name + 2, // number of fields + sizeof(unitree_api::msg::RequestPolicy), + RequestPolicy_message_member_array, // message members + RequestPolicy_init_function, // function to initialize message memory (memory has to be allocated) + RequestPolicy_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t RequestPolicy_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &RequestPolicy_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace unitree_api + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::unitree_api::msg::rosidl_typesupport_introspection_cpp::RequestPolicy_message_type_support_handle; +} + +} // namespace rosidl_typesupport_introspection_cpp + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_api, msg, RequestPolicy)() { + return &::unitree_api::msg::rosidl_typesupport_introspection_cpp::RequestPolicy_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__type_support.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__type_support.h new file mode 100644 index 0000000..7fe2cf2 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from unitree_api:msg/RequestPolicy.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_POLICY__TYPE_SUPPORT_H_ +#define UNITREE_API__MSG__DETAIL__REQUEST_POLICY__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_api/msg/rosidl_generator_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rosidl_runtime_c/message_type_support_struct.h" + +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + unitree_api, + msg, + RequestPolicy +)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_POLICY__TYPE_SUPPORT_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__type_support.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__type_support.hpp new file mode 100644 index 0000000..68dbcba --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/request_policy__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from unitree_api:msg/RequestPolicy.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__REQUEST_POLICY__TYPE_SUPPORT_HPP_ +#define UNITREE_API__MSG__DETAIL__REQUEST_POLICY__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_api/msg/rosidl_generator_cpp__visibility_control.hpp" + +#include "rosidl_typesupport_cpp/message_type_support.hpp" + +#ifdef __cplusplus +extern "C" +{ +#endif +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_CPP_PUBLIC_unitree_api +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + unitree_api, + msg, + RequestPolicy +)(); +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__REQUEST_POLICY__TYPE_SUPPORT_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__builder.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__builder.hpp new file mode 100644 index 0000000..8f0cf0b --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__builder.hpp @@ -0,0 +1,87 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from unitree_api:msg/Response.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__RESPONSE__BUILDER_HPP_ +#define UNITREE_API__MSG__DETAIL__RESPONSE__BUILDER_HPP_ + +#include "unitree_api/msg/detail/response__struct.hpp" +#include +#include +#include + + +namespace unitree_api +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Response_binary +{ +public: + explicit Init_Response_binary(::unitree_api::msg::Response & msg) + : msg_(msg) + {} + ::unitree_api::msg::Response binary(::unitree_api::msg::Response::_binary_type arg) + { + msg_.binary = std::move(arg); + return std::move(msg_); + } + +private: + ::unitree_api::msg::Response msg_; +}; + +class Init_Response_data +{ +public: + explicit Init_Response_data(::unitree_api::msg::Response & msg) + : msg_(msg) + {} + Init_Response_binary data(::unitree_api::msg::Response::_data_type arg) + { + msg_.data = std::move(arg); + return Init_Response_binary(msg_); + } + +private: + ::unitree_api::msg::Response msg_; +}; + +class Init_Response_header +{ +public: + Init_Response_header() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_Response_data header(::unitree_api::msg::Response::_header_type arg) + { + msg_.header = std::move(arg); + return Init_Response_data(msg_); + } + +private: + ::unitree_api::msg::Response msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::unitree_api::msg::Response>() +{ + return unitree_api::msg::builder::Init_Response_header(); +} + +} // namespace unitree_api + +#endif // UNITREE_API__MSG__DETAIL__RESPONSE__BUILDER_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__functions.c b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__functions.c new file mode 100644 index 0000000..e30ee9b --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__functions.c @@ -0,0 +1,288 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from unitree_api:msg/Response.idl +// generated code does not contain a copyright notice +#include "unitree_api/msg/detail/response__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `header` +#include "unitree_api/msg/detail/response_header__functions.h" +// Member `data` +#include "rosidl_runtime_c/string_functions.h" +// Member `binary` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +bool +unitree_api__msg__Response__init(unitree_api__msg__Response * msg) +{ + if (!msg) { + return false; + } + // header + if (!unitree_api__msg__ResponseHeader__init(&msg->header)) { + unitree_api__msg__Response__fini(msg); + return false; + } + // data + if (!rosidl_runtime_c__String__init(&msg->data)) { + unitree_api__msg__Response__fini(msg); + return false; + } + // binary + if (!rosidl_runtime_c__int8__Sequence__init(&msg->binary, 0)) { + unitree_api__msg__Response__fini(msg); + return false; + } + return true; +} + +void +unitree_api__msg__Response__fini(unitree_api__msg__Response * msg) +{ + if (!msg) { + return; + } + // header + unitree_api__msg__ResponseHeader__fini(&msg->header); + // data + rosidl_runtime_c__String__fini(&msg->data); + // binary + rosidl_runtime_c__int8__Sequence__fini(&msg->binary); +} + +bool +unitree_api__msg__Response__are_equal(const unitree_api__msg__Response * lhs, const unitree_api__msg__Response * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // header + if (!unitree_api__msg__ResponseHeader__are_equal( + &(lhs->header), &(rhs->header))) + { + return false; + } + // data + if (!rosidl_runtime_c__String__are_equal( + &(lhs->data), &(rhs->data))) + { + return false; + } + // binary + if (!rosidl_runtime_c__int8__Sequence__are_equal( + &(lhs->binary), &(rhs->binary))) + { + return false; + } + return true; +} + +bool +unitree_api__msg__Response__copy( + const unitree_api__msg__Response * input, + unitree_api__msg__Response * output) +{ + if (!input || !output) { + return false; + } + // header + if (!unitree_api__msg__ResponseHeader__copy( + &(input->header), &(output->header))) + { + return false; + } + // data + if (!rosidl_runtime_c__String__copy( + &(input->data), &(output->data))) + { + return false; + } + // binary + if (!rosidl_runtime_c__int8__Sequence__copy( + &(input->binary), &(output->binary))) + { + return false; + } + return true; +} + +unitree_api__msg__Response * +unitree_api__msg__Response__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_api__msg__Response * msg = (unitree_api__msg__Response *)allocator.allocate(sizeof(unitree_api__msg__Response), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(unitree_api__msg__Response)); + bool success = unitree_api__msg__Response__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +unitree_api__msg__Response__destroy(unitree_api__msg__Response * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + unitree_api__msg__Response__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +unitree_api__msg__Response__Sequence__init(unitree_api__msg__Response__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_api__msg__Response * data = NULL; + + if (size) { + data = (unitree_api__msg__Response *)allocator.zero_allocate(size, sizeof(unitree_api__msg__Response), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = unitree_api__msg__Response__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + unitree_api__msg__Response__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +unitree_api__msg__Response__Sequence__fini(unitree_api__msg__Response__Sequence * array) +{ + if (!array) { + return; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + + if (array->data) { + // ensure that data and capacity values are consistent + assert(array->capacity > 0); + // finalize all array elements + for (size_t i = 0; i < array->capacity; ++i) { + unitree_api__msg__Response__fini(&array->data[i]); + } + allocator.deallocate(array->data, allocator.state); + array->data = NULL; + array->size = 0; + array->capacity = 0; + } else { + // ensure that data, size, and capacity values are consistent + assert(0 == array->size); + assert(0 == array->capacity); + } +} + +unitree_api__msg__Response__Sequence * +unitree_api__msg__Response__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_api__msg__Response__Sequence * array = (unitree_api__msg__Response__Sequence *)allocator.allocate(sizeof(unitree_api__msg__Response__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = unitree_api__msg__Response__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +unitree_api__msg__Response__Sequence__destroy(unitree_api__msg__Response__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + unitree_api__msg__Response__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +unitree_api__msg__Response__Sequence__are_equal(const unitree_api__msg__Response__Sequence * lhs, const unitree_api__msg__Response__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!unitree_api__msg__Response__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +unitree_api__msg__Response__Sequence__copy( + const unitree_api__msg__Response__Sequence * input, + unitree_api__msg__Response__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(unitree_api__msg__Response); + unitree_api__msg__Response * data = + (unitree_api__msg__Response *)realloc(output->data, allocation_size); + if (!data) { + return false; + } + for (size_t i = output->capacity; i < input->size; ++i) { + if (!unitree_api__msg__Response__init(&data[i])) { + /* free currently allocated and return false */ + for (; i-- > output->capacity; ) { + unitree_api__msg__Response__fini(&data[i]); + } + free(data); + return false; + } + } + output->data = data; + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!unitree_api__msg__Response__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__functions.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__functions.h new file mode 100644 index 0000000..a2a89c0 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from unitree_api:msg/Response.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__RESPONSE__FUNCTIONS_H_ +#define UNITREE_API__MSG__DETAIL__RESPONSE__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_api/msg/rosidl_generator_c__visibility_control.h" + +#include "unitree_api/msg/detail/response__struct.h" + +/// Initialize msg/Response message. +/** + * If the init function is called twice for the same message without + * calling fini inbetween previously allocated memory will be leaked. + * \param[in,out] msg The previously allocated message pointer. + * Fields without a default value will not be initialized by this function. + * You might want to call memset(msg, 0, sizeof( + * unitree_api__msg__Response + * )) before or use + * unitree_api__msg__Response__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__Response__init(unitree_api__msg__Response * msg); + +/// Finalize msg/Response message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +void +unitree_api__msg__Response__fini(unitree_api__msg__Response * msg); + +/// Create msg/Response message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * unitree_api__msg__Response__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +unitree_api__msg__Response * +unitree_api__msg__Response__create(); + +/// Destroy msg/Response message. +/** + * It calls + * unitree_api__msg__Response__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +void +unitree_api__msg__Response__destroy(unitree_api__msg__Response * msg); + +/// Check for msg/Response message equality. +/** + * \param[in] lhs The message on the left hand size of the equality operator. + * \param[in] rhs The message on the right hand size of the equality operator. + * \return true if messages are equal, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__Response__are_equal(const unitree_api__msg__Response * lhs, const unitree_api__msg__Response * rhs); + +/// Copy a msg/Response message. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source message pointer. + * \param[out] output The target message pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer is null + * or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__Response__copy( + const unitree_api__msg__Response * input, + unitree_api__msg__Response * output); + +/// Initialize array of msg/Response messages. +/** + * It allocates the memory for the number of elements and calls + * unitree_api__msg__Response__init() + * for each element of the array. + * \param[in,out] array The allocated array pointer. + * \param[in] size The size / capacity of the array. + * \return true if initialization was successful, otherwise false + * If the array pointer is valid and the size is zero it is guaranteed + # to return true. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__Response__Sequence__init(unitree_api__msg__Response__Sequence * array, size_t size); + +/// Finalize array of msg/Response messages. +/** + * It calls + * unitree_api__msg__Response__fini() + * for each element of the array and frees the memory for the number of + * elements. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +void +unitree_api__msg__Response__Sequence__fini(unitree_api__msg__Response__Sequence * array); + +/// Create array of msg/Response messages. +/** + * It allocates the memory for the array and calls + * unitree_api__msg__Response__Sequence__init(). + * \param[in] size The size / capacity of the array. + * \return The pointer to the initialized array if successful, otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +unitree_api__msg__Response__Sequence * +unitree_api__msg__Response__Sequence__create(size_t size); + +/// Destroy array of msg/Response messages. +/** + * It calls + * unitree_api__msg__Response__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +void +unitree_api__msg__Response__Sequence__destroy(unitree_api__msg__Response__Sequence * array); + +/// Check for msg/Response message array equality. +/** + * \param[in] lhs The message array on the left hand size of the equality operator. + * \param[in] rhs The message array on the right hand size of the equality operator. + * \return true if message arrays are equal in size and content, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__Response__Sequence__are_equal(const unitree_api__msg__Response__Sequence * lhs, const unitree_api__msg__Response__Sequence * rhs); + +/// Copy an array of msg/Response messages. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source array pointer. + * \param[out] output The target array pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer + * is null or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__Response__Sequence__copy( + const unitree_api__msg__Response__Sequence * input, + unitree_api__msg__Response__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__RESPONSE__FUNCTIONS_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__rosidl_typesupport_fastrtps_c.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 0000000..cba0d6d --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,36 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from unitree_api:msg/Response.idl +// generated code does not contain a copyright notice +#ifndef UNITREE_API__MSG__DETAIL__RESPONSE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define UNITREE_API__MSG__DETAIL__RESPONSE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_api/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_api +size_t get_serialized_size_unitree_api__msg__Response( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_api +size_t max_serialized_size_unitree_api__msg__Response( + bool & full_bounded, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_api +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, unitree_api, msg, Response)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__RESPONSE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__rosidl_typesupport_fastrtps_cpp.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 0000000..bc0ef8a --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,79 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from unitree_api:msg/Response.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__RESPONSE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define UNITREE_API__MSG__DETAIL__RESPONSE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_api/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "unitree_api/msg/detail/response__struct.hpp" + +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-parameter" +# ifdef __clang__ +# pragma clang diagnostic ignored "-Wdeprecated-register" +# pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +# endif +#endif +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif + +#include "fastcdr/Cdr.h" + +namespace unitree_api +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +cdr_serialize( + const unitree_api::msg::Response & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + unitree_api::msg::Response & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +get_serialized_size( + const unitree_api::msg::Response & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +max_serialized_size_Response( + bool & full_bounded, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace unitree_api + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, unitree_api, msg, Response)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__RESPONSE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__rosidl_typesupport_introspection_c.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__rosidl_typesupport_introspection_c.h new file mode 100644 index 0000000..7ffd774 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from unitree_api:msg/Response.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__RESPONSE__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define UNITREE_API__MSG__DETAIL__RESPONSE__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_api/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_api +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_api, msg, Response)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__RESPONSE__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__rosidl_typesupport_introspection_cpp.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 0000000..9cfa813 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from unitree_api:msg/Response.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__RESPONSE__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define UNITREE_API__MSG__DETAIL__RESPONSE__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +// TODO(dirk-thomas) these visibility macros should be message package specific +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_api, msg, Response)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__RESPONSE__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__struct.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__struct.h new file mode 100644 index 0000000..de3d930 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__struct.h @@ -0,0 +1,50 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from unitree_api:msg/Response.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__RESPONSE__STRUCT_H_ +#define UNITREE_API__MSG__DETAIL__RESPONSE__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'header' +#include "unitree_api/msg/detail/response_header__struct.h" +// Member 'data' +#include "rosidl_runtime_c/string.h" +// Member 'binary' +#include "rosidl_runtime_c/primitives_sequence.h" + +// Struct defined in msg/Response in the package unitree_api. +typedef struct unitree_api__msg__Response +{ + unitree_api__msg__ResponseHeader header; + rosidl_runtime_c__String data; + rosidl_runtime_c__int8__Sequence binary; +} unitree_api__msg__Response; + +// Struct for a sequence of unitree_api__msg__Response. +typedef struct unitree_api__msg__Response__Sequence +{ + unitree_api__msg__Response * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} unitree_api__msg__Response__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__RESPONSE__STRUCT_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__struct.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__struct.hpp new file mode 100644 index 0000000..b8e170c --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__struct.hpp @@ -0,0 +1,160 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from unitree_api:msg/Response.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__RESPONSE__STRUCT_HPP_ +#define UNITREE_API__MSG__DETAIL__RESPONSE__STRUCT_HPP_ + +#include +#include +#include +#include +#include +#include +#include + + +// Include directives for member types +// Member 'header' +#include "unitree_api/msg/detail/response_header__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__unitree_api__msg__Response __attribute__((deprecated)) +#else +# define DEPRECATED__unitree_api__msg__Response __declspec(deprecated) +#endif + +namespace unitree_api +{ + +namespace msg +{ + +// message struct +template +struct Response_ +{ + using Type = Response_; + + explicit Response_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : header(_init) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->data = ""; + } + } + + explicit Response_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : header(_alloc, _init), + data(_alloc) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->data = ""; + } + } + + // field types and members + using _header_type = + unitree_api::msg::ResponseHeader_; + _header_type header; + using _data_type = + std::basic_string, typename ContainerAllocator::template rebind::other>; + _data_type data; + using _binary_type = + std::vector::other>; + _binary_type binary; + + // setters for named parameter idiom + Type & set__header( + const unitree_api::msg::ResponseHeader_ & _arg) + { + this->header = _arg; + return *this; + } + Type & set__data( + const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + { + this->data = _arg; + return *this; + } + Type & set__binary( + const std::vector::other> & _arg) + { + this->binary = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + unitree_api::msg::Response_ *; + using ConstRawPtr = + const unitree_api::msg::Response_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr const>; + + // pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead + // NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly + typedef DEPRECATED__unitree_api__msg__Response + std::shared_ptr> + Ptr; + typedef DEPRECATED__unitree_api__msg__Response + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Response_ & other) const + { + if (this->header != other.header) { + return false; + } + if (this->data != other.data) { + return false; + } + if (this->binary != other.binary) { + return false; + } + return true; + } + bool operator!=(const Response_ & other) const + { + return !this->operator==(other); + } +}; // struct Response_ + +// alias to use template instance with default allocator +using Response = + unitree_api::msg::Response_>; + +// constant definitions + +} // namespace msg + +} // namespace unitree_api + +#endif // UNITREE_API__MSG__DETAIL__RESPONSE__STRUCT_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__traits.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__traits.hpp new file mode 100644 index 0000000..7716161 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__traits.hpp @@ -0,0 +1,46 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from unitree_api:msg/Response.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__RESPONSE__TRAITS_HPP_ +#define UNITREE_API__MSG__DETAIL__RESPONSE__TRAITS_HPP_ + +#include "unitree_api/msg/detail/response__struct.hpp" +#include +#include +#include + +// Include directives for member types +// Member 'header' +#include "unitree_api/msg/detail/response_header__traits.hpp" + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "unitree_api::msg::Response"; +} + +template<> +inline const char * name() +{ + return "unitree_api/msg/Response"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UNITREE_API__MSG__DETAIL__RESPONSE__TRAITS_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__type_support.c b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__type_support.c new file mode 100644 index 0000000..1eb4b01 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__type_support.c @@ -0,0 +1,123 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from unitree_api:msg/Response.idl +// generated code does not contain a copyright notice + +#include +#include "unitree_api/msg/detail/response__rosidl_typesupport_introspection_c.h" +#include "unitree_api/msg/rosidl_typesupport_introspection_c__visibility_control.h" +#include "rosidl_typesupport_introspection_c/field_types.h" +#include "rosidl_typesupport_introspection_c/identifier.h" +#include "rosidl_typesupport_introspection_c/message_introspection.h" +#include "unitree_api/msg/detail/response__functions.h" +#include "unitree_api/msg/detail/response__struct.h" + + +// Include directives for member types +// Member `header` +#include "unitree_api/msg/response_header.h" +// Member `header` +#include "unitree_api/msg/detail/response_header__rosidl_typesupport_introspection_c.h" +// Member `data` +#include "rosidl_runtime_c/string_functions.h" +// Member `binary` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void Response__rosidl_typesupport_introspection_c__Response_init_function( + void * message_memory, enum rosidl_runtime_c__message_initialization _init) +{ + // TODO(karsten1987): initializers are not yet implemented for typesupport c + // see https://github.com/ros2/ros2/issues/397 + (void) _init; + unitree_api__msg__Response__init(message_memory); +} + +void Response__rosidl_typesupport_introspection_c__Response_fini_function(void * message_memory) +{ + unitree_api__msg__Response__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember Response__rosidl_typesupport_introspection_c__Response_message_member_array[3] = { + { + "header", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_api__msg__Response, header), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_api__msg__Response, data), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "binary", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT8, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_api__msg__Response, binary), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers Response__rosidl_typesupport_introspection_c__Response_message_members = { + "unitree_api__msg", // message namespace + "Response", // message name + 3, // number of fields + sizeof(unitree_api__msg__Response), + Response__rosidl_typesupport_introspection_c__Response_message_member_array, // message members + Response__rosidl_typesupport_introspection_c__Response_init_function, // function to initialize message memory (memory has to be allocated) + Response__rosidl_typesupport_introspection_c__Response_fini_function // function to terminate message instance (will not free memory) +}; + +// this is not const since it must be initialized on first access +// since C does not allow non-integral compile-time constants +static rosidl_message_type_support_t Response__rosidl_typesupport_introspection_c__Response_message_type_support_handle = { + 0, + &Response__rosidl_typesupport_introspection_c__Response_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_api +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_api, msg, Response)() { + Response__rosidl_typesupport_introspection_c__Response_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_api, msg, ResponseHeader)(); + if (!Response__rosidl_typesupport_introspection_c__Response_message_type_support_handle.typesupport_identifier) { + Response__rosidl_typesupport_introspection_c__Response_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &Response__rosidl_typesupport_introspection_c__Response_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__type_support.cpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__type_support.cpp new file mode 100644 index 0000000..a27d035 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__type_support.cpp @@ -0,0 +1,164 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from unitree_api:msg/Response.idl +// generated code does not contain a copyright notice + +#include "array" +#include "cstddef" +#include "string" +#include "vector" +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_cpp/message_type_support.hpp" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_api/msg/detail/response__struct.hpp" +#include "rosidl_typesupport_introspection_cpp/field_types.hpp" +#include "rosidl_typesupport_introspection_cpp/identifier.hpp" +#include "rosidl_typesupport_introspection_cpp/message_introspection.hpp" +#include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +namespace unitree_api +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Response_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) unitree_api::msg::Response(_init); +} + +void Response_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Response(); +} + +size_t size_function__Response__binary(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__Response__binary(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__Response__binary(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void resize_function__Response__binary(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Response_message_member_array[3] = { + { + "header", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_api::msg::Response, header), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_api::msg::Response, data), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "binary", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT8, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_api::msg::Response, binary), // bytes offset in struct + nullptr, // default value + size_function__Response__binary, // size() function pointer + get_const_function__Response__binary, // get_const(index) function pointer + get_function__Response__binary, // get(index) function pointer + resize_function__Response__binary // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers Response_message_members = { + "unitree_api::msg", // message namespace + "Response", // message name + 3, // number of fields + sizeof(unitree_api::msg::Response), + Response_message_member_array, // message members + Response_init_function, // function to initialize message memory (memory has to be allocated) + Response_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Response_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Response_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace unitree_api + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::unitree_api::msg::rosidl_typesupport_introspection_cpp::Response_message_type_support_handle; +} + +} // namespace rosidl_typesupport_introspection_cpp + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_api, msg, Response)() { + return &::unitree_api::msg::rosidl_typesupport_introspection_cpp::Response_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__type_support.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__type_support.h new file mode 100644 index 0000000..8b23ed0 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from unitree_api:msg/Response.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__RESPONSE__TYPE_SUPPORT_H_ +#define UNITREE_API__MSG__DETAIL__RESPONSE__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_api/msg/rosidl_generator_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rosidl_runtime_c/message_type_support_struct.h" + +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + unitree_api, + msg, + Response +)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__RESPONSE__TYPE_SUPPORT_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__type_support.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__type_support.hpp new file mode 100644 index 0000000..27859e9 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from unitree_api:msg/Response.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__RESPONSE__TYPE_SUPPORT_HPP_ +#define UNITREE_API__MSG__DETAIL__RESPONSE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_api/msg/rosidl_generator_cpp__visibility_control.hpp" + +#include "rosidl_typesupport_cpp/message_type_support.hpp" + +#ifdef __cplusplus +extern "C" +{ +#endif +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_CPP_PUBLIC_unitree_api +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + unitree_api, + msg, + Response +)(); +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__RESPONSE__TYPE_SUPPORT_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__builder.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__builder.hpp new file mode 100644 index 0000000..8f76d7d --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__builder.hpp @@ -0,0 +1,71 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from unitree_api:msg/ResponseHeader.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__RESPONSE_HEADER__BUILDER_HPP_ +#define UNITREE_API__MSG__DETAIL__RESPONSE_HEADER__BUILDER_HPP_ + +#include "unitree_api/msg/detail/response_header__struct.hpp" +#include +#include +#include + + +namespace unitree_api +{ + +namespace msg +{ + +namespace builder +{ + +class Init_ResponseHeader_status +{ +public: + explicit Init_ResponseHeader_status(::unitree_api::msg::ResponseHeader & msg) + : msg_(msg) + {} + ::unitree_api::msg::ResponseHeader status(::unitree_api::msg::ResponseHeader::_status_type arg) + { + msg_.status = std::move(arg); + return std::move(msg_); + } + +private: + ::unitree_api::msg::ResponseHeader msg_; +}; + +class Init_ResponseHeader_identity +{ +public: + Init_ResponseHeader_identity() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_ResponseHeader_status identity(::unitree_api::msg::ResponseHeader::_identity_type arg) + { + msg_.identity = std::move(arg); + return Init_ResponseHeader_status(msg_); + } + +private: + ::unitree_api::msg::ResponseHeader msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::unitree_api::msg::ResponseHeader>() +{ + return unitree_api::msg::builder::Init_ResponseHeader_identity(); +} + +} // namespace unitree_api + +#endif // UNITREE_API__MSG__DETAIL__RESPONSE_HEADER__BUILDER_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__functions.c b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__functions.c new file mode 100644 index 0000000..5d705c7 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__functions.c @@ -0,0 +1,267 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from unitree_api:msg/ResponseHeader.idl +// generated code does not contain a copyright notice +#include "unitree_api/msg/detail/response_header__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `identity` +#include "unitree_api/msg/detail/request_identity__functions.h" +// Member `status` +#include "unitree_api/msg/detail/response_status__functions.h" + +bool +unitree_api__msg__ResponseHeader__init(unitree_api__msg__ResponseHeader * msg) +{ + if (!msg) { + return false; + } + // identity + if (!unitree_api__msg__RequestIdentity__init(&msg->identity)) { + unitree_api__msg__ResponseHeader__fini(msg); + return false; + } + // status + if (!unitree_api__msg__ResponseStatus__init(&msg->status)) { + unitree_api__msg__ResponseHeader__fini(msg); + return false; + } + return true; +} + +void +unitree_api__msg__ResponseHeader__fini(unitree_api__msg__ResponseHeader * msg) +{ + if (!msg) { + return; + } + // identity + unitree_api__msg__RequestIdentity__fini(&msg->identity); + // status + unitree_api__msg__ResponseStatus__fini(&msg->status); +} + +bool +unitree_api__msg__ResponseHeader__are_equal(const unitree_api__msg__ResponseHeader * lhs, const unitree_api__msg__ResponseHeader * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // identity + if (!unitree_api__msg__RequestIdentity__are_equal( + &(lhs->identity), &(rhs->identity))) + { + return false; + } + // status + if (!unitree_api__msg__ResponseStatus__are_equal( + &(lhs->status), &(rhs->status))) + { + return false; + } + return true; +} + +bool +unitree_api__msg__ResponseHeader__copy( + const unitree_api__msg__ResponseHeader * input, + unitree_api__msg__ResponseHeader * output) +{ + if (!input || !output) { + return false; + } + // identity + if (!unitree_api__msg__RequestIdentity__copy( + &(input->identity), &(output->identity))) + { + return false; + } + // status + if (!unitree_api__msg__ResponseStatus__copy( + &(input->status), &(output->status))) + { + return false; + } + return true; +} + +unitree_api__msg__ResponseHeader * +unitree_api__msg__ResponseHeader__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_api__msg__ResponseHeader * msg = (unitree_api__msg__ResponseHeader *)allocator.allocate(sizeof(unitree_api__msg__ResponseHeader), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(unitree_api__msg__ResponseHeader)); + bool success = unitree_api__msg__ResponseHeader__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +unitree_api__msg__ResponseHeader__destroy(unitree_api__msg__ResponseHeader * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + unitree_api__msg__ResponseHeader__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +unitree_api__msg__ResponseHeader__Sequence__init(unitree_api__msg__ResponseHeader__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_api__msg__ResponseHeader * data = NULL; + + if (size) { + data = (unitree_api__msg__ResponseHeader *)allocator.zero_allocate(size, sizeof(unitree_api__msg__ResponseHeader), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = unitree_api__msg__ResponseHeader__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + unitree_api__msg__ResponseHeader__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +unitree_api__msg__ResponseHeader__Sequence__fini(unitree_api__msg__ResponseHeader__Sequence * array) +{ + if (!array) { + return; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + + if (array->data) { + // ensure that data and capacity values are consistent + assert(array->capacity > 0); + // finalize all array elements + for (size_t i = 0; i < array->capacity; ++i) { + unitree_api__msg__ResponseHeader__fini(&array->data[i]); + } + allocator.deallocate(array->data, allocator.state); + array->data = NULL; + array->size = 0; + array->capacity = 0; + } else { + // ensure that data, size, and capacity values are consistent + assert(0 == array->size); + assert(0 == array->capacity); + } +} + +unitree_api__msg__ResponseHeader__Sequence * +unitree_api__msg__ResponseHeader__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_api__msg__ResponseHeader__Sequence * array = (unitree_api__msg__ResponseHeader__Sequence *)allocator.allocate(sizeof(unitree_api__msg__ResponseHeader__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = unitree_api__msg__ResponseHeader__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +unitree_api__msg__ResponseHeader__Sequence__destroy(unitree_api__msg__ResponseHeader__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + unitree_api__msg__ResponseHeader__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +unitree_api__msg__ResponseHeader__Sequence__are_equal(const unitree_api__msg__ResponseHeader__Sequence * lhs, const unitree_api__msg__ResponseHeader__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!unitree_api__msg__ResponseHeader__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +unitree_api__msg__ResponseHeader__Sequence__copy( + const unitree_api__msg__ResponseHeader__Sequence * input, + unitree_api__msg__ResponseHeader__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(unitree_api__msg__ResponseHeader); + unitree_api__msg__ResponseHeader * data = + (unitree_api__msg__ResponseHeader *)realloc(output->data, allocation_size); + if (!data) { + return false; + } + for (size_t i = output->capacity; i < input->size; ++i) { + if (!unitree_api__msg__ResponseHeader__init(&data[i])) { + /* free currently allocated and return false */ + for (; i-- > output->capacity; ) { + unitree_api__msg__ResponseHeader__fini(&data[i]); + } + free(data); + return false; + } + } + output->data = data; + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!unitree_api__msg__ResponseHeader__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__functions.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__functions.h new file mode 100644 index 0000000..8837dc1 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from unitree_api:msg/ResponseHeader.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__RESPONSE_HEADER__FUNCTIONS_H_ +#define UNITREE_API__MSG__DETAIL__RESPONSE_HEADER__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_api/msg/rosidl_generator_c__visibility_control.h" + +#include "unitree_api/msg/detail/response_header__struct.h" + +/// Initialize msg/ResponseHeader message. +/** + * If the init function is called twice for the same message without + * calling fini inbetween previously allocated memory will be leaked. + * \param[in,out] msg The previously allocated message pointer. + * Fields without a default value will not be initialized by this function. + * You might want to call memset(msg, 0, sizeof( + * unitree_api__msg__ResponseHeader + * )) before or use + * unitree_api__msg__ResponseHeader__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__ResponseHeader__init(unitree_api__msg__ResponseHeader * msg); + +/// Finalize msg/ResponseHeader message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +void +unitree_api__msg__ResponseHeader__fini(unitree_api__msg__ResponseHeader * msg); + +/// Create msg/ResponseHeader message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * unitree_api__msg__ResponseHeader__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +unitree_api__msg__ResponseHeader * +unitree_api__msg__ResponseHeader__create(); + +/// Destroy msg/ResponseHeader message. +/** + * It calls + * unitree_api__msg__ResponseHeader__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +void +unitree_api__msg__ResponseHeader__destroy(unitree_api__msg__ResponseHeader * msg); + +/// Check for msg/ResponseHeader message equality. +/** + * \param[in] lhs The message on the left hand size of the equality operator. + * \param[in] rhs The message on the right hand size of the equality operator. + * \return true if messages are equal, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__ResponseHeader__are_equal(const unitree_api__msg__ResponseHeader * lhs, const unitree_api__msg__ResponseHeader * rhs); + +/// Copy a msg/ResponseHeader message. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source message pointer. + * \param[out] output The target message pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer is null + * or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__ResponseHeader__copy( + const unitree_api__msg__ResponseHeader * input, + unitree_api__msg__ResponseHeader * output); + +/// Initialize array of msg/ResponseHeader messages. +/** + * It allocates the memory for the number of elements and calls + * unitree_api__msg__ResponseHeader__init() + * for each element of the array. + * \param[in,out] array The allocated array pointer. + * \param[in] size The size / capacity of the array. + * \return true if initialization was successful, otherwise false + * If the array pointer is valid and the size is zero it is guaranteed + # to return true. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__ResponseHeader__Sequence__init(unitree_api__msg__ResponseHeader__Sequence * array, size_t size); + +/// Finalize array of msg/ResponseHeader messages. +/** + * It calls + * unitree_api__msg__ResponseHeader__fini() + * for each element of the array and frees the memory for the number of + * elements. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +void +unitree_api__msg__ResponseHeader__Sequence__fini(unitree_api__msg__ResponseHeader__Sequence * array); + +/// Create array of msg/ResponseHeader messages. +/** + * It allocates the memory for the array and calls + * unitree_api__msg__ResponseHeader__Sequence__init(). + * \param[in] size The size / capacity of the array. + * \return The pointer to the initialized array if successful, otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +unitree_api__msg__ResponseHeader__Sequence * +unitree_api__msg__ResponseHeader__Sequence__create(size_t size); + +/// Destroy array of msg/ResponseHeader messages. +/** + * It calls + * unitree_api__msg__ResponseHeader__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +void +unitree_api__msg__ResponseHeader__Sequence__destroy(unitree_api__msg__ResponseHeader__Sequence * array); + +/// Check for msg/ResponseHeader message array equality. +/** + * \param[in] lhs The message array on the left hand size of the equality operator. + * \param[in] rhs The message array on the right hand size of the equality operator. + * \return true if message arrays are equal in size and content, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__ResponseHeader__Sequence__are_equal(const unitree_api__msg__ResponseHeader__Sequence * lhs, const unitree_api__msg__ResponseHeader__Sequence * rhs); + +/// Copy an array of msg/ResponseHeader messages. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source array pointer. + * \param[out] output The target array pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer + * is null or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__ResponseHeader__Sequence__copy( + const unitree_api__msg__ResponseHeader__Sequence * input, + unitree_api__msg__ResponseHeader__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__RESPONSE_HEADER__FUNCTIONS_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__rosidl_typesupport_fastrtps_c.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 0000000..c1c364d --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,36 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from unitree_api:msg/ResponseHeader.idl +// generated code does not contain a copyright notice +#ifndef UNITREE_API__MSG__DETAIL__RESPONSE_HEADER__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define UNITREE_API__MSG__DETAIL__RESPONSE_HEADER__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_api/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_api +size_t get_serialized_size_unitree_api__msg__ResponseHeader( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_api +size_t max_serialized_size_unitree_api__msg__ResponseHeader( + bool & full_bounded, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_api +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, unitree_api, msg, ResponseHeader)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__RESPONSE_HEADER__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__rosidl_typesupport_fastrtps_cpp.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 0000000..d76073f --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,79 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from unitree_api:msg/ResponseHeader.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__RESPONSE_HEADER__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define UNITREE_API__MSG__DETAIL__RESPONSE_HEADER__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_api/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "unitree_api/msg/detail/response_header__struct.hpp" + +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-parameter" +# ifdef __clang__ +# pragma clang diagnostic ignored "-Wdeprecated-register" +# pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +# endif +#endif +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif + +#include "fastcdr/Cdr.h" + +namespace unitree_api +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +cdr_serialize( + const unitree_api::msg::ResponseHeader & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + unitree_api::msg::ResponseHeader & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +get_serialized_size( + const unitree_api::msg::ResponseHeader & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +max_serialized_size_ResponseHeader( + bool & full_bounded, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace unitree_api + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, unitree_api, msg, ResponseHeader)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__RESPONSE_HEADER__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__rosidl_typesupport_introspection_c.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__rosidl_typesupport_introspection_c.h new file mode 100644 index 0000000..c314b11 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from unitree_api:msg/ResponseHeader.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__RESPONSE_HEADER__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define UNITREE_API__MSG__DETAIL__RESPONSE_HEADER__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_api/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_api +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_api, msg, ResponseHeader)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__RESPONSE_HEADER__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__rosidl_typesupport_introspection_cpp.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 0000000..c578e54 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from unitree_api:msg/ResponseHeader.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__RESPONSE_HEADER__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define UNITREE_API__MSG__DETAIL__RESPONSE_HEADER__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +// TODO(dirk-thomas) these visibility macros should be message package specific +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_api, msg, ResponseHeader)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__RESPONSE_HEADER__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__struct.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__struct.h new file mode 100644 index 0000000..f7dd860 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__struct.h @@ -0,0 +1,47 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from unitree_api:msg/ResponseHeader.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__RESPONSE_HEADER__STRUCT_H_ +#define UNITREE_API__MSG__DETAIL__RESPONSE_HEADER__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'identity' +#include "unitree_api/msg/detail/request_identity__struct.h" +// Member 'status' +#include "unitree_api/msg/detail/response_status__struct.h" + +// Struct defined in msg/ResponseHeader in the package unitree_api. +typedef struct unitree_api__msg__ResponseHeader +{ + unitree_api__msg__RequestIdentity identity; + unitree_api__msg__ResponseStatus status; +} unitree_api__msg__ResponseHeader; + +// Struct for a sequence of unitree_api__msg__ResponseHeader. +typedef struct unitree_api__msg__ResponseHeader__Sequence +{ + unitree_api__msg__ResponseHeader * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} unitree_api__msg__ResponseHeader__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__RESPONSE_HEADER__STRUCT_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__struct.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__struct.hpp new file mode 100644 index 0000000..cb00d3b --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__struct.hpp @@ -0,0 +1,143 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from unitree_api:msg/ResponseHeader.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__RESPONSE_HEADER__STRUCT_HPP_ +#define UNITREE_API__MSG__DETAIL__RESPONSE_HEADER__STRUCT_HPP_ + +#include +#include +#include +#include +#include +#include +#include + + +// Include directives for member types +// Member 'identity' +#include "unitree_api/msg/detail/request_identity__struct.hpp" +// Member 'status' +#include "unitree_api/msg/detail/response_status__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__unitree_api__msg__ResponseHeader __attribute__((deprecated)) +#else +# define DEPRECATED__unitree_api__msg__ResponseHeader __declspec(deprecated) +#endif + +namespace unitree_api +{ + +namespace msg +{ + +// message struct +template +struct ResponseHeader_ +{ + using Type = ResponseHeader_; + + explicit ResponseHeader_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : identity(_init), + status(_init) + { + (void)_init; + } + + explicit ResponseHeader_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : identity(_alloc, _init), + status(_alloc, _init) + { + (void)_init; + } + + // field types and members + using _identity_type = + unitree_api::msg::RequestIdentity_; + _identity_type identity; + using _status_type = + unitree_api::msg::ResponseStatus_; + _status_type status; + + // setters for named parameter idiom + Type & set__identity( + const unitree_api::msg::RequestIdentity_ & _arg) + { + this->identity = _arg; + return *this; + } + Type & set__status( + const unitree_api::msg::ResponseStatus_ & _arg) + { + this->status = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + unitree_api::msg::ResponseHeader_ *; + using ConstRawPtr = + const unitree_api::msg::ResponseHeader_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr const>; + + // pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead + // NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly + typedef DEPRECATED__unitree_api__msg__ResponseHeader + std::shared_ptr> + Ptr; + typedef DEPRECATED__unitree_api__msg__ResponseHeader + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const ResponseHeader_ & other) const + { + if (this->identity != other.identity) { + return false; + } + if (this->status != other.status) { + return false; + } + return true; + } + bool operator!=(const ResponseHeader_ & other) const + { + return !this->operator==(other); + } +}; // struct ResponseHeader_ + +// alias to use template instance with default allocator +using ResponseHeader = + unitree_api::msg::ResponseHeader_>; + +// constant definitions + +} // namespace msg + +} // namespace unitree_api + +#endif // UNITREE_API__MSG__DETAIL__RESPONSE_HEADER__STRUCT_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__traits.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__traits.hpp new file mode 100644 index 0000000..a3cb0c2 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__traits.hpp @@ -0,0 +1,48 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from unitree_api:msg/ResponseHeader.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__RESPONSE_HEADER__TRAITS_HPP_ +#define UNITREE_API__MSG__DETAIL__RESPONSE_HEADER__TRAITS_HPP_ + +#include "unitree_api/msg/detail/response_header__struct.hpp" +#include +#include +#include + +// Include directives for member types +// Member 'identity' +#include "unitree_api/msg/detail/request_identity__traits.hpp" +// Member 'status' +#include "unitree_api/msg/detail/response_status__traits.hpp" + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "unitree_api::msg::ResponseHeader"; +} + +template<> +inline const char * name() +{ + return "unitree_api/msg/ResponseHeader"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value && has_fixed_size::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value && has_bounded_size::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UNITREE_API__MSG__DETAIL__RESPONSE_HEADER__TRAITS_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__type_support.c b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__type_support.c new file mode 100644 index 0000000..e728e73 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__type_support.c @@ -0,0 +1,110 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from unitree_api:msg/ResponseHeader.idl +// generated code does not contain a copyright notice + +#include +#include "unitree_api/msg/detail/response_header__rosidl_typesupport_introspection_c.h" +#include "unitree_api/msg/rosidl_typesupport_introspection_c__visibility_control.h" +#include "rosidl_typesupport_introspection_c/field_types.h" +#include "rosidl_typesupport_introspection_c/identifier.h" +#include "rosidl_typesupport_introspection_c/message_introspection.h" +#include "unitree_api/msg/detail/response_header__functions.h" +#include "unitree_api/msg/detail/response_header__struct.h" + + +// Include directives for member types +// Member `identity` +#include "unitree_api/msg/request_identity.h" +// Member `identity` +#include "unitree_api/msg/detail/request_identity__rosidl_typesupport_introspection_c.h" +// Member `status` +#include "unitree_api/msg/response_status.h" +// Member `status` +#include "unitree_api/msg/detail/response_status__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void ResponseHeader__rosidl_typesupport_introspection_c__ResponseHeader_init_function( + void * message_memory, enum rosidl_runtime_c__message_initialization _init) +{ + // TODO(karsten1987): initializers are not yet implemented for typesupport c + // see https://github.com/ros2/ros2/issues/397 + (void) _init; + unitree_api__msg__ResponseHeader__init(message_memory); +} + +void ResponseHeader__rosidl_typesupport_introspection_c__ResponseHeader_fini_function(void * message_memory) +{ + unitree_api__msg__ResponseHeader__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember ResponseHeader__rosidl_typesupport_introspection_c__ResponseHeader_message_member_array[2] = { + { + "identity", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_api__msg__ResponseHeader, identity), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "status", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_api__msg__ResponseHeader, status), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers ResponseHeader__rosidl_typesupport_introspection_c__ResponseHeader_message_members = { + "unitree_api__msg", // message namespace + "ResponseHeader", // message name + 2, // number of fields + sizeof(unitree_api__msg__ResponseHeader), + ResponseHeader__rosidl_typesupport_introspection_c__ResponseHeader_message_member_array, // message members + ResponseHeader__rosidl_typesupport_introspection_c__ResponseHeader_init_function, // function to initialize message memory (memory has to be allocated) + ResponseHeader__rosidl_typesupport_introspection_c__ResponseHeader_fini_function // function to terminate message instance (will not free memory) +}; + +// this is not const since it must be initialized on first access +// since C does not allow non-integral compile-time constants +static rosidl_message_type_support_t ResponseHeader__rosidl_typesupport_introspection_c__ResponseHeader_message_type_support_handle = { + 0, + &ResponseHeader__rosidl_typesupport_introspection_c__ResponseHeader_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_api +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_api, msg, ResponseHeader)() { + ResponseHeader__rosidl_typesupport_introspection_c__ResponseHeader_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_api, msg, RequestIdentity)(); + ResponseHeader__rosidl_typesupport_introspection_c__ResponseHeader_message_member_array[1].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_api, msg, ResponseStatus)(); + if (!ResponseHeader__rosidl_typesupport_introspection_c__ResponseHeader_message_type_support_handle.typesupport_identifier) { + ResponseHeader__rosidl_typesupport_introspection_c__ResponseHeader_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &ResponseHeader__rosidl_typesupport_introspection_c__ResponseHeader_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__type_support.cpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__type_support.cpp new file mode 100644 index 0000000..ea946b8 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__type_support.cpp @@ -0,0 +1,122 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from unitree_api:msg/ResponseHeader.idl +// generated code does not contain a copyright notice + +#include "array" +#include "cstddef" +#include "string" +#include "vector" +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_cpp/message_type_support.hpp" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_api/msg/detail/response_header__struct.hpp" +#include "rosidl_typesupport_introspection_cpp/field_types.hpp" +#include "rosidl_typesupport_introspection_cpp/identifier.hpp" +#include "rosidl_typesupport_introspection_cpp/message_introspection.hpp" +#include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +namespace unitree_api +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void ResponseHeader_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) unitree_api::msg::ResponseHeader(_init); +} + +void ResponseHeader_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~ResponseHeader(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember ResponseHeader_message_member_array[2] = { + { + "identity", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_api::msg::ResponseHeader, identity), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "status", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_api::msg::ResponseHeader, status), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers ResponseHeader_message_members = { + "unitree_api::msg", // message namespace + "ResponseHeader", // message name + 2, // number of fields + sizeof(unitree_api::msg::ResponseHeader), + ResponseHeader_message_member_array, // message members + ResponseHeader_init_function, // function to initialize message memory (memory has to be allocated) + ResponseHeader_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t ResponseHeader_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &ResponseHeader_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace unitree_api + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::unitree_api::msg::rosidl_typesupport_introspection_cpp::ResponseHeader_message_type_support_handle; +} + +} // namespace rosidl_typesupport_introspection_cpp + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_api, msg, ResponseHeader)() { + return &::unitree_api::msg::rosidl_typesupport_introspection_cpp::ResponseHeader_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__type_support.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__type_support.h new file mode 100644 index 0000000..a9d20af --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from unitree_api:msg/ResponseHeader.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__RESPONSE_HEADER__TYPE_SUPPORT_H_ +#define UNITREE_API__MSG__DETAIL__RESPONSE_HEADER__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_api/msg/rosidl_generator_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rosidl_runtime_c/message_type_support_struct.h" + +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + unitree_api, + msg, + ResponseHeader +)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__RESPONSE_HEADER__TYPE_SUPPORT_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__type_support.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__type_support.hpp new file mode 100644 index 0000000..3664697 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_header__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from unitree_api:msg/ResponseHeader.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__RESPONSE_HEADER__TYPE_SUPPORT_HPP_ +#define UNITREE_API__MSG__DETAIL__RESPONSE_HEADER__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_api/msg/rosidl_generator_cpp__visibility_control.hpp" + +#include "rosidl_typesupport_cpp/message_type_support.hpp" + +#ifdef __cplusplus +extern "C" +{ +#endif +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_CPP_PUBLIC_unitree_api +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + unitree_api, + msg, + ResponseHeader +)(); +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__RESPONSE_HEADER__TYPE_SUPPORT_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__builder.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__builder.hpp new file mode 100644 index 0000000..6b78a61 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__builder.hpp @@ -0,0 +1,55 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from unitree_api:msg/ResponseStatus.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__RESPONSE_STATUS__BUILDER_HPP_ +#define UNITREE_API__MSG__DETAIL__RESPONSE_STATUS__BUILDER_HPP_ + +#include "unitree_api/msg/detail/response_status__struct.hpp" +#include +#include +#include + + +namespace unitree_api +{ + +namespace msg +{ + +namespace builder +{ + +class Init_ResponseStatus_code +{ +public: + Init_ResponseStatus_code() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + ::unitree_api::msg::ResponseStatus code(::unitree_api::msg::ResponseStatus::_code_type arg) + { + msg_.code = std::move(arg); + return std::move(msg_); + } + +private: + ::unitree_api::msg::ResponseStatus msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::unitree_api::msg::ResponseStatus>() +{ + return unitree_api::msg::builder::Init_ResponseStatus_code(); +} + +} // namespace unitree_api + +#endif // UNITREE_API__MSG__DETAIL__RESPONSE_STATUS__BUILDER_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__functions.c b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__functions.c new file mode 100644 index 0000000..535cc3f --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__functions.c @@ -0,0 +1,231 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from unitree_api:msg/ResponseStatus.idl +// generated code does not contain a copyright notice +#include "unitree_api/msg/detail/response_status__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +unitree_api__msg__ResponseStatus__init(unitree_api__msg__ResponseStatus * msg) +{ + if (!msg) { + return false; + } + // code + return true; +} + +void +unitree_api__msg__ResponseStatus__fini(unitree_api__msg__ResponseStatus * msg) +{ + if (!msg) { + return; + } + // code +} + +bool +unitree_api__msg__ResponseStatus__are_equal(const unitree_api__msg__ResponseStatus * lhs, const unitree_api__msg__ResponseStatus * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // code + if (lhs->code != rhs->code) { + return false; + } + return true; +} + +bool +unitree_api__msg__ResponseStatus__copy( + const unitree_api__msg__ResponseStatus * input, + unitree_api__msg__ResponseStatus * output) +{ + if (!input || !output) { + return false; + } + // code + output->code = input->code; + return true; +} + +unitree_api__msg__ResponseStatus * +unitree_api__msg__ResponseStatus__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_api__msg__ResponseStatus * msg = (unitree_api__msg__ResponseStatus *)allocator.allocate(sizeof(unitree_api__msg__ResponseStatus), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(unitree_api__msg__ResponseStatus)); + bool success = unitree_api__msg__ResponseStatus__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +unitree_api__msg__ResponseStatus__destroy(unitree_api__msg__ResponseStatus * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + unitree_api__msg__ResponseStatus__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +unitree_api__msg__ResponseStatus__Sequence__init(unitree_api__msg__ResponseStatus__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_api__msg__ResponseStatus * data = NULL; + + if (size) { + data = (unitree_api__msg__ResponseStatus *)allocator.zero_allocate(size, sizeof(unitree_api__msg__ResponseStatus), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = unitree_api__msg__ResponseStatus__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + unitree_api__msg__ResponseStatus__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +unitree_api__msg__ResponseStatus__Sequence__fini(unitree_api__msg__ResponseStatus__Sequence * array) +{ + if (!array) { + return; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + + if (array->data) { + // ensure that data and capacity values are consistent + assert(array->capacity > 0); + // finalize all array elements + for (size_t i = 0; i < array->capacity; ++i) { + unitree_api__msg__ResponseStatus__fini(&array->data[i]); + } + allocator.deallocate(array->data, allocator.state); + array->data = NULL; + array->size = 0; + array->capacity = 0; + } else { + // ensure that data, size, and capacity values are consistent + assert(0 == array->size); + assert(0 == array->capacity); + } +} + +unitree_api__msg__ResponseStatus__Sequence * +unitree_api__msg__ResponseStatus__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_api__msg__ResponseStatus__Sequence * array = (unitree_api__msg__ResponseStatus__Sequence *)allocator.allocate(sizeof(unitree_api__msg__ResponseStatus__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = unitree_api__msg__ResponseStatus__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +unitree_api__msg__ResponseStatus__Sequence__destroy(unitree_api__msg__ResponseStatus__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + unitree_api__msg__ResponseStatus__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +unitree_api__msg__ResponseStatus__Sequence__are_equal(const unitree_api__msg__ResponseStatus__Sequence * lhs, const unitree_api__msg__ResponseStatus__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!unitree_api__msg__ResponseStatus__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +unitree_api__msg__ResponseStatus__Sequence__copy( + const unitree_api__msg__ResponseStatus__Sequence * input, + unitree_api__msg__ResponseStatus__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(unitree_api__msg__ResponseStatus); + unitree_api__msg__ResponseStatus * data = + (unitree_api__msg__ResponseStatus *)realloc(output->data, allocation_size); + if (!data) { + return false; + } + for (size_t i = output->capacity; i < input->size; ++i) { + if (!unitree_api__msg__ResponseStatus__init(&data[i])) { + /* free currently allocated and return false */ + for (; i-- > output->capacity; ) { + unitree_api__msg__ResponseStatus__fini(&data[i]); + } + free(data); + return false; + } + } + output->data = data; + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!unitree_api__msg__ResponseStatus__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__functions.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__functions.h new file mode 100644 index 0000000..58b8246 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from unitree_api:msg/ResponseStatus.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__RESPONSE_STATUS__FUNCTIONS_H_ +#define UNITREE_API__MSG__DETAIL__RESPONSE_STATUS__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_api/msg/rosidl_generator_c__visibility_control.h" + +#include "unitree_api/msg/detail/response_status__struct.h" + +/// Initialize msg/ResponseStatus message. +/** + * If the init function is called twice for the same message without + * calling fini inbetween previously allocated memory will be leaked. + * \param[in,out] msg The previously allocated message pointer. + * Fields without a default value will not be initialized by this function. + * You might want to call memset(msg, 0, sizeof( + * unitree_api__msg__ResponseStatus + * )) before or use + * unitree_api__msg__ResponseStatus__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__ResponseStatus__init(unitree_api__msg__ResponseStatus * msg); + +/// Finalize msg/ResponseStatus message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +void +unitree_api__msg__ResponseStatus__fini(unitree_api__msg__ResponseStatus * msg); + +/// Create msg/ResponseStatus message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * unitree_api__msg__ResponseStatus__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +unitree_api__msg__ResponseStatus * +unitree_api__msg__ResponseStatus__create(); + +/// Destroy msg/ResponseStatus message. +/** + * It calls + * unitree_api__msg__ResponseStatus__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +void +unitree_api__msg__ResponseStatus__destroy(unitree_api__msg__ResponseStatus * msg); + +/// Check for msg/ResponseStatus message equality. +/** + * \param[in] lhs The message on the left hand size of the equality operator. + * \param[in] rhs The message on the right hand size of the equality operator. + * \return true if messages are equal, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__ResponseStatus__are_equal(const unitree_api__msg__ResponseStatus * lhs, const unitree_api__msg__ResponseStatus * rhs); + +/// Copy a msg/ResponseStatus message. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source message pointer. + * \param[out] output The target message pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer is null + * or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__ResponseStatus__copy( + const unitree_api__msg__ResponseStatus * input, + unitree_api__msg__ResponseStatus * output); + +/// Initialize array of msg/ResponseStatus messages. +/** + * It allocates the memory for the number of elements and calls + * unitree_api__msg__ResponseStatus__init() + * for each element of the array. + * \param[in,out] array The allocated array pointer. + * \param[in] size The size / capacity of the array. + * \return true if initialization was successful, otherwise false + * If the array pointer is valid and the size is zero it is guaranteed + # to return true. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__ResponseStatus__Sequence__init(unitree_api__msg__ResponseStatus__Sequence * array, size_t size); + +/// Finalize array of msg/ResponseStatus messages. +/** + * It calls + * unitree_api__msg__ResponseStatus__fini() + * for each element of the array and frees the memory for the number of + * elements. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +void +unitree_api__msg__ResponseStatus__Sequence__fini(unitree_api__msg__ResponseStatus__Sequence * array); + +/// Create array of msg/ResponseStatus messages. +/** + * It allocates the memory for the array and calls + * unitree_api__msg__ResponseStatus__Sequence__init(). + * \param[in] size The size / capacity of the array. + * \return The pointer to the initialized array if successful, otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +unitree_api__msg__ResponseStatus__Sequence * +unitree_api__msg__ResponseStatus__Sequence__create(size_t size); + +/// Destroy array of msg/ResponseStatus messages. +/** + * It calls + * unitree_api__msg__ResponseStatus__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +void +unitree_api__msg__ResponseStatus__Sequence__destroy(unitree_api__msg__ResponseStatus__Sequence * array); + +/// Check for msg/ResponseStatus message array equality. +/** + * \param[in] lhs The message array on the left hand size of the equality operator. + * \param[in] rhs The message array on the right hand size of the equality operator. + * \return true if message arrays are equal in size and content, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__ResponseStatus__Sequence__are_equal(const unitree_api__msg__ResponseStatus__Sequence * lhs, const unitree_api__msg__ResponseStatus__Sequence * rhs); + +/// Copy an array of msg/ResponseStatus messages. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source array pointer. + * \param[out] output The target array pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer + * is null or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +bool +unitree_api__msg__ResponseStatus__Sequence__copy( + const unitree_api__msg__ResponseStatus__Sequence * input, + unitree_api__msg__ResponseStatus__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__RESPONSE_STATUS__FUNCTIONS_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__rosidl_typesupport_fastrtps_c.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 0000000..c7a090f --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,36 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from unitree_api:msg/ResponseStatus.idl +// generated code does not contain a copyright notice +#ifndef UNITREE_API__MSG__DETAIL__RESPONSE_STATUS__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define UNITREE_API__MSG__DETAIL__RESPONSE_STATUS__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_api/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_api +size_t get_serialized_size_unitree_api__msg__ResponseStatus( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_api +size_t max_serialized_size_unitree_api__msg__ResponseStatus( + bool & full_bounded, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_api +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, unitree_api, msg, ResponseStatus)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__RESPONSE_STATUS__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__rosidl_typesupport_fastrtps_cpp.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 0000000..f21d788 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,79 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from unitree_api:msg/ResponseStatus.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__RESPONSE_STATUS__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define UNITREE_API__MSG__DETAIL__RESPONSE_STATUS__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_api/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "unitree_api/msg/detail/response_status__struct.hpp" + +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-parameter" +# ifdef __clang__ +# pragma clang diagnostic ignored "-Wdeprecated-register" +# pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +# endif +#endif +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif + +#include "fastcdr/Cdr.h" + +namespace unitree_api +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +cdr_serialize( + const unitree_api::msg::ResponseStatus & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + unitree_api::msg::ResponseStatus & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +get_serialized_size( + const unitree_api::msg::ResponseStatus & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +max_serialized_size_ResponseStatus( + bool & full_bounded, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace unitree_api + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, unitree_api, msg, ResponseStatus)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__RESPONSE_STATUS__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__rosidl_typesupport_introspection_c.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__rosidl_typesupport_introspection_c.h new file mode 100644 index 0000000..8c3106c --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from unitree_api:msg/ResponseStatus.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__RESPONSE_STATUS__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define UNITREE_API__MSG__DETAIL__RESPONSE_STATUS__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_api/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_api +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_api, msg, ResponseStatus)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__RESPONSE_STATUS__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__rosidl_typesupport_introspection_cpp.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 0000000..7a8ab2e --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from unitree_api:msg/ResponseStatus.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__RESPONSE_STATUS__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define UNITREE_API__MSG__DETAIL__RESPONSE_STATUS__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +// TODO(dirk-thomas) these visibility macros should be message package specific +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_api, msg, ResponseStatus)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__RESPONSE_STATUS__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__struct.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__struct.h new file mode 100644 index 0000000..fc12219 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__struct.h @@ -0,0 +1,40 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from unitree_api:msg/ResponseStatus.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__RESPONSE_STATUS__STRUCT_H_ +#define UNITREE_API__MSG__DETAIL__RESPONSE_STATUS__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Struct defined in msg/ResponseStatus in the package unitree_api. +typedef struct unitree_api__msg__ResponseStatus +{ + int32_t code; +} unitree_api__msg__ResponseStatus; + +// Struct for a sequence of unitree_api__msg__ResponseStatus. +typedef struct unitree_api__msg__ResponseStatus__Sequence +{ + unitree_api__msg__ResponseStatus * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} unitree_api__msg__ResponseStatus__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__RESPONSE_STATUS__STRUCT_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__struct.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__struct.hpp new file mode 100644 index 0000000..126d908 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__struct.hpp @@ -0,0 +1,130 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from unitree_api:msg/ResponseStatus.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__RESPONSE_STATUS__STRUCT_HPP_ +#define UNITREE_API__MSG__DETAIL__RESPONSE_STATUS__STRUCT_HPP_ + +#include +#include +#include +#include +#include +#include +#include + + +#ifndef _WIN32 +# define DEPRECATED__unitree_api__msg__ResponseStatus __attribute__((deprecated)) +#else +# define DEPRECATED__unitree_api__msg__ResponseStatus __declspec(deprecated) +#endif + +namespace unitree_api +{ + +namespace msg +{ + +// message struct +template +struct ResponseStatus_ +{ + using Type = ResponseStatus_; + + explicit ResponseStatus_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->code = 0l; + } + } + + explicit ResponseStatus_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + (void)_alloc; + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->code = 0l; + } + } + + // field types and members + using _code_type = + int32_t; + _code_type code; + + // setters for named parameter idiom + Type & set__code( + const int32_t & _arg) + { + this->code = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + unitree_api::msg::ResponseStatus_ *; + using ConstRawPtr = + const unitree_api::msg::ResponseStatus_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr const>; + + // pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead + // NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly + typedef DEPRECATED__unitree_api__msg__ResponseStatus + std::shared_ptr> + Ptr; + typedef DEPRECATED__unitree_api__msg__ResponseStatus + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const ResponseStatus_ & other) const + { + if (this->code != other.code) { + return false; + } + return true; + } + bool operator!=(const ResponseStatus_ & other) const + { + return !this->operator==(other); + } +}; // struct ResponseStatus_ + +// alias to use template instance with default allocator +using ResponseStatus = + unitree_api::msg::ResponseStatus_>; + +// constant definitions + +} // namespace msg + +} // namespace unitree_api + +#endif // UNITREE_API__MSG__DETAIL__RESPONSE_STATUS__STRUCT_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__traits.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__traits.hpp new file mode 100644 index 0000000..928afdf --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__traits.hpp @@ -0,0 +1,42 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from unitree_api:msg/ResponseStatus.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__RESPONSE_STATUS__TRAITS_HPP_ +#define UNITREE_API__MSG__DETAIL__RESPONSE_STATUS__TRAITS_HPP_ + +#include "unitree_api/msg/detail/response_status__struct.hpp" +#include +#include +#include + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "unitree_api::msg::ResponseStatus"; +} + +template<> +inline const char * name() +{ + return "unitree_api/msg/ResponseStatus"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UNITREE_API__MSG__DETAIL__RESPONSE_STATUS__TRAITS_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__type_support.c b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__type_support.c new file mode 100644 index 0000000..91fa969 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__type_support.c @@ -0,0 +1,81 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from unitree_api:msg/ResponseStatus.idl +// generated code does not contain a copyright notice + +#include +#include "unitree_api/msg/detail/response_status__rosidl_typesupport_introspection_c.h" +#include "unitree_api/msg/rosidl_typesupport_introspection_c__visibility_control.h" +#include "rosidl_typesupport_introspection_c/field_types.h" +#include "rosidl_typesupport_introspection_c/identifier.h" +#include "rosidl_typesupport_introspection_c/message_introspection.h" +#include "unitree_api/msg/detail/response_status__functions.h" +#include "unitree_api/msg/detail/response_status__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void ResponseStatus__rosidl_typesupport_introspection_c__ResponseStatus_init_function( + void * message_memory, enum rosidl_runtime_c__message_initialization _init) +{ + // TODO(karsten1987): initializers are not yet implemented for typesupport c + // see https://github.com/ros2/ros2/issues/397 + (void) _init; + unitree_api__msg__ResponseStatus__init(message_memory); +} + +void ResponseStatus__rosidl_typesupport_introspection_c__ResponseStatus_fini_function(void * message_memory) +{ + unitree_api__msg__ResponseStatus__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember ResponseStatus__rosidl_typesupport_introspection_c__ResponseStatus_message_member_array[1] = { + { + "code", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_api__msg__ResponseStatus, code), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers ResponseStatus__rosidl_typesupport_introspection_c__ResponseStatus_message_members = { + "unitree_api__msg", // message namespace + "ResponseStatus", // message name + 1, // number of fields + sizeof(unitree_api__msg__ResponseStatus), + ResponseStatus__rosidl_typesupport_introspection_c__ResponseStatus_message_member_array, // message members + ResponseStatus__rosidl_typesupport_introspection_c__ResponseStatus_init_function, // function to initialize message memory (memory has to be allocated) + ResponseStatus__rosidl_typesupport_introspection_c__ResponseStatus_fini_function // function to terminate message instance (will not free memory) +}; + +// this is not const since it must be initialized on first access +// since C does not allow non-integral compile-time constants +static rosidl_message_type_support_t ResponseStatus__rosidl_typesupport_introspection_c__ResponseStatus_message_type_support_handle = { + 0, + &ResponseStatus__rosidl_typesupport_introspection_c__ResponseStatus_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_api +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_api, msg, ResponseStatus)() { + if (!ResponseStatus__rosidl_typesupport_introspection_c__ResponseStatus_message_type_support_handle.typesupport_identifier) { + ResponseStatus__rosidl_typesupport_introspection_c__ResponseStatus_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &ResponseStatus__rosidl_typesupport_introspection_c__ResponseStatus_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__type_support.cpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__type_support.cpp new file mode 100644 index 0000000..69fe8f4 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__type_support.cpp @@ -0,0 +1,107 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from unitree_api:msg/ResponseStatus.idl +// generated code does not contain a copyright notice + +#include "array" +#include "cstddef" +#include "string" +#include "vector" +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_cpp/message_type_support.hpp" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_api/msg/detail/response_status__struct.hpp" +#include "rosidl_typesupport_introspection_cpp/field_types.hpp" +#include "rosidl_typesupport_introspection_cpp/identifier.hpp" +#include "rosidl_typesupport_introspection_cpp/message_introspection.hpp" +#include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +namespace unitree_api +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void ResponseStatus_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) unitree_api::msg::ResponseStatus(_init); +} + +void ResponseStatus_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~ResponseStatus(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember ResponseStatus_message_member_array[1] = { + { + "code", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_api::msg::ResponseStatus, code), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers ResponseStatus_message_members = { + "unitree_api::msg", // message namespace + "ResponseStatus", // message name + 1, // number of fields + sizeof(unitree_api::msg::ResponseStatus), + ResponseStatus_message_member_array, // message members + ResponseStatus_init_function, // function to initialize message memory (memory has to be allocated) + ResponseStatus_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t ResponseStatus_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &ResponseStatus_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace unitree_api + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::unitree_api::msg::rosidl_typesupport_introspection_cpp::ResponseStatus_message_type_support_handle; +} + +} // namespace rosidl_typesupport_introspection_cpp + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_api, msg, ResponseStatus)() { + return &::unitree_api::msg::rosidl_typesupport_introspection_cpp::ResponseStatus_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__type_support.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__type_support.h new file mode 100644 index 0000000..fa14f97 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from unitree_api:msg/ResponseStatus.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__RESPONSE_STATUS__TYPE_SUPPORT_H_ +#define UNITREE_API__MSG__DETAIL__RESPONSE_STATUS__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_api/msg/rosidl_generator_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rosidl_runtime_c/message_type_support_struct.h" + +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_C_PUBLIC_unitree_api +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + unitree_api, + msg, + ResponseStatus +)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__RESPONSE_STATUS__TYPE_SUPPORT_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__type_support.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__type_support.hpp new file mode 100644 index 0000000..733b937 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/detail/response_status__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from unitree_api:msg/ResponseStatus.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__DETAIL__RESPONSE_STATUS__TYPE_SUPPORT_HPP_ +#define UNITREE_API__MSG__DETAIL__RESPONSE_STATUS__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_api/msg/rosidl_generator_cpp__visibility_control.hpp" + +#include "rosidl_typesupport_cpp/message_type_support.hpp" + +#ifdef __cplusplus +extern "C" +{ +#endif +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_CPP_PUBLIC_unitree_api +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + unitree_api, + msg, + ResponseStatus +)(); +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__DETAIL__RESPONSE_STATUS__TYPE_SUPPORT_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/request.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/request.h new file mode 100644 index 0000000..49432ff --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/request.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from unitree_api:msg/Request.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__REQUEST_H_ +#define UNITREE_API__MSG__REQUEST_H_ + +#include "unitree_api/msg/detail/request__struct.h" +#include "unitree_api/msg/detail/request__functions.h" +#include "unitree_api/msg/detail/request__type_support.h" + +#endif // UNITREE_API__MSG__REQUEST_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/request.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/request.hpp new file mode 100644 index 0000000..f537925 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/request.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__REQUEST_HPP_ +#define UNITREE_API__MSG__REQUEST_HPP_ + +#include "unitree_api/msg/detail/request__struct.hpp" +#include "unitree_api/msg/detail/request__builder.hpp" +#include "unitree_api/msg/detail/request__traits.hpp" +#include "unitree_api/msg/detail/request__type_support.hpp" + +#endif // UNITREE_API__MSG__REQUEST_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/request_header.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/request_header.h new file mode 100644 index 0000000..db176d4 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/request_header.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from unitree_api:msg/RequestHeader.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__REQUEST_HEADER_H_ +#define UNITREE_API__MSG__REQUEST_HEADER_H_ + +#include "unitree_api/msg/detail/request_header__struct.h" +#include "unitree_api/msg/detail/request_header__functions.h" +#include "unitree_api/msg/detail/request_header__type_support.h" + +#endif // UNITREE_API__MSG__REQUEST_HEADER_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/request_header.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/request_header.hpp new file mode 100644 index 0000000..e5468b2 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/request_header.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__REQUEST_HEADER_HPP_ +#define UNITREE_API__MSG__REQUEST_HEADER_HPP_ + +#include "unitree_api/msg/detail/request_header__struct.hpp" +#include "unitree_api/msg/detail/request_header__builder.hpp" +#include "unitree_api/msg/detail/request_header__traits.hpp" +#include "unitree_api/msg/detail/request_header__type_support.hpp" + +#endif // UNITREE_API__MSG__REQUEST_HEADER_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/request_identity.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/request_identity.h new file mode 100644 index 0000000..e818b2f --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/request_identity.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from unitree_api:msg/RequestIdentity.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__REQUEST_IDENTITY_H_ +#define UNITREE_API__MSG__REQUEST_IDENTITY_H_ + +#include "unitree_api/msg/detail/request_identity__struct.h" +#include "unitree_api/msg/detail/request_identity__functions.h" +#include "unitree_api/msg/detail/request_identity__type_support.h" + +#endif // UNITREE_API__MSG__REQUEST_IDENTITY_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/request_identity.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/request_identity.hpp new file mode 100644 index 0000000..06e0041 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/request_identity.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__REQUEST_IDENTITY_HPP_ +#define UNITREE_API__MSG__REQUEST_IDENTITY_HPP_ + +#include "unitree_api/msg/detail/request_identity__struct.hpp" +#include "unitree_api/msg/detail/request_identity__builder.hpp" +#include "unitree_api/msg/detail/request_identity__traits.hpp" +#include "unitree_api/msg/detail/request_identity__type_support.hpp" + +#endif // UNITREE_API__MSG__REQUEST_IDENTITY_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/request_lease.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/request_lease.h new file mode 100644 index 0000000..5774e17 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/request_lease.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from unitree_api:msg/RequestLease.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__REQUEST_LEASE_H_ +#define UNITREE_API__MSG__REQUEST_LEASE_H_ + +#include "unitree_api/msg/detail/request_lease__struct.h" +#include "unitree_api/msg/detail/request_lease__functions.h" +#include "unitree_api/msg/detail/request_lease__type_support.h" + +#endif // UNITREE_API__MSG__REQUEST_LEASE_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/request_lease.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/request_lease.hpp new file mode 100644 index 0000000..9869d1a --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/request_lease.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__REQUEST_LEASE_HPP_ +#define UNITREE_API__MSG__REQUEST_LEASE_HPP_ + +#include "unitree_api/msg/detail/request_lease__struct.hpp" +#include "unitree_api/msg/detail/request_lease__builder.hpp" +#include "unitree_api/msg/detail/request_lease__traits.hpp" +#include "unitree_api/msg/detail/request_lease__type_support.hpp" + +#endif // UNITREE_API__MSG__REQUEST_LEASE_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/request_policy.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/request_policy.h new file mode 100644 index 0000000..83f89ee --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/request_policy.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from unitree_api:msg/RequestPolicy.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__REQUEST_POLICY_H_ +#define UNITREE_API__MSG__REQUEST_POLICY_H_ + +#include "unitree_api/msg/detail/request_policy__struct.h" +#include "unitree_api/msg/detail/request_policy__functions.h" +#include "unitree_api/msg/detail/request_policy__type_support.h" + +#endif // UNITREE_API__MSG__REQUEST_POLICY_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/request_policy.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/request_policy.hpp new file mode 100644 index 0000000..389c475 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/request_policy.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__REQUEST_POLICY_HPP_ +#define UNITREE_API__MSG__REQUEST_POLICY_HPP_ + +#include "unitree_api/msg/detail/request_policy__struct.hpp" +#include "unitree_api/msg/detail/request_policy__builder.hpp" +#include "unitree_api/msg/detail/request_policy__traits.hpp" +#include "unitree_api/msg/detail/request_policy__type_support.hpp" + +#endif // UNITREE_API__MSG__REQUEST_POLICY_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/response.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/response.h new file mode 100644 index 0000000..13063dd --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/response.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from unitree_api:msg/Response.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__RESPONSE_H_ +#define UNITREE_API__MSG__RESPONSE_H_ + +#include "unitree_api/msg/detail/response__struct.h" +#include "unitree_api/msg/detail/response__functions.h" +#include "unitree_api/msg/detail/response__type_support.h" + +#endif // UNITREE_API__MSG__RESPONSE_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/response.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/response.hpp new file mode 100644 index 0000000..8af5cc9 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/response.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__RESPONSE_HPP_ +#define UNITREE_API__MSG__RESPONSE_HPP_ + +#include "unitree_api/msg/detail/response__struct.hpp" +#include "unitree_api/msg/detail/response__builder.hpp" +#include "unitree_api/msg/detail/response__traits.hpp" +#include "unitree_api/msg/detail/response__type_support.hpp" + +#endif // UNITREE_API__MSG__RESPONSE_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/response_header.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/response_header.h new file mode 100644 index 0000000..5cba446 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/response_header.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from unitree_api:msg/ResponseHeader.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__RESPONSE_HEADER_H_ +#define UNITREE_API__MSG__RESPONSE_HEADER_H_ + +#include "unitree_api/msg/detail/response_header__struct.h" +#include "unitree_api/msg/detail/response_header__functions.h" +#include "unitree_api/msg/detail/response_header__type_support.h" + +#endif // UNITREE_API__MSG__RESPONSE_HEADER_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/response_header.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/response_header.hpp new file mode 100644 index 0000000..3115d6c --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/response_header.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__RESPONSE_HEADER_HPP_ +#define UNITREE_API__MSG__RESPONSE_HEADER_HPP_ + +#include "unitree_api/msg/detail/response_header__struct.hpp" +#include "unitree_api/msg/detail/response_header__builder.hpp" +#include "unitree_api/msg/detail/response_header__traits.hpp" +#include "unitree_api/msg/detail/response_header__type_support.hpp" + +#endif // UNITREE_API__MSG__RESPONSE_HEADER_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/response_status.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/response_status.h new file mode 100644 index 0000000..b01030c --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/response_status.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from unitree_api:msg/ResponseStatus.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__RESPONSE_STATUS_H_ +#define UNITREE_API__MSG__RESPONSE_STATUS_H_ + +#include "unitree_api/msg/detail/response_status__struct.h" +#include "unitree_api/msg/detail/response_status__functions.h" +#include "unitree_api/msg/detail/response_status__type_support.h" + +#endif // UNITREE_API__MSG__RESPONSE_STATUS_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/response_status.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/response_status.hpp new file mode 100644 index 0000000..4e59390 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/response_status.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__RESPONSE_STATUS_HPP_ +#define UNITREE_API__MSG__RESPONSE_STATUS_HPP_ + +#include "unitree_api/msg/detail/response_status__struct.hpp" +#include "unitree_api/msg/detail/response_status__builder.hpp" +#include "unitree_api/msg/detail/response_status__traits.hpp" +#include "unitree_api/msg/detail/response_status__type_support.hpp" + +#endif // UNITREE_API__MSG__RESPONSE_STATUS_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/rosidl_generator_c__visibility_control.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/rosidl_generator_c__visibility_control.h new file mode 100644 index 0000000..c3f4c94 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/rosidl_generator_c__visibility_control.h @@ -0,0 +1,42 @@ +// generated from rosidl_generator_c/resource/rosidl_generator_c__visibility_control.h.in +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__ROSIDL_GENERATOR_C__VISIBILITY_CONTROL_H_ +#define UNITREE_API__MSG__ROSIDL_GENERATOR_C__VISIBILITY_CONTROL_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +// This logic was borrowed (then namespaced) from the examples on the gcc wiki: +// https://gcc.gnu.org/wiki/Visibility + +#if defined _WIN32 || defined __CYGWIN__ + #ifdef __GNUC__ + #define ROSIDL_GENERATOR_C_EXPORT_unitree_api __attribute__ ((dllexport)) + #define ROSIDL_GENERATOR_C_IMPORT_unitree_api __attribute__ ((dllimport)) + #else + #define ROSIDL_GENERATOR_C_EXPORT_unitree_api __declspec(dllexport) + #define ROSIDL_GENERATOR_C_IMPORT_unitree_api __declspec(dllimport) + #endif + #ifdef ROSIDL_GENERATOR_C_BUILDING_DLL_unitree_api + #define ROSIDL_GENERATOR_C_PUBLIC_unitree_api ROSIDL_GENERATOR_C_EXPORT_unitree_api + #else + #define ROSIDL_GENERATOR_C_PUBLIC_unitree_api ROSIDL_GENERATOR_C_IMPORT_unitree_api + #endif +#else + #define ROSIDL_GENERATOR_C_EXPORT_unitree_api __attribute__ ((visibility("default"))) + #define ROSIDL_GENERATOR_C_IMPORT_unitree_api + #if __GNUC__ >= 4 + #define ROSIDL_GENERATOR_C_PUBLIC_unitree_api __attribute__ ((visibility("default"))) + #else + #define ROSIDL_GENERATOR_C_PUBLIC_unitree_api + #endif +#endif + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__ROSIDL_GENERATOR_C__VISIBILITY_CONTROL_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/rosidl_generator_cpp__visibility_control.hpp b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/rosidl_generator_cpp__visibility_control.hpp new file mode 100644 index 0000000..6444c9a --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/rosidl_generator_cpp__visibility_control.hpp @@ -0,0 +1,42 @@ +// generated from rosidl_generator_cpp/resource/rosidl_generator_cpp__visibility_control.hpp.in +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ +#define UNITREE_API__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +// This logic was borrowed (then namespaced) from the examples on the gcc wiki: +// https://gcc.gnu.org/wiki/Visibility + +#if defined _WIN32 || defined __CYGWIN__ + #ifdef __GNUC__ + #define ROSIDL_GENERATOR_CPP_EXPORT_unitree_api __attribute__ ((dllexport)) + #define ROSIDL_GENERATOR_CPP_IMPORT_unitree_api __attribute__ ((dllimport)) + #else + #define ROSIDL_GENERATOR_CPP_EXPORT_unitree_api __declspec(dllexport) + #define ROSIDL_GENERATOR_CPP_IMPORT_unitree_api __declspec(dllimport) + #endif + #ifdef ROSIDL_GENERATOR_CPP_BUILDING_DLL_unitree_api + #define ROSIDL_GENERATOR_CPP_PUBLIC_unitree_api ROSIDL_GENERATOR_CPP_EXPORT_unitree_api + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_unitree_api ROSIDL_GENERATOR_CPP_IMPORT_unitree_api + #endif +#else + #define ROSIDL_GENERATOR_CPP_EXPORT_unitree_api __attribute__ ((visibility("default"))) + #define ROSIDL_GENERATOR_CPP_IMPORT_unitree_api + #if __GNUC__ >= 4 + #define ROSIDL_GENERATOR_CPP_PUBLIC_unitree_api __attribute__ ((visibility("default"))) + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_unitree_api + #endif +#endif + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/rosidl_typesupport_fastrtps_c__visibility_control.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/rosidl_typesupport_fastrtps_c__visibility_control.h new file mode 100644 index 0000000..d8ec81c --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/rosidl_typesupport_fastrtps_c__visibility_control.h @@ -0,0 +1,43 @@ +// generated from +// rosidl_typesupport_fastrtps_c/resource/rosidl_typesupport_fastrtps_c__visibility_control.h.in +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__ROSIDL_TYPESUPPORT_FASTRTPS_C__VISIBILITY_CONTROL_H_ +#define UNITREE_API__MSG__ROSIDL_TYPESUPPORT_FASTRTPS_C__VISIBILITY_CONTROL_H_ + +#if __cplusplus +extern "C" +{ +#endif + +// This logic was borrowed (then namespaced) from the examples on the gcc wiki: +// https://gcc.gnu.org/wiki/Visibility + +#if defined _WIN32 || defined __CYGWIN__ + #ifdef __GNUC__ + #define ROSIDL_TYPESUPPORT_FASTRTPS_C_EXPORT_unitree_api __attribute__ ((dllexport)) + #define ROSIDL_TYPESUPPORT_FASTRTPS_C_IMPORT_unitree_api __attribute__ ((dllimport)) + #else + #define ROSIDL_TYPESUPPORT_FASTRTPS_C_EXPORT_unitree_api __declspec(dllexport) + #define ROSIDL_TYPESUPPORT_FASTRTPS_C_IMPORT_unitree_api __declspec(dllimport) + #endif + #ifdef ROSIDL_TYPESUPPORT_FASTRTPS_C_BUILDING_DLL_unitree_api + #define ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_api ROSIDL_TYPESUPPORT_FASTRTPS_C_EXPORT_unitree_api + #else + #define ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_api ROSIDL_TYPESUPPORT_FASTRTPS_C_IMPORT_unitree_api + #endif +#else + #define ROSIDL_TYPESUPPORT_FASTRTPS_C_EXPORT_unitree_api __attribute__ ((visibility("default"))) + #define ROSIDL_TYPESUPPORT_FASTRTPS_C_IMPORT_unitree_api + #if __GNUC__ >= 4 + #define ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_api __attribute__ ((visibility("default"))) + #else + #define ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_api + #endif +#endif + +#if __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__ROSIDL_TYPESUPPORT_FASTRTPS_C__VISIBILITY_CONTROL_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h new file mode 100644 index 0000000..d43fdba --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h @@ -0,0 +1,43 @@ +// generated from +// rosidl_typesupport_fastrtps_cpp/resource/rosidl_typesupport_fastrtps_cpp__visibility_control.h.in +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__ROSIDL_TYPESUPPORT_FASTRTPS_CPP__VISIBILITY_CONTROL_H_ +#define UNITREE_API__MSG__ROSIDL_TYPESUPPORT_FASTRTPS_CPP__VISIBILITY_CONTROL_H_ + +#if __cplusplus +extern "C" +{ +#endif + +// This logic was borrowed (then namespaced) from the examples on the gcc wiki: +// https://gcc.gnu.org/wiki/Visibility + +#if defined _WIN32 || defined __CYGWIN__ + #ifdef __GNUC__ + #define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_EXPORT_unitree_api __attribute__ ((dllexport)) + #define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_IMPORT_unitree_api __attribute__ ((dllimport)) + #else + #define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_EXPORT_unitree_api __declspec(dllexport) + #define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_IMPORT_unitree_api __declspec(dllimport) + #endif + #ifdef ROSIDL_TYPESUPPORT_FASTRTPS_CPP_BUILDING_DLL_unitree_api + #define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api ROSIDL_TYPESUPPORT_FASTRTPS_CPP_EXPORT_unitree_api + #else + #define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api ROSIDL_TYPESUPPORT_FASTRTPS_CPP_IMPORT_unitree_api + #endif +#else + #define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_EXPORT_unitree_api __attribute__ ((visibility("default"))) + #define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_IMPORT_unitree_api + #if __GNUC__ >= 4 + #define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api __attribute__ ((visibility("default"))) + #else + #define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_api + #endif +#endif + +#if __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__ROSIDL_TYPESUPPORT_FASTRTPS_CPP__VISIBILITY_CONTROL_H_ diff --git a/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/rosidl_typesupport_introspection_c__visibility_control.h b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/rosidl_typesupport_introspection_c__visibility_control.h new file mode 100644 index 0000000..22bb9fc --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/include/unitree_api/msg/rosidl_typesupport_introspection_c__visibility_control.h @@ -0,0 +1,43 @@ +// generated from +// rosidl_typesupport_introspection_c/resource/rosidl_typesupport_introspection_c__visibility_control.h.in +// generated code does not contain a copyright notice + +#ifndef UNITREE_API__MSG__ROSIDL_TYPESUPPORT_INTROSPECTION_C__VISIBILITY_CONTROL_H_ +#define UNITREE_API__MSG__ROSIDL_TYPESUPPORT_INTROSPECTION_C__VISIBILITY_CONTROL_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +// This logic was borrowed (then namespaced) from the examples on the gcc wiki: +// https://gcc.gnu.org/wiki/Visibility + +#if defined _WIN32 || defined __CYGWIN__ + #ifdef __GNUC__ + #define ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_api __attribute__ ((dllexport)) + #define ROSIDL_TYPESUPPORT_INTROSPECTION_C_IMPORT_unitree_api __attribute__ ((dllimport)) + #else + #define ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_api __declspec(dllexport) + #define ROSIDL_TYPESUPPORT_INTROSPECTION_C_IMPORT_unitree_api __declspec(dllimport) + #endif + #ifdef ROSIDL_TYPESUPPORT_INTROSPECTION_C_BUILDING_DLL_unitree_api + #define ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_api ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_api + #else + #define ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_api ROSIDL_TYPESUPPORT_INTROSPECTION_C_IMPORT_unitree_api + #endif +#else + #define ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_api __attribute__ ((visibility("default"))) + #define ROSIDL_TYPESUPPORT_INTROSPECTION_C_IMPORT_unitree_api + #if __GNUC__ >= 4 + #define ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_api __attribute__ ((visibility("default"))) + #else + #define ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_api + #endif +#endif + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_API__MSG__ROSIDL_TYPESUPPORT_INTROSPECTION_C__VISIBILITY_CONTROL_H_ diff --git a/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/__init__.py b/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/__init__.py b/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/__init__.py new file mode 100644 index 0000000..d9c8f06 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/__init__.py @@ -0,0 +1,8 @@ +from unitree_api.msg._request import Request # noqa: F401 +from unitree_api.msg._request_header import RequestHeader # noqa: F401 +from unitree_api.msg._request_identity import RequestIdentity # noqa: F401 +from unitree_api.msg._request_lease import RequestLease # noqa: F401 +from unitree_api.msg._request_policy import RequestPolicy # noqa: F401 +from unitree_api.msg._response import Response # noqa: F401 +from unitree_api.msg._response_header import ResponseHeader # noqa: F401 +from unitree_api.msg._response_status import ResponseStatus # noqa: F401 diff --git a/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_request.py b/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_request.py new file mode 100644 index 0000000..07b2141 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_request.py @@ -0,0 +1,184 @@ +# generated from rosidl_generator_py/resource/_idl.py.em +# with input from unitree_api:msg/Request.idl +# generated code does not contain a copyright notice + + +# Import statements for member types + +# Member 'binary' +import array # noqa: E402, I100 + +import rosidl_parser.definition # noqa: E402, I100 + + +class Metaclass_Request(type): + """Metaclass of message 'Request'.""" + + _CREATE_ROS_MESSAGE = None + _CONVERT_FROM_PY = None + _CONVERT_TO_PY = None + _DESTROY_ROS_MESSAGE = None + _TYPE_SUPPORT = None + + __constants = { + } + + @classmethod + def __import_type_support__(cls): + try: + from rosidl_generator_py import import_type_support + module = import_type_support('unitree_api') + except ImportError: + import logging + import traceback + logger = logging.getLogger( + 'unitree_api.msg.Request') + logger.debug( + 'Failed to import needed modules for type support:\n' + + traceback.format_exc()) + else: + cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__msg__request + cls._CONVERT_FROM_PY = module.convert_from_py_msg__msg__request + cls._CONVERT_TO_PY = module.convert_to_py_msg__msg__request + cls._TYPE_SUPPORT = module.type_support_msg__msg__request + cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__msg__request + + from unitree_api.msg import RequestHeader + if RequestHeader.__class__._TYPE_SUPPORT is None: + RequestHeader.__class__.__import_type_support__() + + @classmethod + def __prepare__(cls, name, bases, **kwargs): + # list constant names here so that they appear in the help text of + # the message class under "Data and other attributes defined here:" + # as well as populate each message instance + return { + } + + +class Request(metaclass=Metaclass_Request): + """Message class 'Request'.""" + + __slots__ = [ + '_header', + '_parameter', + '_binary', + ] + + _fields_and_field_types = { + 'header': 'unitree_api/RequestHeader', + 'parameter': 'string', + 'binary': 'sequence', + } + + SLOT_TYPES = ( + rosidl_parser.definition.NamespacedType(['unitree_api', 'msg'], 'RequestHeader'), # noqa: E501 + rosidl_parser.definition.UnboundedString(), # noqa: E501 + rosidl_parser.definition.UnboundedSequence(rosidl_parser.definition.BasicType('uint8')), # noqa: E501 + ) + + def __init__(self, **kwargs): + assert all('_' + key in self.__slots__ for key in kwargs.keys()), \ + 'Invalid arguments passed to constructor: %s' % \ + ', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__)) + from unitree_api.msg import RequestHeader + self.header = kwargs.get('header', RequestHeader()) + self.parameter = kwargs.get('parameter', str()) + self.binary = array.array('B', kwargs.get('binary', [])) + + def __repr__(self): + typename = self.__class__.__module__.split('.') + typename.pop() + typename.append(self.__class__.__name__) + args = [] + for s, t in zip(self.__slots__, self.SLOT_TYPES): + field = getattr(self, s) + fieldstr = repr(field) + # We use Python array type for fields that can be directly stored + # in them, and "normal" sequences for everything else. If it is + # a type that we store in an array, strip off the 'array' portion. + if ( + isinstance(t, rosidl_parser.definition.AbstractSequence) and + isinstance(t.value_type, rosidl_parser.definition.BasicType) and + t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64'] + ): + if len(field) == 0: + fieldstr = '[]' + else: + assert fieldstr.startswith('array(') + prefix = "array('X', " + suffix = ')' + fieldstr = fieldstr[len(prefix):-len(suffix)] + args.append(s[1:] + '=' + fieldstr) + return '%s(%s)' % ('.'.join(typename), ', '.join(args)) + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + if self.header != other.header: + return False + if self.parameter != other.parameter: + return False + if self.binary != other.binary: + return False + return True + + @classmethod + def get_fields_and_field_types(cls): + from copy import copy + return copy(cls._fields_and_field_types) + + @property + def header(self): + """Message field 'header'.""" + return self._header + + @header.setter + def header(self, value): + if __debug__: + from unitree_api.msg import RequestHeader + assert \ + isinstance(value, RequestHeader), \ + "The 'header' field must be a sub message of type 'RequestHeader'" + self._header = value + + @property + def parameter(self): + """Message field 'parameter'.""" + return self._parameter + + @parameter.setter + def parameter(self, value): + if __debug__: + assert \ + isinstance(value, str), \ + "The 'parameter' field must be of type 'str'" + self._parameter = value + + @property + def binary(self): + """Message field 'binary'.""" + return self._binary + + @binary.setter + def binary(self, value): + if isinstance(value, array.array): + assert value.typecode == 'B', \ + "The 'binary' array.array() must have the type code of 'B'" + self._binary = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + all(isinstance(v, int) for v in value) and + all(val >= 0 and val < 256 for val in value)), \ + "The 'binary' field must be a set or sequence and each value of type 'int' and each unsigned integer in [0, 255]" + self._binary = array.array('B', value) diff --git a/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_request_header.py b/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_request_header.py new file mode 100644 index 0000000..a1c597d --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_request_header.py @@ -0,0 +1,178 @@ +# generated from rosidl_generator_py/resource/_idl.py.em +# with input from unitree_api:msg/RequestHeader.idl +# generated code does not contain a copyright notice + + +# Import statements for member types + +import rosidl_parser.definition # noqa: E402, I100 + + +class Metaclass_RequestHeader(type): + """Metaclass of message 'RequestHeader'.""" + + _CREATE_ROS_MESSAGE = None + _CONVERT_FROM_PY = None + _CONVERT_TO_PY = None + _DESTROY_ROS_MESSAGE = None + _TYPE_SUPPORT = None + + __constants = { + } + + @classmethod + def __import_type_support__(cls): + try: + from rosidl_generator_py import import_type_support + module = import_type_support('unitree_api') + except ImportError: + import logging + import traceback + logger = logging.getLogger( + 'unitree_api.msg.RequestHeader') + logger.debug( + 'Failed to import needed modules for type support:\n' + + traceback.format_exc()) + else: + cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__msg__request_header + cls._CONVERT_FROM_PY = module.convert_from_py_msg__msg__request_header + cls._CONVERT_TO_PY = module.convert_to_py_msg__msg__request_header + cls._TYPE_SUPPORT = module.type_support_msg__msg__request_header + cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__msg__request_header + + from unitree_api.msg import RequestIdentity + if RequestIdentity.__class__._TYPE_SUPPORT is None: + RequestIdentity.__class__.__import_type_support__() + + from unitree_api.msg import RequestLease + if RequestLease.__class__._TYPE_SUPPORT is None: + RequestLease.__class__.__import_type_support__() + + from unitree_api.msg import RequestPolicy + if RequestPolicy.__class__._TYPE_SUPPORT is None: + RequestPolicy.__class__.__import_type_support__() + + @classmethod + def __prepare__(cls, name, bases, **kwargs): + # list constant names here so that they appear in the help text of + # the message class under "Data and other attributes defined here:" + # as well as populate each message instance + return { + } + + +class RequestHeader(metaclass=Metaclass_RequestHeader): + """Message class 'RequestHeader'.""" + + __slots__ = [ + '_identity', + '_lease', + '_policy', + ] + + _fields_and_field_types = { + 'identity': 'unitree_api/RequestIdentity', + 'lease': 'unitree_api/RequestLease', + 'policy': 'unitree_api/RequestPolicy', + } + + SLOT_TYPES = ( + rosidl_parser.definition.NamespacedType(['unitree_api', 'msg'], 'RequestIdentity'), # noqa: E501 + rosidl_parser.definition.NamespacedType(['unitree_api', 'msg'], 'RequestLease'), # noqa: E501 + rosidl_parser.definition.NamespacedType(['unitree_api', 'msg'], 'RequestPolicy'), # noqa: E501 + ) + + def __init__(self, **kwargs): + assert all('_' + key in self.__slots__ for key in kwargs.keys()), \ + 'Invalid arguments passed to constructor: %s' % \ + ', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__)) + from unitree_api.msg import RequestIdentity + self.identity = kwargs.get('identity', RequestIdentity()) + from unitree_api.msg import RequestLease + self.lease = kwargs.get('lease', RequestLease()) + from unitree_api.msg import RequestPolicy + self.policy = kwargs.get('policy', RequestPolicy()) + + def __repr__(self): + typename = self.__class__.__module__.split('.') + typename.pop() + typename.append(self.__class__.__name__) + args = [] + for s, t in zip(self.__slots__, self.SLOT_TYPES): + field = getattr(self, s) + fieldstr = repr(field) + # We use Python array type for fields that can be directly stored + # in them, and "normal" sequences for everything else. If it is + # a type that we store in an array, strip off the 'array' portion. + if ( + isinstance(t, rosidl_parser.definition.AbstractSequence) and + isinstance(t.value_type, rosidl_parser.definition.BasicType) and + t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64'] + ): + if len(field) == 0: + fieldstr = '[]' + else: + assert fieldstr.startswith('array(') + prefix = "array('X', " + suffix = ')' + fieldstr = fieldstr[len(prefix):-len(suffix)] + args.append(s[1:] + '=' + fieldstr) + return '%s(%s)' % ('.'.join(typename), ', '.join(args)) + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + if self.identity != other.identity: + return False + if self.lease != other.lease: + return False + if self.policy != other.policy: + return False + return True + + @classmethod + def get_fields_and_field_types(cls): + from copy import copy + return copy(cls._fields_and_field_types) + + @property + def identity(self): + """Message field 'identity'.""" + return self._identity + + @identity.setter + def identity(self, value): + if __debug__: + from unitree_api.msg import RequestIdentity + assert \ + isinstance(value, RequestIdentity), \ + "The 'identity' field must be a sub message of type 'RequestIdentity'" + self._identity = value + + @property + def lease(self): + """Message field 'lease'.""" + return self._lease + + @lease.setter + def lease(self, value): + if __debug__: + from unitree_api.msg import RequestLease + assert \ + isinstance(value, RequestLease), \ + "The 'lease' field must be a sub message of type 'RequestLease'" + self._lease = value + + @property + def policy(self): + """Message field 'policy'.""" + return self._policy + + @policy.setter + def policy(self, value): + if __debug__: + from unitree_api.msg import RequestPolicy + assert \ + isinstance(value, RequestPolicy), \ + "The 'policy' field must be a sub message of type 'RequestPolicy'" + self._policy = value diff --git a/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_request_header_s.c b/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_request_header_s.c new file mode 100644 index 0000000..f9a2173 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_request_header_s.c @@ -0,0 +1,159 @@ +// generated from rosidl_generator_py/resource/_idl_support.c.em +// with input from unitree_api:msg/RequestHeader.idl +// generated code does not contain a copyright notice +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#include +#include +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-function" +#endif +#include "numpy/ndarrayobject.h" +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_api/msg/detail/request_header__struct.h" +#include "unitree_api/msg/detail/request_header__functions.h" + +bool unitree_api__msg__request_identity__convert_from_py(PyObject * _pymsg, void * _ros_message); +PyObject * unitree_api__msg__request_identity__convert_to_py(void * raw_ros_message); +bool unitree_api__msg__request_lease__convert_from_py(PyObject * _pymsg, void * _ros_message); +PyObject * unitree_api__msg__request_lease__convert_to_py(void * raw_ros_message); +bool unitree_api__msg__request_policy__convert_from_py(PyObject * _pymsg, void * _ros_message); +PyObject * unitree_api__msg__request_policy__convert_to_py(void * raw_ros_message); + +ROSIDL_GENERATOR_C_EXPORT +bool unitree_api__msg__request_header__convert_from_py(PyObject * _pymsg, void * _ros_message) +{ + // check that the passed message is of the expected Python class + { + char full_classname_dest[46]; + { + char * class_name = NULL; + char * module_name = NULL; + { + PyObject * class_attr = PyObject_GetAttrString(_pymsg, "__class__"); + if (class_attr) { + PyObject * name_attr = PyObject_GetAttrString(class_attr, "__name__"); + if (name_attr) { + class_name = (char *)PyUnicode_1BYTE_DATA(name_attr); + Py_DECREF(name_attr); + } + PyObject * module_attr = PyObject_GetAttrString(class_attr, "__module__"); + if (module_attr) { + module_name = (char *)PyUnicode_1BYTE_DATA(module_attr); + Py_DECREF(module_attr); + } + Py_DECREF(class_attr); + } + } + if (!class_name || !module_name) { + return false; + } + snprintf(full_classname_dest, sizeof(full_classname_dest), "%s.%s", module_name, class_name); + } + assert(strncmp("unitree_api.msg._request_header.RequestHeader", full_classname_dest, 45) == 0); + } + unitree_api__msg__RequestHeader * ros_message = _ros_message; + { // identity + PyObject * field = PyObject_GetAttrString(_pymsg, "identity"); + if (!field) { + return false; + } + if (!unitree_api__msg__request_identity__convert_from_py(field, &ros_message->identity)) { + Py_DECREF(field); + return false; + } + Py_DECREF(field); + } + { // lease + PyObject * field = PyObject_GetAttrString(_pymsg, "lease"); + if (!field) { + return false; + } + if (!unitree_api__msg__request_lease__convert_from_py(field, &ros_message->lease)) { + Py_DECREF(field); + return false; + } + Py_DECREF(field); + } + { // policy + PyObject * field = PyObject_GetAttrString(_pymsg, "policy"); + if (!field) { + return false; + } + if (!unitree_api__msg__request_policy__convert_from_py(field, &ros_message->policy)) { + Py_DECREF(field); + return false; + } + Py_DECREF(field); + } + + return true; +} + +ROSIDL_GENERATOR_C_EXPORT +PyObject * unitree_api__msg__request_header__convert_to_py(void * raw_ros_message) +{ + /* NOTE(esteve): Call constructor of RequestHeader */ + PyObject * _pymessage = NULL; + { + PyObject * pymessage_module = PyImport_ImportModule("unitree_api.msg._request_header"); + assert(pymessage_module); + PyObject * pymessage_class = PyObject_GetAttrString(pymessage_module, "RequestHeader"); + assert(pymessage_class); + Py_DECREF(pymessage_module); + _pymessage = PyObject_CallObject(pymessage_class, NULL); + Py_DECREF(pymessage_class); + if (!_pymessage) { + return NULL; + } + } + unitree_api__msg__RequestHeader * ros_message = (unitree_api__msg__RequestHeader *)raw_ros_message; + { // identity + PyObject * field = NULL; + field = unitree_api__msg__request_identity__convert_to_py(&ros_message->identity); + if (!field) { + return NULL; + } + { + int rc = PyObject_SetAttrString(_pymessage, "identity", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // lease + PyObject * field = NULL; + field = unitree_api__msg__request_lease__convert_to_py(&ros_message->lease); + if (!field) { + return NULL; + } + { + int rc = PyObject_SetAttrString(_pymessage, "lease", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // policy + PyObject * field = NULL; + field = unitree_api__msg__request_policy__convert_to_py(&ros_message->policy); + if (!field) { + return NULL; + } + { + int rc = PyObject_SetAttrString(_pymessage, "policy", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + + // ownership of _pymessage is transferred to the caller + return _pymessage; +} diff --git a/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_request_identity.py b/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_request_identity.py new file mode 100644 index 0000000..77d5a90 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_request_identity.py @@ -0,0 +1,145 @@ +# generated from rosidl_generator_py/resource/_idl.py.em +# with input from unitree_api:msg/RequestIdentity.idl +# generated code does not contain a copyright notice + + +# Import statements for member types + +import rosidl_parser.definition # noqa: E402, I100 + + +class Metaclass_RequestIdentity(type): + """Metaclass of message 'RequestIdentity'.""" + + _CREATE_ROS_MESSAGE = None + _CONVERT_FROM_PY = None + _CONVERT_TO_PY = None + _DESTROY_ROS_MESSAGE = None + _TYPE_SUPPORT = None + + __constants = { + } + + @classmethod + def __import_type_support__(cls): + try: + from rosidl_generator_py import import_type_support + module = import_type_support('unitree_api') + except ImportError: + import logging + import traceback + logger = logging.getLogger( + 'unitree_api.msg.RequestIdentity') + logger.debug( + 'Failed to import needed modules for type support:\n' + + traceback.format_exc()) + else: + cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__msg__request_identity + cls._CONVERT_FROM_PY = module.convert_from_py_msg__msg__request_identity + cls._CONVERT_TO_PY = module.convert_to_py_msg__msg__request_identity + cls._TYPE_SUPPORT = module.type_support_msg__msg__request_identity + cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__msg__request_identity + + @classmethod + def __prepare__(cls, name, bases, **kwargs): + # list constant names here so that they appear in the help text of + # the message class under "Data and other attributes defined here:" + # as well as populate each message instance + return { + } + + +class RequestIdentity(metaclass=Metaclass_RequestIdentity): + """Message class 'RequestIdentity'.""" + + __slots__ = [ + '_id', + '_api_id', + ] + + _fields_and_field_types = { + 'id': 'int64', + 'api_id': 'int64', + } + + SLOT_TYPES = ( + rosidl_parser.definition.BasicType('int64'), # noqa: E501 + rosidl_parser.definition.BasicType('int64'), # noqa: E501 + ) + + def __init__(self, **kwargs): + assert all('_' + key in self.__slots__ for key in kwargs.keys()), \ + 'Invalid arguments passed to constructor: %s' % \ + ', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__)) + self.id = kwargs.get('id', int()) + self.api_id = kwargs.get('api_id', int()) + + def __repr__(self): + typename = self.__class__.__module__.split('.') + typename.pop() + typename.append(self.__class__.__name__) + args = [] + for s, t in zip(self.__slots__, self.SLOT_TYPES): + field = getattr(self, s) + fieldstr = repr(field) + # We use Python array type for fields that can be directly stored + # in them, and "normal" sequences for everything else. If it is + # a type that we store in an array, strip off the 'array' portion. + if ( + isinstance(t, rosidl_parser.definition.AbstractSequence) and + isinstance(t.value_type, rosidl_parser.definition.BasicType) and + t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64'] + ): + if len(field) == 0: + fieldstr = '[]' + else: + assert fieldstr.startswith('array(') + prefix = "array('X', " + suffix = ')' + fieldstr = fieldstr[len(prefix):-len(suffix)] + args.append(s[1:] + '=' + fieldstr) + return '%s(%s)' % ('.'.join(typename), ', '.join(args)) + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + if self.id != other.id: + return False + if self.api_id != other.api_id: + return False + return True + + @classmethod + def get_fields_and_field_types(cls): + from copy import copy + return copy(cls._fields_and_field_types) + + @property # noqa: A003 + def id(self): # noqa: A003 + """Message field 'id'.""" + return self._id + + @id.setter # noqa: A003 + def id(self, value): # noqa: A003 + if __debug__: + assert \ + isinstance(value, int), \ + "The 'id' field must be of type 'int'" + assert value >= -9223372036854775808 and value < 9223372036854775808, \ + "The 'id' field must be an integer in [-9223372036854775808, 9223372036854775807]" + self._id = value + + @property + def api_id(self): + """Message field 'api_id'.""" + return self._api_id + + @api_id.setter + def api_id(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'api_id' field must be of type 'int'" + assert value >= -9223372036854775808 and value < 9223372036854775808, \ + "The 'api_id' field must be an integer in [-9223372036854775808, 9223372036854775807]" + self._api_id = value diff --git a/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_request_identity_s.c b/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_request_identity_s.c new file mode 100644 index 0000000..ac38d5d --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_request_identity_s.c @@ -0,0 +1,118 @@ +// generated from rosidl_generator_py/resource/_idl_support.c.em +// with input from unitree_api:msg/RequestIdentity.idl +// generated code does not contain a copyright notice +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#include +#include +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-function" +#endif +#include "numpy/ndarrayobject.h" +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_api/msg/detail/request_identity__struct.h" +#include "unitree_api/msg/detail/request_identity__functions.h" + + +ROSIDL_GENERATOR_C_EXPORT +bool unitree_api__msg__request_identity__convert_from_py(PyObject * _pymsg, void * _ros_message) +{ + // check that the passed message is of the expected Python class + { + char full_classname_dest[50]; + { + char * class_name = NULL; + char * module_name = NULL; + { + PyObject * class_attr = PyObject_GetAttrString(_pymsg, "__class__"); + if (class_attr) { + PyObject * name_attr = PyObject_GetAttrString(class_attr, "__name__"); + if (name_attr) { + class_name = (char *)PyUnicode_1BYTE_DATA(name_attr); + Py_DECREF(name_attr); + } + PyObject * module_attr = PyObject_GetAttrString(class_attr, "__module__"); + if (module_attr) { + module_name = (char *)PyUnicode_1BYTE_DATA(module_attr); + Py_DECREF(module_attr); + } + Py_DECREF(class_attr); + } + } + if (!class_name || !module_name) { + return false; + } + snprintf(full_classname_dest, sizeof(full_classname_dest), "%s.%s", module_name, class_name); + } + assert(strncmp("unitree_api.msg._request_identity.RequestIdentity", full_classname_dest, 49) == 0); + } + unitree_api__msg__RequestIdentity * ros_message = _ros_message; + { // id + PyObject * field = PyObject_GetAttrString(_pymsg, "id"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->id = PyLong_AsLongLong(field); + Py_DECREF(field); + } + { // api_id + PyObject * field = PyObject_GetAttrString(_pymsg, "api_id"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->api_id = PyLong_AsLongLong(field); + Py_DECREF(field); + } + + return true; +} + +ROSIDL_GENERATOR_C_EXPORT +PyObject * unitree_api__msg__request_identity__convert_to_py(void * raw_ros_message) +{ + /* NOTE(esteve): Call constructor of RequestIdentity */ + PyObject * _pymessage = NULL; + { + PyObject * pymessage_module = PyImport_ImportModule("unitree_api.msg._request_identity"); + assert(pymessage_module); + PyObject * pymessage_class = PyObject_GetAttrString(pymessage_module, "RequestIdentity"); + assert(pymessage_class); + Py_DECREF(pymessage_module); + _pymessage = PyObject_CallObject(pymessage_class, NULL); + Py_DECREF(pymessage_class); + if (!_pymessage) { + return NULL; + } + } + unitree_api__msg__RequestIdentity * ros_message = (unitree_api__msg__RequestIdentity *)raw_ros_message; + { // id + PyObject * field = NULL; + field = PyLong_FromLongLong(ros_message->id); + { + int rc = PyObject_SetAttrString(_pymessage, "id", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // api_id + PyObject * field = NULL; + field = PyLong_FromLongLong(ros_message->api_id); + { + int rc = PyObject_SetAttrString(_pymessage, "api_id", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + + // ownership of _pymessage is transferred to the caller + return _pymessage; +} diff --git a/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_request_lease.py b/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_request_lease.py new file mode 100644 index 0000000..016cba8 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_request_lease.py @@ -0,0 +1,124 @@ +# generated from rosidl_generator_py/resource/_idl.py.em +# with input from unitree_api:msg/RequestLease.idl +# generated code does not contain a copyright notice + + +# Import statements for member types + +import rosidl_parser.definition # noqa: E402, I100 + + +class Metaclass_RequestLease(type): + """Metaclass of message 'RequestLease'.""" + + _CREATE_ROS_MESSAGE = None + _CONVERT_FROM_PY = None + _CONVERT_TO_PY = None + _DESTROY_ROS_MESSAGE = None + _TYPE_SUPPORT = None + + __constants = { + } + + @classmethod + def __import_type_support__(cls): + try: + from rosidl_generator_py import import_type_support + module = import_type_support('unitree_api') + except ImportError: + import logging + import traceback + logger = logging.getLogger( + 'unitree_api.msg.RequestLease') + logger.debug( + 'Failed to import needed modules for type support:\n' + + traceback.format_exc()) + else: + cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__msg__request_lease + cls._CONVERT_FROM_PY = module.convert_from_py_msg__msg__request_lease + cls._CONVERT_TO_PY = module.convert_to_py_msg__msg__request_lease + cls._TYPE_SUPPORT = module.type_support_msg__msg__request_lease + cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__msg__request_lease + + @classmethod + def __prepare__(cls, name, bases, **kwargs): + # list constant names here so that they appear in the help text of + # the message class under "Data and other attributes defined here:" + # as well as populate each message instance + return { + } + + +class RequestLease(metaclass=Metaclass_RequestLease): + """Message class 'RequestLease'.""" + + __slots__ = [ + '_id', + ] + + _fields_and_field_types = { + 'id': 'int64', + } + + SLOT_TYPES = ( + rosidl_parser.definition.BasicType('int64'), # noqa: E501 + ) + + def __init__(self, **kwargs): + assert all('_' + key in self.__slots__ for key in kwargs.keys()), \ + 'Invalid arguments passed to constructor: %s' % \ + ', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__)) + self.id = kwargs.get('id', int()) + + def __repr__(self): + typename = self.__class__.__module__.split('.') + typename.pop() + typename.append(self.__class__.__name__) + args = [] + for s, t in zip(self.__slots__, self.SLOT_TYPES): + field = getattr(self, s) + fieldstr = repr(field) + # We use Python array type for fields that can be directly stored + # in them, and "normal" sequences for everything else. If it is + # a type that we store in an array, strip off the 'array' portion. + if ( + isinstance(t, rosidl_parser.definition.AbstractSequence) and + isinstance(t.value_type, rosidl_parser.definition.BasicType) and + t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64'] + ): + if len(field) == 0: + fieldstr = '[]' + else: + assert fieldstr.startswith('array(') + prefix = "array('X', " + suffix = ')' + fieldstr = fieldstr[len(prefix):-len(suffix)] + args.append(s[1:] + '=' + fieldstr) + return '%s(%s)' % ('.'.join(typename), ', '.join(args)) + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + if self.id != other.id: + return False + return True + + @classmethod + def get_fields_and_field_types(cls): + from copy import copy + return copy(cls._fields_and_field_types) + + @property # noqa: A003 + def id(self): # noqa: A003 + """Message field 'id'.""" + return self._id + + @id.setter # noqa: A003 + def id(self, value): # noqa: A003 + if __debug__: + assert \ + isinstance(value, int), \ + "The 'id' field must be of type 'int'" + assert value >= -9223372036854775808 and value < 9223372036854775808, \ + "The 'id' field must be an integer in [-9223372036854775808, 9223372036854775807]" + self._id = value diff --git a/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_request_lease_s.c b/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_request_lease_s.c new file mode 100644 index 0000000..a98c137 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_request_lease_s.c @@ -0,0 +1,98 @@ +// generated from rosidl_generator_py/resource/_idl_support.c.em +// with input from unitree_api:msg/RequestLease.idl +// generated code does not contain a copyright notice +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#include +#include +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-function" +#endif +#include "numpy/ndarrayobject.h" +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_api/msg/detail/request_lease__struct.h" +#include "unitree_api/msg/detail/request_lease__functions.h" + + +ROSIDL_GENERATOR_C_EXPORT +bool unitree_api__msg__request_lease__convert_from_py(PyObject * _pymsg, void * _ros_message) +{ + // check that the passed message is of the expected Python class + { + char full_classname_dest[44]; + { + char * class_name = NULL; + char * module_name = NULL; + { + PyObject * class_attr = PyObject_GetAttrString(_pymsg, "__class__"); + if (class_attr) { + PyObject * name_attr = PyObject_GetAttrString(class_attr, "__name__"); + if (name_attr) { + class_name = (char *)PyUnicode_1BYTE_DATA(name_attr); + Py_DECREF(name_attr); + } + PyObject * module_attr = PyObject_GetAttrString(class_attr, "__module__"); + if (module_attr) { + module_name = (char *)PyUnicode_1BYTE_DATA(module_attr); + Py_DECREF(module_attr); + } + Py_DECREF(class_attr); + } + } + if (!class_name || !module_name) { + return false; + } + snprintf(full_classname_dest, sizeof(full_classname_dest), "%s.%s", module_name, class_name); + } + assert(strncmp("unitree_api.msg._request_lease.RequestLease", full_classname_dest, 43) == 0); + } + unitree_api__msg__RequestLease * ros_message = _ros_message; + { // id + PyObject * field = PyObject_GetAttrString(_pymsg, "id"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->id = PyLong_AsLongLong(field); + Py_DECREF(field); + } + + return true; +} + +ROSIDL_GENERATOR_C_EXPORT +PyObject * unitree_api__msg__request_lease__convert_to_py(void * raw_ros_message) +{ + /* NOTE(esteve): Call constructor of RequestLease */ + PyObject * _pymessage = NULL; + { + PyObject * pymessage_module = PyImport_ImportModule("unitree_api.msg._request_lease"); + assert(pymessage_module); + PyObject * pymessage_class = PyObject_GetAttrString(pymessage_module, "RequestLease"); + assert(pymessage_class); + Py_DECREF(pymessage_module); + _pymessage = PyObject_CallObject(pymessage_class, NULL); + Py_DECREF(pymessage_class); + if (!_pymessage) { + return NULL; + } + } + unitree_api__msg__RequestLease * ros_message = (unitree_api__msg__RequestLease *)raw_ros_message; + { // id + PyObject * field = NULL; + field = PyLong_FromLongLong(ros_message->id); + { + int rc = PyObject_SetAttrString(_pymessage, "id", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + + // ownership of _pymessage is transferred to the caller + return _pymessage; +} diff --git a/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_request_policy.py b/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_request_policy.py new file mode 100644 index 0000000..97a0331 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_request_policy.py @@ -0,0 +1,143 @@ +# generated from rosidl_generator_py/resource/_idl.py.em +# with input from unitree_api:msg/RequestPolicy.idl +# generated code does not contain a copyright notice + + +# Import statements for member types + +import rosidl_parser.definition # noqa: E402, I100 + + +class Metaclass_RequestPolicy(type): + """Metaclass of message 'RequestPolicy'.""" + + _CREATE_ROS_MESSAGE = None + _CONVERT_FROM_PY = None + _CONVERT_TO_PY = None + _DESTROY_ROS_MESSAGE = None + _TYPE_SUPPORT = None + + __constants = { + } + + @classmethod + def __import_type_support__(cls): + try: + from rosidl_generator_py import import_type_support + module = import_type_support('unitree_api') + except ImportError: + import logging + import traceback + logger = logging.getLogger( + 'unitree_api.msg.RequestPolicy') + logger.debug( + 'Failed to import needed modules for type support:\n' + + traceback.format_exc()) + else: + cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__msg__request_policy + cls._CONVERT_FROM_PY = module.convert_from_py_msg__msg__request_policy + cls._CONVERT_TO_PY = module.convert_to_py_msg__msg__request_policy + cls._TYPE_SUPPORT = module.type_support_msg__msg__request_policy + cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__msg__request_policy + + @classmethod + def __prepare__(cls, name, bases, **kwargs): + # list constant names here so that they appear in the help text of + # the message class under "Data and other attributes defined here:" + # as well as populate each message instance + return { + } + + +class RequestPolicy(metaclass=Metaclass_RequestPolicy): + """Message class 'RequestPolicy'.""" + + __slots__ = [ + '_priority', + '_noreply', + ] + + _fields_and_field_types = { + 'priority': 'int32', + 'noreply': 'boolean', + } + + SLOT_TYPES = ( + rosidl_parser.definition.BasicType('int32'), # noqa: E501 + rosidl_parser.definition.BasicType('boolean'), # noqa: E501 + ) + + def __init__(self, **kwargs): + assert all('_' + key in self.__slots__ for key in kwargs.keys()), \ + 'Invalid arguments passed to constructor: %s' % \ + ', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__)) + self.priority = kwargs.get('priority', int()) + self.noreply = kwargs.get('noreply', bool()) + + def __repr__(self): + typename = self.__class__.__module__.split('.') + typename.pop() + typename.append(self.__class__.__name__) + args = [] + for s, t in zip(self.__slots__, self.SLOT_TYPES): + field = getattr(self, s) + fieldstr = repr(field) + # We use Python array type for fields that can be directly stored + # in them, and "normal" sequences for everything else. If it is + # a type that we store in an array, strip off the 'array' portion. + if ( + isinstance(t, rosidl_parser.definition.AbstractSequence) and + isinstance(t.value_type, rosidl_parser.definition.BasicType) and + t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64'] + ): + if len(field) == 0: + fieldstr = '[]' + else: + assert fieldstr.startswith('array(') + prefix = "array('X', " + suffix = ')' + fieldstr = fieldstr[len(prefix):-len(suffix)] + args.append(s[1:] + '=' + fieldstr) + return '%s(%s)' % ('.'.join(typename), ', '.join(args)) + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + if self.priority != other.priority: + return False + if self.noreply != other.noreply: + return False + return True + + @classmethod + def get_fields_and_field_types(cls): + from copy import copy + return copy(cls._fields_and_field_types) + + @property + def priority(self): + """Message field 'priority'.""" + return self._priority + + @priority.setter + def priority(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'priority' field must be of type 'int'" + assert value >= -2147483648 and value < 2147483648, \ + "The 'priority' field must be an integer in [-2147483648, 2147483647]" + self._priority = value + + @property + def noreply(self): + """Message field 'noreply'.""" + return self._noreply + + @noreply.setter + def noreply(self, value): + if __debug__: + assert \ + isinstance(value, bool), \ + "The 'noreply' field must be of type 'bool'" + self._noreply = value diff --git a/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_request_policy_s.c b/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_request_policy_s.c new file mode 100644 index 0000000..ab38a3a --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_request_policy_s.c @@ -0,0 +1,118 @@ +// generated from rosidl_generator_py/resource/_idl_support.c.em +// with input from unitree_api:msg/RequestPolicy.idl +// generated code does not contain a copyright notice +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#include +#include +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-function" +#endif +#include "numpy/ndarrayobject.h" +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_api/msg/detail/request_policy__struct.h" +#include "unitree_api/msg/detail/request_policy__functions.h" + + +ROSIDL_GENERATOR_C_EXPORT +bool unitree_api__msg__request_policy__convert_from_py(PyObject * _pymsg, void * _ros_message) +{ + // check that the passed message is of the expected Python class + { + char full_classname_dest[46]; + { + char * class_name = NULL; + char * module_name = NULL; + { + PyObject * class_attr = PyObject_GetAttrString(_pymsg, "__class__"); + if (class_attr) { + PyObject * name_attr = PyObject_GetAttrString(class_attr, "__name__"); + if (name_attr) { + class_name = (char *)PyUnicode_1BYTE_DATA(name_attr); + Py_DECREF(name_attr); + } + PyObject * module_attr = PyObject_GetAttrString(class_attr, "__module__"); + if (module_attr) { + module_name = (char *)PyUnicode_1BYTE_DATA(module_attr); + Py_DECREF(module_attr); + } + Py_DECREF(class_attr); + } + } + if (!class_name || !module_name) { + return false; + } + snprintf(full_classname_dest, sizeof(full_classname_dest), "%s.%s", module_name, class_name); + } + assert(strncmp("unitree_api.msg._request_policy.RequestPolicy", full_classname_dest, 45) == 0); + } + unitree_api__msg__RequestPolicy * ros_message = _ros_message; + { // priority + PyObject * field = PyObject_GetAttrString(_pymsg, "priority"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->priority = (int32_t)PyLong_AsLong(field); + Py_DECREF(field); + } + { // noreply + PyObject * field = PyObject_GetAttrString(_pymsg, "noreply"); + if (!field) { + return false; + } + assert(PyBool_Check(field)); + ros_message->noreply = (Py_True == field); + Py_DECREF(field); + } + + return true; +} + +ROSIDL_GENERATOR_C_EXPORT +PyObject * unitree_api__msg__request_policy__convert_to_py(void * raw_ros_message) +{ + /* NOTE(esteve): Call constructor of RequestPolicy */ + PyObject * _pymessage = NULL; + { + PyObject * pymessage_module = PyImport_ImportModule("unitree_api.msg._request_policy"); + assert(pymessage_module); + PyObject * pymessage_class = PyObject_GetAttrString(pymessage_module, "RequestPolicy"); + assert(pymessage_class); + Py_DECREF(pymessage_module); + _pymessage = PyObject_CallObject(pymessage_class, NULL); + Py_DECREF(pymessage_class); + if (!_pymessage) { + return NULL; + } + } + unitree_api__msg__RequestPolicy * ros_message = (unitree_api__msg__RequestPolicy *)raw_ros_message; + { // priority + PyObject * field = NULL; + field = PyLong_FromLong(ros_message->priority); + { + int rc = PyObject_SetAttrString(_pymessage, "priority", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // noreply + PyObject * field = NULL; + field = PyBool_FromLong(ros_message->noreply ? 1 : 0); + { + int rc = PyObject_SetAttrString(_pymessage, "noreply", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + + // ownership of _pymessage is transferred to the caller + return _pymessage; +} diff --git a/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_request_s.c b/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_request_s.c new file mode 100644 index 0000000..9212cde --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_request_s.c @@ -0,0 +1,263 @@ +// generated from rosidl_generator_py/resource/_idl_support.c.em +// with input from unitree_api:msg/Request.idl +// generated code does not contain a copyright notice +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#include +#include +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-function" +#endif +#include "numpy/ndarrayobject.h" +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_api/msg/detail/request__struct.h" +#include "unitree_api/msg/detail/request__functions.h" + +#include "rosidl_runtime_c/string.h" +#include "rosidl_runtime_c/string_functions.h" + +#include "rosidl_runtime_c/primitives_sequence.h" +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +bool unitree_api__msg__request_header__convert_from_py(PyObject * _pymsg, void * _ros_message); +PyObject * unitree_api__msg__request_header__convert_to_py(void * raw_ros_message); + +ROSIDL_GENERATOR_C_EXPORT +bool unitree_api__msg__request__convert_from_py(PyObject * _pymsg, void * _ros_message) +{ + // check that the passed message is of the expected Python class + { + char full_classname_dest[33]; + { + char * class_name = NULL; + char * module_name = NULL; + { + PyObject * class_attr = PyObject_GetAttrString(_pymsg, "__class__"); + if (class_attr) { + PyObject * name_attr = PyObject_GetAttrString(class_attr, "__name__"); + if (name_attr) { + class_name = (char *)PyUnicode_1BYTE_DATA(name_attr); + Py_DECREF(name_attr); + } + PyObject * module_attr = PyObject_GetAttrString(class_attr, "__module__"); + if (module_attr) { + module_name = (char *)PyUnicode_1BYTE_DATA(module_attr); + Py_DECREF(module_attr); + } + Py_DECREF(class_attr); + } + } + if (!class_name || !module_name) { + return false; + } + snprintf(full_classname_dest, sizeof(full_classname_dest), "%s.%s", module_name, class_name); + } + assert(strncmp("unitree_api.msg._request.Request", full_classname_dest, 32) == 0); + } + unitree_api__msg__Request * ros_message = _ros_message; + { // header + PyObject * field = PyObject_GetAttrString(_pymsg, "header"); + if (!field) { + return false; + } + if (!unitree_api__msg__request_header__convert_from_py(field, &ros_message->header)) { + Py_DECREF(field); + return false; + } + Py_DECREF(field); + } + { // parameter + PyObject * field = PyObject_GetAttrString(_pymsg, "parameter"); + if (!field) { + return false; + } + assert(PyUnicode_Check(field)); + PyObject * encoded_field = PyUnicode_AsUTF8String(field); + if (!encoded_field) { + Py_DECREF(field); + return false; + } + rosidl_runtime_c__String__assign(&ros_message->parameter, PyBytes_AS_STRING(encoded_field)); + Py_DECREF(encoded_field); + Py_DECREF(field); + } + { // binary + PyObject * field = PyObject_GetAttrString(_pymsg, "binary"); + if (!field) { + return false; + } + if (PyObject_CheckBuffer(field)) { + // Optimization for converting arrays of primitives + Py_buffer view; + int rc = PyObject_GetBuffer(field, &view, PyBUF_SIMPLE); + if (rc < 0) { + Py_DECREF(field); + return false; + } + Py_ssize_t size = view.len / sizeof(uint8_t); + if (!rosidl_runtime_c__uint8__Sequence__init(&(ros_message->binary), size)) { + PyErr_SetString(PyExc_RuntimeError, "unable to create uint8__Sequence ros_message"); + PyBuffer_Release(&view); + Py_DECREF(field); + return false; + } + uint8_t * dest = ros_message->binary.data; + rc = PyBuffer_ToContiguous(dest, &view, view.len, 'C'); + if (rc < 0) { + PyBuffer_Release(&view); + Py_DECREF(field); + return false; + } + PyBuffer_Release(&view); + } else { + PyObject * seq_field = PySequence_Fast(field, "expected a sequence in 'binary'"); + if (!seq_field) { + Py_DECREF(field); + return false; + } + Py_ssize_t size = PySequence_Size(field); + if (-1 == size) { + Py_DECREF(seq_field); + Py_DECREF(field); + return false; + } + if (!rosidl_runtime_c__uint8__Sequence__init(&(ros_message->binary), size)) { + PyErr_SetString(PyExc_RuntimeError, "unable to create uint8__Sequence ros_message"); + Py_DECREF(seq_field); + Py_DECREF(field); + return false; + } + uint8_t * dest = ros_message->binary.data; + for (Py_ssize_t i = 0; i < size; ++i) { + PyObject * item = PySequence_Fast_GET_ITEM(seq_field, i); + if (!item) { + Py_DECREF(seq_field); + Py_DECREF(field); + return false; + } + assert(PyLong_Check(item)); + uint8_t tmp = (uint8_t)PyLong_AsUnsignedLong(item); + + memcpy(&dest[i], &tmp, sizeof(uint8_t)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + + return true; +} + +ROSIDL_GENERATOR_C_EXPORT +PyObject * unitree_api__msg__request__convert_to_py(void * raw_ros_message) +{ + /* NOTE(esteve): Call constructor of Request */ + PyObject * _pymessage = NULL; + { + PyObject * pymessage_module = PyImport_ImportModule("unitree_api.msg._request"); + assert(pymessage_module); + PyObject * pymessage_class = PyObject_GetAttrString(pymessage_module, "Request"); + assert(pymessage_class); + Py_DECREF(pymessage_module); + _pymessage = PyObject_CallObject(pymessage_class, NULL); + Py_DECREF(pymessage_class); + if (!_pymessage) { + return NULL; + } + } + unitree_api__msg__Request * ros_message = (unitree_api__msg__Request *)raw_ros_message; + { // header + PyObject * field = NULL; + field = unitree_api__msg__request_header__convert_to_py(&ros_message->header); + if (!field) { + return NULL; + } + { + int rc = PyObject_SetAttrString(_pymessage, "header", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // parameter + PyObject * field = NULL; + field = PyUnicode_DecodeUTF8( + ros_message->parameter.data, + strlen(ros_message->parameter.data), + "replace"); + if (!field) { + return NULL; + } + { + int rc = PyObject_SetAttrString(_pymessage, "parameter", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // binary + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "binary"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "array.array") == 0); + // ensure that itemsize matches the sizeof of the ROS message field + PyObject * itemsize_attr = PyObject_GetAttrString(field, "itemsize"); + assert(itemsize_attr != NULL); + size_t itemsize = PyLong_AsSize_t(itemsize_attr); + Py_DECREF(itemsize_attr); + if (itemsize != sizeof(uint8_t)) { + PyErr_SetString(PyExc_RuntimeError, "itemsize doesn't match expectation"); + Py_DECREF(field); + return NULL; + } + // clear the array, poor approach to remove potential default values + Py_ssize_t length = PyObject_Length(field); + if (-1 == length) { + Py_DECREF(field); + return NULL; + } + if (length > 0) { + PyObject * pop = PyObject_GetAttrString(field, "pop"); + assert(pop != NULL); + for (Py_ssize_t i = 0; i < length; ++i) { + PyObject * ret = PyObject_CallFunctionObjArgs(pop, NULL); + if (!ret) { + Py_DECREF(pop); + Py_DECREF(field); + return NULL; + } + Py_DECREF(ret); + } + Py_DECREF(pop); + } + if (ros_message->binary.size > 0) { + // populating the array.array using the frombytes method + PyObject * frombytes = PyObject_GetAttrString(field, "frombytes"); + assert(frombytes != NULL); + uint8_t * src = &(ros_message->binary.data[0]); + PyObject * data = PyBytes_FromStringAndSize((const char *)src, ros_message->binary.size * sizeof(uint8_t)); + assert(data != NULL); + PyObject * ret = PyObject_CallFunctionObjArgs(frombytes, data, NULL); + Py_DECREF(data); + Py_DECREF(frombytes); + if (!ret) { + Py_DECREF(field); + return NULL; + } + Py_DECREF(ret); + } + Py_DECREF(field); + } + + // ownership of _pymessage is transferred to the caller + return _pymessage; +} diff --git a/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_response.py b/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_response.py new file mode 100644 index 0000000..cf6a415 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_response.py @@ -0,0 +1,184 @@ +# generated from rosidl_generator_py/resource/_idl.py.em +# with input from unitree_api:msg/Response.idl +# generated code does not contain a copyright notice + + +# Import statements for member types + +# Member 'binary' +import array # noqa: E402, I100 + +import rosidl_parser.definition # noqa: E402, I100 + + +class Metaclass_Response(type): + """Metaclass of message 'Response'.""" + + _CREATE_ROS_MESSAGE = None + _CONVERT_FROM_PY = None + _CONVERT_TO_PY = None + _DESTROY_ROS_MESSAGE = None + _TYPE_SUPPORT = None + + __constants = { + } + + @classmethod + def __import_type_support__(cls): + try: + from rosidl_generator_py import import_type_support + module = import_type_support('unitree_api') + except ImportError: + import logging + import traceback + logger = logging.getLogger( + 'unitree_api.msg.Response') + logger.debug( + 'Failed to import needed modules for type support:\n' + + traceback.format_exc()) + else: + cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__msg__response + cls._CONVERT_FROM_PY = module.convert_from_py_msg__msg__response + cls._CONVERT_TO_PY = module.convert_to_py_msg__msg__response + cls._TYPE_SUPPORT = module.type_support_msg__msg__response + cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__msg__response + + from unitree_api.msg import ResponseHeader + if ResponseHeader.__class__._TYPE_SUPPORT is None: + ResponseHeader.__class__.__import_type_support__() + + @classmethod + def __prepare__(cls, name, bases, **kwargs): + # list constant names here so that they appear in the help text of + # the message class under "Data and other attributes defined here:" + # as well as populate each message instance + return { + } + + +class Response(metaclass=Metaclass_Response): + """Message class 'Response'.""" + + __slots__ = [ + '_header', + '_data', + '_binary', + ] + + _fields_and_field_types = { + 'header': 'unitree_api/ResponseHeader', + 'data': 'string', + 'binary': 'sequence', + } + + SLOT_TYPES = ( + rosidl_parser.definition.NamespacedType(['unitree_api', 'msg'], 'ResponseHeader'), # noqa: E501 + rosidl_parser.definition.UnboundedString(), # noqa: E501 + rosidl_parser.definition.UnboundedSequence(rosidl_parser.definition.BasicType('int8')), # noqa: E501 + ) + + def __init__(self, **kwargs): + assert all('_' + key in self.__slots__ for key in kwargs.keys()), \ + 'Invalid arguments passed to constructor: %s' % \ + ', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__)) + from unitree_api.msg import ResponseHeader + self.header = kwargs.get('header', ResponseHeader()) + self.data = kwargs.get('data', str()) + self.binary = array.array('b', kwargs.get('binary', [])) + + def __repr__(self): + typename = self.__class__.__module__.split('.') + typename.pop() + typename.append(self.__class__.__name__) + args = [] + for s, t in zip(self.__slots__, self.SLOT_TYPES): + field = getattr(self, s) + fieldstr = repr(field) + # We use Python array type for fields that can be directly stored + # in them, and "normal" sequences for everything else. If it is + # a type that we store in an array, strip off the 'array' portion. + if ( + isinstance(t, rosidl_parser.definition.AbstractSequence) and + isinstance(t.value_type, rosidl_parser.definition.BasicType) and + t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64'] + ): + if len(field) == 0: + fieldstr = '[]' + else: + assert fieldstr.startswith('array(') + prefix = "array('X', " + suffix = ')' + fieldstr = fieldstr[len(prefix):-len(suffix)] + args.append(s[1:] + '=' + fieldstr) + return '%s(%s)' % ('.'.join(typename), ', '.join(args)) + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + if self.header != other.header: + return False + if self.data != other.data: + return False + if self.binary != other.binary: + return False + return True + + @classmethod + def get_fields_and_field_types(cls): + from copy import copy + return copy(cls._fields_and_field_types) + + @property + def header(self): + """Message field 'header'.""" + return self._header + + @header.setter + def header(self, value): + if __debug__: + from unitree_api.msg import ResponseHeader + assert \ + isinstance(value, ResponseHeader), \ + "The 'header' field must be a sub message of type 'ResponseHeader'" + self._header = value + + @property + def data(self): + """Message field 'data'.""" + return self._data + + @data.setter + def data(self, value): + if __debug__: + assert \ + isinstance(value, str), \ + "The 'data' field must be of type 'str'" + self._data = value + + @property + def binary(self): + """Message field 'binary'.""" + return self._binary + + @binary.setter + def binary(self, value): + if isinstance(value, array.array): + assert value.typecode == 'b', \ + "The 'binary' array.array() must have the type code of 'b'" + self._binary = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + all(isinstance(v, int) for v in value) and + all(val >= -128 and val < 128 for val in value)), \ + "The 'binary' field must be a set or sequence and each value of type 'int' and each integer in [-128, 127]" + self._binary = array.array('b', value) diff --git a/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_response_header.py b/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_response_header.py new file mode 100644 index 0000000..c39b64b --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_response_header.py @@ -0,0 +1,153 @@ +# generated from rosidl_generator_py/resource/_idl.py.em +# with input from unitree_api:msg/ResponseHeader.idl +# generated code does not contain a copyright notice + + +# Import statements for member types + +import rosidl_parser.definition # noqa: E402, I100 + + +class Metaclass_ResponseHeader(type): + """Metaclass of message 'ResponseHeader'.""" + + _CREATE_ROS_MESSAGE = None + _CONVERT_FROM_PY = None + _CONVERT_TO_PY = None + _DESTROY_ROS_MESSAGE = None + _TYPE_SUPPORT = None + + __constants = { + } + + @classmethod + def __import_type_support__(cls): + try: + from rosidl_generator_py import import_type_support + module = import_type_support('unitree_api') + except ImportError: + import logging + import traceback + logger = logging.getLogger( + 'unitree_api.msg.ResponseHeader') + logger.debug( + 'Failed to import needed modules for type support:\n' + + traceback.format_exc()) + else: + cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__msg__response_header + cls._CONVERT_FROM_PY = module.convert_from_py_msg__msg__response_header + cls._CONVERT_TO_PY = module.convert_to_py_msg__msg__response_header + cls._TYPE_SUPPORT = module.type_support_msg__msg__response_header + cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__msg__response_header + + from unitree_api.msg import RequestIdentity + if RequestIdentity.__class__._TYPE_SUPPORT is None: + RequestIdentity.__class__.__import_type_support__() + + from unitree_api.msg import ResponseStatus + if ResponseStatus.__class__._TYPE_SUPPORT is None: + ResponseStatus.__class__.__import_type_support__() + + @classmethod + def __prepare__(cls, name, bases, **kwargs): + # list constant names here so that they appear in the help text of + # the message class under "Data and other attributes defined here:" + # as well as populate each message instance + return { + } + + +class ResponseHeader(metaclass=Metaclass_ResponseHeader): + """Message class 'ResponseHeader'.""" + + __slots__ = [ + '_identity', + '_status', + ] + + _fields_and_field_types = { + 'identity': 'unitree_api/RequestIdentity', + 'status': 'unitree_api/ResponseStatus', + } + + SLOT_TYPES = ( + rosidl_parser.definition.NamespacedType(['unitree_api', 'msg'], 'RequestIdentity'), # noqa: E501 + rosidl_parser.definition.NamespacedType(['unitree_api', 'msg'], 'ResponseStatus'), # noqa: E501 + ) + + def __init__(self, **kwargs): + assert all('_' + key in self.__slots__ for key in kwargs.keys()), \ + 'Invalid arguments passed to constructor: %s' % \ + ', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__)) + from unitree_api.msg import RequestIdentity + self.identity = kwargs.get('identity', RequestIdentity()) + from unitree_api.msg import ResponseStatus + self.status = kwargs.get('status', ResponseStatus()) + + def __repr__(self): + typename = self.__class__.__module__.split('.') + typename.pop() + typename.append(self.__class__.__name__) + args = [] + for s, t in zip(self.__slots__, self.SLOT_TYPES): + field = getattr(self, s) + fieldstr = repr(field) + # We use Python array type for fields that can be directly stored + # in them, and "normal" sequences for everything else. If it is + # a type that we store in an array, strip off the 'array' portion. + if ( + isinstance(t, rosidl_parser.definition.AbstractSequence) and + isinstance(t.value_type, rosidl_parser.definition.BasicType) and + t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64'] + ): + if len(field) == 0: + fieldstr = '[]' + else: + assert fieldstr.startswith('array(') + prefix = "array('X', " + suffix = ')' + fieldstr = fieldstr[len(prefix):-len(suffix)] + args.append(s[1:] + '=' + fieldstr) + return '%s(%s)' % ('.'.join(typename), ', '.join(args)) + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + if self.identity != other.identity: + return False + if self.status != other.status: + return False + return True + + @classmethod + def get_fields_and_field_types(cls): + from copy import copy + return copy(cls._fields_and_field_types) + + @property + def identity(self): + """Message field 'identity'.""" + return self._identity + + @identity.setter + def identity(self, value): + if __debug__: + from unitree_api.msg import RequestIdentity + assert \ + isinstance(value, RequestIdentity), \ + "The 'identity' field must be a sub message of type 'RequestIdentity'" + self._identity = value + + @property + def status(self): + """Message field 'status'.""" + return self._status + + @status.setter + def status(self, value): + if __debug__: + from unitree_api.msg import ResponseStatus + assert \ + isinstance(value, ResponseStatus), \ + "The 'status' field must be a sub message of type 'ResponseStatus'" + self._status = value diff --git a/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_response_header_s.c b/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_response_header_s.c new file mode 100644 index 0000000..7201b0b --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_response_header_s.c @@ -0,0 +1,132 @@ +// generated from rosidl_generator_py/resource/_idl_support.c.em +// with input from unitree_api:msg/ResponseHeader.idl +// generated code does not contain a copyright notice +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#include +#include +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-function" +#endif +#include "numpy/ndarrayobject.h" +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_api/msg/detail/response_header__struct.h" +#include "unitree_api/msg/detail/response_header__functions.h" + +bool unitree_api__msg__request_identity__convert_from_py(PyObject * _pymsg, void * _ros_message); +PyObject * unitree_api__msg__request_identity__convert_to_py(void * raw_ros_message); +bool unitree_api__msg__response_status__convert_from_py(PyObject * _pymsg, void * _ros_message); +PyObject * unitree_api__msg__response_status__convert_to_py(void * raw_ros_message); + +ROSIDL_GENERATOR_C_EXPORT +bool unitree_api__msg__response_header__convert_from_py(PyObject * _pymsg, void * _ros_message) +{ + // check that the passed message is of the expected Python class + { + char full_classname_dest[48]; + { + char * class_name = NULL; + char * module_name = NULL; + { + PyObject * class_attr = PyObject_GetAttrString(_pymsg, "__class__"); + if (class_attr) { + PyObject * name_attr = PyObject_GetAttrString(class_attr, "__name__"); + if (name_attr) { + class_name = (char *)PyUnicode_1BYTE_DATA(name_attr); + Py_DECREF(name_attr); + } + PyObject * module_attr = PyObject_GetAttrString(class_attr, "__module__"); + if (module_attr) { + module_name = (char *)PyUnicode_1BYTE_DATA(module_attr); + Py_DECREF(module_attr); + } + Py_DECREF(class_attr); + } + } + if (!class_name || !module_name) { + return false; + } + snprintf(full_classname_dest, sizeof(full_classname_dest), "%s.%s", module_name, class_name); + } + assert(strncmp("unitree_api.msg._response_header.ResponseHeader", full_classname_dest, 47) == 0); + } + unitree_api__msg__ResponseHeader * ros_message = _ros_message; + { // identity + PyObject * field = PyObject_GetAttrString(_pymsg, "identity"); + if (!field) { + return false; + } + if (!unitree_api__msg__request_identity__convert_from_py(field, &ros_message->identity)) { + Py_DECREF(field); + return false; + } + Py_DECREF(field); + } + { // status + PyObject * field = PyObject_GetAttrString(_pymsg, "status"); + if (!field) { + return false; + } + if (!unitree_api__msg__response_status__convert_from_py(field, &ros_message->status)) { + Py_DECREF(field); + return false; + } + Py_DECREF(field); + } + + return true; +} + +ROSIDL_GENERATOR_C_EXPORT +PyObject * unitree_api__msg__response_header__convert_to_py(void * raw_ros_message) +{ + /* NOTE(esteve): Call constructor of ResponseHeader */ + PyObject * _pymessage = NULL; + { + PyObject * pymessage_module = PyImport_ImportModule("unitree_api.msg._response_header"); + assert(pymessage_module); + PyObject * pymessage_class = PyObject_GetAttrString(pymessage_module, "ResponseHeader"); + assert(pymessage_class); + Py_DECREF(pymessage_module); + _pymessage = PyObject_CallObject(pymessage_class, NULL); + Py_DECREF(pymessage_class); + if (!_pymessage) { + return NULL; + } + } + unitree_api__msg__ResponseHeader * ros_message = (unitree_api__msg__ResponseHeader *)raw_ros_message; + { // identity + PyObject * field = NULL; + field = unitree_api__msg__request_identity__convert_to_py(&ros_message->identity); + if (!field) { + return NULL; + } + { + int rc = PyObject_SetAttrString(_pymessage, "identity", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // status + PyObject * field = NULL; + field = unitree_api__msg__response_status__convert_to_py(&ros_message->status); + if (!field) { + return NULL; + } + { + int rc = PyObject_SetAttrString(_pymessage, "status", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + + // ownership of _pymessage is transferred to the caller + return _pymessage; +} diff --git a/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_response_s.c b/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_response_s.c new file mode 100644 index 0000000..9798e13 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_response_s.c @@ -0,0 +1,262 @@ +// generated from rosidl_generator_py/resource/_idl_support.c.em +// with input from unitree_api:msg/Response.idl +// generated code does not contain a copyright notice +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#include +#include +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-function" +#endif +#include "numpy/ndarrayobject.h" +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_api/msg/detail/response__struct.h" +#include "unitree_api/msg/detail/response__functions.h" + +#include "rosidl_runtime_c/string.h" +#include "rosidl_runtime_c/string_functions.h" + +#include "rosidl_runtime_c/primitives_sequence.h" +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +bool unitree_api__msg__response_header__convert_from_py(PyObject * _pymsg, void * _ros_message); +PyObject * unitree_api__msg__response_header__convert_to_py(void * raw_ros_message); + +ROSIDL_GENERATOR_C_EXPORT +bool unitree_api__msg__response__convert_from_py(PyObject * _pymsg, void * _ros_message) +{ + // check that the passed message is of the expected Python class + { + char full_classname_dest[35]; + { + char * class_name = NULL; + char * module_name = NULL; + { + PyObject * class_attr = PyObject_GetAttrString(_pymsg, "__class__"); + if (class_attr) { + PyObject * name_attr = PyObject_GetAttrString(class_attr, "__name__"); + if (name_attr) { + class_name = (char *)PyUnicode_1BYTE_DATA(name_attr); + Py_DECREF(name_attr); + } + PyObject * module_attr = PyObject_GetAttrString(class_attr, "__module__"); + if (module_attr) { + module_name = (char *)PyUnicode_1BYTE_DATA(module_attr); + Py_DECREF(module_attr); + } + Py_DECREF(class_attr); + } + } + if (!class_name || !module_name) { + return false; + } + snprintf(full_classname_dest, sizeof(full_classname_dest), "%s.%s", module_name, class_name); + } + assert(strncmp("unitree_api.msg._response.Response", full_classname_dest, 34) == 0); + } + unitree_api__msg__Response * ros_message = _ros_message; + { // header + PyObject * field = PyObject_GetAttrString(_pymsg, "header"); + if (!field) { + return false; + } + if (!unitree_api__msg__response_header__convert_from_py(field, &ros_message->header)) { + Py_DECREF(field); + return false; + } + Py_DECREF(field); + } + { // data + PyObject * field = PyObject_GetAttrString(_pymsg, "data"); + if (!field) { + return false; + } + assert(PyUnicode_Check(field)); + PyObject * encoded_field = PyUnicode_AsUTF8String(field); + if (!encoded_field) { + Py_DECREF(field); + return false; + } + rosidl_runtime_c__String__assign(&ros_message->data, PyBytes_AS_STRING(encoded_field)); + Py_DECREF(encoded_field); + Py_DECREF(field); + } + { // binary + PyObject * field = PyObject_GetAttrString(_pymsg, "binary"); + if (!field) { + return false; + } + if (PyObject_CheckBuffer(field)) { + // Optimization for converting arrays of primitives + Py_buffer view; + int rc = PyObject_GetBuffer(field, &view, PyBUF_SIMPLE); + if (rc < 0) { + Py_DECREF(field); + return false; + } + Py_ssize_t size = view.len / sizeof(int8_t); + if (!rosidl_runtime_c__int8__Sequence__init(&(ros_message->binary), size)) { + PyErr_SetString(PyExc_RuntimeError, "unable to create int8__Sequence ros_message"); + PyBuffer_Release(&view); + Py_DECREF(field); + return false; + } + int8_t * dest = ros_message->binary.data; + rc = PyBuffer_ToContiguous(dest, &view, view.len, 'C'); + if (rc < 0) { + PyBuffer_Release(&view); + Py_DECREF(field); + return false; + } + PyBuffer_Release(&view); + } else { + PyObject * seq_field = PySequence_Fast(field, "expected a sequence in 'binary'"); + if (!seq_field) { + Py_DECREF(field); + return false; + } + Py_ssize_t size = PySequence_Size(field); + if (-1 == size) { + Py_DECREF(seq_field); + Py_DECREF(field); + return false; + } + if (!rosidl_runtime_c__int8__Sequence__init(&(ros_message->binary), size)) { + PyErr_SetString(PyExc_RuntimeError, "unable to create int8__Sequence ros_message"); + Py_DECREF(seq_field); + Py_DECREF(field); + return false; + } + int8_t * dest = ros_message->binary.data; + for (Py_ssize_t i = 0; i < size; ++i) { + PyObject * item = PySequence_Fast_GET_ITEM(seq_field, i); + if (!item) { + Py_DECREF(seq_field); + Py_DECREF(field); + return false; + } + assert(PyLong_Check(item)); + int8_t tmp = (int8_t)PyLong_AsLong(item); + memcpy(&dest[i], &tmp, sizeof(int8_t)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + + return true; +} + +ROSIDL_GENERATOR_C_EXPORT +PyObject * unitree_api__msg__response__convert_to_py(void * raw_ros_message) +{ + /* NOTE(esteve): Call constructor of Response */ + PyObject * _pymessage = NULL; + { + PyObject * pymessage_module = PyImport_ImportModule("unitree_api.msg._response"); + assert(pymessage_module); + PyObject * pymessage_class = PyObject_GetAttrString(pymessage_module, "Response"); + assert(pymessage_class); + Py_DECREF(pymessage_module); + _pymessage = PyObject_CallObject(pymessage_class, NULL); + Py_DECREF(pymessage_class); + if (!_pymessage) { + return NULL; + } + } + unitree_api__msg__Response * ros_message = (unitree_api__msg__Response *)raw_ros_message; + { // header + PyObject * field = NULL; + field = unitree_api__msg__response_header__convert_to_py(&ros_message->header); + if (!field) { + return NULL; + } + { + int rc = PyObject_SetAttrString(_pymessage, "header", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // data + PyObject * field = NULL; + field = PyUnicode_DecodeUTF8( + ros_message->data.data, + strlen(ros_message->data.data), + "replace"); + if (!field) { + return NULL; + } + { + int rc = PyObject_SetAttrString(_pymessage, "data", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // binary + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "binary"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "array.array") == 0); + // ensure that itemsize matches the sizeof of the ROS message field + PyObject * itemsize_attr = PyObject_GetAttrString(field, "itemsize"); + assert(itemsize_attr != NULL); + size_t itemsize = PyLong_AsSize_t(itemsize_attr); + Py_DECREF(itemsize_attr); + if (itemsize != sizeof(int8_t)) { + PyErr_SetString(PyExc_RuntimeError, "itemsize doesn't match expectation"); + Py_DECREF(field); + return NULL; + } + // clear the array, poor approach to remove potential default values + Py_ssize_t length = PyObject_Length(field); + if (-1 == length) { + Py_DECREF(field); + return NULL; + } + if (length > 0) { + PyObject * pop = PyObject_GetAttrString(field, "pop"); + assert(pop != NULL); + for (Py_ssize_t i = 0; i < length; ++i) { + PyObject * ret = PyObject_CallFunctionObjArgs(pop, NULL); + if (!ret) { + Py_DECREF(pop); + Py_DECREF(field); + return NULL; + } + Py_DECREF(ret); + } + Py_DECREF(pop); + } + if (ros_message->binary.size > 0) { + // populating the array.array using the frombytes method + PyObject * frombytes = PyObject_GetAttrString(field, "frombytes"); + assert(frombytes != NULL); + int8_t * src = &(ros_message->binary.data[0]); + PyObject * data = PyBytes_FromStringAndSize((const char *)src, ros_message->binary.size * sizeof(int8_t)); + assert(data != NULL); + PyObject * ret = PyObject_CallFunctionObjArgs(frombytes, data, NULL); + Py_DECREF(data); + Py_DECREF(frombytes); + if (!ret) { + Py_DECREF(field); + return NULL; + } + Py_DECREF(ret); + } + Py_DECREF(field); + } + + // ownership of _pymessage is transferred to the caller + return _pymessage; +} diff --git a/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_response_status.py b/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_response_status.py new file mode 100644 index 0000000..a8dd87f --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_response_status.py @@ -0,0 +1,124 @@ +# generated from rosidl_generator_py/resource/_idl.py.em +# with input from unitree_api:msg/ResponseStatus.idl +# generated code does not contain a copyright notice + + +# Import statements for member types + +import rosidl_parser.definition # noqa: E402, I100 + + +class Metaclass_ResponseStatus(type): + """Metaclass of message 'ResponseStatus'.""" + + _CREATE_ROS_MESSAGE = None + _CONVERT_FROM_PY = None + _CONVERT_TO_PY = None + _DESTROY_ROS_MESSAGE = None + _TYPE_SUPPORT = None + + __constants = { + } + + @classmethod + def __import_type_support__(cls): + try: + from rosidl_generator_py import import_type_support + module = import_type_support('unitree_api') + except ImportError: + import logging + import traceback + logger = logging.getLogger( + 'unitree_api.msg.ResponseStatus') + logger.debug( + 'Failed to import needed modules for type support:\n' + + traceback.format_exc()) + else: + cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__msg__response_status + cls._CONVERT_FROM_PY = module.convert_from_py_msg__msg__response_status + cls._CONVERT_TO_PY = module.convert_to_py_msg__msg__response_status + cls._TYPE_SUPPORT = module.type_support_msg__msg__response_status + cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__msg__response_status + + @classmethod + def __prepare__(cls, name, bases, **kwargs): + # list constant names here so that they appear in the help text of + # the message class under "Data and other attributes defined here:" + # as well as populate each message instance + return { + } + + +class ResponseStatus(metaclass=Metaclass_ResponseStatus): + """Message class 'ResponseStatus'.""" + + __slots__ = [ + '_code', + ] + + _fields_and_field_types = { + 'code': 'int32', + } + + SLOT_TYPES = ( + rosidl_parser.definition.BasicType('int32'), # noqa: E501 + ) + + def __init__(self, **kwargs): + assert all('_' + key in self.__slots__ for key in kwargs.keys()), \ + 'Invalid arguments passed to constructor: %s' % \ + ', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__)) + self.code = kwargs.get('code', int()) + + def __repr__(self): + typename = self.__class__.__module__.split('.') + typename.pop() + typename.append(self.__class__.__name__) + args = [] + for s, t in zip(self.__slots__, self.SLOT_TYPES): + field = getattr(self, s) + fieldstr = repr(field) + # We use Python array type for fields that can be directly stored + # in them, and "normal" sequences for everything else. If it is + # a type that we store in an array, strip off the 'array' portion. + if ( + isinstance(t, rosidl_parser.definition.AbstractSequence) and + isinstance(t.value_type, rosidl_parser.definition.BasicType) and + t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64'] + ): + if len(field) == 0: + fieldstr = '[]' + else: + assert fieldstr.startswith('array(') + prefix = "array('X', " + suffix = ')' + fieldstr = fieldstr[len(prefix):-len(suffix)] + args.append(s[1:] + '=' + fieldstr) + return '%s(%s)' % ('.'.join(typename), ', '.join(args)) + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + if self.code != other.code: + return False + return True + + @classmethod + def get_fields_and_field_types(cls): + from copy import copy + return copy(cls._fields_and_field_types) + + @property + def code(self): + """Message field 'code'.""" + return self._code + + @code.setter + def code(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'code' field must be of type 'int'" + assert value >= -2147483648 and value < 2147483648, \ + "The 'code' field must be an integer in [-2147483648, 2147483647]" + self._code = value diff --git a/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_response_status_s.c b/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_response_status_s.c new file mode 100644 index 0000000..6a9497c --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/lib/python3.8/site-packages/unitree_api/msg/_response_status_s.c @@ -0,0 +1,98 @@ +// generated from rosidl_generator_py/resource/_idl_support.c.em +// with input from unitree_api:msg/ResponseStatus.idl +// generated code does not contain a copyright notice +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#include +#include +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-function" +#endif +#include "numpy/ndarrayobject.h" +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_api/msg/detail/response_status__struct.h" +#include "unitree_api/msg/detail/response_status__functions.h" + + +ROSIDL_GENERATOR_C_EXPORT +bool unitree_api__msg__response_status__convert_from_py(PyObject * _pymsg, void * _ros_message) +{ + // check that the passed message is of the expected Python class + { + char full_classname_dest[48]; + { + char * class_name = NULL; + char * module_name = NULL; + { + PyObject * class_attr = PyObject_GetAttrString(_pymsg, "__class__"); + if (class_attr) { + PyObject * name_attr = PyObject_GetAttrString(class_attr, "__name__"); + if (name_attr) { + class_name = (char *)PyUnicode_1BYTE_DATA(name_attr); + Py_DECREF(name_attr); + } + PyObject * module_attr = PyObject_GetAttrString(class_attr, "__module__"); + if (module_attr) { + module_name = (char *)PyUnicode_1BYTE_DATA(module_attr); + Py_DECREF(module_attr); + } + Py_DECREF(class_attr); + } + } + if (!class_name || !module_name) { + return false; + } + snprintf(full_classname_dest, sizeof(full_classname_dest), "%s.%s", module_name, class_name); + } + assert(strncmp("unitree_api.msg._response_status.ResponseStatus", full_classname_dest, 47) == 0); + } + unitree_api__msg__ResponseStatus * ros_message = _ros_message; + { // code + PyObject * field = PyObject_GetAttrString(_pymsg, "code"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->code = (int32_t)PyLong_AsLong(field); + Py_DECREF(field); + } + + return true; +} + +ROSIDL_GENERATOR_C_EXPORT +PyObject * unitree_api__msg__response_status__convert_to_py(void * raw_ros_message) +{ + /* NOTE(esteve): Call constructor of ResponseStatus */ + PyObject * _pymessage = NULL; + { + PyObject * pymessage_module = PyImport_ImportModule("unitree_api.msg._response_status"); + assert(pymessage_module); + PyObject * pymessage_class = PyObject_GetAttrString(pymessage_module, "ResponseStatus"); + assert(pymessage_class); + Py_DECREF(pymessage_module); + _pymessage = PyObject_CallObject(pymessage_class, NULL); + Py_DECREF(pymessage_class); + if (!_pymessage) { + return NULL; + } + } + unitree_api__msg__ResponseStatus * ros_message = (unitree_api__msg__ResponseStatus *)raw_ros_message; + { // code + PyObject * field = NULL; + field = PyLong_FromLong(ros_message->code); + { + int rc = PyObject_SetAttrString(_pymessage, "code", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + + // ownership of _pymessage is transferred to the caller + return _pymessage; +} diff --git a/deploy/robot_ws/install/unitree_api/share/ament_index/resource_index/package_run_dependencies/unitree_api b/deploy/robot_ws/install/unitree_api/share/ament_index/resource_index/package_run_dependencies/unitree_api new file mode 100644 index 0000000..cabffa8 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/ament_index/resource_index/package_run_dependencies/unitree_api @@ -0,0 +1 @@ +geometry_msgs;rosidl_default_runtime;ament_lint_auto;ament_lint_common \ No newline at end of file diff --git a/deploy/robot_ws/install/unitree_api/share/ament_index/resource_index/packages/unitree_api b/deploy/robot_ws/install/unitree_api/share/ament_index/resource_index/packages/unitree_api new file mode 100644 index 0000000..e69de29 diff --git a/deploy/robot_ws/install/unitree_api/share/ament_index/resource_index/parent_prefix_path/unitree_api b/deploy/robot_ws/install/unitree_api/share/ament_index/resource_index/parent_prefix_path/unitree_api new file mode 100644 index 0000000..e053138 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/ament_index/resource_index/parent_prefix_path/unitree_api @@ -0,0 +1 @@ +/home/unitree/locomotion/Go2Py/deploy/ros2_ws/install/go2py_node:/home/unitree/locomotion/Go2Py/deploy/ros2_ws/install/unitree_go:/home/unitree/locomotion/Go2Py/deploy/ros2_ws/install/unitree_api:/home/unitree/locomotion/Go2Py/deploy/ros2_ws/install/hesai_ros_driver:/home/unitree/locomotion/unitree_ros2/cyclonedds_ws/install/unitree_go:/home/unitree/locomotion/unitree_ros2/cyclonedds_ws/install/unitree_api:/home/unitree/locomotion/unitree_ros2/cyclonedds_ws/install/rmw_cyclonedds_cpp:/opt/ros/foxy \ No newline at end of file diff --git a/deploy/robot_ws/install/unitree_api/share/ament_index/resource_index/rosidl_interfaces/unitree_api b/deploy/robot_ws/install/unitree_api/share/ament_index/resource_index/rosidl_interfaces/unitree_api new file mode 100644 index 0000000..cf70eec --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/ament_index/resource_index/rosidl_interfaces/unitree_api @@ -0,0 +1,16 @@ +msg/Request.idl +msg/Request.msg +msg/RequestHeader.idl +msg/RequestHeader.msg +msg/RequestIdentity.idl +msg/RequestIdentity.msg +msg/RequestLease.idl +msg/RequestLease.msg +msg/RequestPolicy.idl +msg/RequestPolicy.msg +msg/Response.idl +msg/Response.msg +msg/ResponseHeader.idl +msg/ResponseHeader.msg +msg/ResponseStatus.idl +msg/ResponseStatus.msg \ No newline at end of file diff --git a/deploy/robot_ws/install/unitree_api/share/colcon-core/packages/unitree_api b/deploy/robot_ws/install/unitree_api/share/colcon-core/packages/unitree_api new file mode 100644 index 0000000..c819a81 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/colcon-core/packages/unitree_api @@ -0,0 +1 @@ +geometry_msgs:rosidl_default_runtime \ No newline at end of file diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/ament_cmake_export_dependencies-extras.cmake b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/ament_cmake_export_dependencies-extras.cmake new file mode 100644 index 0000000..728a66a --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/ament_cmake_export_dependencies-extras.cmake @@ -0,0 +1,92 @@ +# generated from ament_cmake_export_dependencies/cmake/ament_cmake_export_dependencies-extras.cmake.in + +set(_exported_dependencies "geometry_msgs;geometry_msgs;std_msgs;builtin_interfaces;rosidl_runtime_c;rosidl_typesupport_interface;geometry_msgs;std_msgs;builtin_interfaces;geometry_msgs;std_msgs;builtin_interfaces") + +find_package(ament_cmake_libraries QUIET REQUIRED) + +# find_package() all dependencies +# and append their DEFINITIONS INCLUDE_DIRS, LIBRARIES, and LINK_FLAGS +# variables to unitree_api_DEFINITIONS, unitree_api_INCLUDE_DIRS, +# unitree_api_LIBRARIES, and unitree_api_LINK_FLAGS. +# Additionally collect the direct dependency names in +# unitree_api_DEPENDENCIES as well as the recursive dependency names +# in unitree_api_RECURSIVE_DEPENDENCIES. +if(NOT _exported_dependencies STREQUAL "") + find_package(ament_cmake_core QUIET REQUIRED) + set(unitree_api_DEPENDENCIES ${_exported_dependencies}) + set(unitree_api_RECURSIVE_DEPENDENCIES ${_exported_dependencies}) + set(_libraries) + foreach(_dep ${_exported_dependencies}) + if(NOT ${_dep}_FOUND) + find_package("${_dep}" QUIET REQUIRED) + endif() + # if a package provides modern CMake interface targets use them + # exclusively assuming the classic CMake variables only exist for + # backward compatibility + set(use_modern_cmake FALSE) + if(NOT "${${_dep}_TARGETS}" STREQUAL "") + foreach(_target ${${_dep}_TARGETS}) + # only use actual targets + # in case a package uses this variable for other content + if(TARGET "${_target}") + get_target_property(_include_dirs ${_target} INTERFACE_INCLUDE_DIRECTORIES) + if(_include_dirs) + list_append_unique(unitree_api_INCLUDE_DIRS "${_include_dirs}") + endif() + + get_target_property(_imported_configurations ${_target} IMPORTED_CONFIGURATIONS) + if(_imported_configurations) + string(TOUPPER "${_imported_configurations}" _imported_configurations) + if(DEBUG_CONFIGURATIONS) + string(TOUPPER "${DEBUG_CONFIGURATIONS}" _debug_configurations_uppercase) + else() + set(_debug_configurations_uppercase "DEBUG") + endif() + foreach(_imported_config ${_imported_configurations}) + get_target_property(_imported_implib ${_target} IMPORTED_IMPLIB_${_imported_config}) + if(_imported_implib) + set(_imported_implib_config "optimized") + if(${_imported_config} IN_LIST _debug_configurations_uppercase) + set(_imported_implib_config "debug") + endif() + list(APPEND _libraries ${_imported_implib_config} ${_imported_implib}) + else() + get_target_property(_imported_location ${_target} IMPORTED_LOCATION_${_imported_config}) + if(_imported_location) + list(APPEND _libraries "${_imported_location}") + endif() + endif() + endforeach() + endif() + + get_target_property(_link_libraries ${_target} INTERFACE_LINK_LIBRARIES) + if(_link_libraries) + list(APPEND _libraries "${_link_libraries}") + endif() + set(use_modern_cmake TRUE) + endif() + endforeach() + endif() + if(NOT use_modern_cmake) + if(${_dep}_DEFINITIONS) + list_append_unique(unitree_api_DEFINITIONS "${${_dep}_DEFINITIONS}") + endif() + if(${_dep}_INCLUDE_DIRS) + list_append_unique(unitree_api_INCLUDE_DIRS "${${_dep}_INCLUDE_DIRS}") + endif() + if(${_dep}_LIBRARIES) + list(APPEND _libraries "${${_dep}_LIBRARIES}") + endif() + if(${_dep}_LINK_FLAGS) + list_append_unique(unitree_api_LINK_FLAGS "${${_dep}_LINK_FLAGS}") + endif() + if(${_dep}_RECURSIVE_DEPENDENCIES) + list_append_unique(unitree_api_RECURSIVE_DEPENDENCIES "${${_dep}_RECURSIVE_DEPENDENCIES}") + endif() + endif() + if(_libraries) + ament_libraries_deduplicate(_libraries "${_libraries}") + list(APPEND unitree_api_LIBRARIES "${_libraries}") + endif() + endforeach() +endif() diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/ament_cmake_export_include_directories-extras.cmake b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/ament_cmake_export_include_directories-extras.cmake new file mode 100644 index 0000000..a8069fa --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/ament_cmake_export_include_directories-extras.cmake @@ -0,0 +1,16 @@ +# generated from ament_cmake_export_include_directories/cmake/ament_cmake_export_include_directories-extras.cmake.in + +set(_exported_include_dirs "${unitree_api_DIR}/../../../include") + +# append include directories to unitree_api_INCLUDE_DIRS +# warn about not existing paths +if(NOT _exported_include_dirs STREQUAL "") + find_package(ament_cmake_core QUIET REQUIRED) + foreach(_exported_include_dir ${_exported_include_dirs}) + if(NOT IS_DIRECTORY "${_exported_include_dir}") + message(WARNING "Package 'unitree_api' exports the include directory '${_exported_include_dir}' which doesn't exist") + endif() + normalize_path(_exported_include_dir "${_exported_include_dir}") + list(APPEND unitree_api_INCLUDE_DIRS "${_exported_include_dir}") + endforeach() +endif() diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/ament_cmake_export_libraries-extras.cmake b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/ament_cmake_export_libraries-extras.cmake new file mode 100644 index 0000000..d514da4 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/ament_cmake_export_libraries-extras.cmake @@ -0,0 +1,140 @@ +# generated from ament_cmake_export_libraries/cmake/template/ament_cmake_export_libraries.cmake.in + +set(_exported_libraries "unitree_api__rosidl_generator_c;unitree_api__rosidl_typesupport_c;unitree_api__rosidl_typesupport_cpp") +set(_exported_library_names "") + +# populate unitree_api_LIBRARIES +if(NOT _exported_libraries STREQUAL "") + # loop over libraries, either target names or absolute paths + list(LENGTH _exported_libraries _length) + set(_i 0) + while(_i LESS _length) + list(GET _exported_libraries ${_i} _arg) + + # pass linker flags along + if("${_arg}" MATCHES "^-" AND NOT "${_arg}" MATCHES "^-[l|framework]") + list(APPEND unitree_api_LIBRARIES "${_arg}") + math(EXPR _i "${_i} + 1") + continue() + endif() + + if("${_arg}" MATCHES "^(debug|optimized|general)$") + # remember build configuration keyword + # and get following library + set(_cfg "${_arg}") + math(EXPR _i "${_i} + 1") + if(_i EQUAL _length) + message(FATAL_ERROR "Package 'unitree_api' passes the build configuration keyword '${_cfg}' as the last exported library") + endif() + list(GET _exported_libraries ${_i} _library) + else() + # the value is a library without a build configuration keyword + set(_cfg "") + set(_library "${_arg}") + endif() + math(EXPR _i "${_i} + 1") + + if(NOT IS_ABSOLUTE "${_library}") + # search for library target relative to this CMake file + set(_lib "NOTFOUND") + find_library( + _lib NAMES "${_library}" + PATHS "${unitree_api_DIR}/../../../lib" + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH + ) + + if(NOT _lib) + # warn about not existing library and ignore it + message(FATAL_ERROR "Package 'unitree_api' exports the library '${_library}' which couldn't be found") + elseif(NOT IS_ABSOLUTE "${_lib}") + # the found library must be an absolute path + message(FATAL_ERROR "Package 'unitree_api' found the library '${_library}' at '${_lib}' which is not an absolute path") + elseif(NOT EXISTS "${_lib}") + # the found library must exist + message(FATAL_ERROR "Package 'unitree_api' found the library '${_lib}' which doesn't exist") + else() + list(APPEND unitree_api_LIBRARIES ${_cfg} "${_lib}") + endif() + + else() + if(NOT EXISTS "${_library}") + # the found library must exist + message(WARNING "Package 'unitree_api' exports the library '${_library}' which doesn't exist") + else() + list(APPEND unitree_api_LIBRARIES ${_cfg} "${_library}") + endif() + endif() + endwhile() +endif() + +# find_library() library names with optional LIBRARY_DIRS +# and add the libraries to unitree_api_LIBRARIES +if(NOT _exported_library_names STREQUAL "") + # loop over library names + # but remember related build configuration keyword if available + list(LENGTH _exported_library_names _length) + set(_i 0) + while(_i LESS _length) + list(GET _exported_library_names ${_i} _arg) + # pass linker flags along + if("${_arg}" MATCHES "^-" AND NOT "${_arg}" MATCHES "^-[l|framework]") + list(APPEND unitree_api_LIBRARIES "${_arg}") + math(EXPR _i "${_i} + 1") + continue() + endif() + + if("${_arg}" MATCHES "^(debug|optimized|general)$") + # remember build configuration keyword + # and get following library name + set(_cfg "${_arg}") + math(EXPR _i "${_i} + 1") + if(_i EQUAL _length) + message(FATAL_ERROR "Package 'unitree_api' passes the build configuration keyword '${_cfg}' as the last exported target") + endif() + list(GET _exported_library_names ${_i} _library) + else() + # the value is a library target without a build configuration keyword + set(_cfg "") + set(_library "${_arg}") + endif() + math(EXPR _i "${_i} + 1") + + # extract optional LIBRARY_DIRS from library name + string(REPLACE ":" ";" _library_dirs "${_library}") + list(GET _library_dirs 0 _library_name) + list(REMOVE_AT _library_dirs 0) + + set(_lib "NOTFOUND") + if(NOT _library_dirs) + # search for library in the common locations + find_library( + _lib + NAMES "${_library_name}" + ) + if(NOT _lib) + # warn about not existing library and later ignore it + message(WARNING "Package 'unitree_api' exports library '${_library_name}' which couldn't be found") + endif() + else() + # search for library in the specified directories + find_library( + _lib + NAMES "${_library_name}" + PATHS ${_library_dirs} + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH + ) + if(NOT _lib) + # warn about not existing library and later ignore it + message(WARNING "Package 'unitree_api' exports library '${_library_name}' with LIBRARY_DIRS '${_library_dirs}' which couldn't be found") + endif() + endif() + if(_lib) + list(APPEND unitree_api_LIBRARIES ${_cfg} "${_lib}") + endif() + endwhile() +endif() + +# TODO(dirk-thomas) deduplicate unitree_api_LIBRARIES +# while maintaining library order +# as well as build configuration keywords +# as well as linker flags diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/ament_cmake_export_targets-extras.cmake b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/ament_cmake_export_targets-extras.cmake new file mode 100644 index 0000000..cc5525c --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/ament_cmake_export_targets-extras.cmake @@ -0,0 +1,27 @@ +# generated from ament_cmake_export_targets/cmake/ament_cmake_export_targets-extras.cmake.in + +set(_exported_targets "unitree_api__rosidl_generator_c;unitree_api__rosidl_typesupport_introspection_c;unitree_api__rosidl_typesupport_c;unitree_api__rosidl_generator_cpp;unitree_api__rosidl_typesupport_introspection_cpp;unitree_api__rosidl_typesupport_cpp") + +# include all exported targets +if(NOT _exported_targets STREQUAL "") + foreach(_target ${_exported_targets}) + set(_export_file "${unitree_api_DIR}/${_target}Export.cmake") + include("${_export_file}") + + # extract the target names associated with the export + set(_regex "foreach\\((_cmake)?_expected_?[Tt]arget (IN ITEMS )?(.+)\\)") + file( + STRINGS "${_export_file}" _foreach_targets + REGEX "${_regex}") + list(LENGTH _foreach_targets _matches) + if(NOT _matches EQUAL 1) + message(FATAL_ERROR + "Failed to find exported target names in '${_export_file}'") + endif() + string(REGEX REPLACE "${_regex}" "\\3" _targets "${_foreach_targets}") + string(REPLACE " " ";" _targets "${_targets}") + list(LENGTH _targets _length) + + list(APPEND unitree_api_TARGETS ${_targets}) + endforeach() +endif() diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/rosidl_cmake-extras.cmake b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/rosidl_cmake-extras.cmake new file mode 100644 index 0000000..9b686e8 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/rosidl_cmake-extras.cmake @@ -0,0 +1,4 @@ +# generated from rosidl_cmake/cmake/rosidl_cmake-extras.cmake.in + +set(unitree_api_IDL_FILES "msg/Request.idl;msg/RequestHeader.idl;msg/RequestIdentity.idl;msg/RequestLease.idl;msg/RequestPolicy.idl;msg/Response.idl;msg/ResponseHeader.idl;msg/ResponseStatus.idl") +set(unitree_api_INTERFACE_FILES "msg/Request.msg;msg/RequestHeader.msg;msg/RequestIdentity.msg;msg/RequestLease.msg;msg/RequestPolicy.msg;msg/Response.msg;msg/ResponseHeader.msg;msg/ResponseStatus.msg") diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/rosidl_cmake_export_typesupport_libraries-extras.cmake b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/rosidl_cmake_export_typesupport_libraries-extras.cmake new file mode 100644 index 0000000..c9d47ed --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/rosidl_cmake_export_typesupport_libraries-extras.cmake @@ -0,0 +1,46 @@ +# generated from +# rosidl_cmake/cmake/template/rosidl_cmake_export_typesupport_libraries.cmake.in + +set(_exported_typesupport_libraries + "__rosidl_typesupport_fastrtps_c:unitree_api__rosidl_typesupport_fastrtps_c;__rosidl_typesupport_fastrtps_cpp:unitree_api__rosidl_typesupport_fastrtps_cpp") + +# populate unitree_api_LIBRARIES_ +if(NOT _exported_typesupport_libraries STREQUAL "") + # loop over typesupport libraries + foreach(_tuple ${_exported_typesupport_libraries}) + string(REPLACE ":" ";" _tuple "${_tuple}") + list(GET _tuple 0 _suffix) + list(GET _tuple 1 _library) + + if(NOT IS_ABSOLUTE "${_library}") + # search for library target relative to this CMake file + set(_lib "NOTFOUND") + find_library( + _lib NAMES "${_library}" + PATHS "${unitree_api_DIR}/../../../lib" + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH + ) + + if(NOT _lib) + # the library wasn't found + message(FATAL_ERROR "Package 'unitree_api' exports the typesupport library '${_library}' which couldn't be found") + elseif(NOT IS_ABSOLUTE "${_lib}") + # the found library must be an absolute path + message(FATAL_ERROR "Package 'unitree_api' found the typesupport library '${_library}' at '${_lib}' which is not an absolute path") + elseif(NOT EXISTS "${_lib}") + # the found library must exist + message(FATAL_ERROR "Package 'unitree_api' found the typesupport library '${_lib}' which doesn't exist") + else() + list(APPEND unitree_api_LIBRARIES${_suffix} ${_cfg} "${_lib}") + endif() + + else() + if(NOT EXISTS "${_library}") + # the found library must exist + message(WARNING "Package 'unitree_api' exports the typesupport library '${_library}' which doesn't exist") + else() + list(APPEND unitree_api_LIBRARIES${_suffix} "${_library}") + endif() + endif() + endforeach() +endif() diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/rosidl_cmake_export_typesupport_targets-extras.cmake b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/rosidl_cmake_export_typesupport_targets-extras.cmake new file mode 100644 index 0000000..3a0327c --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/rosidl_cmake_export_typesupport_targets-extras.cmake @@ -0,0 +1,23 @@ +# generated from +# rosidl_cmake/cmake/template/rosidl_cmake_export_typesupport_targets.cmake.in + +set(_exported_typesupport_targets + "__rosidl_typesupport_introspection_c:unitree_api__rosidl_typesupport_introspection_c;__rosidl_typesupport_introspection_cpp:unitree_api__rosidl_typesupport_introspection_cpp") + +# populate unitree_api_TARGETS_ +if(NOT _exported_typesupport_targets STREQUAL "") + # loop over typesupport targets + foreach(_tuple ${_exported_typesupport_targets}) + string(REPLACE ":" ";" _tuple "${_tuple}") + list(GET _tuple 0 _suffix) + list(GET _tuple 1 _target) + + set(_target "unitree_api::${_target}") + if(NOT TARGET "${_target}") + # the exported target must exist + message(WARNING "Package 'unitree_api' exports the typesupport target '${_target}' which doesn't exist") + else() + list(APPEND unitree_api_TARGETS${_suffix} "${_target}") + endif() + endforeach() +endif() diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_apiConfig-version.cmake b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_apiConfig-version.cmake new file mode 100644 index 0000000..7beb732 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_apiConfig-version.cmake @@ -0,0 +1,14 @@ +# generated from ament/cmake/core/templates/nameConfig-version.cmake.in +set(PACKAGE_VERSION "0.0.0") + +set(PACKAGE_VERSION_EXACT False) +set(PACKAGE_VERSION_COMPATIBLE False) + +if("${PACKAGE_FIND_VERSION}" VERSION_EQUAL "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_EXACT True) + set(PACKAGE_VERSION_COMPATIBLE True) +endif() + +if("${PACKAGE_FIND_VERSION}" VERSION_LESS "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_COMPATIBLE True) +endif() diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_apiConfig.cmake b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_apiConfig.cmake new file mode 100644 index 0000000..bd35a5c --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_apiConfig.cmake @@ -0,0 +1,42 @@ +# generated from ament/cmake/core/templates/nameConfig.cmake.in + +# prevent multiple inclusion +if(_unitree_api_CONFIG_INCLUDED) + # ensure to keep the found flag the same + if(NOT DEFINED unitree_api_FOUND) + # explicitly set it to FALSE, otherwise CMake will set it to TRUE + set(unitree_api_FOUND FALSE) + elseif(NOT unitree_api_FOUND) + # use separate condition to avoid uninitialized variable warning + set(unitree_api_FOUND FALSE) + endif() + return() +endif() +set(_unitree_api_CONFIG_INCLUDED TRUE) + +# output package information +if(NOT unitree_api_FIND_QUIETLY) + message(STATUS "Found unitree_api: 0.0.0 (${unitree_api_DIR})") +endif() + +# warn when using a deprecated package +if(NOT "" STREQUAL "") + set(_msg "Package 'unitree_api' is deprecated") + # append custom deprecation text if available + if(NOT "" STREQUAL "TRUE") + set(_msg "${_msg} ()") + endif() + # optionally quiet the deprecation message + if(NOT ${unitree_api_DEPRECATED_QUIET}) + message(DEPRECATION "${_msg}") + endif() +endif() + +# flag package as ament-based to distinguish it after being find_package()-ed +set(unitree_api_FOUND_AMENT_PACKAGE TRUE) + +# include all config extra files +set(_extras "rosidl_cmake-extras.cmake;ament_cmake_export_dependencies-extras.cmake;ament_cmake_export_libraries-extras.cmake;ament_cmake_export_targets-extras.cmake;ament_cmake_export_include_directories-extras.cmake;rosidl_cmake_export_typesupport_libraries-extras.cmake;rosidl_cmake_export_typesupport_targets-extras.cmake") +foreach(_extra ${_extras}) + include("${unitree_api_DIR}/${_extra}") +endforeach() diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_api__rosidl_generator_cExport-noconfig.cmake b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_api__rosidl_generator_cExport-noconfig.cmake new file mode 100644 index 0000000..2e4f4d8 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_api__rosidl_generator_cExport-noconfig.cmake @@ -0,0 +1,19 @@ +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Import target "unitree_api::unitree_api__rosidl_generator_c" for configuration "" +set_property(TARGET unitree_api::unitree_api__rosidl_generator_c APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG) +set_target_properties(unitree_api::unitree_api__rosidl_generator_c PROPERTIES + IMPORTED_LOCATION_NOCONFIG "${_IMPORT_PREFIX}/lib/libunitree_api__rosidl_generator_c.so" + IMPORTED_SONAME_NOCONFIG "libunitree_api__rosidl_generator_c.so" + ) + +list(APPEND _IMPORT_CHECK_TARGETS unitree_api::unitree_api__rosidl_generator_c ) +list(APPEND _IMPORT_CHECK_FILES_FOR_unitree_api::unitree_api__rosidl_generator_c "${_IMPORT_PREFIX}/lib/libunitree_api__rosidl_generator_c.so" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_api__rosidl_generator_cExport.cmake b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_api__rosidl_generator_cExport.cmake new file mode 100644 index 0000000..4f7e95e --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_api__rosidl_generator_cExport.cmake @@ -0,0 +1,99 @@ +# Generated by CMake + +if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5) + message(FATAL_ERROR "CMake >= 2.6.0 required") +endif() +cmake_policy(PUSH) +cmake_policy(VERSION 2.6) +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Protect against multiple inclusion, which would fail when already imported targets are added once more. +set(_targetsDefined) +set(_targetsNotDefined) +set(_expectedTargets) +foreach(_expectedTarget unitree_api::unitree_api__rosidl_generator_c) + list(APPEND _expectedTargets ${_expectedTarget}) + if(NOT TARGET ${_expectedTarget}) + list(APPEND _targetsNotDefined ${_expectedTarget}) + endif() + if(TARGET ${_expectedTarget}) + list(APPEND _targetsDefined ${_expectedTarget}) + endif() +endforeach() +if("${_targetsDefined}" STREQUAL "${_expectedTargets}") + unset(_targetsDefined) + unset(_targetsNotDefined) + unset(_expectedTargets) + set(CMAKE_IMPORT_FILE_VERSION) + cmake_policy(POP) + return() +endif() +if(NOT "${_targetsDefined}" STREQUAL "") + message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n") +endif() +unset(_targetsDefined) +unset(_targetsNotDefined) +unset(_expectedTargets) + + +# Compute the installation prefix relative to this file. +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +if(_IMPORT_PREFIX STREQUAL "/") + set(_IMPORT_PREFIX "") +endif() + +# Create imported target unitree_api::unitree_api__rosidl_generator_c +add_library(unitree_api::unitree_api__rosidl_generator_c SHARED IMPORTED) + +set_target_properties(unitree_api::unitree_api__rosidl_generator_c PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" + INTERFACE_LINK_LIBRARIES "geometry_msgs::geometry_msgs__rosidl_generator_c;geometry_msgs::geometry_msgs__rosidl_typesupport_introspection_c;geometry_msgs::geometry_msgs__rosidl_typesupport_c;geometry_msgs::geometry_msgs__rosidl_generator_cpp;geometry_msgs::geometry_msgs__rosidl_typesupport_introspection_cpp;geometry_msgs::geometry_msgs__rosidl_typesupport_cpp;std_msgs::std_msgs__rosidl_generator_c;std_msgs::std_msgs__rosidl_typesupport_introspection_c;std_msgs::std_msgs__rosidl_typesupport_c;std_msgs::std_msgs__rosidl_generator_cpp;std_msgs::std_msgs__rosidl_typesupport_introspection_cpp;std_msgs::std_msgs__rosidl_typesupport_cpp;builtin_interfaces::builtin_interfaces__rosidl_generator_c;builtin_interfaces::builtin_interfaces__rosidl_typesupport_introspection_c;builtin_interfaces::builtin_interfaces__rosidl_typesupport_c;builtin_interfaces::builtin_interfaces__rosidl_generator_cpp;builtin_interfaces::builtin_interfaces__rosidl_typesupport_introspection_cpp;builtin_interfaces::builtin_interfaces__rosidl_typesupport_cpp;rosidl_runtime_c::rosidl_runtime_c;rosidl_typesupport_interface::rosidl_typesupport_interface;rcutils::rcutils" +) + +if(CMAKE_VERSION VERSION_LESS 2.8.12) + message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.") +endif() + +# Load information for each installed configuration. +get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +file(GLOB CONFIG_FILES "${_DIR}/unitree_api__rosidl_generator_cExport-*.cmake") +foreach(f ${CONFIG_FILES}) + include(${f}) +endforeach() + +# Cleanup temporary variables. +set(_IMPORT_PREFIX) + +# Loop over all imported files and verify that they actually exist +foreach(target ${_IMPORT_CHECK_TARGETS} ) + foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} ) + if(NOT EXISTS "${file}" ) + message(FATAL_ERROR "The imported target \"${target}\" references the file + \"${file}\" +but this file does not exist. Possible reasons include: +* The file was deleted, renamed, or moved to another location. +* An install or uninstall procedure did not complete successfully. +* The installation package was faulty and contained + \"${CMAKE_CURRENT_LIST_FILE}\" +but not all the files it references. +") + endif() + endforeach() + unset(_IMPORT_CHECK_FILES_FOR_${target}) +endforeach() +unset(_IMPORT_CHECK_TARGETS) + +# This file does not depend on other imported targets which have +# been exported from the same project but in a separate export set. + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) +cmake_policy(POP) diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_api__rosidl_generator_cppExport.cmake b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_api__rosidl_generator_cppExport.cmake new file mode 100644 index 0000000..9f1900d --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_api__rosidl_generator_cppExport.cmake @@ -0,0 +1,99 @@ +# Generated by CMake + +if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5) + message(FATAL_ERROR "CMake >= 2.6.0 required") +endif() +cmake_policy(PUSH) +cmake_policy(VERSION 2.6) +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Protect against multiple inclusion, which would fail when already imported targets are added once more. +set(_targetsDefined) +set(_targetsNotDefined) +set(_expectedTargets) +foreach(_expectedTarget unitree_api::unitree_api__rosidl_generator_cpp) + list(APPEND _expectedTargets ${_expectedTarget}) + if(NOT TARGET ${_expectedTarget}) + list(APPEND _targetsNotDefined ${_expectedTarget}) + endif() + if(TARGET ${_expectedTarget}) + list(APPEND _targetsDefined ${_expectedTarget}) + endif() +endforeach() +if("${_targetsDefined}" STREQUAL "${_expectedTargets}") + unset(_targetsDefined) + unset(_targetsNotDefined) + unset(_expectedTargets) + set(CMAKE_IMPORT_FILE_VERSION) + cmake_policy(POP) + return() +endif() +if(NOT "${_targetsDefined}" STREQUAL "") + message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n") +endif() +unset(_targetsDefined) +unset(_targetsNotDefined) +unset(_expectedTargets) + + +# Compute the installation prefix relative to this file. +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +if(_IMPORT_PREFIX STREQUAL "/") + set(_IMPORT_PREFIX "") +endif() + +# Create imported target unitree_api::unitree_api__rosidl_generator_cpp +add_library(unitree_api::unitree_api__rosidl_generator_cpp INTERFACE IMPORTED) + +set_target_properties(unitree_api::unitree_api__rosidl_generator_cpp PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" + INTERFACE_LINK_LIBRARIES "geometry_msgs::geometry_msgs__rosidl_generator_c;geometry_msgs::geometry_msgs__rosidl_typesupport_introspection_c;geometry_msgs::geometry_msgs__rosidl_typesupport_c;geometry_msgs::geometry_msgs__rosidl_generator_cpp;geometry_msgs::geometry_msgs__rosidl_typesupport_introspection_cpp;geometry_msgs::geometry_msgs__rosidl_typesupport_cpp;std_msgs::std_msgs__rosidl_generator_c;std_msgs::std_msgs__rosidl_typesupport_introspection_c;std_msgs::std_msgs__rosidl_typesupport_c;std_msgs::std_msgs__rosidl_generator_cpp;std_msgs::std_msgs__rosidl_typesupport_introspection_cpp;std_msgs::std_msgs__rosidl_typesupport_cpp;builtin_interfaces::builtin_interfaces__rosidl_generator_c;builtin_interfaces::builtin_interfaces__rosidl_typesupport_introspection_c;builtin_interfaces::builtin_interfaces__rosidl_typesupport_c;builtin_interfaces::builtin_interfaces__rosidl_generator_cpp;builtin_interfaces::builtin_interfaces__rosidl_typesupport_introspection_cpp;builtin_interfaces::builtin_interfaces__rosidl_typesupport_cpp;rosidl_runtime_cpp::rosidl_runtime_cpp" +) + +if(CMAKE_VERSION VERSION_LESS 3.0.0) + message(FATAL_ERROR "This file relies on consumers using CMake 3.0.0 or greater.") +endif() + +# Load information for each installed configuration. +get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +file(GLOB CONFIG_FILES "${_DIR}/unitree_api__rosidl_generator_cppExport-*.cmake") +foreach(f ${CONFIG_FILES}) + include(${f}) +endforeach() + +# Cleanup temporary variables. +set(_IMPORT_PREFIX) + +# Loop over all imported files and verify that they actually exist +foreach(target ${_IMPORT_CHECK_TARGETS} ) + foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} ) + if(NOT EXISTS "${file}" ) + message(FATAL_ERROR "The imported target \"${target}\" references the file + \"${file}\" +but this file does not exist. Possible reasons include: +* The file was deleted, renamed, or moved to another location. +* An install or uninstall procedure did not complete successfully. +* The installation package was faulty and contained + \"${CMAKE_CURRENT_LIST_FILE}\" +but not all the files it references. +") + endif() + endforeach() + unset(_IMPORT_CHECK_FILES_FOR_${target}) +endforeach() +unset(_IMPORT_CHECK_TARGETS) + +# This file does not depend on other imported targets which have +# been exported from the same project but in a separate export set. + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) +cmake_policy(POP) diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_api__rosidl_typesupport_cExport-noconfig.cmake b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_api__rosidl_typesupport_cExport-noconfig.cmake new file mode 100644 index 0000000..7d8f168 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_api__rosidl_typesupport_cExport-noconfig.cmake @@ -0,0 +1,19 @@ +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Import target "unitree_api::unitree_api__rosidl_typesupport_c" for configuration "" +set_property(TARGET unitree_api::unitree_api__rosidl_typesupport_c APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG) +set_target_properties(unitree_api::unitree_api__rosidl_typesupport_c PROPERTIES + IMPORTED_LOCATION_NOCONFIG "${_IMPORT_PREFIX}/lib/libunitree_api__rosidl_typesupport_c.so" + IMPORTED_SONAME_NOCONFIG "libunitree_api__rosidl_typesupport_c.so" + ) + +list(APPEND _IMPORT_CHECK_TARGETS unitree_api::unitree_api__rosidl_typesupport_c ) +list(APPEND _IMPORT_CHECK_FILES_FOR_unitree_api::unitree_api__rosidl_typesupport_c "${_IMPORT_PREFIX}/lib/libunitree_api__rosidl_typesupport_c.so" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_api__rosidl_typesupport_cExport.cmake b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_api__rosidl_typesupport_cExport.cmake new file mode 100644 index 0000000..a51f7a6 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_api__rosidl_typesupport_cExport.cmake @@ -0,0 +1,99 @@ +# Generated by CMake + +if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5) + message(FATAL_ERROR "CMake >= 2.6.0 required") +endif() +cmake_policy(PUSH) +cmake_policy(VERSION 2.6) +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Protect against multiple inclusion, which would fail when already imported targets are added once more. +set(_targetsDefined) +set(_targetsNotDefined) +set(_expectedTargets) +foreach(_expectedTarget unitree_api::unitree_api__rosidl_typesupport_c) + list(APPEND _expectedTargets ${_expectedTarget}) + if(NOT TARGET ${_expectedTarget}) + list(APPEND _targetsNotDefined ${_expectedTarget}) + endif() + if(TARGET ${_expectedTarget}) + list(APPEND _targetsDefined ${_expectedTarget}) + endif() +endforeach() +if("${_targetsDefined}" STREQUAL "${_expectedTargets}") + unset(_targetsDefined) + unset(_targetsNotDefined) + unset(_expectedTargets) + set(CMAKE_IMPORT_FILE_VERSION) + cmake_policy(POP) + return() +endif() +if(NOT "${_targetsDefined}" STREQUAL "") + message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n") +endif() +unset(_targetsDefined) +unset(_targetsNotDefined) +unset(_expectedTargets) + + +# Compute the installation prefix relative to this file. +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +if(_IMPORT_PREFIX STREQUAL "/") + set(_IMPORT_PREFIX "") +endif() + +# Create imported target unitree_api::unitree_api__rosidl_typesupport_c +add_library(unitree_api::unitree_api__rosidl_typesupport_c SHARED IMPORTED) + +set_target_properties(unitree_api::unitree_api__rosidl_typesupport_c PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" + INTERFACE_LINK_LIBRARIES "rosidl_runtime_c::rosidl_runtime_c;rosidl_typesupport_c::rosidl_typesupport_c;rosidl_typesupport_interface::rosidl_typesupport_interface;geometry_msgs::geometry_msgs__rosidl_generator_c;geometry_msgs::geometry_msgs__rosidl_typesupport_introspection_c;geometry_msgs::geometry_msgs__rosidl_typesupport_c;geometry_msgs::geometry_msgs__rosidl_generator_cpp;geometry_msgs::geometry_msgs__rosidl_typesupport_introspection_cpp;geometry_msgs::geometry_msgs__rosidl_typesupport_cpp;std_msgs::std_msgs__rosidl_generator_c;std_msgs::std_msgs__rosidl_typesupport_introspection_c;std_msgs::std_msgs__rosidl_typesupport_c;std_msgs::std_msgs__rosidl_generator_cpp;std_msgs::std_msgs__rosidl_typesupport_introspection_cpp;std_msgs::std_msgs__rosidl_typesupport_cpp;builtin_interfaces::builtin_interfaces__rosidl_generator_c;builtin_interfaces::builtin_interfaces__rosidl_typesupport_introspection_c;builtin_interfaces::builtin_interfaces__rosidl_typesupport_c;builtin_interfaces::builtin_interfaces__rosidl_generator_cpp;builtin_interfaces::builtin_interfaces__rosidl_typesupport_introspection_cpp;builtin_interfaces::builtin_interfaces__rosidl_typesupport_cpp" +) + +if(CMAKE_VERSION VERSION_LESS 2.8.12) + message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.") +endif() + +# Load information for each installed configuration. +get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +file(GLOB CONFIG_FILES "${_DIR}/unitree_api__rosidl_typesupport_cExport-*.cmake") +foreach(f ${CONFIG_FILES}) + include(${f}) +endforeach() + +# Cleanup temporary variables. +set(_IMPORT_PREFIX) + +# Loop over all imported files and verify that they actually exist +foreach(target ${_IMPORT_CHECK_TARGETS} ) + foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} ) + if(NOT EXISTS "${file}" ) + message(FATAL_ERROR "The imported target \"${target}\" references the file + \"${file}\" +but this file does not exist. Possible reasons include: +* The file was deleted, renamed, or moved to another location. +* An install or uninstall procedure did not complete successfully. +* The installation package was faulty and contained + \"${CMAKE_CURRENT_LIST_FILE}\" +but not all the files it references. +") + endif() + endforeach() + unset(_IMPORT_CHECK_FILES_FOR_${target}) +endforeach() +unset(_IMPORT_CHECK_TARGETS) + +# This file does not depend on other imported targets which have +# been exported from the same project but in a separate export set. + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) +cmake_policy(POP) diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_api__rosidl_typesupport_cppExport-noconfig.cmake b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_api__rosidl_typesupport_cppExport-noconfig.cmake new file mode 100644 index 0000000..f96356e --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_api__rosidl_typesupport_cppExport-noconfig.cmake @@ -0,0 +1,19 @@ +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Import target "unitree_api::unitree_api__rosidl_typesupport_cpp" for configuration "" +set_property(TARGET unitree_api::unitree_api__rosidl_typesupport_cpp APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG) +set_target_properties(unitree_api::unitree_api__rosidl_typesupport_cpp PROPERTIES + IMPORTED_LOCATION_NOCONFIG "${_IMPORT_PREFIX}/lib/libunitree_api__rosidl_typesupport_cpp.so" + IMPORTED_SONAME_NOCONFIG "libunitree_api__rosidl_typesupport_cpp.so" + ) + +list(APPEND _IMPORT_CHECK_TARGETS unitree_api::unitree_api__rosidl_typesupport_cpp ) +list(APPEND _IMPORT_CHECK_FILES_FOR_unitree_api::unitree_api__rosidl_typesupport_cpp "${_IMPORT_PREFIX}/lib/libunitree_api__rosidl_typesupport_cpp.so" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_api__rosidl_typesupport_cppExport.cmake b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_api__rosidl_typesupport_cppExport.cmake new file mode 100644 index 0000000..16c31ac --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_api__rosidl_typesupport_cppExport.cmake @@ -0,0 +1,99 @@ +# Generated by CMake + +if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5) + message(FATAL_ERROR "CMake >= 2.6.0 required") +endif() +cmake_policy(PUSH) +cmake_policy(VERSION 2.6) +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Protect against multiple inclusion, which would fail when already imported targets are added once more. +set(_targetsDefined) +set(_targetsNotDefined) +set(_expectedTargets) +foreach(_expectedTarget unitree_api::unitree_api__rosidl_typesupport_cpp) + list(APPEND _expectedTargets ${_expectedTarget}) + if(NOT TARGET ${_expectedTarget}) + list(APPEND _targetsNotDefined ${_expectedTarget}) + endif() + if(TARGET ${_expectedTarget}) + list(APPEND _targetsDefined ${_expectedTarget}) + endif() +endforeach() +if("${_targetsDefined}" STREQUAL "${_expectedTargets}") + unset(_targetsDefined) + unset(_targetsNotDefined) + unset(_expectedTargets) + set(CMAKE_IMPORT_FILE_VERSION) + cmake_policy(POP) + return() +endif() +if(NOT "${_targetsDefined}" STREQUAL "") + message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n") +endif() +unset(_targetsDefined) +unset(_targetsNotDefined) +unset(_expectedTargets) + + +# Compute the installation prefix relative to this file. +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +if(_IMPORT_PREFIX STREQUAL "/") + set(_IMPORT_PREFIX "") +endif() + +# Create imported target unitree_api::unitree_api__rosidl_typesupport_cpp +add_library(unitree_api::unitree_api__rosidl_typesupport_cpp SHARED IMPORTED) + +set_target_properties(unitree_api::unitree_api__rosidl_typesupport_cpp PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" + INTERFACE_LINK_LIBRARIES "rosidl_runtime_c::rosidl_runtime_c;rosidl_runtime_cpp::rosidl_runtime_cpp;rosidl_typesupport_cpp::rosidl_typesupport_cpp;rosidl_typesupport_interface::rosidl_typesupport_interface;geometry_msgs::geometry_msgs__rosidl_generator_c;geometry_msgs::geometry_msgs__rosidl_typesupport_introspection_c;geometry_msgs::geometry_msgs__rosidl_typesupport_c;geometry_msgs::geometry_msgs__rosidl_generator_cpp;geometry_msgs::geometry_msgs__rosidl_typesupport_introspection_cpp;geometry_msgs::geometry_msgs__rosidl_typesupport_cpp;std_msgs::std_msgs__rosidl_generator_c;std_msgs::std_msgs__rosidl_typesupport_introspection_c;std_msgs::std_msgs__rosidl_typesupport_c;std_msgs::std_msgs__rosidl_generator_cpp;std_msgs::std_msgs__rosidl_typesupport_introspection_cpp;std_msgs::std_msgs__rosidl_typesupport_cpp;builtin_interfaces::builtin_interfaces__rosidl_generator_c;builtin_interfaces::builtin_interfaces__rosidl_typesupport_introspection_c;builtin_interfaces::builtin_interfaces__rosidl_typesupport_c;builtin_interfaces::builtin_interfaces__rosidl_generator_cpp;builtin_interfaces::builtin_interfaces__rosidl_typesupport_introspection_cpp;builtin_interfaces::builtin_interfaces__rosidl_typesupport_cpp" +) + +if(CMAKE_VERSION VERSION_LESS 2.8.12) + message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.") +endif() + +# Load information for each installed configuration. +get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +file(GLOB CONFIG_FILES "${_DIR}/unitree_api__rosidl_typesupport_cppExport-*.cmake") +foreach(f ${CONFIG_FILES}) + include(${f}) +endforeach() + +# Cleanup temporary variables. +set(_IMPORT_PREFIX) + +# Loop over all imported files and verify that they actually exist +foreach(target ${_IMPORT_CHECK_TARGETS} ) + foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} ) + if(NOT EXISTS "${file}" ) + message(FATAL_ERROR "The imported target \"${target}\" references the file + \"${file}\" +but this file does not exist. Possible reasons include: +* The file was deleted, renamed, or moved to another location. +* An install or uninstall procedure did not complete successfully. +* The installation package was faulty and contained + \"${CMAKE_CURRENT_LIST_FILE}\" +but not all the files it references. +") + endif() + endforeach() + unset(_IMPORT_CHECK_FILES_FOR_${target}) +endforeach() +unset(_IMPORT_CHECK_TARGETS) + +# This file does not depend on other imported targets which have +# been exported from the same project but in a separate export set. + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) +cmake_policy(POP) diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_api__rosidl_typesupport_introspection_cExport-noconfig.cmake b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_api__rosidl_typesupport_introspection_cExport-noconfig.cmake new file mode 100644 index 0000000..00ce971 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_api__rosidl_typesupport_introspection_cExport-noconfig.cmake @@ -0,0 +1,19 @@ +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Import target "unitree_api::unitree_api__rosidl_typesupport_introspection_c" for configuration "" +set_property(TARGET unitree_api::unitree_api__rosidl_typesupport_introspection_c APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG) +set_target_properties(unitree_api::unitree_api__rosidl_typesupport_introspection_c PROPERTIES + IMPORTED_LOCATION_NOCONFIG "${_IMPORT_PREFIX}/lib/libunitree_api__rosidl_typesupport_introspection_c.so" + IMPORTED_SONAME_NOCONFIG "libunitree_api__rosidl_typesupport_introspection_c.so" + ) + +list(APPEND _IMPORT_CHECK_TARGETS unitree_api::unitree_api__rosidl_typesupport_introspection_c ) +list(APPEND _IMPORT_CHECK_FILES_FOR_unitree_api::unitree_api__rosidl_typesupport_introspection_c "${_IMPORT_PREFIX}/lib/libunitree_api__rosidl_typesupport_introspection_c.so" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_api__rosidl_typesupport_introspection_cExport.cmake b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_api__rosidl_typesupport_introspection_cExport.cmake new file mode 100644 index 0000000..2dde5a4 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_api__rosidl_typesupport_introspection_cExport.cmake @@ -0,0 +1,114 @@ +# Generated by CMake + +if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5) + message(FATAL_ERROR "CMake >= 2.6.0 required") +endif() +cmake_policy(PUSH) +cmake_policy(VERSION 2.6) +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Protect against multiple inclusion, which would fail when already imported targets are added once more. +set(_targetsDefined) +set(_targetsNotDefined) +set(_expectedTargets) +foreach(_expectedTarget unitree_api::unitree_api__rosidl_typesupport_introspection_c) + list(APPEND _expectedTargets ${_expectedTarget}) + if(NOT TARGET ${_expectedTarget}) + list(APPEND _targetsNotDefined ${_expectedTarget}) + endif() + if(TARGET ${_expectedTarget}) + list(APPEND _targetsDefined ${_expectedTarget}) + endif() +endforeach() +if("${_targetsDefined}" STREQUAL "${_expectedTargets}") + unset(_targetsDefined) + unset(_targetsNotDefined) + unset(_expectedTargets) + set(CMAKE_IMPORT_FILE_VERSION) + cmake_policy(POP) + return() +endif() +if(NOT "${_targetsDefined}" STREQUAL "") + message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n") +endif() +unset(_targetsDefined) +unset(_targetsNotDefined) +unset(_expectedTargets) + + +# Compute the installation prefix relative to this file. +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +if(_IMPORT_PREFIX STREQUAL "/") + set(_IMPORT_PREFIX "") +endif() + +# Create imported target unitree_api::unitree_api__rosidl_typesupport_introspection_c +add_library(unitree_api::unitree_api__rosidl_typesupport_introspection_c SHARED IMPORTED) + +set_target_properties(unitree_api::unitree_api__rosidl_typesupport_introspection_c PROPERTIES + INTERFACE_LINK_LIBRARIES "unitree_api::unitree_api__rosidl_generator_c;rosidl_typesupport_introspection_c::rosidl_typesupport_introspection_c;geometry_msgs::geometry_msgs__rosidl_generator_c;geometry_msgs::geometry_msgs__rosidl_typesupport_introspection_c;geometry_msgs::geometry_msgs__rosidl_typesupport_c;geometry_msgs::geometry_msgs__rosidl_generator_cpp;geometry_msgs::geometry_msgs__rosidl_typesupport_introspection_cpp;geometry_msgs::geometry_msgs__rosidl_typesupport_cpp;geometry_msgs::geometry_msgs__rosidl_typesupport_introspection_c;std_msgs::std_msgs__rosidl_generator_c;std_msgs::std_msgs__rosidl_typesupport_introspection_c;std_msgs::std_msgs__rosidl_typesupport_c;std_msgs::std_msgs__rosidl_generator_cpp;std_msgs::std_msgs__rosidl_typesupport_introspection_cpp;std_msgs::std_msgs__rosidl_typesupport_cpp;std_msgs::std_msgs__rosidl_typesupport_introspection_c;builtin_interfaces::builtin_interfaces__rosidl_generator_c;builtin_interfaces::builtin_interfaces__rosidl_typesupport_introspection_c;builtin_interfaces::builtin_interfaces__rosidl_typesupport_c;builtin_interfaces::builtin_interfaces__rosidl_generator_cpp;builtin_interfaces::builtin_interfaces__rosidl_typesupport_introspection_cpp;builtin_interfaces::builtin_interfaces__rosidl_typesupport_cpp;builtin_interfaces::builtin_interfaces__rosidl_typesupport_introspection_c" +) + +if(CMAKE_VERSION VERSION_LESS 2.8.12) + message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.") +endif() + +# Load information for each installed configuration. +get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +file(GLOB CONFIG_FILES "${_DIR}/unitree_api__rosidl_typesupport_introspection_cExport-*.cmake") +foreach(f ${CONFIG_FILES}) + include(${f}) +endforeach() + +# Cleanup temporary variables. +set(_IMPORT_PREFIX) + +# Loop over all imported files and verify that they actually exist +foreach(target ${_IMPORT_CHECK_TARGETS} ) + foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} ) + if(NOT EXISTS "${file}" ) + message(FATAL_ERROR "The imported target \"${target}\" references the file + \"${file}\" +but this file does not exist. Possible reasons include: +* The file was deleted, renamed, or moved to another location. +* An install or uninstall procedure did not complete successfully. +* The installation package was faulty and contained + \"${CMAKE_CURRENT_LIST_FILE}\" +but not all the files it references. +") + endif() + endforeach() + unset(_IMPORT_CHECK_FILES_FOR_${target}) +endforeach() +unset(_IMPORT_CHECK_TARGETS) + +# Make sure the targets which have been exported in some other +# export set exist. +unset(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets) +foreach(_target "unitree_api::unitree_api__rosidl_generator_c" ) + if(NOT TARGET "${_target}" ) + set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets "${${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets} ${_target}") + endif() +endforeach() + +if(DEFINED ${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets) + if(CMAKE_FIND_PACKAGE_NAME) + set( ${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE) + set( ${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "The following imported targets are referenced, but are missing: ${${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets}") + else() + message(FATAL_ERROR "The following imported targets are referenced, but are missing: ${${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets}") + endif() +endif() +unset(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) +cmake_policy(POP) diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_api__rosidl_typesupport_introspection_cppExport-noconfig.cmake b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_api__rosidl_typesupport_introspection_cppExport-noconfig.cmake new file mode 100644 index 0000000..2500f11 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_api__rosidl_typesupport_introspection_cppExport-noconfig.cmake @@ -0,0 +1,19 @@ +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Import target "unitree_api::unitree_api__rosidl_typesupport_introspection_cpp" for configuration "" +set_property(TARGET unitree_api::unitree_api__rosidl_typesupport_introspection_cpp APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG) +set_target_properties(unitree_api::unitree_api__rosidl_typesupport_introspection_cpp PROPERTIES + IMPORTED_LOCATION_NOCONFIG "${_IMPORT_PREFIX}/lib/libunitree_api__rosidl_typesupport_introspection_cpp.so" + IMPORTED_SONAME_NOCONFIG "libunitree_api__rosidl_typesupport_introspection_cpp.so" + ) + +list(APPEND _IMPORT_CHECK_TARGETS unitree_api::unitree_api__rosidl_typesupport_introspection_cpp ) +list(APPEND _IMPORT_CHECK_FILES_FOR_unitree_api::unitree_api__rosidl_typesupport_introspection_cpp "${_IMPORT_PREFIX}/lib/libunitree_api__rosidl_typesupport_introspection_cpp.so" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_api__rosidl_typesupport_introspection_cppExport.cmake b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_api__rosidl_typesupport_introspection_cppExport.cmake new file mode 100644 index 0000000..657a3e2 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/cmake/unitree_api__rosidl_typesupport_introspection_cppExport.cmake @@ -0,0 +1,98 @@ +# Generated by CMake + +if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5) + message(FATAL_ERROR "CMake >= 2.6.0 required") +endif() +cmake_policy(PUSH) +cmake_policy(VERSION 2.6) +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Protect against multiple inclusion, which would fail when already imported targets are added once more. +set(_targetsDefined) +set(_targetsNotDefined) +set(_expectedTargets) +foreach(_expectedTarget unitree_api::unitree_api__rosidl_typesupport_introspection_cpp) + list(APPEND _expectedTargets ${_expectedTarget}) + if(NOT TARGET ${_expectedTarget}) + list(APPEND _targetsNotDefined ${_expectedTarget}) + endif() + if(TARGET ${_expectedTarget}) + list(APPEND _targetsDefined ${_expectedTarget}) + endif() +endforeach() +if("${_targetsDefined}" STREQUAL "${_expectedTargets}") + unset(_targetsDefined) + unset(_targetsNotDefined) + unset(_expectedTargets) + set(CMAKE_IMPORT_FILE_VERSION) + cmake_policy(POP) + return() +endif() +if(NOT "${_targetsDefined}" STREQUAL "") + message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n") +endif() +unset(_targetsDefined) +unset(_targetsNotDefined) +unset(_expectedTargets) + + +# Compute the installation prefix relative to this file. +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +if(_IMPORT_PREFIX STREQUAL "/") + set(_IMPORT_PREFIX "") +endif() + +# Create imported target unitree_api::unitree_api__rosidl_typesupport_introspection_cpp +add_library(unitree_api::unitree_api__rosidl_typesupport_introspection_cpp SHARED IMPORTED) + +set_target_properties(unitree_api::unitree_api__rosidl_typesupport_introspection_cpp PROPERTIES + INTERFACE_LINK_LIBRARIES "rosidl_runtime_c::rosidl_runtime_c;rosidl_typesupport_interface::rosidl_typesupport_interface;rosidl_typesupport_introspection_cpp::rosidl_typesupport_introspection_cpp;geometry_msgs::geometry_msgs__rosidl_generator_c;geometry_msgs::geometry_msgs__rosidl_typesupport_introspection_c;geometry_msgs::geometry_msgs__rosidl_typesupport_c;geometry_msgs::geometry_msgs__rosidl_generator_cpp;geometry_msgs::geometry_msgs__rosidl_typesupport_introspection_cpp;geometry_msgs::geometry_msgs__rosidl_typesupport_cpp;geometry_msgs::geometry_msgs__rosidl_typesupport_introspection_cpp;std_msgs::std_msgs__rosidl_generator_c;std_msgs::std_msgs__rosidl_typesupport_introspection_c;std_msgs::std_msgs__rosidl_typesupport_c;std_msgs::std_msgs__rosidl_generator_cpp;std_msgs::std_msgs__rosidl_typesupport_introspection_cpp;std_msgs::std_msgs__rosidl_typesupport_cpp;std_msgs::std_msgs__rosidl_typesupport_introspection_cpp;builtin_interfaces::builtin_interfaces__rosidl_generator_c;builtin_interfaces::builtin_interfaces__rosidl_typesupport_introspection_c;builtin_interfaces::builtin_interfaces__rosidl_typesupport_c;builtin_interfaces::builtin_interfaces__rosidl_generator_cpp;builtin_interfaces::builtin_interfaces__rosidl_typesupport_introspection_cpp;builtin_interfaces::builtin_interfaces__rosidl_typesupport_cpp;builtin_interfaces::builtin_interfaces__rosidl_typesupport_introspection_cpp" +) + +if(CMAKE_VERSION VERSION_LESS 2.8.12) + message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.") +endif() + +# Load information for each installed configuration. +get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +file(GLOB CONFIG_FILES "${_DIR}/unitree_api__rosidl_typesupport_introspection_cppExport-*.cmake") +foreach(f ${CONFIG_FILES}) + include(${f}) +endforeach() + +# Cleanup temporary variables. +set(_IMPORT_PREFIX) + +# Loop over all imported files and verify that they actually exist +foreach(target ${_IMPORT_CHECK_TARGETS} ) + foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} ) + if(NOT EXISTS "${file}" ) + message(FATAL_ERROR "The imported target \"${target}\" references the file + \"${file}\" +but this file does not exist. Possible reasons include: +* The file was deleted, renamed, or moved to another location. +* An install or uninstall procedure did not complete successfully. +* The installation package was faulty and contained + \"${CMAKE_CURRENT_LIST_FILE}\" +but not all the files it references. +") + endif() + endforeach() + unset(_IMPORT_CHECK_FILES_FOR_${target}) +endforeach() +unset(_IMPORT_CHECK_TARGETS) + +# This file does not depend on other imported targets which have +# been exported from the same project but in a separate export set. + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) +cmake_policy(POP) diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/environment/ament_prefix_path.dsv b/deploy/robot_ws/install/unitree_api/share/unitree_api/environment/ament_prefix_path.dsv new file mode 100644 index 0000000..79d4c95 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/environment/ament_prefix_path.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;AMENT_PREFIX_PATH; diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/environment/ament_prefix_path.sh b/deploy/robot_ws/install/unitree_api/share/unitree_api/environment/ament_prefix_path.sh new file mode 100644 index 0000000..02e441b --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/environment/ament_prefix_path.sh @@ -0,0 +1,4 @@ +# copied from +# ament_cmake_core/cmake/environment_hooks/environment/ament_prefix_path.sh + +ament_prepend_unique_value AMENT_PREFIX_PATH "$AMENT_CURRENT_PREFIX" diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/environment/library_path.dsv b/deploy/robot_ws/install/unitree_api/share/unitree_api/environment/library_path.dsv new file mode 100644 index 0000000..89bec93 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/environment/library_path.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;LD_LIBRARY_PATH;lib diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/environment/library_path.sh b/deploy/robot_ws/install/unitree_api/share/unitree_api/environment/library_path.sh new file mode 100644 index 0000000..292e518 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/environment/library_path.sh @@ -0,0 +1,16 @@ +# copied from ament_package/template/environment_hook/library_path.sh + +# detect if running on Darwin platform +_UNAME=`uname -s` +_IS_DARWIN=0 +if [ "$_UNAME" = "Darwin" ]; then + _IS_DARWIN=1 +fi +unset _UNAME + +if [ $_IS_DARWIN -eq 0 ]; then + ament_prepend_unique_value LD_LIBRARY_PATH "$AMENT_CURRENT_PREFIX/lib" +else + ament_prepend_unique_value DYLD_LIBRARY_PATH "$AMENT_CURRENT_PREFIX/lib" +fi +unset _IS_DARWIN diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/environment/path.dsv b/deploy/robot_ws/install/unitree_api/share/unitree_api/environment/path.dsv new file mode 100644 index 0000000..b94426a --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/environment/path.dsv @@ -0,0 +1 @@ +prepend-non-duplicate-if-exists;PATH;bin diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/environment/path.sh b/deploy/robot_ws/install/unitree_api/share/unitree_api/environment/path.sh new file mode 100644 index 0000000..e59b749 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/environment/path.sh @@ -0,0 +1,5 @@ +# copied from ament_cmake_core/cmake/environment_hooks/environment/path.sh + +if [ -d "$AMENT_CURRENT_PREFIX/bin" ]; then + ament_prepend_unique_value PATH "$AMENT_CURRENT_PREFIX/bin" +fi diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/environment/pythonpath.dsv b/deploy/robot_ws/install/unitree_api/share/unitree_api/environment/pythonpath.dsv new file mode 100644 index 0000000..84dbc4c --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/environment/pythonpath.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;PYTHONPATH;lib/python3.8/site-packages diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/environment/pythonpath.sh b/deploy/robot_ws/install/unitree_api/share/unitree_api/environment/pythonpath.sh new file mode 100644 index 0000000..7fe2b2f --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/environment/pythonpath.sh @@ -0,0 +1,3 @@ +# generated from ament_package/template/environment_hook/pythonpath.sh.in + +ament_prepend_unique_value PYTHONPATH "$AMENT_CURRENT_PREFIX/lib/python3.8/site-packages" diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/hook/cmake_prefix_path.dsv b/deploy/robot_ws/install/unitree_api/share/unitree_api/hook/cmake_prefix_path.dsv new file mode 100644 index 0000000..e119f32 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/hook/cmake_prefix_path.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;CMAKE_PREFIX_PATH; diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/hook/cmake_prefix_path.ps1 b/deploy/robot_ws/install/unitree_api/share/unitree_api/hook/cmake_prefix_path.ps1 new file mode 100644 index 0000000..d03facc --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/hook/cmake_prefix_path.ps1 @@ -0,0 +1,3 @@ +# generated from colcon_powershell/shell/template/hook_prepend_value.ps1.em + +colcon_prepend_unique_value CMAKE_PREFIX_PATH "$env:COLCON_CURRENT_PREFIX" diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/hook/cmake_prefix_path.sh b/deploy/robot_ws/install/unitree_api/share/unitree_api/hook/cmake_prefix_path.sh new file mode 100644 index 0000000..a948e68 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/hook/cmake_prefix_path.sh @@ -0,0 +1,3 @@ +# generated from colcon_core/shell/template/hook_prepend_value.sh.em + +_colcon_prepend_unique_value CMAKE_PREFIX_PATH "$COLCON_CURRENT_PREFIX" diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/hook/ld_library_path_lib.dsv b/deploy/robot_ws/install/unitree_api/share/unitree_api/hook/ld_library_path_lib.dsv new file mode 100644 index 0000000..89bec93 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/hook/ld_library_path_lib.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;LD_LIBRARY_PATH;lib diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/hook/ld_library_path_lib.ps1 b/deploy/robot_ws/install/unitree_api/share/unitree_api/hook/ld_library_path_lib.ps1 new file mode 100644 index 0000000..f6df601 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/hook/ld_library_path_lib.ps1 @@ -0,0 +1,3 @@ +# generated from colcon_powershell/shell/template/hook_prepend_value.ps1.em + +colcon_prepend_unique_value LD_LIBRARY_PATH "$env:COLCON_CURRENT_PREFIX\lib" diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/hook/ld_library_path_lib.sh b/deploy/robot_ws/install/unitree_api/share/unitree_api/hook/ld_library_path_lib.sh new file mode 100644 index 0000000..ca3c102 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/hook/ld_library_path_lib.sh @@ -0,0 +1,3 @@ +# generated from colcon_core/shell/template/hook_prepend_value.sh.em + +_colcon_prepend_unique_value LD_LIBRARY_PATH "$COLCON_CURRENT_PREFIX/lib" diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/hook/pythonpath.dsv b/deploy/robot_ws/install/unitree_api/share/unitree_api/hook/pythonpath.dsv new file mode 100644 index 0000000..84dbc4c --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/hook/pythonpath.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;PYTHONPATH;lib/python3.8/site-packages diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/hook/pythonpath.ps1 b/deploy/robot_ws/install/unitree_api/share/unitree_api/hook/pythonpath.ps1 new file mode 100644 index 0000000..12877ef --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/hook/pythonpath.ps1 @@ -0,0 +1,3 @@ +# generated from colcon_powershell/shell/template/hook_prepend_value.ps1.em + +colcon_prepend_unique_value PYTHONPATH "$env:COLCON_CURRENT_PREFIX\lib/python3.8/site-packages" diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/hook/pythonpath.sh b/deploy/robot_ws/install/unitree_api/share/unitree_api/hook/pythonpath.sh new file mode 100644 index 0000000..ed8efd9 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/hook/pythonpath.sh @@ -0,0 +1,3 @@ +# generated from colcon_core/shell/template/hook_prepend_value.sh.em + +_colcon_prepend_unique_value PYTHONPATH "$COLCON_CURRENT_PREFIX/lib/python3.8/site-packages" diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/local_setup.bash b/deploy/robot_ws/install/unitree_api/share/unitree_api/local_setup.bash new file mode 100644 index 0000000..49782f2 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/local_setup.bash @@ -0,0 +1,46 @@ +# generated from ament_package/template/package_level/local_setup.bash.in + +# source local_setup.sh from same directory as this file +_this_path=$(builtin cd "`dirname "${BASH_SOURCE[0]}"`" && pwd) +# provide AMENT_CURRENT_PREFIX to shell script +AMENT_CURRENT_PREFIX=$(builtin cd "`dirname "${BASH_SOURCE[0]}"`/../.." && pwd) +# store AMENT_CURRENT_PREFIX to restore it before each environment hook +_package_local_setup_AMENT_CURRENT_PREFIX=$AMENT_CURRENT_PREFIX + +# trace output +if [ -n "$AMENT_TRACE_SETUP_FILES" ]; then + echo "# . \"$_this_path/local_setup.sh\"" +fi +. "$_this_path/local_setup.sh" +unset _this_path + +# unset AMENT_ENVIRONMENT_HOOKS +# if not appending to them for return +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + unset AMENT_ENVIRONMENT_HOOKS +fi + +# restore AMENT_CURRENT_PREFIX before evaluating the environment hooks +AMENT_CURRENT_PREFIX=$_package_local_setup_AMENT_CURRENT_PREFIX +# list all environment hooks of this package + +# source all shell-specific environment hooks of this package +# if not returning them +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + _package_local_setup_IFS=$IFS + IFS=":" + for _hook in $AMENT_ENVIRONMENT_HOOKS; do + # restore AMENT_CURRENT_PREFIX for each environment hook + AMENT_CURRENT_PREFIX=$_package_local_setup_AMENT_CURRENT_PREFIX + # restore IFS before sourcing other files + IFS=$_package_local_setup_IFS + . "$_hook" + done + unset _hook + IFS=$_package_local_setup_IFS + unset _package_local_setup_IFS + unset AMENT_ENVIRONMENT_HOOKS +fi + +unset _package_local_setup_AMENT_CURRENT_PREFIX +unset AMENT_CURRENT_PREFIX diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/local_setup.dsv b/deploy/robot_ws/install/unitree_api/share/unitree_api/local_setup.dsv new file mode 100644 index 0000000..3a58b11 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/local_setup.dsv @@ -0,0 +1,4 @@ +source;share/unitree_api/environment/ament_prefix_path.sh +source;share/unitree_api/environment/library_path.sh +source;share/unitree_api/environment/path.sh +source;share/unitree_api/environment/pythonpath.sh diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/local_setup.sh b/deploy/robot_ws/install/unitree_api/share/unitree_api/local_setup.sh new file mode 100644 index 0000000..81dfc27 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/local_setup.sh @@ -0,0 +1,135 @@ +# generated from ament_package/template/package_level/local_setup.sh.in + +# since this file is sourced use either the provided AMENT_CURRENT_PREFIX +# or fall back to the destination set at configure time +: ${AMENT_CURRENT_PREFIX:="/home/unitree/locomotion/Go2Py/deploy/ros2_ws/install/unitree_api"} +if [ ! -d "$AMENT_CURRENT_PREFIX" ]; then + if [ -z "$COLCON_CURRENT_PREFIX" ]; then + echo "The compile time prefix path '$AMENT_CURRENT_PREFIX' doesn't " \ + "exist. Consider sourcing a different extension than '.sh'." 1>&2 + else + AMENT_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" + fi +fi + +# function to append values to environment variables +# using colons as separators and avoiding leading separators +ament_append_value() { + # arguments + _listname="$1" + _value="$2" + #echo "listname $_listname" + #eval echo "list value \$$_listname" + #echo "value $_value" + + # avoid leading separator + eval _values=\"\$$_listname\" + if [ -z "$_values" ]; then + eval export $_listname=\"$_value\" + #eval echo "set list \$$_listname" + else + # field separator must not be a colon + _ament_append_value_IFS=$IFS + unset IFS + eval export $_listname=\"\$$_listname:$_value\" + #eval echo "append list \$$_listname" + IFS=$_ament_append_value_IFS + unset _ament_append_value_IFS + fi + unset _values + + unset _value + unset _listname +} + +# function to prepend non-duplicate values to environment variables +# using colons as separators and avoiding trailing separators +ament_prepend_unique_value() { + # arguments + _listname="$1" + _value="$2" + #echo "listname $_listname" + #eval echo "list value \$$_listname" + #echo "value $_value" + + # check if the list contains the value + eval _values=\"\$$_listname\" + _duplicate= + _ament_prepend_unique_value_IFS=$IFS + IFS=":" + if [ "$AMENT_SHELL" = "zsh" ]; then + ament_zsh_to_array _values + fi + for _item in $_values; do + # ignore empty strings + if [ -z "$_item" ]; then + continue + fi + if [ "$_item" = "$_value" ]; then + _duplicate=1 + fi + done + unset _item + + # prepend only non-duplicates + if [ -z "$_duplicate" ]; then + # avoid trailing separator + if [ -z "$_values" ]; then + eval export $_listname=\"$_value\" + #eval echo "set list \$$_listname" + else + # field separator must not be a colon + unset IFS + eval export $_listname=\"$_value:\$$_listname\" + #eval echo "prepend list \$$_listname" + fi + fi + IFS=$_ament_prepend_unique_value_IFS + unset _ament_prepend_unique_value_IFS + unset _duplicate + unset _values + + unset _value + unset _listname +} + +# unset AMENT_ENVIRONMENT_HOOKS +# if not appending to them for return +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + unset AMENT_ENVIRONMENT_HOOKS +fi + +# list all environment hooks of this package +ament_append_value AMENT_ENVIRONMENT_HOOKS "$AMENT_CURRENT_PREFIX/share/unitree_api/environment/ament_prefix_path.sh" +ament_append_value AMENT_ENVIRONMENT_HOOKS "$AMENT_CURRENT_PREFIX/share/unitree_api/environment/library_path.sh" +ament_append_value AMENT_ENVIRONMENT_HOOKS "$AMENT_CURRENT_PREFIX/share/unitree_api/environment/path.sh" +ament_append_value AMENT_ENVIRONMENT_HOOKS "$AMENT_CURRENT_PREFIX/share/unitree_api/environment/pythonpath.sh" + +# source all shell-specific environment hooks of this package +# if not returning them +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + _package_local_setup_IFS=$IFS + IFS=":" + if [ "$AMENT_SHELL" = "zsh" ]; then + ament_zsh_to_array AMENT_ENVIRONMENT_HOOKS + fi + for _hook in $AMENT_ENVIRONMENT_HOOKS; do + if [ -f "$_hook" ]; then + # restore IFS before sourcing other files + IFS=$_package_local_setup_IFS + # trace output + if [ -n "$AMENT_TRACE_SETUP_FILES" ]; then + echo "# . \"$_hook\"" + fi + . "$_hook" + fi + done + unset _hook + IFS=$_package_local_setup_IFS + unset _package_local_setup_IFS + unset AMENT_ENVIRONMENT_HOOKS +fi + +# reset AMENT_CURRENT_PREFIX after each package +# allowing to source multiple package-level setup files +unset AMENT_CURRENT_PREFIX diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/local_setup.zsh b/deploy/robot_ws/install/unitree_api/share/unitree_api/local_setup.zsh new file mode 100644 index 0000000..fe161be --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/local_setup.zsh @@ -0,0 +1,59 @@ +# generated from ament_package/template/package_level/local_setup.zsh.in + +AMENT_SHELL=zsh + +# source local_setup.sh from same directory as this file +_this_path=$(builtin cd -q "`dirname "${(%):-%N}"`" > /dev/null && pwd) +# provide AMENT_CURRENT_PREFIX to shell script +AMENT_CURRENT_PREFIX=$(builtin cd -q "`dirname "${(%):-%N}"`/../.." > /dev/null && pwd) +# store AMENT_CURRENT_PREFIX to restore it before each environment hook +_package_local_setup_AMENT_CURRENT_PREFIX=$AMENT_CURRENT_PREFIX + +# function to convert array-like strings into arrays +# to wordaround SH_WORD_SPLIT not being set +ament_zsh_to_array() { + local _listname=$1 + local _dollar="$" + local _split="{=" + local _to_array="(\"$_dollar$_split$_listname}\")" + eval $_listname=$_to_array +} + +# trace output +if [ -n "$AMENT_TRACE_SETUP_FILES" ]; then + echo "# . \"$_this_path/local_setup.sh\"" +fi +# the package-level local_setup file unsets AMENT_CURRENT_PREFIX +. "$_this_path/local_setup.sh" +unset _this_path + +# unset AMENT_ENVIRONMENT_HOOKS +# if not appending to them for return +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + unset AMENT_ENVIRONMENT_HOOKS +fi + +# restore AMENT_CURRENT_PREFIX before evaluating the environment hooks +AMENT_CURRENT_PREFIX=$_package_local_setup_AMENT_CURRENT_PREFIX +# list all environment hooks of this package + +# source all shell-specific environment hooks of this package +# if not returning them +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + _package_local_setup_IFS=$IFS + IFS=":" + for _hook in $AMENT_ENVIRONMENT_HOOKS; do + # restore AMENT_CURRENT_PREFIX for each environment hook + AMENT_CURRENT_PREFIX=$_package_local_setup_AMENT_CURRENT_PREFIX + # restore IFS before sourcing other files + IFS=$_package_local_setup_IFS + . "$_hook" + done + unset _hook + IFS=$_package_local_setup_IFS + unset _package_local_setup_IFS + unset AMENT_ENVIRONMENT_HOOKS +fi + +unset _package_local_setup_AMENT_CURRENT_PREFIX +unset AMENT_CURRENT_PREFIX diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/Request.idl b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/Request.idl new file mode 100644 index 0000000..7ffe0f0 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/Request.idl @@ -0,0 +1,17 @@ +// generated from rosidl_adapter/resource/msg.idl.em +// with input from unitree_api/msg/Request.msg +// generated code does not contain a copyright notice + +#include "unitree_api/msg/RequestHeader.idl" + +module unitree_api { + module msg { + struct Request { + unitree_api::msg::RequestHeader header; + + string parameter; + + sequence binary; + }; + }; +}; diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/Request.msg b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/Request.msg new file mode 100644 index 0000000..b1df58a --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/Request.msg @@ -0,0 +1,3 @@ +RequestHeader header +string parameter +uint8[] binary \ No newline at end of file diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/RequestHeader.idl b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/RequestHeader.idl new file mode 100644 index 0000000..97d6987 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/RequestHeader.idl @@ -0,0 +1,19 @@ +// generated from rosidl_adapter/resource/msg.idl.em +// with input from unitree_api/msg/RequestHeader.msg +// generated code does not contain a copyright notice + +#include "unitree_api/msg/RequestIdentity.idl" +#include "unitree_api/msg/RequestLease.idl" +#include "unitree_api/msg/RequestPolicy.idl" + +module unitree_api { + module msg { + struct RequestHeader { + unitree_api::msg::RequestIdentity identity; + + unitree_api::msg::RequestLease lease; + + unitree_api::msg::RequestPolicy policy; + }; + }; +}; diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/RequestHeader.msg b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/RequestHeader.msg new file mode 100644 index 0000000..022161b --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/RequestHeader.msg @@ -0,0 +1,3 @@ +RequestIdentity identity +RequestLease lease +RequestPolicy policy \ No newline at end of file diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/RequestIdentity.idl b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/RequestIdentity.idl new file mode 100644 index 0000000..2ead946 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/RequestIdentity.idl @@ -0,0 +1,14 @@ +// generated from rosidl_adapter/resource/msg.idl.em +// with input from unitree_api/msg/RequestIdentity.msg +// generated code does not contain a copyright notice + + +module unitree_api { + module msg { + struct RequestIdentity { + int64 id; + + int64 api_id; + }; + }; +}; diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/RequestIdentity.msg b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/RequestIdentity.msg new file mode 100644 index 0000000..90011ff --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/RequestIdentity.msg @@ -0,0 +1,2 @@ +int64 id +int64 api_id \ No newline at end of file diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/RequestLease.idl b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/RequestLease.idl new file mode 100644 index 0000000..698449e --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/RequestLease.idl @@ -0,0 +1,12 @@ +// generated from rosidl_adapter/resource/msg.idl.em +// with input from unitree_api/msg/RequestLease.msg +// generated code does not contain a copyright notice + + +module unitree_api { + module msg { + struct RequestLease { + int64 id; + }; + }; +}; diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/RequestLease.msg b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/RequestLease.msg new file mode 100644 index 0000000..85f692f --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/RequestLease.msg @@ -0,0 +1 @@ +int64 id \ No newline at end of file diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/RequestPolicy.idl b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/RequestPolicy.idl new file mode 100644 index 0000000..ff73905 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/RequestPolicy.idl @@ -0,0 +1,14 @@ +// generated from rosidl_adapter/resource/msg.idl.em +// with input from unitree_api/msg/RequestPolicy.msg +// generated code does not contain a copyright notice + + +module unitree_api { + module msg { + struct RequestPolicy { + int32 priority; + + boolean noreply; + }; + }; +}; diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/RequestPolicy.msg b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/RequestPolicy.msg new file mode 100644 index 0000000..89e00c2 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/RequestPolicy.msg @@ -0,0 +1,2 @@ +int32 priority +bool noreply \ No newline at end of file diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/Response.idl b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/Response.idl new file mode 100644 index 0000000..59ac745 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/Response.idl @@ -0,0 +1,17 @@ +// generated from rosidl_adapter/resource/msg.idl.em +// with input from unitree_api/msg/Response.msg +// generated code does not contain a copyright notice + +#include "unitree_api/msg/ResponseHeader.idl" + +module unitree_api { + module msg { + struct Response { + unitree_api::msg::ResponseHeader header; + + string data; + + sequence binary; + }; + }; +}; diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/Response.msg b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/Response.msg new file mode 100644 index 0000000..2036630 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/Response.msg @@ -0,0 +1,3 @@ +ResponseHeader header +string data +int8[] binary diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/ResponseHeader.idl b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/ResponseHeader.idl new file mode 100644 index 0000000..de1dd0c --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/ResponseHeader.idl @@ -0,0 +1,16 @@ +// generated from rosidl_adapter/resource/msg.idl.em +// with input from unitree_api/msg/ResponseHeader.msg +// generated code does not contain a copyright notice + +#include "unitree_api/msg/RequestIdentity.idl" +#include "unitree_api/msg/ResponseStatus.idl" + +module unitree_api { + module msg { + struct ResponseHeader { + unitree_api::msg::RequestIdentity identity; + + unitree_api::msg::ResponseStatus status; + }; + }; +}; diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/ResponseHeader.msg b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/ResponseHeader.msg new file mode 100644 index 0000000..3d51649 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/ResponseHeader.msg @@ -0,0 +1,2 @@ +RequestIdentity identity +ResponseStatus status diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/ResponseStatus.idl b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/ResponseStatus.idl new file mode 100644 index 0000000..6d6fcad --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/ResponseStatus.idl @@ -0,0 +1,12 @@ +// generated from rosidl_adapter/resource/msg.idl.em +// with input from unitree_api/msg/ResponseStatus.msg +// generated code does not contain a copyright notice + + +module unitree_api { + module msg { + struct ResponseStatus { + int32 code; + }; + }; +}; diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/ResponseStatus.msg b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/ResponseStatus.msg new file mode 100644 index 0000000..1d379fa --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/ResponseStatus.msg @@ -0,0 +1 @@ +int32 code \ No newline at end of file diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/dds_connext/RequestHeader_.idl b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/dds_connext/RequestHeader_.idl new file mode 100644 index 0000000..8493ad2 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/dds_connext/RequestHeader_.idl @@ -0,0 +1,34 @@ +// generated from rosidl_generator_dds_idl/resource/idl.idl.em +// with input from unitree_api:msg/RequestHeader.idl +// generated code does not contain a copyright notice +#include "unitree_api/msg/dds_connext/RequestIdentity_.idl" +#include "unitree_api/msg/dds_connext/RequestLease_.idl" +#include "unitree_api/msg/dds_connext/RequestPolicy_.idl" + +#ifndef __unitree_api__msg__request_header__idl__ +#define __unitree_api__msg__request_header__idl__ + + +module unitree_api { + +module msg { + +module dds_ { + + +struct RequestHeader_ { +unitree_api::msg::dds_::RequestIdentity_ identity_; +unitree_api::msg::dds_::RequestLease_ lease_; +unitree_api::msg::dds_::RequestPolicy_ policy_; + +}; + + +}; // module dds_ + +}; // module msg + +}; // module unitree_api + + +#endif // __unitree_api__msg__request_header__idl__ diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/dds_connext/RequestIdentity_.idl b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/dds_connext/RequestIdentity_.idl new file mode 100644 index 0000000..dc65c91 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/dds_connext/RequestIdentity_.idl @@ -0,0 +1,30 @@ +// generated from rosidl_generator_dds_idl/resource/idl.idl.em +// with input from unitree_api:msg/RequestIdentity.idl +// generated code does not contain a copyright notice + +#ifndef __unitree_api__msg__request_identity__idl__ +#define __unitree_api__msg__request_identity__idl__ + + +module unitree_api { + +module msg { + +module dds_ { + + +struct RequestIdentity_ { +long long id_; +long long api_id_; + +}; + + +}; // module dds_ + +}; // module msg + +}; // module unitree_api + + +#endif // __unitree_api__msg__request_identity__idl__ diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/dds_connext/RequestLease_.idl b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/dds_connext/RequestLease_.idl new file mode 100644 index 0000000..fdb7980 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/dds_connext/RequestLease_.idl @@ -0,0 +1,29 @@ +// generated from rosidl_generator_dds_idl/resource/idl.idl.em +// with input from unitree_api:msg/RequestLease.idl +// generated code does not contain a copyright notice + +#ifndef __unitree_api__msg__request_lease__idl__ +#define __unitree_api__msg__request_lease__idl__ + + +module unitree_api { + +module msg { + +module dds_ { + + +struct RequestLease_ { +long long id_; + +}; + + +}; // module dds_ + +}; // module msg + +}; // module unitree_api + + +#endif // __unitree_api__msg__request_lease__idl__ diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/dds_connext/RequestPolicy_.idl b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/dds_connext/RequestPolicy_.idl new file mode 100644 index 0000000..9181d63 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/dds_connext/RequestPolicy_.idl @@ -0,0 +1,30 @@ +// generated from rosidl_generator_dds_idl/resource/idl.idl.em +// with input from unitree_api:msg/RequestPolicy.idl +// generated code does not contain a copyright notice + +#ifndef __unitree_api__msg__request_policy__idl__ +#define __unitree_api__msg__request_policy__idl__ + + +module unitree_api { + +module msg { + +module dds_ { + + +struct RequestPolicy_ { +long priority_; +boolean noreply_; + +}; + + +}; // module dds_ + +}; // module msg + +}; // module unitree_api + + +#endif // __unitree_api__msg__request_policy__idl__ diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/dds_connext/Request_.idl b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/dds_connext/Request_.idl new file mode 100644 index 0000000..0a99414 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/dds_connext/Request_.idl @@ -0,0 +1,33 @@ +// generated from rosidl_generator_dds_idl/resource/idl.idl.em +// with input from unitree_api:msg/Request.idl +// generated code does not contain a copyright notice +#include "unitree_api/msg/dds_connext/RequestHeader_.idl" + +#ifndef __unitree_api__msg__request__idl__ +#define __unitree_api__msg__request__idl__ + + +module unitree_api { + +module msg { + +module dds_ { + + +struct Request_ { +unitree_api::msg::dds_::RequestHeader_ header_; +string parameter_; +sequence binary_; + + +}; + + +}; // module dds_ + +}; // module msg + +}; // module unitree_api + + +#endif // __unitree_api__msg__request__idl__ diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/dds_connext/ResponseHeader_.idl b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/dds_connext/ResponseHeader_.idl new file mode 100644 index 0000000..4bd3912 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/dds_connext/ResponseHeader_.idl @@ -0,0 +1,32 @@ +// generated from rosidl_generator_dds_idl/resource/idl.idl.em +// with input from unitree_api:msg/ResponseHeader.idl +// generated code does not contain a copyright notice +#include "unitree_api/msg/dds_connext/RequestIdentity_.idl" +#include "unitree_api/msg/dds_connext/ResponseStatus_.idl" + +#ifndef __unitree_api__msg__response_header__idl__ +#define __unitree_api__msg__response_header__idl__ + + +module unitree_api { + +module msg { + +module dds_ { + + +struct ResponseHeader_ { +unitree_api::msg::dds_::RequestIdentity_ identity_; +unitree_api::msg::dds_::ResponseStatus_ status_; + +}; + + +}; // module dds_ + +}; // module msg + +}; // module unitree_api + + +#endif // __unitree_api__msg__response_header__idl__ diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/dds_connext/ResponseStatus_.idl b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/dds_connext/ResponseStatus_.idl new file mode 100644 index 0000000..a7e1fea --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/dds_connext/ResponseStatus_.idl @@ -0,0 +1,29 @@ +// generated from rosidl_generator_dds_idl/resource/idl.idl.em +// with input from unitree_api:msg/ResponseStatus.idl +// generated code does not contain a copyright notice + +#ifndef __unitree_api__msg__response_status__idl__ +#define __unitree_api__msg__response_status__idl__ + + +module unitree_api { + +module msg { + +module dds_ { + + +struct ResponseStatus_ { +long code_; + +}; + + +}; // module dds_ + +}; // module msg + +}; // module unitree_api + + +#endif // __unitree_api__msg__response_status__idl__ diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/dds_connext/Response_.idl b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/dds_connext/Response_.idl new file mode 100644 index 0000000..49947ff --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/msg/dds_connext/Response_.idl @@ -0,0 +1,33 @@ +// generated from rosidl_generator_dds_idl/resource/idl.idl.em +// with input from unitree_api:msg/Response.idl +// generated code does not contain a copyright notice +#include "unitree_api/msg/dds_connext/ResponseHeader_.idl" + +#ifndef __unitree_api__msg__response__idl__ +#define __unitree_api__msg__response__idl__ + + +module unitree_api { + +module msg { + +module dds_ { + + +struct Response_ { +unitree_api::msg::dds_::ResponseHeader_ header_; +string data_; +sequence binary_; + + +}; + + +}; // module dds_ + +}; // module msg + +}; // module unitree_api + + +#endif // __unitree_api__msg__response__idl__ diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/package.bash b/deploy/robot_ws/install/unitree_api/share/unitree_api/package.bash new file mode 100644 index 0000000..b8b8f51 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/package.bash @@ -0,0 +1,39 @@ +# generated from colcon_bash/shell/template/package.bash.em + +# This script extends the environment for this package. + +# a bash script is able to determine its own path if necessary +if [ -z "$COLCON_CURRENT_PREFIX" ]; then + # the prefix is two levels up from the package specific share directory + _colcon_package_bash_COLCON_CURRENT_PREFIX="$(builtin cd "`dirname "${BASH_SOURCE[0]}"`/../.." > /dev/null && pwd)" +else + _colcon_package_bash_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" +fi + +# function to source another script with conditional trace output +# first argument: the path of the script +# additional arguments: arguments to the script +_colcon_package_bash_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo "# . \"$1\"" + fi + . "$@" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# source sh script of this package +_colcon_package_bash_source_script "$_colcon_package_bash_COLCON_CURRENT_PREFIX/share/unitree_api/package.sh" + +# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced scripts +COLCON_CURRENT_PREFIX="$_colcon_package_bash_COLCON_CURRENT_PREFIX" + +# source bash hooks +_colcon_package_bash_source_script "$COLCON_CURRENT_PREFIX/share/unitree_api/local_setup.bash" + +unset COLCON_CURRENT_PREFIX + +unset _colcon_package_bash_source_script +unset _colcon_package_bash_COLCON_CURRENT_PREFIX diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/package.dsv b/deploy/robot_ws/install/unitree_api/share/unitree_api/package.dsv new file mode 100644 index 0000000..656bd50 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/package.dsv @@ -0,0 +1,14 @@ +source;share/unitree_api/hook/cmake_prefix_path.ps1 +source;share/unitree_api/hook/cmake_prefix_path.dsv +source;share/unitree_api/hook/cmake_prefix_path.sh +source;share/unitree_api/hook/ld_library_path_lib.ps1 +source;share/unitree_api/hook/ld_library_path_lib.dsv +source;share/unitree_api/hook/ld_library_path_lib.sh +source;share/unitree_api/hook/pythonpath.ps1 +source;share/unitree_api/hook/pythonpath.dsv +source;share/unitree_api/hook/pythonpath.sh +source;share/unitree_api/local_setup.bash +source;share/unitree_api/local_setup.dsv +source;share/unitree_api/local_setup.ps1 +source;share/unitree_api/local_setup.sh +source;share/unitree_api/local_setup.zsh diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/package.ps1 b/deploy/robot_ws/install/unitree_api/share/unitree_api/package.ps1 new file mode 100644 index 0000000..fb211f8 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/package.ps1 @@ -0,0 +1,118 @@ +# generated from colcon_powershell/shell/template/package.ps1.em + +# function to append a value to a variable +# which uses colons as separators +# duplicates as well as leading separators are avoided +# first argument: the name of the result variable +# second argument: the value to be prepended +function colcon_append_unique_value { + param ( + $_listname, + $_value + ) + + # get values from variable + if (Test-Path Env:$_listname) { + $_values=(Get-Item env:$_listname).Value + } else { + $_values="" + } + $_duplicate="" + # start with no values + $_all_values="" + # iterate over existing values in the variable + if ($_values) { + $_values.Split(";") | ForEach { + # not an empty string + if ($_) { + # not a duplicate of _value + if ($_ -eq $_value) { + $_duplicate="1" + } + if ($_all_values) { + $_all_values="${_all_values};$_" + } else { + $_all_values="$_" + } + } + } + } + # append only non-duplicates + if (!$_duplicate) { + # avoid leading separator + if ($_all_values) { + $_all_values="${_all_values};${_value}" + } else { + $_all_values="${_value}" + } + } + + # export the updated variable + Set-Item env:\$_listname -Value "$_all_values" +} + +# function to prepend a value to a variable +# which uses colons as separators +# duplicates as well as trailing separators are avoided +# first argument: the name of the result variable +# second argument: the value to be prepended +function colcon_prepend_unique_value { + param ( + $_listname, + $_value + ) + + # get values from variable + if (Test-Path Env:$_listname) { + $_values=(Get-Item env:$_listname).Value + } else { + $_values="" + } + # start with the new value + $_all_values="$_value" + # iterate over existing values in the variable + if ($_values) { + $_values.Split(";") | ForEach { + # not an empty string + if ($_) { + # not a duplicate of _value + if ($_ -ne $_value) { + # keep non-duplicate values + $_all_values="${_all_values};$_" + } + } + } + } + # export the updated variable + Set-Item env:\$_listname -Value "$_all_values" +} + +# function to source another script with conditional trace output +# first argument: the path of the script +# additional arguments: arguments to the script +function colcon_package_source_powershell_script { + param ( + $_colcon_package_source_powershell_script + ) + # source script with conditional trace output + if (Test-Path $_colcon_package_source_powershell_script) { + if ($env:COLCON_TRACE) { + echo ". '$_colcon_package_source_powershell_script'" + } + . "$_colcon_package_source_powershell_script" + } else { + Write-Error "not found: '$_colcon_package_source_powershell_script'" + } +} + + +# a powershell script is able to determine its own path +# the prefix is two levels up from the package specific share directory +$env:COLCON_CURRENT_PREFIX=(Get-Item $PSCommandPath).Directory.Parent.Parent.FullName + +colcon_package_source_powershell_script "$env:COLCON_CURRENT_PREFIX\share/unitree_api/hook/cmake_prefix_path.ps1" +colcon_package_source_powershell_script "$env:COLCON_CURRENT_PREFIX\share/unitree_api/hook/ld_library_path_lib.ps1" +colcon_package_source_powershell_script "$env:COLCON_CURRENT_PREFIX\share/unitree_api/hook/pythonpath.ps1" +colcon_package_source_powershell_script "$env:COLCON_CURRENT_PREFIX\share/unitree_api/local_setup.ps1" + +Remove-Item Env:\COLCON_CURRENT_PREFIX diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/package.sh b/deploy/robot_ws/install/unitree_api/share/unitree_api/package.sh new file mode 100644 index 0000000..a2f8237 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/package.sh @@ -0,0 +1,89 @@ +# generated from colcon_core/shell/template/package.sh.em + +# This script extends the environment for this package. + +# function to prepend a value to a variable +# which uses colons as separators +# duplicates as well as trailing separators are avoided +# first argument: the name of the result variable +# second argument: the value to be prepended +_colcon_prepend_unique_value() { + # arguments + _listname="$1" + _value="$2" + + # get values from variable + eval _values=\"\$$_listname\" + # backup the field separator + _colcon_prepend_unique_value_IFS=$IFS + IFS=":" + # start with the new value + _all_values="$_value" + # workaround SH_WORD_SPLIT not being set in zsh + if [ "$(command -v colcon_zsh_convert_to_array)" ]; then + colcon_zsh_convert_to_array _values + fi + # iterate over existing values in the variable + for _item in $_values; do + # ignore empty strings + if [ -z "$_item" ]; then + continue + fi + # ignore duplicates of _value + if [ "$_item" = "$_value" ]; then + continue + fi + # keep non-duplicate values + _all_values="$_all_values:$_item" + done + unset _item + # restore the field separator + IFS=$_colcon_prepend_unique_value_IFS + unset _colcon_prepend_unique_value_IFS + # export the updated variable + eval export $_listname=\"$_all_values\" + unset _all_values + unset _values + + unset _value + unset _listname +} + +# since a plain shell script can't determine its own path when being sourced +# either use the provided COLCON_CURRENT_PREFIX +# or fall back to the build time prefix (if it exists) +_colcon_package_sh_COLCON_CURRENT_PREFIX="/home/unitree/locomotion/Go2Py/deploy/ros2_ws/install/unitree_api" +if [ -z "$COLCON_CURRENT_PREFIX" ]; then + if [ ! -d "$_colcon_package_sh_COLCON_CURRENT_PREFIX" ]; then + echo "The build time path \"$_colcon_package_sh_COLCON_CURRENT_PREFIX\" doesn't exist. Either source a script for a different shell or set the environment variable \"COLCON_CURRENT_PREFIX\" explicitly." 1>&2 + unset _colcon_package_sh_COLCON_CURRENT_PREFIX + return 1 + fi + COLCON_CURRENT_PREFIX="$_colcon_package_sh_COLCON_CURRENT_PREFIX" +fi +unset _colcon_package_sh_COLCON_CURRENT_PREFIX + +# function to source another script with conditional trace output +# first argument: the path of the script +# additional arguments: arguments to the script +_colcon_package_sh_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo "# . \"$1\"" + fi + . "$@" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# source sh hooks +_colcon_package_sh_source_script "$COLCON_CURRENT_PREFIX/share/unitree_api/hook/cmake_prefix_path.sh" +_colcon_package_sh_source_script "$COLCON_CURRENT_PREFIX/share/unitree_api/hook/ld_library_path_lib.sh" +_colcon_package_sh_source_script "$COLCON_CURRENT_PREFIX/share/unitree_api/hook/pythonpath.sh" +_colcon_package_sh_source_script "$COLCON_CURRENT_PREFIX/share/unitree_api/local_setup.sh" + +unset _colcon_package_sh_source_script +unset COLCON_CURRENT_PREFIX + +# do not unset _colcon_prepend_unique_value since it might be used by non-primary shell hooks diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/package.xml b/deploy/robot_ws/install/unitree_api/share/unitree_api/package.xml new file mode 100644 index 0000000..915a946 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/package.xml @@ -0,0 +1,23 @@ + + + + unitree_api + 0.0.0 + TODO: Package description + czk + TODO: License declaration + + rosidl_default_generators + rosidl_default_runtime + rosidl_interface_packages + ament_cmake + + geometry_msgs + + ament_lint_auto + ament_lint_common + + + ament_cmake + + diff --git a/deploy/robot_ws/install/unitree_api/share/unitree_api/package.zsh b/deploy/robot_ws/install/unitree_api/share/unitree_api/package.zsh new file mode 100644 index 0000000..880fd38 --- /dev/null +++ b/deploy/robot_ws/install/unitree_api/share/unitree_api/package.zsh @@ -0,0 +1,50 @@ +# generated from colcon_zsh/shell/template/package.zsh.em + +# This script extends the environment for this package. + +# a zsh script is able to determine its own path if necessary +if [ -z "$COLCON_CURRENT_PREFIX" ]; then + # the prefix is two levels up from the package specific share directory + _colcon_package_zsh_COLCON_CURRENT_PREFIX="$(builtin cd -q "`dirname "${(%):-%N}"`/../.." > /dev/null && pwd)" +else + _colcon_package_zsh_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" +fi + +# function to source another script with conditional trace output +# first argument: the path of the script +# additional arguments: arguments to the script +_colcon_package_zsh_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo "# . \"$1\"" + fi + . "$@" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# function to convert array-like strings into arrays +# to workaround SH_WORD_SPLIT not being set +colcon_zsh_convert_to_array() { + local _listname=$1 + local _dollar="$" + local _split="{=" + local _to_array="(\"$_dollar$_split$_listname}\")" + eval $_listname=$_to_array +} + +# source sh script of this package +_colcon_package_zsh_source_script "$_colcon_package_zsh_COLCON_CURRENT_PREFIX/share/unitree_api/package.sh" +unset convert_zsh_to_array + +# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced scripts +COLCON_CURRENT_PREFIX="$_colcon_package_zsh_COLCON_CURRENT_PREFIX" + +# source zsh hooks +_colcon_package_zsh_source_script "$COLCON_CURRENT_PREFIX/share/unitree_api/local_setup.zsh" + +unset COLCON_CURRENT_PREFIX + +unset _colcon_package_zsh_source_script +unset _colcon_package_zsh_COLCON_CURRENT_PREFIX diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/audio_data.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/audio_data.h new file mode 100644 index 0000000..0e53b0c --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/audio_data.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from unitree_go:msg/AudioData.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__AUDIO_DATA_H_ +#define UNITREE_GO__MSG__AUDIO_DATA_H_ + +#include "unitree_go/msg/detail/audio_data__struct.h" +#include "unitree_go/msg/detail/audio_data__functions.h" +#include "unitree_go/msg/detail/audio_data__type_support.h" + +#endif // UNITREE_GO__MSG__AUDIO_DATA_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/audio_data.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/audio_data.hpp new file mode 100644 index 0000000..cd0bece --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/audio_data.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__AUDIO_DATA_HPP_ +#define UNITREE_GO__MSG__AUDIO_DATA_HPP_ + +#include "unitree_go/msg/detail/audio_data__struct.hpp" +#include "unitree_go/msg/detail/audio_data__builder.hpp" +#include "unitree_go/msg/detail/audio_data__traits.hpp" +#include "unitree_go/msg/detail/audio_data__type_support.hpp" + +#endif // UNITREE_GO__MSG__AUDIO_DATA_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/bms_cmd.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/bms_cmd.h new file mode 100644 index 0000000..f2e734f --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/bms_cmd.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from unitree_go:msg/BmsCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__BMS_CMD_H_ +#define UNITREE_GO__MSG__BMS_CMD_H_ + +#include "unitree_go/msg/detail/bms_cmd__struct.h" +#include "unitree_go/msg/detail/bms_cmd__functions.h" +#include "unitree_go/msg/detail/bms_cmd__type_support.h" + +#endif // UNITREE_GO__MSG__BMS_CMD_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/bms_cmd.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/bms_cmd.hpp new file mode 100644 index 0000000..3dc6de1 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/bms_cmd.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__BMS_CMD_HPP_ +#define UNITREE_GO__MSG__BMS_CMD_HPP_ + +#include "unitree_go/msg/detail/bms_cmd__struct.hpp" +#include "unitree_go/msg/detail/bms_cmd__builder.hpp" +#include "unitree_go/msg/detail/bms_cmd__traits.hpp" +#include "unitree_go/msg/detail/bms_cmd__type_support.hpp" + +#endif // UNITREE_GO__MSG__BMS_CMD_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/bms_state.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/bms_state.h new file mode 100644 index 0000000..02a74a8 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/bms_state.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from unitree_go:msg/BmsState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__BMS_STATE_H_ +#define UNITREE_GO__MSG__BMS_STATE_H_ + +#include "unitree_go/msg/detail/bms_state__struct.h" +#include "unitree_go/msg/detail/bms_state__functions.h" +#include "unitree_go/msg/detail/bms_state__type_support.h" + +#endif // UNITREE_GO__MSG__BMS_STATE_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/bms_state.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/bms_state.hpp new file mode 100644 index 0000000..f22e8aa --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/bms_state.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__BMS_STATE_HPP_ +#define UNITREE_GO__MSG__BMS_STATE_HPP_ + +#include "unitree_go/msg/detail/bms_state__struct.hpp" +#include "unitree_go/msg/detail/bms_state__builder.hpp" +#include "unitree_go/msg/detail/bms_state__traits.hpp" +#include "unitree_go/msg/detail/bms_state__type_support.hpp" + +#endif // UNITREE_GO__MSG__BMS_STATE_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__builder.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__builder.hpp new file mode 100644 index 0000000..2669aa0 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__builder.hpp @@ -0,0 +1,71 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from unitree_go:msg/AudioData.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__AUDIO_DATA__BUILDER_HPP_ +#define UNITREE_GO__MSG__DETAIL__AUDIO_DATA__BUILDER_HPP_ + +#include "unitree_go/msg/detail/audio_data__struct.hpp" +#include +#include +#include + + +namespace unitree_go +{ + +namespace msg +{ + +namespace builder +{ + +class Init_AudioData_data +{ +public: + explicit Init_AudioData_data(::unitree_go::msg::AudioData & msg) + : msg_(msg) + {} + ::unitree_go::msg::AudioData data(::unitree_go::msg::AudioData::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::unitree_go::msg::AudioData msg_; +}; + +class Init_AudioData_time_frame +{ +public: + Init_AudioData_time_frame() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_AudioData_data time_frame(::unitree_go::msg::AudioData::_time_frame_type arg) + { + msg_.time_frame = std::move(arg); + return Init_AudioData_data(msg_); + } + +private: + ::unitree_go::msg::AudioData msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::unitree_go::msg::AudioData>() +{ + return unitree_go::msg::builder::Init_AudioData_time_frame(); +} + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__AUDIO_DATA__BUILDER_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__functions.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__functions.c new file mode 100644 index 0000000..a7609a8 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__functions.c @@ -0,0 +1,254 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from unitree_go:msg/AudioData.idl +// generated code does not contain a copyright notice +#include "unitree_go/msg/detail/audio_data__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +bool +unitree_go__msg__AudioData__init(unitree_go__msg__AudioData * msg) +{ + if (!msg) { + return false; + } + // time_frame + // data + if (!rosidl_runtime_c__uint8__Sequence__init(&msg->data, 0)) { + unitree_go__msg__AudioData__fini(msg); + return false; + } + return true; +} + +void +unitree_go__msg__AudioData__fini(unitree_go__msg__AudioData * msg) +{ + if (!msg) { + return; + } + // time_frame + // data + rosidl_runtime_c__uint8__Sequence__fini(&msg->data); +} + +bool +unitree_go__msg__AudioData__are_equal(const unitree_go__msg__AudioData * lhs, const unitree_go__msg__AudioData * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // time_frame + if (lhs->time_frame != rhs->time_frame) { + return false; + } + // data + if (!rosidl_runtime_c__uint8__Sequence__are_equal( + &(lhs->data), &(rhs->data))) + { + return false; + } + return true; +} + +bool +unitree_go__msg__AudioData__copy( + const unitree_go__msg__AudioData * input, + unitree_go__msg__AudioData * output) +{ + if (!input || !output) { + return false; + } + // time_frame + output->time_frame = input->time_frame; + // data + if (!rosidl_runtime_c__uint8__Sequence__copy( + &(input->data), &(output->data))) + { + return false; + } + return true; +} + +unitree_go__msg__AudioData * +unitree_go__msg__AudioData__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__AudioData * msg = (unitree_go__msg__AudioData *)allocator.allocate(sizeof(unitree_go__msg__AudioData), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(unitree_go__msg__AudioData)); + bool success = unitree_go__msg__AudioData__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +unitree_go__msg__AudioData__destroy(unitree_go__msg__AudioData * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + unitree_go__msg__AudioData__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +unitree_go__msg__AudioData__Sequence__init(unitree_go__msg__AudioData__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__AudioData * data = NULL; + + if (size) { + data = (unitree_go__msg__AudioData *)allocator.zero_allocate(size, sizeof(unitree_go__msg__AudioData), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = unitree_go__msg__AudioData__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + unitree_go__msg__AudioData__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +unitree_go__msg__AudioData__Sequence__fini(unitree_go__msg__AudioData__Sequence * array) +{ + if (!array) { + return; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + + if (array->data) { + // ensure that data and capacity values are consistent + assert(array->capacity > 0); + // finalize all array elements + for (size_t i = 0; i < array->capacity; ++i) { + unitree_go__msg__AudioData__fini(&array->data[i]); + } + allocator.deallocate(array->data, allocator.state); + array->data = NULL; + array->size = 0; + array->capacity = 0; + } else { + // ensure that data, size, and capacity values are consistent + assert(0 == array->size); + assert(0 == array->capacity); + } +} + +unitree_go__msg__AudioData__Sequence * +unitree_go__msg__AudioData__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__AudioData__Sequence * array = (unitree_go__msg__AudioData__Sequence *)allocator.allocate(sizeof(unitree_go__msg__AudioData__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = unitree_go__msg__AudioData__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +unitree_go__msg__AudioData__Sequence__destroy(unitree_go__msg__AudioData__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + unitree_go__msg__AudioData__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +unitree_go__msg__AudioData__Sequence__are_equal(const unitree_go__msg__AudioData__Sequence * lhs, const unitree_go__msg__AudioData__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!unitree_go__msg__AudioData__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +unitree_go__msg__AudioData__Sequence__copy( + const unitree_go__msg__AudioData__Sequence * input, + unitree_go__msg__AudioData__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(unitree_go__msg__AudioData); + unitree_go__msg__AudioData * data = + (unitree_go__msg__AudioData *)realloc(output->data, allocation_size); + if (!data) { + return false; + } + for (size_t i = output->capacity; i < input->size; ++i) { + if (!unitree_go__msg__AudioData__init(&data[i])) { + /* free currently allocated and return false */ + for (; i-- > output->capacity; ) { + unitree_go__msg__AudioData__fini(&data[i]); + } + free(data); + return false; + } + } + output->data = data; + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!unitree_go__msg__AudioData__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__functions.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__functions.h new file mode 100644 index 0000000..08f4495 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from unitree_go:msg/AudioData.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__AUDIO_DATA__FUNCTIONS_H_ +#define UNITREE_GO__MSG__DETAIL__AUDIO_DATA__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#include "unitree_go/msg/detail/audio_data__struct.h" + +/// Initialize msg/AudioData message. +/** + * If the init function is called twice for the same message without + * calling fini inbetween previously allocated memory will be leaked. + * \param[in,out] msg The previously allocated message pointer. + * Fields without a default value will not be initialized by this function. + * You might want to call memset(msg, 0, sizeof( + * unitree_go__msg__AudioData + * )) before or use + * unitree_go__msg__AudioData__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__AudioData__init(unitree_go__msg__AudioData * msg); + +/// Finalize msg/AudioData message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__AudioData__fini(unitree_go__msg__AudioData * msg); + +/// Create msg/AudioData message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * unitree_go__msg__AudioData__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__AudioData * +unitree_go__msg__AudioData__create(); + +/// Destroy msg/AudioData message. +/** + * It calls + * unitree_go__msg__AudioData__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__AudioData__destroy(unitree_go__msg__AudioData * msg); + +/// Check for msg/AudioData message equality. +/** + * \param[in] lhs The message on the left hand size of the equality operator. + * \param[in] rhs The message on the right hand size of the equality operator. + * \return true if messages are equal, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__AudioData__are_equal(const unitree_go__msg__AudioData * lhs, const unitree_go__msg__AudioData * rhs); + +/// Copy a msg/AudioData message. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source message pointer. + * \param[out] output The target message pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer is null + * or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__AudioData__copy( + const unitree_go__msg__AudioData * input, + unitree_go__msg__AudioData * output); + +/// Initialize array of msg/AudioData messages. +/** + * It allocates the memory for the number of elements and calls + * unitree_go__msg__AudioData__init() + * for each element of the array. + * \param[in,out] array The allocated array pointer. + * \param[in] size The size / capacity of the array. + * \return true if initialization was successful, otherwise false + * If the array pointer is valid and the size is zero it is guaranteed + # to return true. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__AudioData__Sequence__init(unitree_go__msg__AudioData__Sequence * array, size_t size); + +/// Finalize array of msg/AudioData messages. +/** + * It calls + * unitree_go__msg__AudioData__fini() + * for each element of the array and frees the memory for the number of + * elements. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__AudioData__Sequence__fini(unitree_go__msg__AudioData__Sequence * array); + +/// Create array of msg/AudioData messages. +/** + * It allocates the memory for the array and calls + * unitree_go__msg__AudioData__Sequence__init(). + * \param[in] size The size / capacity of the array. + * \return The pointer to the initialized array if successful, otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__AudioData__Sequence * +unitree_go__msg__AudioData__Sequence__create(size_t size); + +/// Destroy array of msg/AudioData messages. +/** + * It calls + * unitree_go__msg__AudioData__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__AudioData__Sequence__destroy(unitree_go__msg__AudioData__Sequence * array); + +/// Check for msg/AudioData message array equality. +/** + * \param[in] lhs The message array on the left hand size of the equality operator. + * \param[in] rhs The message array on the right hand size of the equality operator. + * \return true if message arrays are equal in size and content, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__AudioData__Sequence__are_equal(const unitree_go__msg__AudioData__Sequence * lhs, const unitree_go__msg__AudioData__Sequence * rhs); + +/// Copy an array of msg/AudioData messages. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source array pointer. + * \param[out] output The target array pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer + * is null or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__AudioData__Sequence__copy( + const unitree_go__msg__AudioData__Sequence * input, + unitree_go__msg__AudioData__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__AUDIO_DATA__FUNCTIONS_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__rosidl_typesupport_fastrtps_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 0000000..1e0c84d --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,36 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from unitree_go:msg/AudioData.idl +// generated code does not contain a copyright notice +#ifndef UNITREE_GO__MSG__DETAIL__AUDIO_DATA__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define UNITREE_GO__MSG__DETAIL__AUDIO_DATA__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t get_serialized_size_unitree_go__msg__AudioData( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t max_serialized_size_unitree_go__msg__AudioData( + bool & full_bounded, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, unitree_go, msg, AudioData)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__AUDIO_DATA__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__rosidl_typesupport_fastrtps_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 0000000..81ae2e9 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,79 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from unitree_go:msg/AudioData.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__AUDIO_DATA__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__AUDIO_DATA__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "unitree_go/msg/detail/audio_data__struct.hpp" + +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-parameter" +# ifdef __clang__ +# pragma clang diagnostic ignored "-Wdeprecated-register" +# pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +# endif +#endif +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif + +#include "fastcdr/Cdr.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_serialize( + const unitree_go::msg::AudioData & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + unitree_go::msg::AudioData & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +get_serialized_size( + const unitree_go::msg::AudioData & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +max_serialized_size_AudioData( + bool & full_bounded, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace unitree_go + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, unitree_go, msg, AudioData)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__AUDIO_DATA__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__rosidl_typesupport_introspection_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__rosidl_typesupport_introspection_c.h new file mode 100644 index 0000000..7e4fc10 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from unitree_go:msg/AudioData.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__AUDIO_DATA__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define UNITREE_GO__MSG__DETAIL__AUDIO_DATA__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, AudioData)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__AUDIO_DATA__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__rosidl_typesupport_introspection_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 0000000..26a305c --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from unitree_go:msg/AudioData.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__AUDIO_DATA__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__AUDIO_DATA__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +// TODO(dirk-thomas) these visibility macros should be message package specific +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, AudioData)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__AUDIO_DATA__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__struct.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__struct.h new file mode 100644 index 0000000..02840c3 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__struct.h @@ -0,0 +1,45 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from unitree_go:msg/AudioData.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__AUDIO_DATA__STRUCT_H_ +#define UNITREE_GO__MSG__DETAIL__AUDIO_DATA__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'data' +#include "rosidl_runtime_c/primitives_sequence.h" + +// Struct defined in msg/AudioData in the package unitree_go. +typedef struct unitree_go__msg__AudioData +{ + uint64_t time_frame; + rosidl_runtime_c__uint8__Sequence data; +} unitree_go__msg__AudioData; + +// Struct for a sequence of unitree_go__msg__AudioData. +typedef struct unitree_go__msg__AudioData__Sequence +{ + unitree_go__msg__AudioData * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} unitree_go__msg__AudioData__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__AUDIO_DATA__STRUCT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__struct.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__struct.hpp new file mode 100644 index 0000000..4a403d8 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__struct.hpp @@ -0,0 +1,142 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from unitree_go:msg/AudioData.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__AUDIO_DATA__STRUCT_HPP_ +#define UNITREE_GO__MSG__DETAIL__AUDIO_DATA__STRUCT_HPP_ + +#include +#include +#include +#include +#include +#include +#include + + +#ifndef _WIN32 +# define DEPRECATED__unitree_go__msg__AudioData __attribute__((deprecated)) +#else +# define DEPRECATED__unitree_go__msg__AudioData __declspec(deprecated) +#endif + +namespace unitree_go +{ + +namespace msg +{ + +// message struct +template +struct AudioData_ +{ + using Type = AudioData_; + + explicit AudioData_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->time_frame = 0ull; + } + } + + explicit AudioData_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + (void)_alloc; + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->time_frame = 0ull; + } + } + + // field types and members + using _time_frame_type = + uint64_t; + _time_frame_type time_frame; + using _data_type = + std::vector::other>; + _data_type data; + + // setters for named parameter idiom + Type & set__time_frame( + const uint64_t & _arg) + { + this->time_frame = _arg; + return *this; + } + Type & set__data( + const std::vector::other> & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + unitree_go::msg::AudioData_ *; + using ConstRawPtr = + const unitree_go::msg::AudioData_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr const>; + + // pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead + // NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly + typedef DEPRECATED__unitree_go__msg__AudioData + std::shared_ptr> + Ptr; + typedef DEPRECATED__unitree_go__msg__AudioData + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const AudioData_ & other) const + { + if (this->time_frame != other.time_frame) { + return false; + } + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const AudioData_ & other) const + { + return !this->operator==(other); + } +}; // struct AudioData_ + +// alias to use template instance with default allocator +using AudioData = + unitree_go::msg::AudioData_>; + +// constant definitions + +} // namespace msg + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__AUDIO_DATA__STRUCT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__traits.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__traits.hpp new file mode 100644 index 0000000..84b9b36 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__traits.hpp @@ -0,0 +1,42 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from unitree_go:msg/AudioData.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__AUDIO_DATA__TRAITS_HPP_ +#define UNITREE_GO__MSG__DETAIL__AUDIO_DATA__TRAITS_HPP_ + +#include "unitree_go/msg/detail/audio_data__struct.hpp" +#include +#include +#include + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "unitree_go::msg::AudioData"; +} + +template<> +inline const char * name() +{ + return "unitree_go/msg/AudioData"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UNITREE_GO__MSG__DETAIL__AUDIO_DATA__TRAITS_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__type_support.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__type_support.c new file mode 100644 index 0000000..5adade8 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__type_support.c @@ -0,0 +1,100 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from unitree_go:msg/AudioData.idl +// generated code does not contain a copyright notice + +#include +#include "unitree_go/msg/detail/audio_data__rosidl_typesupport_introspection_c.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" +#include "rosidl_typesupport_introspection_c/field_types.h" +#include "rosidl_typesupport_introspection_c/identifier.h" +#include "rosidl_typesupport_introspection_c/message_introspection.h" +#include "unitree_go/msg/detail/audio_data__functions.h" +#include "unitree_go/msg/detail/audio_data__struct.h" + + +// Include directives for member types +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void AudioData__rosidl_typesupport_introspection_c__AudioData_init_function( + void * message_memory, enum rosidl_runtime_c__message_initialization _init) +{ + // TODO(karsten1987): initializers are not yet implemented for typesupport c + // see https://github.com/ros2/ros2/issues/397 + (void) _init; + unitree_go__msg__AudioData__init(message_memory); +} + +void AudioData__rosidl_typesupport_introspection_c__AudioData_fini_function(void * message_memory) +{ + unitree_go__msg__AudioData__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember AudioData__rosidl_typesupport_introspection_c__AudioData_message_member_array[2] = { + { + "time_frame", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT64, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__AudioData, time_frame), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__AudioData, data), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers AudioData__rosidl_typesupport_introspection_c__AudioData_message_members = { + "unitree_go__msg", // message namespace + "AudioData", // message name + 2, // number of fields + sizeof(unitree_go__msg__AudioData), + AudioData__rosidl_typesupport_introspection_c__AudioData_message_member_array, // message members + AudioData__rosidl_typesupport_introspection_c__AudioData_init_function, // function to initialize message memory (memory has to be allocated) + AudioData__rosidl_typesupport_introspection_c__AudioData_fini_function // function to terminate message instance (will not free memory) +}; + +// this is not const since it must be initialized on first access +// since C does not allow non-integral compile-time constants +static rosidl_message_type_support_t AudioData__rosidl_typesupport_introspection_c__AudioData_message_type_support_handle = { + 0, + &AudioData__rosidl_typesupport_introspection_c__AudioData_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, AudioData)() { + if (!AudioData__rosidl_typesupport_introspection_c__AudioData_message_type_support_handle.typesupport_identifier) { + AudioData__rosidl_typesupport_introspection_c__AudioData_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &AudioData__rosidl_typesupport_introspection_c__AudioData_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__type_support.cpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__type_support.cpp new file mode 100644 index 0000000..fbc0cb3 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__type_support.cpp @@ -0,0 +1,149 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from unitree_go:msg/AudioData.idl +// generated code does not contain a copyright notice + +#include "array" +#include "cstddef" +#include "string" +#include "vector" +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_cpp/message_type_support.hpp" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/detail/audio_data__struct.hpp" +#include "rosidl_typesupport_introspection_cpp/field_types.hpp" +#include "rosidl_typesupport_introspection_cpp/identifier.hpp" +#include "rosidl_typesupport_introspection_cpp/message_introspection.hpp" +#include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void AudioData_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) unitree_go::msg::AudioData(_init); +} + +void AudioData_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~AudioData(); +} + +size_t size_function__AudioData__data(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__AudioData__data(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__AudioData__data(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void resize_function__AudioData__data(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember AudioData_message_member_array[2] = { + { + "time_frame", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT64, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::AudioData, time_frame), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::AudioData, data), // bytes offset in struct + nullptr, // default value + size_function__AudioData__data, // size() function pointer + get_const_function__AudioData__data, // get_const(index) function pointer + get_function__AudioData__data, // get(index) function pointer + resize_function__AudioData__data // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers AudioData_message_members = { + "unitree_go::msg", // message namespace + "AudioData", // message name + 2, // number of fields + sizeof(unitree_go::msg::AudioData), + AudioData_message_member_array, // message members + AudioData_init_function, // function to initialize message memory (memory has to be allocated) + AudioData_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t AudioData_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &AudioData_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace unitree_go + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::AudioData_message_type_support_handle; +} + +} // namespace rosidl_typesupport_introspection_cpp + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, AudioData)() { + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::AudioData_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__type_support.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__type_support.h new file mode 100644 index 0000000..1a9e388 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from unitree_go:msg/AudioData.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__AUDIO_DATA__TYPE_SUPPORT_H_ +#define UNITREE_GO__MSG__DETAIL__AUDIO_DATA__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rosidl_runtime_c/message_type_support_struct.h" + +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + unitree_go, + msg, + AudioData +)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__AUDIO_DATA__TYPE_SUPPORT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__type_support.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__type_support.hpp new file mode 100644 index 0000000..0a55289 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/audio_data__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from unitree_go:msg/AudioData.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__AUDIO_DATA__TYPE_SUPPORT_HPP_ +#define UNITREE_GO__MSG__DETAIL__AUDIO_DATA__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_cpp__visibility_control.hpp" + +#include "rosidl_typesupport_cpp/message_type_support.hpp" + +#ifdef __cplusplus +extern "C" +{ +#endif +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + unitree_go, + msg, + AudioData +)(); +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__AUDIO_DATA__TYPE_SUPPORT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__builder.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__builder.hpp new file mode 100644 index 0000000..ed95748 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__builder.hpp @@ -0,0 +1,71 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from unitree_go:msg/BmsCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__BMS_CMD__BUILDER_HPP_ +#define UNITREE_GO__MSG__DETAIL__BMS_CMD__BUILDER_HPP_ + +#include "unitree_go/msg/detail/bms_cmd__struct.hpp" +#include +#include +#include + + +namespace unitree_go +{ + +namespace msg +{ + +namespace builder +{ + +class Init_BmsCmd_reserve +{ +public: + explicit Init_BmsCmd_reserve(::unitree_go::msg::BmsCmd & msg) + : msg_(msg) + {} + ::unitree_go::msg::BmsCmd reserve(::unitree_go::msg::BmsCmd::_reserve_type arg) + { + msg_.reserve = std::move(arg); + return std::move(msg_); + } + +private: + ::unitree_go::msg::BmsCmd msg_; +}; + +class Init_BmsCmd_off +{ +public: + Init_BmsCmd_off() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_BmsCmd_reserve off(::unitree_go::msg::BmsCmd::_off_type arg) + { + msg_.off = std::move(arg); + return Init_BmsCmd_reserve(msg_); + } + +private: + ::unitree_go::msg::BmsCmd msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::unitree_go::msg::BmsCmd>() +{ + return unitree_go::msg::builder::Init_BmsCmd_off(); +} + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__BMS_CMD__BUILDER_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__functions.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__functions.c new file mode 100644 index 0000000..db520cd --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__functions.c @@ -0,0 +1,243 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from unitree_go:msg/BmsCmd.idl +// generated code does not contain a copyright notice +#include "unitree_go/msg/detail/bms_cmd__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +unitree_go__msg__BmsCmd__init(unitree_go__msg__BmsCmd * msg) +{ + if (!msg) { + return false; + } + // off + // reserve + return true; +} + +void +unitree_go__msg__BmsCmd__fini(unitree_go__msg__BmsCmd * msg) +{ + if (!msg) { + return; + } + // off + // reserve +} + +bool +unitree_go__msg__BmsCmd__are_equal(const unitree_go__msg__BmsCmd * lhs, const unitree_go__msg__BmsCmd * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // off + if (lhs->off != rhs->off) { + return false; + } + // reserve + for (size_t i = 0; i < 3; ++i) { + if (lhs->reserve[i] != rhs->reserve[i]) { + return false; + } + } + return true; +} + +bool +unitree_go__msg__BmsCmd__copy( + const unitree_go__msg__BmsCmd * input, + unitree_go__msg__BmsCmd * output) +{ + if (!input || !output) { + return false; + } + // off + output->off = input->off; + // reserve + for (size_t i = 0; i < 3; ++i) { + output->reserve[i] = input->reserve[i]; + } + return true; +} + +unitree_go__msg__BmsCmd * +unitree_go__msg__BmsCmd__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__BmsCmd * msg = (unitree_go__msg__BmsCmd *)allocator.allocate(sizeof(unitree_go__msg__BmsCmd), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(unitree_go__msg__BmsCmd)); + bool success = unitree_go__msg__BmsCmd__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +unitree_go__msg__BmsCmd__destroy(unitree_go__msg__BmsCmd * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + unitree_go__msg__BmsCmd__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +unitree_go__msg__BmsCmd__Sequence__init(unitree_go__msg__BmsCmd__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__BmsCmd * data = NULL; + + if (size) { + data = (unitree_go__msg__BmsCmd *)allocator.zero_allocate(size, sizeof(unitree_go__msg__BmsCmd), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = unitree_go__msg__BmsCmd__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + unitree_go__msg__BmsCmd__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +unitree_go__msg__BmsCmd__Sequence__fini(unitree_go__msg__BmsCmd__Sequence * array) +{ + if (!array) { + return; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + + if (array->data) { + // ensure that data and capacity values are consistent + assert(array->capacity > 0); + // finalize all array elements + for (size_t i = 0; i < array->capacity; ++i) { + unitree_go__msg__BmsCmd__fini(&array->data[i]); + } + allocator.deallocate(array->data, allocator.state); + array->data = NULL; + array->size = 0; + array->capacity = 0; + } else { + // ensure that data, size, and capacity values are consistent + assert(0 == array->size); + assert(0 == array->capacity); + } +} + +unitree_go__msg__BmsCmd__Sequence * +unitree_go__msg__BmsCmd__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__BmsCmd__Sequence * array = (unitree_go__msg__BmsCmd__Sequence *)allocator.allocate(sizeof(unitree_go__msg__BmsCmd__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = unitree_go__msg__BmsCmd__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +unitree_go__msg__BmsCmd__Sequence__destroy(unitree_go__msg__BmsCmd__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + unitree_go__msg__BmsCmd__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +unitree_go__msg__BmsCmd__Sequence__are_equal(const unitree_go__msg__BmsCmd__Sequence * lhs, const unitree_go__msg__BmsCmd__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!unitree_go__msg__BmsCmd__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +unitree_go__msg__BmsCmd__Sequence__copy( + const unitree_go__msg__BmsCmd__Sequence * input, + unitree_go__msg__BmsCmd__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(unitree_go__msg__BmsCmd); + unitree_go__msg__BmsCmd * data = + (unitree_go__msg__BmsCmd *)realloc(output->data, allocation_size); + if (!data) { + return false; + } + for (size_t i = output->capacity; i < input->size; ++i) { + if (!unitree_go__msg__BmsCmd__init(&data[i])) { + /* free currently allocated and return false */ + for (; i-- > output->capacity; ) { + unitree_go__msg__BmsCmd__fini(&data[i]); + } + free(data); + return false; + } + } + output->data = data; + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!unitree_go__msg__BmsCmd__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__functions.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__functions.h new file mode 100644 index 0000000..f9d18a5 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from unitree_go:msg/BmsCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__BMS_CMD__FUNCTIONS_H_ +#define UNITREE_GO__MSG__DETAIL__BMS_CMD__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#include "unitree_go/msg/detail/bms_cmd__struct.h" + +/// Initialize msg/BmsCmd message. +/** + * If the init function is called twice for the same message without + * calling fini inbetween previously allocated memory will be leaked. + * \param[in,out] msg The previously allocated message pointer. + * Fields without a default value will not be initialized by this function. + * You might want to call memset(msg, 0, sizeof( + * unitree_go__msg__BmsCmd + * )) before or use + * unitree_go__msg__BmsCmd__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__BmsCmd__init(unitree_go__msg__BmsCmd * msg); + +/// Finalize msg/BmsCmd message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__BmsCmd__fini(unitree_go__msg__BmsCmd * msg); + +/// Create msg/BmsCmd message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * unitree_go__msg__BmsCmd__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__BmsCmd * +unitree_go__msg__BmsCmd__create(); + +/// Destroy msg/BmsCmd message. +/** + * It calls + * unitree_go__msg__BmsCmd__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__BmsCmd__destroy(unitree_go__msg__BmsCmd * msg); + +/// Check for msg/BmsCmd message equality. +/** + * \param[in] lhs The message on the left hand size of the equality operator. + * \param[in] rhs The message on the right hand size of the equality operator. + * \return true if messages are equal, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__BmsCmd__are_equal(const unitree_go__msg__BmsCmd * lhs, const unitree_go__msg__BmsCmd * rhs); + +/// Copy a msg/BmsCmd message. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source message pointer. + * \param[out] output The target message pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer is null + * or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__BmsCmd__copy( + const unitree_go__msg__BmsCmd * input, + unitree_go__msg__BmsCmd * output); + +/// Initialize array of msg/BmsCmd messages. +/** + * It allocates the memory for the number of elements and calls + * unitree_go__msg__BmsCmd__init() + * for each element of the array. + * \param[in,out] array The allocated array pointer. + * \param[in] size The size / capacity of the array. + * \return true if initialization was successful, otherwise false + * If the array pointer is valid and the size is zero it is guaranteed + # to return true. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__BmsCmd__Sequence__init(unitree_go__msg__BmsCmd__Sequence * array, size_t size); + +/// Finalize array of msg/BmsCmd messages. +/** + * It calls + * unitree_go__msg__BmsCmd__fini() + * for each element of the array and frees the memory for the number of + * elements. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__BmsCmd__Sequence__fini(unitree_go__msg__BmsCmd__Sequence * array); + +/// Create array of msg/BmsCmd messages. +/** + * It allocates the memory for the array and calls + * unitree_go__msg__BmsCmd__Sequence__init(). + * \param[in] size The size / capacity of the array. + * \return The pointer to the initialized array if successful, otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__BmsCmd__Sequence * +unitree_go__msg__BmsCmd__Sequence__create(size_t size); + +/// Destroy array of msg/BmsCmd messages. +/** + * It calls + * unitree_go__msg__BmsCmd__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__BmsCmd__Sequence__destroy(unitree_go__msg__BmsCmd__Sequence * array); + +/// Check for msg/BmsCmd message array equality. +/** + * \param[in] lhs The message array on the left hand size of the equality operator. + * \param[in] rhs The message array on the right hand size of the equality operator. + * \return true if message arrays are equal in size and content, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__BmsCmd__Sequence__are_equal(const unitree_go__msg__BmsCmd__Sequence * lhs, const unitree_go__msg__BmsCmd__Sequence * rhs); + +/// Copy an array of msg/BmsCmd messages. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source array pointer. + * \param[out] output The target array pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer + * is null or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__BmsCmd__Sequence__copy( + const unitree_go__msg__BmsCmd__Sequence * input, + unitree_go__msg__BmsCmd__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__BMS_CMD__FUNCTIONS_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__rosidl_typesupport_fastrtps_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 0000000..b7a7c3e --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,36 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from unitree_go:msg/BmsCmd.idl +// generated code does not contain a copyright notice +#ifndef UNITREE_GO__MSG__DETAIL__BMS_CMD__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define UNITREE_GO__MSG__DETAIL__BMS_CMD__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t get_serialized_size_unitree_go__msg__BmsCmd( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t max_serialized_size_unitree_go__msg__BmsCmd( + bool & full_bounded, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, unitree_go, msg, BmsCmd)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__BMS_CMD__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__rosidl_typesupport_fastrtps_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 0000000..3237daf --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,79 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from unitree_go:msg/BmsCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__BMS_CMD__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__BMS_CMD__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "unitree_go/msg/detail/bms_cmd__struct.hpp" + +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-parameter" +# ifdef __clang__ +# pragma clang diagnostic ignored "-Wdeprecated-register" +# pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +# endif +#endif +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif + +#include "fastcdr/Cdr.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_serialize( + const unitree_go::msg::BmsCmd & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + unitree_go::msg::BmsCmd & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +get_serialized_size( + const unitree_go::msg::BmsCmd & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +max_serialized_size_BmsCmd( + bool & full_bounded, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace unitree_go + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, unitree_go, msg, BmsCmd)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__BMS_CMD__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__rosidl_typesupport_introspection_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__rosidl_typesupport_introspection_c.h new file mode 100644 index 0000000..62a41f3 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from unitree_go:msg/BmsCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__BMS_CMD__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define UNITREE_GO__MSG__DETAIL__BMS_CMD__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, BmsCmd)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__BMS_CMD__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__rosidl_typesupport_introspection_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 0000000..fcaff2b --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from unitree_go:msg/BmsCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__BMS_CMD__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__BMS_CMD__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +// TODO(dirk-thomas) these visibility macros should be message package specific +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, BmsCmd)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__BMS_CMD__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__struct.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__struct.h new file mode 100644 index 0000000..56eb65e --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__struct.h @@ -0,0 +1,41 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from unitree_go:msg/BmsCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__BMS_CMD__STRUCT_H_ +#define UNITREE_GO__MSG__DETAIL__BMS_CMD__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Struct defined in msg/BmsCmd in the package unitree_go. +typedef struct unitree_go__msg__BmsCmd +{ + uint8_t off; + uint8_t reserve[3]; +} unitree_go__msg__BmsCmd; + +// Struct for a sequence of unitree_go__msg__BmsCmd. +typedef struct unitree_go__msg__BmsCmd__Sequence +{ + unitree_go__msg__BmsCmd * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} unitree_go__msg__BmsCmd__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__BMS_CMD__STRUCT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__struct.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__struct.hpp new file mode 100644 index 0000000..d5e6812 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__struct.hpp @@ -0,0 +1,144 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from unitree_go:msg/BmsCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__BMS_CMD__STRUCT_HPP_ +#define UNITREE_GO__MSG__DETAIL__BMS_CMD__STRUCT_HPP_ + +#include +#include +#include +#include +#include +#include +#include + + +#ifndef _WIN32 +# define DEPRECATED__unitree_go__msg__BmsCmd __attribute__((deprecated)) +#else +# define DEPRECATED__unitree_go__msg__BmsCmd __declspec(deprecated) +#endif + +namespace unitree_go +{ + +namespace msg +{ + +// message struct +template +struct BmsCmd_ +{ + using Type = BmsCmd_; + + explicit BmsCmd_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->off = 0; + std::fill::iterator, uint8_t>(this->reserve.begin(), this->reserve.end(), 0); + } + } + + explicit BmsCmd_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : reserve(_alloc) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->off = 0; + std::fill::iterator, uint8_t>(this->reserve.begin(), this->reserve.end(), 0); + } + } + + // field types and members + using _off_type = + uint8_t; + _off_type off; + using _reserve_type = + std::array; + _reserve_type reserve; + + // setters for named parameter idiom + Type & set__off( + const uint8_t & _arg) + { + this->off = _arg; + return *this; + } + Type & set__reserve( + const std::array & _arg) + { + this->reserve = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + unitree_go::msg::BmsCmd_ *; + using ConstRawPtr = + const unitree_go::msg::BmsCmd_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr const>; + + // pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead + // NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly + typedef DEPRECATED__unitree_go__msg__BmsCmd + std::shared_ptr> + Ptr; + typedef DEPRECATED__unitree_go__msg__BmsCmd + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const BmsCmd_ & other) const + { + if (this->off != other.off) { + return false; + } + if (this->reserve != other.reserve) { + return false; + } + return true; + } + bool operator!=(const BmsCmd_ & other) const + { + return !this->operator==(other); + } +}; // struct BmsCmd_ + +// alias to use template instance with default allocator +using BmsCmd = + unitree_go::msg::BmsCmd_>; + +// constant definitions + +} // namespace msg + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__BMS_CMD__STRUCT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__traits.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__traits.hpp new file mode 100644 index 0000000..b46b48c --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__traits.hpp @@ -0,0 +1,42 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from unitree_go:msg/BmsCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__BMS_CMD__TRAITS_HPP_ +#define UNITREE_GO__MSG__DETAIL__BMS_CMD__TRAITS_HPP_ + +#include "unitree_go/msg/detail/bms_cmd__struct.hpp" +#include +#include +#include + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "unitree_go::msg::BmsCmd"; +} + +template<> +inline const char * name() +{ + return "unitree_go/msg/BmsCmd"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UNITREE_GO__MSG__DETAIL__BMS_CMD__TRAITS_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__type_support.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__type_support.c new file mode 100644 index 0000000..488909f --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__type_support.c @@ -0,0 +1,96 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from unitree_go:msg/BmsCmd.idl +// generated code does not contain a copyright notice + +#include +#include "unitree_go/msg/detail/bms_cmd__rosidl_typesupport_introspection_c.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" +#include "rosidl_typesupport_introspection_c/field_types.h" +#include "rosidl_typesupport_introspection_c/identifier.h" +#include "rosidl_typesupport_introspection_c/message_introspection.h" +#include "unitree_go/msg/detail/bms_cmd__functions.h" +#include "unitree_go/msg/detail/bms_cmd__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void BmsCmd__rosidl_typesupport_introspection_c__BmsCmd_init_function( + void * message_memory, enum rosidl_runtime_c__message_initialization _init) +{ + // TODO(karsten1987): initializers are not yet implemented for typesupport c + // see https://github.com/ros2/ros2/issues/397 + (void) _init; + unitree_go__msg__BmsCmd__init(message_memory); +} + +void BmsCmd__rosidl_typesupport_introspection_c__BmsCmd_fini_function(void * message_memory) +{ + unitree_go__msg__BmsCmd__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember BmsCmd__rosidl_typesupport_introspection_c__BmsCmd_message_member_array[2] = { + { + "off", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__BmsCmd, off), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "reserve", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 3, // array size + false, // is upper bound + offsetof(unitree_go__msg__BmsCmd, reserve), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers BmsCmd__rosidl_typesupport_introspection_c__BmsCmd_message_members = { + "unitree_go__msg", // message namespace + "BmsCmd", // message name + 2, // number of fields + sizeof(unitree_go__msg__BmsCmd), + BmsCmd__rosidl_typesupport_introspection_c__BmsCmd_message_member_array, // message members + BmsCmd__rosidl_typesupport_introspection_c__BmsCmd_init_function, // function to initialize message memory (memory has to be allocated) + BmsCmd__rosidl_typesupport_introspection_c__BmsCmd_fini_function // function to terminate message instance (will not free memory) +}; + +// this is not const since it must be initialized on first access +// since C does not allow non-integral compile-time constants +static rosidl_message_type_support_t BmsCmd__rosidl_typesupport_introspection_c__BmsCmd_message_type_support_handle = { + 0, + &BmsCmd__rosidl_typesupport_introspection_c__BmsCmd_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, BmsCmd)() { + if (!BmsCmd__rosidl_typesupport_introspection_c__BmsCmd_message_type_support_handle.typesupport_identifier) { + BmsCmd__rosidl_typesupport_introspection_c__BmsCmd_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &BmsCmd__rosidl_typesupport_introspection_c__BmsCmd_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__type_support.cpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__type_support.cpp new file mode 100644 index 0000000..f893d64 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__type_support.cpp @@ -0,0 +1,142 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from unitree_go:msg/BmsCmd.idl +// generated code does not contain a copyright notice + +#include "array" +#include "cstddef" +#include "string" +#include "vector" +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_cpp/message_type_support.hpp" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/detail/bms_cmd__struct.hpp" +#include "rosidl_typesupport_introspection_cpp/field_types.hpp" +#include "rosidl_typesupport_introspection_cpp/identifier.hpp" +#include "rosidl_typesupport_introspection_cpp/message_introspection.hpp" +#include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void BmsCmd_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) unitree_go::msg::BmsCmd(_init); +} + +void BmsCmd_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~BmsCmd(); +} + +size_t size_function__BmsCmd__reserve(const void * untyped_member) +{ + (void)untyped_member; + return 3; +} + +const void * get_const_function__BmsCmd__reserve(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__BmsCmd__reserve(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember BmsCmd_message_member_array[2] = { + { + "off", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::BmsCmd, off), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "reserve", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 3, // array size + false, // is upper bound + offsetof(unitree_go::msg::BmsCmd, reserve), // bytes offset in struct + nullptr, // default value + size_function__BmsCmd__reserve, // size() function pointer + get_const_function__BmsCmd__reserve, // get_const(index) function pointer + get_function__BmsCmd__reserve, // get(index) function pointer + nullptr // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers BmsCmd_message_members = { + "unitree_go::msg", // message namespace + "BmsCmd", // message name + 2, // number of fields + sizeof(unitree_go::msg::BmsCmd), + BmsCmd_message_member_array, // message members + BmsCmd_init_function, // function to initialize message memory (memory has to be allocated) + BmsCmd_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t BmsCmd_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &BmsCmd_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace unitree_go + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::BmsCmd_message_type_support_handle; +} + +} // namespace rosidl_typesupport_introspection_cpp + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, BmsCmd)() { + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::BmsCmd_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__type_support.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__type_support.h new file mode 100644 index 0000000..56bc7a8 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from unitree_go:msg/BmsCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__BMS_CMD__TYPE_SUPPORT_H_ +#define UNITREE_GO__MSG__DETAIL__BMS_CMD__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rosidl_runtime_c/message_type_support_struct.h" + +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + unitree_go, + msg, + BmsCmd +)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__BMS_CMD__TYPE_SUPPORT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__type_support.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__type_support.hpp new file mode 100644 index 0000000..79bb6ba --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_cmd__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from unitree_go:msg/BmsCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__BMS_CMD__TYPE_SUPPORT_HPP_ +#define UNITREE_GO__MSG__DETAIL__BMS_CMD__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_cpp__visibility_control.hpp" + +#include "rosidl_typesupport_cpp/message_type_support.hpp" + +#ifdef __cplusplus +extern "C" +{ +#endif +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + unitree_go, + msg, + BmsCmd +)(); +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__BMS_CMD__TYPE_SUPPORT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__builder.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__builder.hpp new file mode 100644 index 0000000..0f747d6 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__builder.hpp @@ -0,0 +1,183 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from unitree_go:msg/BmsState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__BMS_STATE__BUILDER_HPP_ +#define UNITREE_GO__MSG__DETAIL__BMS_STATE__BUILDER_HPP_ + +#include "unitree_go/msg/detail/bms_state__struct.hpp" +#include +#include +#include + + +namespace unitree_go +{ + +namespace msg +{ + +namespace builder +{ + +class Init_BmsState_cell_vol +{ +public: + explicit Init_BmsState_cell_vol(::unitree_go::msg::BmsState & msg) + : msg_(msg) + {} + ::unitree_go::msg::BmsState cell_vol(::unitree_go::msg::BmsState::_cell_vol_type arg) + { + msg_.cell_vol = std::move(arg); + return std::move(msg_); + } + +private: + ::unitree_go::msg::BmsState msg_; +}; + +class Init_BmsState_mcu_ntc +{ +public: + explicit Init_BmsState_mcu_ntc(::unitree_go::msg::BmsState & msg) + : msg_(msg) + {} + Init_BmsState_cell_vol mcu_ntc(::unitree_go::msg::BmsState::_mcu_ntc_type arg) + { + msg_.mcu_ntc = std::move(arg); + return Init_BmsState_cell_vol(msg_); + } + +private: + ::unitree_go::msg::BmsState msg_; +}; + +class Init_BmsState_bq_ntc +{ +public: + explicit Init_BmsState_bq_ntc(::unitree_go::msg::BmsState & msg) + : msg_(msg) + {} + Init_BmsState_mcu_ntc bq_ntc(::unitree_go::msg::BmsState::_bq_ntc_type arg) + { + msg_.bq_ntc = std::move(arg); + return Init_BmsState_mcu_ntc(msg_); + } + +private: + ::unitree_go::msg::BmsState msg_; +}; + +class Init_BmsState_cycle +{ +public: + explicit Init_BmsState_cycle(::unitree_go::msg::BmsState & msg) + : msg_(msg) + {} + Init_BmsState_bq_ntc cycle(::unitree_go::msg::BmsState::_cycle_type arg) + { + msg_.cycle = std::move(arg); + return Init_BmsState_bq_ntc(msg_); + } + +private: + ::unitree_go::msg::BmsState msg_; +}; + +class Init_BmsState_current +{ +public: + explicit Init_BmsState_current(::unitree_go::msg::BmsState & msg) + : msg_(msg) + {} + Init_BmsState_cycle current(::unitree_go::msg::BmsState::_current_type arg) + { + msg_.current = std::move(arg); + return Init_BmsState_cycle(msg_); + } + +private: + ::unitree_go::msg::BmsState msg_; +}; + +class Init_BmsState_soc +{ +public: + explicit Init_BmsState_soc(::unitree_go::msg::BmsState & msg) + : msg_(msg) + {} + Init_BmsState_current soc(::unitree_go::msg::BmsState::_soc_type arg) + { + msg_.soc = std::move(arg); + return Init_BmsState_current(msg_); + } + +private: + ::unitree_go::msg::BmsState msg_; +}; + +class Init_BmsState_status +{ +public: + explicit Init_BmsState_status(::unitree_go::msg::BmsState & msg) + : msg_(msg) + {} + Init_BmsState_soc status(::unitree_go::msg::BmsState::_status_type arg) + { + msg_.status = std::move(arg); + return Init_BmsState_soc(msg_); + } + +private: + ::unitree_go::msg::BmsState msg_; +}; + +class Init_BmsState_version_low +{ +public: + explicit Init_BmsState_version_low(::unitree_go::msg::BmsState & msg) + : msg_(msg) + {} + Init_BmsState_status version_low(::unitree_go::msg::BmsState::_version_low_type arg) + { + msg_.version_low = std::move(arg); + return Init_BmsState_status(msg_); + } + +private: + ::unitree_go::msg::BmsState msg_; +}; + +class Init_BmsState_version_high +{ +public: + Init_BmsState_version_high() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_BmsState_version_low version_high(::unitree_go::msg::BmsState::_version_high_type arg) + { + msg_.version_high = std::move(arg); + return Init_BmsState_version_low(msg_); + } + +private: + ::unitree_go::msg::BmsState msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::unitree_go::msg::BmsState>() +{ + return unitree_go::msg::builder::Init_BmsState_version_high(); +} + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__BMS_STATE__BUILDER_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__functions.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__functions.c new file mode 100644 index 0000000..1f0a0ec --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__functions.c @@ -0,0 +1,307 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from unitree_go:msg/BmsState.idl +// generated code does not contain a copyright notice +#include "unitree_go/msg/detail/bms_state__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +unitree_go__msg__BmsState__init(unitree_go__msg__BmsState * msg) +{ + if (!msg) { + return false; + } + // version_high + // version_low + // status + // soc + // current + // cycle + // bq_ntc + // mcu_ntc + // cell_vol + return true; +} + +void +unitree_go__msg__BmsState__fini(unitree_go__msg__BmsState * msg) +{ + if (!msg) { + return; + } + // version_high + // version_low + // status + // soc + // current + // cycle + // bq_ntc + // mcu_ntc + // cell_vol +} + +bool +unitree_go__msg__BmsState__are_equal(const unitree_go__msg__BmsState * lhs, const unitree_go__msg__BmsState * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // version_high + if (lhs->version_high != rhs->version_high) { + return false; + } + // version_low + if (lhs->version_low != rhs->version_low) { + return false; + } + // status + if (lhs->status != rhs->status) { + return false; + } + // soc + if (lhs->soc != rhs->soc) { + return false; + } + // current + if (lhs->current != rhs->current) { + return false; + } + // cycle + if (lhs->cycle != rhs->cycle) { + return false; + } + // bq_ntc + for (size_t i = 0; i < 2; ++i) { + if (lhs->bq_ntc[i] != rhs->bq_ntc[i]) { + return false; + } + } + // mcu_ntc + for (size_t i = 0; i < 2; ++i) { + if (lhs->mcu_ntc[i] != rhs->mcu_ntc[i]) { + return false; + } + } + // cell_vol + for (size_t i = 0; i < 15; ++i) { + if (lhs->cell_vol[i] != rhs->cell_vol[i]) { + return false; + } + } + return true; +} + +bool +unitree_go__msg__BmsState__copy( + const unitree_go__msg__BmsState * input, + unitree_go__msg__BmsState * output) +{ + if (!input || !output) { + return false; + } + // version_high + output->version_high = input->version_high; + // version_low + output->version_low = input->version_low; + // status + output->status = input->status; + // soc + output->soc = input->soc; + // current + output->current = input->current; + // cycle + output->cycle = input->cycle; + // bq_ntc + for (size_t i = 0; i < 2; ++i) { + output->bq_ntc[i] = input->bq_ntc[i]; + } + // mcu_ntc + for (size_t i = 0; i < 2; ++i) { + output->mcu_ntc[i] = input->mcu_ntc[i]; + } + // cell_vol + for (size_t i = 0; i < 15; ++i) { + output->cell_vol[i] = input->cell_vol[i]; + } + return true; +} + +unitree_go__msg__BmsState * +unitree_go__msg__BmsState__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__BmsState * msg = (unitree_go__msg__BmsState *)allocator.allocate(sizeof(unitree_go__msg__BmsState), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(unitree_go__msg__BmsState)); + bool success = unitree_go__msg__BmsState__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +unitree_go__msg__BmsState__destroy(unitree_go__msg__BmsState * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + unitree_go__msg__BmsState__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +unitree_go__msg__BmsState__Sequence__init(unitree_go__msg__BmsState__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__BmsState * data = NULL; + + if (size) { + data = (unitree_go__msg__BmsState *)allocator.zero_allocate(size, sizeof(unitree_go__msg__BmsState), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = unitree_go__msg__BmsState__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + unitree_go__msg__BmsState__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +unitree_go__msg__BmsState__Sequence__fini(unitree_go__msg__BmsState__Sequence * array) +{ + if (!array) { + return; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + + if (array->data) { + // ensure that data and capacity values are consistent + assert(array->capacity > 0); + // finalize all array elements + for (size_t i = 0; i < array->capacity; ++i) { + unitree_go__msg__BmsState__fini(&array->data[i]); + } + allocator.deallocate(array->data, allocator.state); + array->data = NULL; + array->size = 0; + array->capacity = 0; + } else { + // ensure that data, size, and capacity values are consistent + assert(0 == array->size); + assert(0 == array->capacity); + } +} + +unitree_go__msg__BmsState__Sequence * +unitree_go__msg__BmsState__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__BmsState__Sequence * array = (unitree_go__msg__BmsState__Sequence *)allocator.allocate(sizeof(unitree_go__msg__BmsState__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = unitree_go__msg__BmsState__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +unitree_go__msg__BmsState__Sequence__destroy(unitree_go__msg__BmsState__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + unitree_go__msg__BmsState__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +unitree_go__msg__BmsState__Sequence__are_equal(const unitree_go__msg__BmsState__Sequence * lhs, const unitree_go__msg__BmsState__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!unitree_go__msg__BmsState__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +unitree_go__msg__BmsState__Sequence__copy( + const unitree_go__msg__BmsState__Sequence * input, + unitree_go__msg__BmsState__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(unitree_go__msg__BmsState); + unitree_go__msg__BmsState * data = + (unitree_go__msg__BmsState *)realloc(output->data, allocation_size); + if (!data) { + return false; + } + for (size_t i = output->capacity; i < input->size; ++i) { + if (!unitree_go__msg__BmsState__init(&data[i])) { + /* free currently allocated and return false */ + for (; i-- > output->capacity; ) { + unitree_go__msg__BmsState__fini(&data[i]); + } + free(data); + return false; + } + } + output->data = data; + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!unitree_go__msg__BmsState__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__functions.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__functions.h new file mode 100644 index 0000000..0e3dc72 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from unitree_go:msg/BmsState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__BMS_STATE__FUNCTIONS_H_ +#define UNITREE_GO__MSG__DETAIL__BMS_STATE__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#include "unitree_go/msg/detail/bms_state__struct.h" + +/// Initialize msg/BmsState message. +/** + * If the init function is called twice for the same message without + * calling fini inbetween previously allocated memory will be leaked. + * \param[in,out] msg The previously allocated message pointer. + * Fields without a default value will not be initialized by this function. + * You might want to call memset(msg, 0, sizeof( + * unitree_go__msg__BmsState + * )) before or use + * unitree_go__msg__BmsState__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__BmsState__init(unitree_go__msg__BmsState * msg); + +/// Finalize msg/BmsState message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__BmsState__fini(unitree_go__msg__BmsState * msg); + +/// Create msg/BmsState message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * unitree_go__msg__BmsState__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__BmsState * +unitree_go__msg__BmsState__create(); + +/// Destroy msg/BmsState message. +/** + * It calls + * unitree_go__msg__BmsState__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__BmsState__destroy(unitree_go__msg__BmsState * msg); + +/// Check for msg/BmsState message equality. +/** + * \param[in] lhs The message on the left hand size of the equality operator. + * \param[in] rhs The message on the right hand size of the equality operator. + * \return true if messages are equal, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__BmsState__are_equal(const unitree_go__msg__BmsState * lhs, const unitree_go__msg__BmsState * rhs); + +/// Copy a msg/BmsState message. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source message pointer. + * \param[out] output The target message pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer is null + * or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__BmsState__copy( + const unitree_go__msg__BmsState * input, + unitree_go__msg__BmsState * output); + +/// Initialize array of msg/BmsState messages. +/** + * It allocates the memory for the number of elements and calls + * unitree_go__msg__BmsState__init() + * for each element of the array. + * \param[in,out] array The allocated array pointer. + * \param[in] size The size / capacity of the array. + * \return true if initialization was successful, otherwise false + * If the array pointer is valid and the size is zero it is guaranteed + # to return true. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__BmsState__Sequence__init(unitree_go__msg__BmsState__Sequence * array, size_t size); + +/// Finalize array of msg/BmsState messages. +/** + * It calls + * unitree_go__msg__BmsState__fini() + * for each element of the array and frees the memory for the number of + * elements. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__BmsState__Sequence__fini(unitree_go__msg__BmsState__Sequence * array); + +/// Create array of msg/BmsState messages. +/** + * It allocates the memory for the array and calls + * unitree_go__msg__BmsState__Sequence__init(). + * \param[in] size The size / capacity of the array. + * \return The pointer to the initialized array if successful, otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__BmsState__Sequence * +unitree_go__msg__BmsState__Sequence__create(size_t size); + +/// Destroy array of msg/BmsState messages. +/** + * It calls + * unitree_go__msg__BmsState__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__BmsState__Sequence__destroy(unitree_go__msg__BmsState__Sequence * array); + +/// Check for msg/BmsState message array equality. +/** + * \param[in] lhs The message array on the left hand size of the equality operator. + * \param[in] rhs The message array on the right hand size of the equality operator. + * \return true if message arrays are equal in size and content, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__BmsState__Sequence__are_equal(const unitree_go__msg__BmsState__Sequence * lhs, const unitree_go__msg__BmsState__Sequence * rhs); + +/// Copy an array of msg/BmsState messages. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source array pointer. + * \param[out] output The target array pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer + * is null or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__BmsState__Sequence__copy( + const unitree_go__msg__BmsState__Sequence * input, + unitree_go__msg__BmsState__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__BMS_STATE__FUNCTIONS_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__rosidl_typesupport_fastrtps_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 0000000..3de157d --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,36 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from unitree_go:msg/BmsState.idl +// generated code does not contain a copyright notice +#ifndef UNITREE_GO__MSG__DETAIL__BMS_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define UNITREE_GO__MSG__DETAIL__BMS_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t get_serialized_size_unitree_go__msg__BmsState( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t max_serialized_size_unitree_go__msg__BmsState( + bool & full_bounded, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, unitree_go, msg, BmsState)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__BMS_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__rosidl_typesupport_fastrtps_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 0000000..eede409 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,79 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from unitree_go:msg/BmsState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__BMS_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__BMS_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "unitree_go/msg/detail/bms_state__struct.hpp" + +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-parameter" +# ifdef __clang__ +# pragma clang diagnostic ignored "-Wdeprecated-register" +# pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +# endif +#endif +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif + +#include "fastcdr/Cdr.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_serialize( + const unitree_go::msg::BmsState & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + unitree_go::msg::BmsState & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +get_serialized_size( + const unitree_go::msg::BmsState & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +max_serialized_size_BmsState( + bool & full_bounded, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace unitree_go + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, unitree_go, msg, BmsState)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__BMS_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__rosidl_typesupport_introspection_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__rosidl_typesupport_introspection_c.h new file mode 100644 index 0000000..c18b944 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from unitree_go:msg/BmsState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__BMS_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define UNITREE_GO__MSG__DETAIL__BMS_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, BmsState)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__BMS_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__rosidl_typesupport_introspection_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 0000000..05d7362 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from unitree_go:msg/BmsState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__BMS_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__BMS_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +// TODO(dirk-thomas) these visibility macros should be message package specific +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, BmsState)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__BMS_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__struct.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__struct.h new file mode 100644 index 0000000..871e4bd --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__struct.h @@ -0,0 +1,48 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from unitree_go:msg/BmsState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__BMS_STATE__STRUCT_H_ +#define UNITREE_GO__MSG__DETAIL__BMS_STATE__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Struct defined in msg/BmsState in the package unitree_go. +typedef struct unitree_go__msg__BmsState +{ + uint8_t version_high; + uint8_t version_low; + uint8_t status; + uint8_t soc; + int32_t current; + uint16_t cycle; + int8_t bq_ntc[2]; + int8_t mcu_ntc[2]; + uint16_t cell_vol[15]; +} unitree_go__msg__BmsState; + +// Struct for a sequence of unitree_go__msg__BmsState. +typedef struct unitree_go__msg__BmsState__Sequence +{ + unitree_go__msg__BmsState * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} unitree_go__msg__BmsState__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__BMS_STATE__STRUCT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__struct.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__struct.hpp new file mode 100644 index 0000000..ebf76be --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__struct.hpp @@ -0,0 +1,244 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from unitree_go:msg/BmsState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__BMS_STATE__STRUCT_HPP_ +#define UNITREE_GO__MSG__DETAIL__BMS_STATE__STRUCT_HPP_ + +#include +#include +#include +#include +#include +#include +#include + + +#ifndef _WIN32 +# define DEPRECATED__unitree_go__msg__BmsState __attribute__((deprecated)) +#else +# define DEPRECATED__unitree_go__msg__BmsState __declspec(deprecated) +#endif + +namespace unitree_go +{ + +namespace msg +{ + +// message struct +template +struct BmsState_ +{ + using Type = BmsState_; + + explicit BmsState_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->version_high = 0; + this->version_low = 0; + this->status = 0; + this->soc = 0; + this->current = 0l; + this->cycle = 0; + std::fill::iterator, int8_t>(this->bq_ntc.begin(), this->bq_ntc.end(), 0); + std::fill::iterator, int8_t>(this->mcu_ntc.begin(), this->mcu_ntc.end(), 0); + std::fill::iterator, uint16_t>(this->cell_vol.begin(), this->cell_vol.end(), 0); + } + } + + explicit BmsState_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : bq_ntc(_alloc), + mcu_ntc(_alloc), + cell_vol(_alloc) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->version_high = 0; + this->version_low = 0; + this->status = 0; + this->soc = 0; + this->current = 0l; + this->cycle = 0; + std::fill::iterator, int8_t>(this->bq_ntc.begin(), this->bq_ntc.end(), 0); + std::fill::iterator, int8_t>(this->mcu_ntc.begin(), this->mcu_ntc.end(), 0); + std::fill::iterator, uint16_t>(this->cell_vol.begin(), this->cell_vol.end(), 0); + } + } + + // field types and members + using _version_high_type = + uint8_t; + _version_high_type version_high; + using _version_low_type = + uint8_t; + _version_low_type version_low; + using _status_type = + uint8_t; + _status_type status; + using _soc_type = + uint8_t; + _soc_type soc; + using _current_type = + int32_t; + _current_type current; + using _cycle_type = + uint16_t; + _cycle_type cycle; + using _bq_ntc_type = + std::array; + _bq_ntc_type bq_ntc; + using _mcu_ntc_type = + std::array; + _mcu_ntc_type mcu_ntc; + using _cell_vol_type = + std::array; + _cell_vol_type cell_vol; + + // setters for named parameter idiom + Type & set__version_high( + const uint8_t & _arg) + { + this->version_high = _arg; + return *this; + } + Type & set__version_low( + const uint8_t & _arg) + { + this->version_low = _arg; + return *this; + } + Type & set__status( + const uint8_t & _arg) + { + this->status = _arg; + return *this; + } + Type & set__soc( + const uint8_t & _arg) + { + this->soc = _arg; + return *this; + } + Type & set__current( + const int32_t & _arg) + { + this->current = _arg; + return *this; + } + Type & set__cycle( + const uint16_t & _arg) + { + this->cycle = _arg; + return *this; + } + Type & set__bq_ntc( + const std::array & _arg) + { + this->bq_ntc = _arg; + return *this; + } + Type & set__mcu_ntc( + const std::array & _arg) + { + this->mcu_ntc = _arg; + return *this; + } + Type & set__cell_vol( + const std::array & _arg) + { + this->cell_vol = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + unitree_go::msg::BmsState_ *; + using ConstRawPtr = + const unitree_go::msg::BmsState_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr const>; + + // pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead + // NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly + typedef DEPRECATED__unitree_go__msg__BmsState + std::shared_ptr> + Ptr; + typedef DEPRECATED__unitree_go__msg__BmsState + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const BmsState_ & other) const + { + if (this->version_high != other.version_high) { + return false; + } + if (this->version_low != other.version_low) { + return false; + } + if (this->status != other.status) { + return false; + } + if (this->soc != other.soc) { + return false; + } + if (this->current != other.current) { + return false; + } + if (this->cycle != other.cycle) { + return false; + } + if (this->bq_ntc != other.bq_ntc) { + return false; + } + if (this->mcu_ntc != other.mcu_ntc) { + return false; + } + if (this->cell_vol != other.cell_vol) { + return false; + } + return true; + } + bool operator!=(const BmsState_ & other) const + { + return !this->operator==(other); + } +}; // struct BmsState_ + +// alias to use template instance with default allocator +using BmsState = + unitree_go::msg::BmsState_>; + +// constant definitions + +} // namespace msg + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__BMS_STATE__STRUCT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__traits.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__traits.hpp new file mode 100644 index 0000000..1622215 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__traits.hpp @@ -0,0 +1,42 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from unitree_go:msg/BmsState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__BMS_STATE__TRAITS_HPP_ +#define UNITREE_GO__MSG__DETAIL__BMS_STATE__TRAITS_HPP_ + +#include "unitree_go/msg/detail/bms_state__struct.hpp" +#include +#include +#include + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "unitree_go::msg::BmsState"; +} + +template<> +inline const char * name() +{ + return "unitree_go/msg/BmsState"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UNITREE_GO__MSG__DETAIL__BMS_STATE__TRAITS_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__type_support.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__type_support.c new file mode 100644 index 0000000..1884c9d --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__type_support.c @@ -0,0 +1,201 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from unitree_go:msg/BmsState.idl +// generated code does not contain a copyright notice + +#include +#include "unitree_go/msg/detail/bms_state__rosidl_typesupport_introspection_c.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" +#include "rosidl_typesupport_introspection_c/field_types.h" +#include "rosidl_typesupport_introspection_c/identifier.h" +#include "rosidl_typesupport_introspection_c/message_introspection.h" +#include "unitree_go/msg/detail/bms_state__functions.h" +#include "unitree_go/msg/detail/bms_state__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void BmsState__rosidl_typesupport_introspection_c__BmsState_init_function( + void * message_memory, enum rosidl_runtime_c__message_initialization _init) +{ + // TODO(karsten1987): initializers are not yet implemented for typesupport c + // see https://github.com/ros2/ros2/issues/397 + (void) _init; + unitree_go__msg__BmsState__init(message_memory); +} + +void BmsState__rosidl_typesupport_introspection_c__BmsState_fini_function(void * message_memory) +{ + unitree_go__msg__BmsState__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember BmsState__rosidl_typesupport_introspection_c__BmsState_message_member_array[9] = { + { + "version_high", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__BmsState, version_high), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "version_low", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__BmsState, version_low), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "status", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__BmsState, status), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "soc", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__BmsState, soc), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "current", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__BmsState, current), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "cycle", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT16, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__BmsState, cycle), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "bq_ntc", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT8, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 2, // array size + false, // is upper bound + offsetof(unitree_go__msg__BmsState, bq_ntc), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "mcu_ntc", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT8, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 2, // array size + false, // is upper bound + offsetof(unitree_go__msg__BmsState, mcu_ntc), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "cell_vol", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT16, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 15, // array size + false, // is upper bound + offsetof(unitree_go__msg__BmsState, cell_vol), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers BmsState__rosidl_typesupport_introspection_c__BmsState_message_members = { + "unitree_go__msg", // message namespace + "BmsState", // message name + 9, // number of fields + sizeof(unitree_go__msg__BmsState), + BmsState__rosidl_typesupport_introspection_c__BmsState_message_member_array, // message members + BmsState__rosidl_typesupport_introspection_c__BmsState_init_function, // function to initialize message memory (memory has to be allocated) + BmsState__rosidl_typesupport_introspection_c__BmsState_fini_function // function to terminate message instance (will not free memory) +}; + +// this is not const since it must be initialized on first access +// since C does not allow non-integral compile-time constants +static rosidl_message_type_support_t BmsState__rosidl_typesupport_introspection_c__BmsState_message_type_support_handle = { + 0, + &BmsState__rosidl_typesupport_introspection_c__BmsState_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, BmsState)() { + if (!BmsState__rosidl_typesupport_introspection_c__BmsState_message_type_support_handle.typesupport_identifier) { + BmsState__rosidl_typesupport_introspection_c__BmsState_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &BmsState__rosidl_typesupport_introspection_c__BmsState_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__type_support.cpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__type_support.cpp new file mode 100644 index 0000000..36d016c --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__type_support.cpp @@ -0,0 +1,287 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from unitree_go:msg/BmsState.idl +// generated code does not contain a copyright notice + +#include "array" +#include "cstddef" +#include "string" +#include "vector" +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_cpp/message_type_support.hpp" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/detail/bms_state__struct.hpp" +#include "rosidl_typesupport_introspection_cpp/field_types.hpp" +#include "rosidl_typesupport_introspection_cpp/identifier.hpp" +#include "rosidl_typesupport_introspection_cpp/message_introspection.hpp" +#include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void BmsState_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) unitree_go::msg::BmsState(_init); +} + +void BmsState_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~BmsState(); +} + +size_t size_function__BmsState__bq_ntc(const void * untyped_member) +{ + (void)untyped_member; + return 2; +} + +const void * get_const_function__BmsState__bq_ntc(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__BmsState__bq_ntc(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +size_t size_function__BmsState__mcu_ntc(const void * untyped_member) +{ + (void)untyped_member; + return 2; +} + +const void * get_const_function__BmsState__mcu_ntc(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__BmsState__mcu_ntc(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +size_t size_function__BmsState__cell_vol(const void * untyped_member) +{ + (void)untyped_member; + return 15; +} + +const void * get_const_function__BmsState__cell_vol(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__BmsState__cell_vol(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember BmsState_message_member_array[9] = { + { + "version_high", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::BmsState, version_high), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "version_low", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::BmsState, version_low), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "status", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::BmsState, status), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "soc", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::BmsState, soc), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "current", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::BmsState, current), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "cycle", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT16, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::BmsState, cycle), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "bq_ntc", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT8, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 2, // array size + false, // is upper bound + offsetof(unitree_go::msg::BmsState, bq_ntc), // bytes offset in struct + nullptr, // default value + size_function__BmsState__bq_ntc, // size() function pointer + get_const_function__BmsState__bq_ntc, // get_const(index) function pointer + get_function__BmsState__bq_ntc, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "mcu_ntc", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT8, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 2, // array size + false, // is upper bound + offsetof(unitree_go::msg::BmsState, mcu_ntc), // bytes offset in struct + nullptr, // default value + size_function__BmsState__mcu_ntc, // size() function pointer + get_const_function__BmsState__mcu_ntc, // get_const(index) function pointer + get_function__BmsState__mcu_ntc, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "cell_vol", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT16, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 15, // array size + false, // is upper bound + offsetof(unitree_go::msg::BmsState, cell_vol), // bytes offset in struct + nullptr, // default value + size_function__BmsState__cell_vol, // size() function pointer + get_const_function__BmsState__cell_vol, // get_const(index) function pointer + get_function__BmsState__cell_vol, // get(index) function pointer + nullptr // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers BmsState_message_members = { + "unitree_go::msg", // message namespace + "BmsState", // message name + 9, // number of fields + sizeof(unitree_go::msg::BmsState), + BmsState_message_member_array, // message members + BmsState_init_function, // function to initialize message memory (memory has to be allocated) + BmsState_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t BmsState_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &BmsState_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace unitree_go + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::BmsState_message_type_support_handle; +} + +} // namespace rosidl_typesupport_introspection_cpp + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, BmsState)() { + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::BmsState_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__type_support.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__type_support.h new file mode 100644 index 0000000..73d2256 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from unitree_go:msg/BmsState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__BMS_STATE__TYPE_SUPPORT_H_ +#define UNITREE_GO__MSG__DETAIL__BMS_STATE__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rosidl_runtime_c/message_type_support_struct.h" + +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + unitree_go, + msg, + BmsState +)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__BMS_STATE__TYPE_SUPPORT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__type_support.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__type_support.hpp new file mode 100644 index 0000000..6cc54fd --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/bms_state__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from unitree_go:msg/BmsState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__BMS_STATE__TYPE_SUPPORT_HPP_ +#define UNITREE_GO__MSG__DETAIL__BMS_STATE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_cpp__visibility_control.hpp" + +#include "rosidl_typesupport_cpp/message_type_support.hpp" + +#ifdef __cplusplus +extern "C" +{ +#endif +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + unitree_go, + msg, + BmsState +)(); +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__BMS_STATE__TYPE_SUPPORT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__builder.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__builder.hpp new file mode 100644 index 0000000..e05b854 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__builder.hpp @@ -0,0 +1,71 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from unitree_go:msg/Error.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__ERROR__BUILDER_HPP_ +#define UNITREE_GO__MSG__DETAIL__ERROR__BUILDER_HPP_ + +#include "unitree_go/msg/detail/error__struct.hpp" +#include +#include +#include + + +namespace unitree_go +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Error_state +{ +public: + explicit Init_Error_state(::unitree_go::msg::Error & msg) + : msg_(msg) + {} + ::unitree_go::msg::Error state(::unitree_go::msg::Error::_state_type arg) + { + msg_.state = std::move(arg); + return std::move(msg_); + } + +private: + ::unitree_go::msg::Error msg_; +}; + +class Init_Error_source +{ +public: + Init_Error_source() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_Error_state source(::unitree_go::msg::Error::_source_type arg) + { + msg_.source = std::move(arg); + return Init_Error_state(msg_); + } + +private: + ::unitree_go::msg::Error msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::unitree_go::msg::Error>() +{ + return unitree_go::msg::builder::Init_Error_source(); +} + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__ERROR__BUILDER_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__functions.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__functions.c new file mode 100644 index 0000000..3cc186a --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__functions.c @@ -0,0 +1,239 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from unitree_go:msg/Error.idl +// generated code does not contain a copyright notice +#include "unitree_go/msg/detail/error__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +unitree_go__msg__Error__init(unitree_go__msg__Error * msg) +{ + if (!msg) { + return false; + } + // source + // state + return true; +} + +void +unitree_go__msg__Error__fini(unitree_go__msg__Error * msg) +{ + if (!msg) { + return; + } + // source + // state +} + +bool +unitree_go__msg__Error__are_equal(const unitree_go__msg__Error * lhs, const unitree_go__msg__Error * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // source + if (lhs->source != rhs->source) { + return false; + } + // state + if (lhs->state != rhs->state) { + return false; + } + return true; +} + +bool +unitree_go__msg__Error__copy( + const unitree_go__msg__Error * input, + unitree_go__msg__Error * output) +{ + if (!input || !output) { + return false; + } + // source + output->source = input->source; + // state + output->state = input->state; + return true; +} + +unitree_go__msg__Error * +unitree_go__msg__Error__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__Error * msg = (unitree_go__msg__Error *)allocator.allocate(sizeof(unitree_go__msg__Error), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(unitree_go__msg__Error)); + bool success = unitree_go__msg__Error__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +unitree_go__msg__Error__destroy(unitree_go__msg__Error * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + unitree_go__msg__Error__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +unitree_go__msg__Error__Sequence__init(unitree_go__msg__Error__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__Error * data = NULL; + + if (size) { + data = (unitree_go__msg__Error *)allocator.zero_allocate(size, sizeof(unitree_go__msg__Error), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = unitree_go__msg__Error__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + unitree_go__msg__Error__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +unitree_go__msg__Error__Sequence__fini(unitree_go__msg__Error__Sequence * array) +{ + if (!array) { + return; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + + if (array->data) { + // ensure that data and capacity values are consistent + assert(array->capacity > 0); + // finalize all array elements + for (size_t i = 0; i < array->capacity; ++i) { + unitree_go__msg__Error__fini(&array->data[i]); + } + allocator.deallocate(array->data, allocator.state); + array->data = NULL; + array->size = 0; + array->capacity = 0; + } else { + // ensure that data, size, and capacity values are consistent + assert(0 == array->size); + assert(0 == array->capacity); + } +} + +unitree_go__msg__Error__Sequence * +unitree_go__msg__Error__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__Error__Sequence * array = (unitree_go__msg__Error__Sequence *)allocator.allocate(sizeof(unitree_go__msg__Error__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = unitree_go__msg__Error__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +unitree_go__msg__Error__Sequence__destroy(unitree_go__msg__Error__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + unitree_go__msg__Error__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +unitree_go__msg__Error__Sequence__are_equal(const unitree_go__msg__Error__Sequence * lhs, const unitree_go__msg__Error__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!unitree_go__msg__Error__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +unitree_go__msg__Error__Sequence__copy( + const unitree_go__msg__Error__Sequence * input, + unitree_go__msg__Error__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(unitree_go__msg__Error); + unitree_go__msg__Error * data = + (unitree_go__msg__Error *)realloc(output->data, allocation_size); + if (!data) { + return false; + } + for (size_t i = output->capacity; i < input->size; ++i) { + if (!unitree_go__msg__Error__init(&data[i])) { + /* free currently allocated and return false */ + for (; i-- > output->capacity; ) { + unitree_go__msg__Error__fini(&data[i]); + } + free(data); + return false; + } + } + output->data = data; + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!unitree_go__msg__Error__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__functions.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__functions.h new file mode 100644 index 0000000..41ac606 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from unitree_go:msg/Error.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__ERROR__FUNCTIONS_H_ +#define UNITREE_GO__MSG__DETAIL__ERROR__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#include "unitree_go/msg/detail/error__struct.h" + +/// Initialize msg/Error message. +/** + * If the init function is called twice for the same message without + * calling fini inbetween previously allocated memory will be leaked. + * \param[in,out] msg The previously allocated message pointer. + * Fields without a default value will not be initialized by this function. + * You might want to call memset(msg, 0, sizeof( + * unitree_go__msg__Error + * )) before or use + * unitree_go__msg__Error__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__Error__init(unitree_go__msg__Error * msg); + +/// Finalize msg/Error message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__Error__fini(unitree_go__msg__Error * msg); + +/// Create msg/Error message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * unitree_go__msg__Error__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__Error * +unitree_go__msg__Error__create(); + +/// Destroy msg/Error message. +/** + * It calls + * unitree_go__msg__Error__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__Error__destroy(unitree_go__msg__Error * msg); + +/// Check for msg/Error message equality. +/** + * \param[in] lhs The message on the left hand size of the equality operator. + * \param[in] rhs The message on the right hand size of the equality operator. + * \return true if messages are equal, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__Error__are_equal(const unitree_go__msg__Error * lhs, const unitree_go__msg__Error * rhs); + +/// Copy a msg/Error message. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source message pointer. + * \param[out] output The target message pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer is null + * or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__Error__copy( + const unitree_go__msg__Error * input, + unitree_go__msg__Error * output); + +/// Initialize array of msg/Error messages. +/** + * It allocates the memory for the number of elements and calls + * unitree_go__msg__Error__init() + * for each element of the array. + * \param[in,out] array The allocated array pointer. + * \param[in] size The size / capacity of the array. + * \return true if initialization was successful, otherwise false + * If the array pointer is valid and the size is zero it is guaranteed + # to return true. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__Error__Sequence__init(unitree_go__msg__Error__Sequence * array, size_t size); + +/// Finalize array of msg/Error messages. +/** + * It calls + * unitree_go__msg__Error__fini() + * for each element of the array and frees the memory for the number of + * elements. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__Error__Sequence__fini(unitree_go__msg__Error__Sequence * array); + +/// Create array of msg/Error messages. +/** + * It allocates the memory for the array and calls + * unitree_go__msg__Error__Sequence__init(). + * \param[in] size The size / capacity of the array. + * \return The pointer to the initialized array if successful, otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__Error__Sequence * +unitree_go__msg__Error__Sequence__create(size_t size); + +/// Destroy array of msg/Error messages. +/** + * It calls + * unitree_go__msg__Error__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__Error__Sequence__destroy(unitree_go__msg__Error__Sequence * array); + +/// Check for msg/Error message array equality. +/** + * \param[in] lhs The message array on the left hand size of the equality operator. + * \param[in] rhs The message array on the right hand size of the equality operator. + * \return true if message arrays are equal in size and content, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__Error__Sequence__are_equal(const unitree_go__msg__Error__Sequence * lhs, const unitree_go__msg__Error__Sequence * rhs); + +/// Copy an array of msg/Error messages. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source array pointer. + * \param[out] output The target array pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer + * is null or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__Error__Sequence__copy( + const unitree_go__msg__Error__Sequence * input, + unitree_go__msg__Error__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__ERROR__FUNCTIONS_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__rosidl_typesupport_fastrtps_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 0000000..269b6b6 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,36 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from unitree_go:msg/Error.idl +// generated code does not contain a copyright notice +#ifndef UNITREE_GO__MSG__DETAIL__ERROR__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define UNITREE_GO__MSG__DETAIL__ERROR__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t get_serialized_size_unitree_go__msg__Error( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t max_serialized_size_unitree_go__msg__Error( + bool & full_bounded, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, unitree_go, msg, Error)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__ERROR__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__rosidl_typesupport_fastrtps_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 0000000..7ec5407 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,79 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from unitree_go:msg/Error.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__ERROR__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__ERROR__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "unitree_go/msg/detail/error__struct.hpp" + +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-parameter" +# ifdef __clang__ +# pragma clang diagnostic ignored "-Wdeprecated-register" +# pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +# endif +#endif +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif + +#include "fastcdr/Cdr.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_serialize( + const unitree_go::msg::Error & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + unitree_go::msg::Error & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +get_serialized_size( + const unitree_go::msg::Error & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +max_serialized_size_Error( + bool & full_bounded, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace unitree_go + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, unitree_go, msg, Error)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__ERROR__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__rosidl_typesupport_introspection_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__rosidl_typesupport_introspection_c.h new file mode 100644 index 0000000..007d6ab --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from unitree_go:msg/Error.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__ERROR__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define UNITREE_GO__MSG__DETAIL__ERROR__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, Error)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__ERROR__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__rosidl_typesupport_introspection_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 0000000..fe36165 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from unitree_go:msg/Error.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__ERROR__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__ERROR__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +// TODO(dirk-thomas) these visibility macros should be message package specific +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, Error)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__ERROR__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__struct.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__struct.h new file mode 100644 index 0000000..868464f --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__struct.h @@ -0,0 +1,41 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from unitree_go:msg/Error.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__ERROR__STRUCT_H_ +#define UNITREE_GO__MSG__DETAIL__ERROR__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Struct defined in msg/Error in the package unitree_go. +typedef struct unitree_go__msg__Error +{ + uint32_t source; + uint32_t state; +} unitree_go__msg__Error; + +// Struct for a sequence of unitree_go__msg__Error. +typedef struct unitree_go__msg__Error__Sequence +{ + unitree_go__msg__Error * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} unitree_go__msg__Error__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__ERROR__STRUCT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__struct.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__struct.hpp new file mode 100644 index 0000000..31658a8 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__struct.hpp @@ -0,0 +1,144 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from unitree_go:msg/Error.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__ERROR__STRUCT_HPP_ +#define UNITREE_GO__MSG__DETAIL__ERROR__STRUCT_HPP_ + +#include +#include +#include +#include +#include +#include +#include + + +#ifndef _WIN32 +# define DEPRECATED__unitree_go__msg__Error __attribute__((deprecated)) +#else +# define DEPRECATED__unitree_go__msg__Error __declspec(deprecated) +#endif + +namespace unitree_go +{ + +namespace msg +{ + +// message struct +template +struct Error_ +{ + using Type = Error_; + + explicit Error_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->source = 0ul; + this->state = 0ul; + } + } + + explicit Error_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + (void)_alloc; + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->source = 0ul; + this->state = 0ul; + } + } + + // field types and members + using _source_type = + uint32_t; + _source_type source; + using _state_type = + uint32_t; + _state_type state; + + // setters for named parameter idiom + Type & set__source( + const uint32_t & _arg) + { + this->source = _arg; + return *this; + } + Type & set__state( + const uint32_t & _arg) + { + this->state = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + unitree_go::msg::Error_ *; + using ConstRawPtr = + const unitree_go::msg::Error_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr const>; + + // pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead + // NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly + typedef DEPRECATED__unitree_go__msg__Error + std::shared_ptr> + Ptr; + typedef DEPRECATED__unitree_go__msg__Error + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Error_ & other) const + { + if (this->source != other.source) { + return false; + } + if (this->state != other.state) { + return false; + } + return true; + } + bool operator!=(const Error_ & other) const + { + return !this->operator==(other); + } +}; // struct Error_ + +// alias to use template instance with default allocator +using Error = + unitree_go::msg::Error_>; + +// constant definitions + +} // namespace msg + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__ERROR__STRUCT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__traits.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__traits.hpp new file mode 100644 index 0000000..e867f5e --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__traits.hpp @@ -0,0 +1,42 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from unitree_go:msg/Error.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__ERROR__TRAITS_HPP_ +#define UNITREE_GO__MSG__DETAIL__ERROR__TRAITS_HPP_ + +#include "unitree_go/msg/detail/error__struct.hpp" +#include +#include +#include + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "unitree_go::msg::Error"; +} + +template<> +inline const char * name() +{ + return "unitree_go/msg/Error"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UNITREE_GO__MSG__DETAIL__ERROR__TRAITS_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__type_support.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__type_support.c new file mode 100644 index 0000000..f6e5856 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__type_support.c @@ -0,0 +1,96 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from unitree_go:msg/Error.idl +// generated code does not contain a copyright notice + +#include +#include "unitree_go/msg/detail/error__rosidl_typesupport_introspection_c.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" +#include "rosidl_typesupport_introspection_c/field_types.h" +#include "rosidl_typesupport_introspection_c/identifier.h" +#include "rosidl_typesupport_introspection_c/message_introspection.h" +#include "unitree_go/msg/detail/error__functions.h" +#include "unitree_go/msg/detail/error__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void Error__rosidl_typesupport_introspection_c__Error_init_function( + void * message_memory, enum rosidl_runtime_c__message_initialization _init) +{ + // TODO(karsten1987): initializers are not yet implemented for typesupport c + // see https://github.com/ros2/ros2/issues/397 + (void) _init; + unitree_go__msg__Error__init(message_memory); +} + +void Error__rosidl_typesupport_introspection_c__Error_fini_function(void * message_memory) +{ + unitree_go__msg__Error__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember Error__rosidl_typesupport_introspection_c__Error_message_member_array[2] = { + { + "source", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__Error, source), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "state", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__Error, state), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers Error__rosidl_typesupport_introspection_c__Error_message_members = { + "unitree_go__msg", // message namespace + "Error", // message name + 2, // number of fields + sizeof(unitree_go__msg__Error), + Error__rosidl_typesupport_introspection_c__Error_message_member_array, // message members + Error__rosidl_typesupport_introspection_c__Error_init_function, // function to initialize message memory (memory has to be allocated) + Error__rosidl_typesupport_introspection_c__Error_fini_function // function to terminate message instance (will not free memory) +}; + +// this is not const since it must be initialized on first access +// since C does not allow non-integral compile-time constants +static rosidl_message_type_support_t Error__rosidl_typesupport_introspection_c__Error_message_type_support_handle = { + 0, + &Error__rosidl_typesupport_introspection_c__Error_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, Error)() { + if (!Error__rosidl_typesupport_introspection_c__Error_message_type_support_handle.typesupport_identifier) { + Error__rosidl_typesupport_introspection_c__Error_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &Error__rosidl_typesupport_introspection_c__Error_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__type_support.cpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__type_support.cpp new file mode 100644 index 0000000..018929d --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__type_support.cpp @@ -0,0 +1,122 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from unitree_go:msg/Error.idl +// generated code does not contain a copyright notice + +#include "array" +#include "cstddef" +#include "string" +#include "vector" +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_cpp/message_type_support.hpp" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/detail/error__struct.hpp" +#include "rosidl_typesupport_introspection_cpp/field_types.hpp" +#include "rosidl_typesupport_introspection_cpp/identifier.hpp" +#include "rosidl_typesupport_introspection_cpp/message_introspection.hpp" +#include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Error_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) unitree_go::msg::Error(_init); +} + +void Error_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Error(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Error_message_member_array[2] = { + { + "source", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::Error, source), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "state", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::Error, state), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers Error_message_members = { + "unitree_go::msg", // message namespace + "Error", // message name + 2, // number of fields + sizeof(unitree_go::msg::Error), + Error_message_member_array, // message members + Error_init_function, // function to initialize message memory (memory has to be allocated) + Error_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Error_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Error_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace unitree_go + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::Error_message_type_support_handle; +} + +} // namespace rosidl_typesupport_introspection_cpp + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, Error)() { + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::Error_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__type_support.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__type_support.h new file mode 100644 index 0000000..3257200 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from unitree_go:msg/Error.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__ERROR__TYPE_SUPPORT_H_ +#define UNITREE_GO__MSG__DETAIL__ERROR__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rosidl_runtime_c/message_type_support_struct.h" + +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + unitree_go, + msg, + Error +)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__ERROR__TYPE_SUPPORT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__type_support.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__type_support.hpp new file mode 100644 index 0000000..2080995 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/error__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from unitree_go:msg/Error.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__ERROR__TYPE_SUPPORT_HPP_ +#define UNITREE_GO__MSG__DETAIL__ERROR__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_cpp__visibility_control.hpp" + +#include "rosidl_typesupport_cpp/message_type_support.hpp" + +#ifdef __cplusplus +extern "C" +{ +#endif +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + unitree_go, + msg, + Error +)(); +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__ERROR__TYPE_SUPPORT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__builder.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__builder.hpp new file mode 100644 index 0000000..c11f19d --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__builder.hpp @@ -0,0 +1,103 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from unitree_go:msg/Go2FrontVideoData.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__GO2_FRONT_VIDEO_DATA__BUILDER_HPP_ +#define UNITREE_GO__MSG__DETAIL__GO2_FRONT_VIDEO_DATA__BUILDER_HPP_ + +#include "unitree_go/msg/detail/go2_front_video_data__struct.hpp" +#include +#include +#include + + +namespace unitree_go +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Go2FrontVideoData_video180p +{ +public: + explicit Init_Go2FrontVideoData_video180p(::unitree_go::msg::Go2FrontVideoData & msg) + : msg_(msg) + {} + ::unitree_go::msg::Go2FrontVideoData video180p(::unitree_go::msg::Go2FrontVideoData::_video180p_type arg) + { + msg_.video180p = std::move(arg); + return std::move(msg_); + } + +private: + ::unitree_go::msg::Go2FrontVideoData msg_; +}; + +class Init_Go2FrontVideoData_video360p +{ +public: + explicit Init_Go2FrontVideoData_video360p(::unitree_go::msg::Go2FrontVideoData & msg) + : msg_(msg) + {} + Init_Go2FrontVideoData_video180p video360p(::unitree_go::msg::Go2FrontVideoData::_video360p_type arg) + { + msg_.video360p = std::move(arg); + return Init_Go2FrontVideoData_video180p(msg_); + } + +private: + ::unitree_go::msg::Go2FrontVideoData msg_; +}; + +class Init_Go2FrontVideoData_video720p +{ +public: + explicit Init_Go2FrontVideoData_video720p(::unitree_go::msg::Go2FrontVideoData & msg) + : msg_(msg) + {} + Init_Go2FrontVideoData_video360p video720p(::unitree_go::msg::Go2FrontVideoData::_video720p_type arg) + { + msg_.video720p = std::move(arg); + return Init_Go2FrontVideoData_video360p(msg_); + } + +private: + ::unitree_go::msg::Go2FrontVideoData msg_; +}; + +class Init_Go2FrontVideoData_time_frame +{ +public: + Init_Go2FrontVideoData_time_frame() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_Go2FrontVideoData_video720p time_frame(::unitree_go::msg::Go2FrontVideoData::_time_frame_type arg) + { + msg_.time_frame = std::move(arg); + return Init_Go2FrontVideoData_video720p(msg_); + } + +private: + ::unitree_go::msg::Go2FrontVideoData msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::unitree_go::msg::Go2FrontVideoData>() +{ + return unitree_go::msg::builder::Init_Go2FrontVideoData_time_frame(); +} + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__GO2_FRONT_VIDEO_DATA__BUILDER_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__functions.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__functions.c new file mode 100644 index 0000000..af91c99 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__functions.c @@ -0,0 +1,294 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from unitree_go:msg/Go2FrontVideoData.idl +// generated code does not contain a copyright notice +#include "unitree_go/msg/detail/go2_front_video_data__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `video720p` +// Member `video360p` +// Member `video180p` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +bool +unitree_go__msg__Go2FrontVideoData__init(unitree_go__msg__Go2FrontVideoData * msg) +{ + if (!msg) { + return false; + } + // time_frame + // video720p + if (!rosidl_runtime_c__uint8__Sequence__init(&msg->video720p, 0)) { + unitree_go__msg__Go2FrontVideoData__fini(msg); + return false; + } + // video360p + if (!rosidl_runtime_c__uint8__Sequence__init(&msg->video360p, 0)) { + unitree_go__msg__Go2FrontVideoData__fini(msg); + return false; + } + // video180p + if (!rosidl_runtime_c__uint8__Sequence__init(&msg->video180p, 0)) { + unitree_go__msg__Go2FrontVideoData__fini(msg); + return false; + } + return true; +} + +void +unitree_go__msg__Go2FrontVideoData__fini(unitree_go__msg__Go2FrontVideoData * msg) +{ + if (!msg) { + return; + } + // time_frame + // video720p + rosidl_runtime_c__uint8__Sequence__fini(&msg->video720p); + // video360p + rosidl_runtime_c__uint8__Sequence__fini(&msg->video360p); + // video180p + rosidl_runtime_c__uint8__Sequence__fini(&msg->video180p); +} + +bool +unitree_go__msg__Go2FrontVideoData__are_equal(const unitree_go__msg__Go2FrontVideoData * lhs, const unitree_go__msg__Go2FrontVideoData * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // time_frame + if (lhs->time_frame != rhs->time_frame) { + return false; + } + // video720p + if (!rosidl_runtime_c__uint8__Sequence__are_equal( + &(lhs->video720p), &(rhs->video720p))) + { + return false; + } + // video360p + if (!rosidl_runtime_c__uint8__Sequence__are_equal( + &(lhs->video360p), &(rhs->video360p))) + { + return false; + } + // video180p + if (!rosidl_runtime_c__uint8__Sequence__are_equal( + &(lhs->video180p), &(rhs->video180p))) + { + return false; + } + return true; +} + +bool +unitree_go__msg__Go2FrontVideoData__copy( + const unitree_go__msg__Go2FrontVideoData * input, + unitree_go__msg__Go2FrontVideoData * output) +{ + if (!input || !output) { + return false; + } + // time_frame + output->time_frame = input->time_frame; + // video720p + if (!rosidl_runtime_c__uint8__Sequence__copy( + &(input->video720p), &(output->video720p))) + { + return false; + } + // video360p + if (!rosidl_runtime_c__uint8__Sequence__copy( + &(input->video360p), &(output->video360p))) + { + return false; + } + // video180p + if (!rosidl_runtime_c__uint8__Sequence__copy( + &(input->video180p), &(output->video180p))) + { + return false; + } + return true; +} + +unitree_go__msg__Go2FrontVideoData * +unitree_go__msg__Go2FrontVideoData__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__Go2FrontVideoData * msg = (unitree_go__msg__Go2FrontVideoData *)allocator.allocate(sizeof(unitree_go__msg__Go2FrontVideoData), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(unitree_go__msg__Go2FrontVideoData)); + bool success = unitree_go__msg__Go2FrontVideoData__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +unitree_go__msg__Go2FrontVideoData__destroy(unitree_go__msg__Go2FrontVideoData * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + unitree_go__msg__Go2FrontVideoData__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +unitree_go__msg__Go2FrontVideoData__Sequence__init(unitree_go__msg__Go2FrontVideoData__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__Go2FrontVideoData * data = NULL; + + if (size) { + data = (unitree_go__msg__Go2FrontVideoData *)allocator.zero_allocate(size, sizeof(unitree_go__msg__Go2FrontVideoData), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = unitree_go__msg__Go2FrontVideoData__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + unitree_go__msg__Go2FrontVideoData__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +unitree_go__msg__Go2FrontVideoData__Sequence__fini(unitree_go__msg__Go2FrontVideoData__Sequence * array) +{ + if (!array) { + return; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + + if (array->data) { + // ensure that data and capacity values are consistent + assert(array->capacity > 0); + // finalize all array elements + for (size_t i = 0; i < array->capacity; ++i) { + unitree_go__msg__Go2FrontVideoData__fini(&array->data[i]); + } + allocator.deallocate(array->data, allocator.state); + array->data = NULL; + array->size = 0; + array->capacity = 0; + } else { + // ensure that data, size, and capacity values are consistent + assert(0 == array->size); + assert(0 == array->capacity); + } +} + +unitree_go__msg__Go2FrontVideoData__Sequence * +unitree_go__msg__Go2FrontVideoData__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__Go2FrontVideoData__Sequence * array = (unitree_go__msg__Go2FrontVideoData__Sequence *)allocator.allocate(sizeof(unitree_go__msg__Go2FrontVideoData__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = unitree_go__msg__Go2FrontVideoData__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +unitree_go__msg__Go2FrontVideoData__Sequence__destroy(unitree_go__msg__Go2FrontVideoData__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + unitree_go__msg__Go2FrontVideoData__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +unitree_go__msg__Go2FrontVideoData__Sequence__are_equal(const unitree_go__msg__Go2FrontVideoData__Sequence * lhs, const unitree_go__msg__Go2FrontVideoData__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!unitree_go__msg__Go2FrontVideoData__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +unitree_go__msg__Go2FrontVideoData__Sequence__copy( + const unitree_go__msg__Go2FrontVideoData__Sequence * input, + unitree_go__msg__Go2FrontVideoData__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(unitree_go__msg__Go2FrontVideoData); + unitree_go__msg__Go2FrontVideoData * data = + (unitree_go__msg__Go2FrontVideoData *)realloc(output->data, allocation_size); + if (!data) { + return false; + } + for (size_t i = output->capacity; i < input->size; ++i) { + if (!unitree_go__msg__Go2FrontVideoData__init(&data[i])) { + /* free currently allocated and return false */ + for (; i-- > output->capacity; ) { + unitree_go__msg__Go2FrontVideoData__fini(&data[i]); + } + free(data); + return false; + } + } + output->data = data; + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!unitree_go__msg__Go2FrontVideoData__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__functions.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__functions.h new file mode 100644 index 0000000..e294419 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from unitree_go:msg/Go2FrontVideoData.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__GO2_FRONT_VIDEO_DATA__FUNCTIONS_H_ +#define UNITREE_GO__MSG__DETAIL__GO2_FRONT_VIDEO_DATA__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#include "unitree_go/msg/detail/go2_front_video_data__struct.h" + +/// Initialize msg/Go2FrontVideoData message. +/** + * If the init function is called twice for the same message without + * calling fini inbetween previously allocated memory will be leaked. + * \param[in,out] msg The previously allocated message pointer. + * Fields without a default value will not be initialized by this function. + * You might want to call memset(msg, 0, sizeof( + * unitree_go__msg__Go2FrontVideoData + * )) before or use + * unitree_go__msg__Go2FrontVideoData__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__Go2FrontVideoData__init(unitree_go__msg__Go2FrontVideoData * msg); + +/// Finalize msg/Go2FrontVideoData message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__Go2FrontVideoData__fini(unitree_go__msg__Go2FrontVideoData * msg); + +/// Create msg/Go2FrontVideoData message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * unitree_go__msg__Go2FrontVideoData__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__Go2FrontVideoData * +unitree_go__msg__Go2FrontVideoData__create(); + +/// Destroy msg/Go2FrontVideoData message. +/** + * It calls + * unitree_go__msg__Go2FrontVideoData__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__Go2FrontVideoData__destroy(unitree_go__msg__Go2FrontVideoData * msg); + +/// Check for msg/Go2FrontVideoData message equality. +/** + * \param[in] lhs The message on the left hand size of the equality operator. + * \param[in] rhs The message on the right hand size of the equality operator. + * \return true if messages are equal, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__Go2FrontVideoData__are_equal(const unitree_go__msg__Go2FrontVideoData * lhs, const unitree_go__msg__Go2FrontVideoData * rhs); + +/// Copy a msg/Go2FrontVideoData message. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source message pointer. + * \param[out] output The target message pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer is null + * or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__Go2FrontVideoData__copy( + const unitree_go__msg__Go2FrontVideoData * input, + unitree_go__msg__Go2FrontVideoData * output); + +/// Initialize array of msg/Go2FrontVideoData messages. +/** + * It allocates the memory for the number of elements and calls + * unitree_go__msg__Go2FrontVideoData__init() + * for each element of the array. + * \param[in,out] array The allocated array pointer. + * \param[in] size The size / capacity of the array. + * \return true if initialization was successful, otherwise false + * If the array pointer is valid and the size is zero it is guaranteed + # to return true. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__Go2FrontVideoData__Sequence__init(unitree_go__msg__Go2FrontVideoData__Sequence * array, size_t size); + +/// Finalize array of msg/Go2FrontVideoData messages. +/** + * It calls + * unitree_go__msg__Go2FrontVideoData__fini() + * for each element of the array and frees the memory for the number of + * elements. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__Go2FrontVideoData__Sequence__fini(unitree_go__msg__Go2FrontVideoData__Sequence * array); + +/// Create array of msg/Go2FrontVideoData messages. +/** + * It allocates the memory for the array and calls + * unitree_go__msg__Go2FrontVideoData__Sequence__init(). + * \param[in] size The size / capacity of the array. + * \return The pointer to the initialized array if successful, otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__Go2FrontVideoData__Sequence * +unitree_go__msg__Go2FrontVideoData__Sequence__create(size_t size); + +/// Destroy array of msg/Go2FrontVideoData messages. +/** + * It calls + * unitree_go__msg__Go2FrontVideoData__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__Go2FrontVideoData__Sequence__destroy(unitree_go__msg__Go2FrontVideoData__Sequence * array); + +/// Check for msg/Go2FrontVideoData message array equality. +/** + * \param[in] lhs The message array on the left hand size of the equality operator. + * \param[in] rhs The message array on the right hand size of the equality operator. + * \return true if message arrays are equal in size and content, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__Go2FrontVideoData__Sequence__are_equal(const unitree_go__msg__Go2FrontVideoData__Sequence * lhs, const unitree_go__msg__Go2FrontVideoData__Sequence * rhs); + +/// Copy an array of msg/Go2FrontVideoData messages. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source array pointer. + * \param[out] output The target array pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer + * is null or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__Go2FrontVideoData__Sequence__copy( + const unitree_go__msg__Go2FrontVideoData__Sequence * input, + unitree_go__msg__Go2FrontVideoData__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__GO2_FRONT_VIDEO_DATA__FUNCTIONS_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__rosidl_typesupport_fastrtps_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 0000000..4786d45 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,36 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from unitree_go:msg/Go2FrontVideoData.idl +// generated code does not contain a copyright notice +#ifndef UNITREE_GO__MSG__DETAIL__GO2_FRONT_VIDEO_DATA__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define UNITREE_GO__MSG__DETAIL__GO2_FRONT_VIDEO_DATA__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t get_serialized_size_unitree_go__msg__Go2FrontVideoData( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t max_serialized_size_unitree_go__msg__Go2FrontVideoData( + bool & full_bounded, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, unitree_go, msg, Go2FrontVideoData)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__GO2_FRONT_VIDEO_DATA__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__rosidl_typesupport_fastrtps_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 0000000..a93e5c9 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,79 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from unitree_go:msg/Go2FrontVideoData.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__GO2_FRONT_VIDEO_DATA__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__GO2_FRONT_VIDEO_DATA__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "unitree_go/msg/detail/go2_front_video_data__struct.hpp" + +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-parameter" +# ifdef __clang__ +# pragma clang diagnostic ignored "-Wdeprecated-register" +# pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +# endif +#endif +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif + +#include "fastcdr/Cdr.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_serialize( + const unitree_go::msg::Go2FrontVideoData & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + unitree_go::msg::Go2FrontVideoData & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +get_serialized_size( + const unitree_go::msg::Go2FrontVideoData & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +max_serialized_size_Go2FrontVideoData( + bool & full_bounded, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace unitree_go + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, unitree_go, msg, Go2FrontVideoData)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__GO2_FRONT_VIDEO_DATA__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__rosidl_typesupport_introspection_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__rosidl_typesupport_introspection_c.h new file mode 100644 index 0000000..276f2f0 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from unitree_go:msg/Go2FrontVideoData.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__GO2_FRONT_VIDEO_DATA__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define UNITREE_GO__MSG__DETAIL__GO2_FRONT_VIDEO_DATA__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, Go2FrontVideoData)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__GO2_FRONT_VIDEO_DATA__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__rosidl_typesupport_introspection_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 0000000..2f15fa2 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from unitree_go:msg/Go2FrontVideoData.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__GO2_FRONT_VIDEO_DATA__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__GO2_FRONT_VIDEO_DATA__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +// TODO(dirk-thomas) these visibility macros should be message package specific +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, Go2FrontVideoData)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__GO2_FRONT_VIDEO_DATA__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__struct.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__struct.h new file mode 100644 index 0000000..6c4b665 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__struct.h @@ -0,0 +1,49 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from unitree_go:msg/Go2FrontVideoData.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__GO2_FRONT_VIDEO_DATA__STRUCT_H_ +#define UNITREE_GO__MSG__DETAIL__GO2_FRONT_VIDEO_DATA__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'video720p' +// Member 'video360p' +// Member 'video180p' +#include "rosidl_runtime_c/primitives_sequence.h" + +// Struct defined in msg/Go2FrontVideoData in the package unitree_go. +typedef struct unitree_go__msg__Go2FrontVideoData +{ + uint64_t time_frame; + rosidl_runtime_c__uint8__Sequence video720p; + rosidl_runtime_c__uint8__Sequence video360p; + rosidl_runtime_c__uint8__Sequence video180p; +} unitree_go__msg__Go2FrontVideoData; + +// Struct for a sequence of unitree_go__msg__Go2FrontVideoData. +typedef struct unitree_go__msg__Go2FrontVideoData__Sequence +{ + unitree_go__msg__Go2FrontVideoData * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} unitree_go__msg__Go2FrontVideoData__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__GO2_FRONT_VIDEO_DATA__STRUCT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__struct.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__struct.hpp new file mode 100644 index 0000000..f7e5b85 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__struct.hpp @@ -0,0 +1,166 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from unitree_go:msg/Go2FrontVideoData.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__GO2_FRONT_VIDEO_DATA__STRUCT_HPP_ +#define UNITREE_GO__MSG__DETAIL__GO2_FRONT_VIDEO_DATA__STRUCT_HPP_ + +#include +#include +#include +#include +#include +#include +#include + + +#ifndef _WIN32 +# define DEPRECATED__unitree_go__msg__Go2FrontVideoData __attribute__((deprecated)) +#else +# define DEPRECATED__unitree_go__msg__Go2FrontVideoData __declspec(deprecated) +#endif + +namespace unitree_go +{ + +namespace msg +{ + +// message struct +template +struct Go2FrontVideoData_ +{ + using Type = Go2FrontVideoData_; + + explicit Go2FrontVideoData_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->time_frame = 0ull; + } + } + + explicit Go2FrontVideoData_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + (void)_alloc; + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->time_frame = 0ull; + } + } + + // field types and members + using _time_frame_type = + uint64_t; + _time_frame_type time_frame; + using _video720p_type = + std::vector::other>; + _video720p_type video720p; + using _video360p_type = + std::vector::other>; + _video360p_type video360p; + using _video180p_type = + std::vector::other>; + _video180p_type video180p; + + // setters for named parameter idiom + Type & set__time_frame( + const uint64_t & _arg) + { + this->time_frame = _arg; + return *this; + } + Type & set__video720p( + const std::vector::other> & _arg) + { + this->video720p = _arg; + return *this; + } + Type & set__video360p( + const std::vector::other> & _arg) + { + this->video360p = _arg; + return *this; + } + Type & set__video180p( + const std::vector::other> & _arg) + { + this->video180p = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + unitree_go::msg::Go2FrontVideoData_ *; + using ConstRawPtr = + const unitree_go::msg::Go2FrontVideoData_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr const>; + + // pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead + // NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly + typedef DEPRECATED__unitree_go__msg__Go2FrontVideoData + std::shared_ptr> + Ptr; + typedef DEPRECATED__unitree_go__msg__Go2FrontVideoData + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Go2FrontVideoData_ & other) const + { + if (this->time_frame != other.time_frame) { + return false; + } + if (this->video720p != other.video720p) { + return false; + } + if (this->video360p != other.video360p) { + return false; + } + if (this->video180p != other.video180p) { + return false; + } + return true; + } + bool operator!=(const Go2FrontVideoData_ & other) const + { + return !this->operator==(other); + } +}; // struct Go2FrontVideoData_ + +// alias to use template instance with default allocator +using Go2FrontVideoData = + unitree_go::msg::Go2FrontVideoData_>; + +// constant definitions + +} // namespace msg + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__GO2_FRONT_VIDEO_DATA__STRUCT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__traits.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__traits.hpp new file mode 100644 index 0000000..db0046a --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__traits.hpp @@ -0,0 +1,42 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from unitree_go:msg/Go2FrontVideoData.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__GO2_FRONT_VIDEO_DATA__TRAITS_HPP_ +#define UNITREE_GO__MSG__DETAIL__GO2_FRONT_VIDEO_DATA__TRAITS_HPP_ + +#include "unitree_go/msg/detail/go2_front_video_data__struct.hpp" +#include +#include +#include + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "unitree_go::msg::Go2FrontVideoData"; +} + +template<> +inline const char * name() +{ + return "unitree_go/msg/Go2FrontVideoData"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UNITREE_GO__MSG__DETAIL__GO2_FRONT_VIDEO_DATA__TRAITS_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__type_support.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__type_support.c new file mode 100644 index 0000000..c6be76c --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__type_support.c @@ -0,0 +1,132 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from unitree_go:msg/Go2FrontVideoData.idl +// generated code does not contain a copyright notice + +#include +#include "unitree_go/msg/detail/go2_front_video_data__rosidl_typesupport_introspection_c.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" +#include "rosidl_typesupport_introspection_c/field_types.h" +#include "rosidl_typesupport_introspection_c/identifier.h" +#include "rosidl_typesupport_introspection_c/message_introspection.h" +#include "unitree_go/msg/detail/go2_front_video_data__functions.h" +#include "unitree_go/msg/detail/go2_front_video_data__struct.h" + + +// Include directives for member types +// Member `video720p` +// Member `video360p` +// Member `video180p` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void Go2FrontVideoData__rosidl_typesupport_introspection_c__Go2FrontVideoData_init_function( + void * message_memory, enum rosidl_runtime_c__message_initialization _init) +{ + // TODO(karsten1987): initializers are not yet implemented for typesupport c + // see https://github.com/ros2/ros2/issues/397 + (void) _init; + unitree_go__msg__Go2FrontVideoData__init(message_memory); +} + +void Go2FrontVideoData__rosidl_typesupport_introspection_c__Go2FrontVideoData_fini_function(void * message_memory) +{ + unitree_go__msg__Go2FrontVideoData__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember Go2FrontVideoData__rosidl_typesupport_introspection_c__Go2FrontVideoData_message_member_array[4] = { + { + "time_frame", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT64, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__Go2FrontVideoData, time_frame), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "video720p", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__Go2FrontVideoData, video720p), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "video360p", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__Go2FrontVideoData, video360p), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "video180p", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__Go2FrontVideoData, video180p), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers Go2FrontVideoData__rosidl_typesupport_introspection_c__Go2FrontVideoData_message_members = { + "unitree_go__msg", // message namespace + "Go2FrontVideoData", // message name + 4, // number of fields + sizeof(unitree_go__msg__Go2FrontVideoData), + Go2FrontVideoData__rosidl_typesupport_introspection_c__Go2FrontVideoData_message_member_array, // message members + Go2FrontVideoData__rosidl_typesupport_introspection_c__Go2FrontVideoData_init_function, // function to initialize message memory (memory has to be allocated) + Go2FrontVideoData__rosidl_typesupport_introspection_c__Go2FrontVideoData_fini_function // function to terminate message instance (will not free memory) +}; + +// this is not const since it must be initialized on first access +// since C does not allow non-integral compile-time constants +static rosidl_message_type_support_t Go2FrontVideoData__rosidl_typesupport_introspection_c__Go2FrontVideoData_message_type_support_handle = { + 0, + &Go2FrontVideoData__rosidl_typesupport_introspection_c__Go2FrontVideoData_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, Go2FrontVideoData)() { + if (!Go2FrontVideoData__rosidl_typesupport_introspection_c__Go2FrontVideoData_message_type_support_handle.typesupport_identifier) { + Go2FrontVideoData__rosidl_typesupport_introspection_c__Go2FrontVideoData_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &Go2FrontVideoData__rosidl_typesupport_introspection_c__Go2FrontVideoData_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__type_support.cpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__type_support.cpp new file mode 100644 index 0000000..a10ddeb --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__type_support.cpp @@ -0,0 +1,233 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from unitree_go:msg/Go2FrontVideoData.idl +// generated code does not contain a copyright notice + +#include "array" +#include "cstddef" +#include "string" +#include "vector" +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_cpp/message_type_support.hpp" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/detail/go2_front_video_data__struct.hpp" +#include "rosidl_typesupport_introspection_cpp/field_types.hpp" +#include "rosidl_typesupport_introspection_cpp/identifier.hpp" +#include "rosidl_typesupport_introspection_cpp/message_introspection.hpp" +#include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Go2FrontVideoData_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) unitree_go::msg::Go2FrontVideoData(_init); +} + +void Go2FrontVideoData_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Go2FrontVideoData(); +} + +size_t size_function__Go2FrontVideoData__video720p(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__Go2FrontVideoData__video720p(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__Go2FrontVideoData__video720p(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void resize_function__Go2FrontVideoData__video720p(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +size_t size_function__Go2FrontVideoData__video360p(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__Go2FrontVideoData__video360p(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__Go2FrontVideoData__video360p(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void resize_function__Go2FrontVideoData__video360p(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +size_t size_function__Go2FrontVideoData__video180p(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__Go2FrontVideoData__video180p(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__Go2FrontVideoData__video180p(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void resize_function__Go2FrontVideoData__video180p(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Go2FrontVideoData_message_member_array[4] = { + { + "time_frame", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT64, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::Go2FrontVideoData, time_frame), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "video720p", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::Go2FrontVideoData, video720p), // bytes offset in struct + nullptr, // default value + size_function__Go2FrontVideoData__video720p, // size() function pointer + get_const_function__Go2FrontVideoData__video720p, // get_const(index) function pointer + get_function__Go2FrontVideoData__video720p, // get(index) function pointer + resize_function__Go2FrontVideoData__video720p // resize(index) function pointer + }, + { + "video360p", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::Go2FrontVideoData, video360p), // bytes offset in struct + nullptr, // default value + size_function__Go2FrontVideoData__video360p, // size() function pointer + get_const_function__Go2FrontVideoData__video360p, // get_const(index) function pointer + get_function__Go2FrontVideoData__video360p, // get(index) function pointer + resize_function__Go2FrontVideoData__video360p // resize(index) function pointer + }, + { + "video180p", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::Go2FrontVideoData, video180p), // bytes offset in struct + nullptr, // default value + size_function__Go2FrontVideoData__video180p, // size() function pointer + get_const_function__Go2FrontVideoData__video180p, // get_const(index) function pointer + get_function__Go2FrontVideoData__video180p, // get(index) function pointer + resize_function__Go2FrontVideoData__video180p // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers Go2FrontVideoData_message_members = { + "unitree_go::msg", // message namespace + "Go2FrontVideoData", // message name + 4, // number of fields + sizeof(unitree_go::msg::Go2FrontVideoData), + Go2FrontVideoData_message_member_array, // message members + Go2FrontVideoData_init_function, // function to initialize message memory (memory has to be allocated) + Go2FrontVideoData_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Go2FrontVideoData_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Go2FrontVideoData_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace unitree_go + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::Go2FrontVideoData_message_type_support_handle; +} + +} // namespace rosidl_typesupport_introspection_cpp + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, Go2FrontVideoData)() { + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::Go2FrontVideoData_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__type_support.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__type_support.h new file mode 100644 index 0000000..3529f31 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from unitree_go:msg/Go2FrontVideoData.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__GO2_FRONT_VIDEO_DATA__TYPE_SUPPORT_H_ +#define UNITREE_GO__MSG__DETAIL__GO2_FRONT_VIDEO_DATA__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rosidl_runtime_c/message_type_support_struct.h" + +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + unitree_go, + msg, + Go2FrontVideoData +)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__GO2_FRONT_VIDEO_DATA__TYPE_SUPPORT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__type_support.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__type_support.hpp new file mode 100644 index 0000000..83f0a58 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/go2_front_video_data__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from unitree_go:msg/Go2FrontVideoData.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__GO2_FRONT_VIDEO_DATA__TYPE_SUPPORT_HPP_ +#define UNITREE_GO__MSG__DETAIL__GO2_FRONT_VIDEO_DATA__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_cpp__visibility_control.hpp" + +#include "rosidl_typesupport_cpp/message_type_support.hpp" + +#ifdef __cplusplus +extern "C" +{ +#endif +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + unitree_go, + msg, + Go2FrontVideoData +)(); +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__GO2_FRONT_VIDEO_DATA__TYPE_SUPPORT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__builder.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__builder.hpp new file mode 100644 index 0000000..fbbddaa --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__builder.hpp @@ -0,0 +1,151 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from unitree_go:msg/HeightMap.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__HEIGHT_MAP__BUILDER_HPP_ +#define UNITREE_GO__MSG__DETAIL__HEIGHT_MAP__BUILDER_HPP_ + +#include "unitree_go/msg/detail/height_map__struct.hpp" +#include +#include +#include + + +namespace unitree_go +{ + +namespace msg +{ + +namespace builder +{ + +class Init_HeightMap_data +{ +public: + explicit Init_HeightMap_data(::unitree_go::msg::HeightMap & msg) + : msg_(msg) + {} + ::unitree_go::msg::HeightMap data(::unitree_go::msg::HeightMap::_data_type arg) + { + msg_.data = std::move(arg); + return std::move(msg_); + } + +private: + ::unitree_go::msg::HeightMap msg_; +}; + +class Init_HeightMap_origin +{ +public: + explicit Init_HeightMap_origin(::unitree_go::msg::HeightMap & msg) + : msg_(msg) + {} + Init_HeightMap_data origin(::unitree_go::msg::HeightMap::_origin_type arg) + { + msg_.origin = std::move(arg); + return Init_HeightMap_data(msg_); + } + +private: + ::unitree_go::msg::HeightMap msg_; +}; + +class Init_HeightMap_height +{ +public: + explicit Init_HeightMap_height(::unitree_go::msg::HeightMap & msg) + : msg_(msg) + {} + Init_HeightMap_origin height(::unitree_go::msg::HeightMap::_height_type arg) + { + msg_.height = std::move(arg); + return Init_HeightMap_origin(msg_); + } + +private: + ::unitree_go::msg::HeightMap msg_; +}; + +class Init_HeightMap_width +{ +public: + explicit Init_HeightMap_width(::unitree_go::msg::HeightMap & msg) + : msg_(msg) + {} + Init_HeightMap_height width(::unitree_go::msg::HeightMap::_width_type arg) + { + msg_.width = std::move(arg); + return Init_HeightMap_height(msg_); + } + +private: + ::unitree_go::msg::HeightMap msg_; +}; + +class Init_HeightMap_resolution +{ +public: + explicit Init_HeightMap_resolution(::unitree_go::msg::HeightMap & msg) + : msg_(msg) + {} + Init_HeightMap_width resolution(::unitree_go::msg::HeightMap::_resolution_type arg) + { + msg_.resolution = std::move(arg); + return Init_HeightMap_width(msg_); + } + +private: + ::unitree_go::msg::HeightMap msg_; +}; + +class Init_HeightMap_frame_id +{ +public: + explicit Init_HeightMap_frame_id(::unitree_go::msg::HeightMap & msg) + : msg_(msg) + {} + Init_HeightMap_resolution frame_id(::unitree_go::msg::HeightMap::_frame_id_type arg) + { + msg_.frame_id = std::move(arg); + return Init_HeightMap_resolution(msg_); + } + +private: + ::unitree_go::msg::HeightMap msg_; +}; + +class Init_HeightMap_stamp +{ +public: + Init_HeightMap_stamp() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_HeightMap_frame_id stamp(::unitree_go::msg::HeightMap::_stamp_type arg) + { + msg_.stamp = std::move(arg); + return Init_HeightMap_frame_id(msg_); + } + +private: + ::unitree_go::msg::HeightMap msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::unitree_go::msg::HeightMap>() +{ + return unitree_go::msg::builder::Init_HeightMap_stamp(); +} + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__HEIGHT_MAP__BUILDER_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__functions.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__functions.c new file mode 100644 index 0000000..f3540b8 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__functions.c @@ -0,0 +1,311 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from unitree_go:msg/HeightMap.idl +// generated code does not contain a copyright notice +#include "unitree_go/msg/detail/height_map__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `frame_id` +#include "rosidl_runtime_c/string_functions.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +bool +unitree_go__msg__HeightMap__init(unitree_go__msg__HeightMap * msg) +{ + if (!msg) { + return false; + } + // stamp + // frame_id + if (!rosidl_runtime_c__String__init(&msg->frame_id)) { + unitree_go__msg__HeightMap__fini(msg); + return false; + } + // resolution + // width + // height + // origin + // data + if (!rosidl_runtime_c__float__Sequence__init(&msg->data, 0)) { + unitree_go__msg__HeightMap__fini(msg); + return false; + } + return true; +} + +void +unitree_go__msg__HeightMap__fini(unitree_go__msg__HeightMap * msg) +{ + if (!msg) { + return; + } + // stamp + // frame_id + rosidl_runtime_c__String__fini(&msg->frame_id); + // resolution + // width + // height + // origin + // data + rosidl_runtime_c__float__Sequence__fini(&msg->data); +} + +bool +unitree_go__msg__HeightMap__are_equal(const unitree_go__msg__HeightMap * lhs, const unitree_go__msg__HeightMap * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // stamp + if (lhs->stamp != rhs->stamp) { + return false; + } + // frame_id + if (!rosidl_runtime_c__String__are_equal( + &(lhs->frame_id), &(rhs->frame_id))) + { + return false; + } + // resolution + if (lhs->resolution != rhs->resolution) { + return false; + } + // width + if (lhs->width != rhs->width) { + return false; + } + // height + if (lhs->height != rhs->height) { + return false; + } + // origin + for (size_t i = 0; i < 2; ++i) { + if (lhs->origin[i] != rhs->origin[i]) { + return false; + } + } + // data + if (!rosidl_runtime_c__float__Sequence__are_equal( + &(lhs->data), &(rhs->data))) + { + return false; + } + return true; +} + +bool +unitree_go__msg__HeightMap__copy( + const unitree_go__msg__HeightMap * input, + unitree_go__msg__HeightMap * output) +{ + if (!input || !output) { + return false; + } + // stamp + output->stamp = input->stamp; + // frame_id + if (!rosidl_runtime_c__String__copy( + &(input->frame_id), &(output->frame_id))) + { + return false; + } + // resolution + output->resolution = input->resolution; + // width + output->width = input->width; + // height + output->height = input->height; + // origin + for (size_t i = 0; i < 2; ++i) { + output->origin[i] = input->origin[i]; + } + // data + if (!rosidl_runtime_c__float__Sequence__copy( + &(input->data), &(output->data))) + { + return false; + } + return true; +} + +unitree_go__msg__HeightMap * +unitree_go__msg__HeightMap__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__HeightMap * msg = (unitree_go__msg__HeightMap *)allocator.allocate(sizeof(unitree_go__msg__HeightMap), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(unitree_go__msg__HeightMap)); + bool success = unitree_go__msg__HeightMap__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +unitree_go__msg__HeightMap__destroy(unitree_go__msg__HeightMap * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + unitree_go__msg__HeightMap__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +unitree_go__msg__HeightMap__Sequence__init(unitree_go__msg__HeightMap__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__HeightMap * data = NULL; + + if (size) { + data = (unitree_go__msg__HeightMap *)allocator.zero_allocate(size, sizeof(unitree_go__msg__HeightMap), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = unitree_go__msg__HeightMap__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + unitree_go__msg__HeightMap__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +unitree_go__msg__HeightMap__Sequence__fini(unitree_go__msg__HeightMap__Sequence * array) +{ + if (!array) { + return; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + + if (array->data) { + // ensure that data and capacity values are consistent + assert(array->capacity > 0); + // finalize all array elements + for (size_t i = 0; i < array->capacity; ++i) { + unitree_go__msg__HeightMap__fini(&array->data[i]); + } + allocator.deallocate(array->data, allocator.state); + array->data = NULL; + array->size = 0; + array->capacity = 0; + } else { + // ensure that data, size, and capacity values are consistent + assert(0 == array->size); + assert(0 == array->capacity); + } +} + +unitree_go__msg__HeightMap__Sequence * +unitree_go__msg__HeightMap__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__HeightMap__Sequence * array = (unitree_go__msg__HeightMap__Sequence *)allocator.allocate(sizeof(unitree_go__msg__HeightMap__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = unitree_go__msg__HeightMap__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +unitree_go__msg__HeightMap__Sequence__destroy(unitree_go__msg__HeightMap__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + unitree_go__msg__HeightMap__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +unitree_go__msg__HeightMap__Sequence__are_equal(const unitree_go__msg__HeightMap__Sequence * lhs, const unitree_go__msg__HeightMap__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!unitree_go__msg__HeightMap__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +unitree_go__msg__HeightMap__Sequence__copy( + const unitree_go__msg__HeightMap__Sequence * input, + unitree_go__msg__HeightMap__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(unitree_go__msg__HeightMap); + unitree_go__msg__HeightMap * data = + (unitree_go__msg__HeightMap *)realloc(output->data, allocation_size); + if (!data) { + return false; + } + for (size_t i = output->capacity; i < input->size; ++i) { + if (!unitree_go__msg__HeightMap__init(&data[i])) { + /* free currently allocated and return false */ + for (; i-- > output->capacity; ) { + unitree_go__msg__HeightMap__fini(&data[i]); + } + free(data); + return false; + } + } + output->data = data; + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!unitree_go__msg__HeightMap__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__functions.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__functions.h new file mode 100644 index 0000000..7b8994d --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from unitree_go:msg/HeightMap.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__HEIGHT_MAP__FUNCTIONS_H_ +#define UNITREE_GO__MSG__DETAIL__HEIGHT_MAP__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#include "unitree_go/msg/detail/height_map__struct.h" + +/// Initialize msg/HeightMap message. +/** + * If the init function is called twice for the same message without + * calling fini inbetween previously allocated memory will be leaked. + * \param[in,out] msg The previously allocated message pointer. + * Fields without a default value will not be initialized by this function. + * You might want to call memset(msg, 0, sizeof( + * unitree_go__msg__HeightMap + * )) before or use + * unitree_go__msg__HeightMap__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__HeightMap__init(unitree_go__msg__HeightMap * msg); + +/// Finalize msg/HeightMap message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__HeightMap__fini(unitree_go__msg__HeightMap * msg); + +/// Create msg/HeightMap message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * unitree_go__msg__HeightMap__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__HeightMap * +unitree_go__msg__HeightMap__create(); + +/// Destroy msg/HeightMap message. +/** + * It calls + * unitree_go__msg__HeightMap__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__HeightMap__destroy(unitree_go__msg__HeightMap * msg); + +/// Check for msg/HeightMap message equality. +/** + * \param[in] lhs The message on the left hand size of the equality operator. + * \param[in] rhs The message on the right hand size of the equality operator. + * \return true if messages are equal, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__HeightMap__are_equal(const unitree_go__msg__HeightMap * lhs, const unitree_go__msg__HeightMap * rhs); + +/// Copy a msg/HeightMap message. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source message pointer. + * \param[out] output The target message pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer is null + * or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__HeightMap__copy( + const unitree_go__msg__HeightMap * input, + unitree_go__msg__HeightMap * output); + +/// Initialize array of msg/HeightMap messages. +/** + * It allocates the memory for the number of elements and calls + * unitree_go__msg__HeightMap__init() + * for each element of the array. + * \param[in,out] array The allocated array pointer. + * \param[in] size The size / capacity of the array. + * \return true if initialization was successful, otherwise false + * If the array pointer is valid and the size is zero it is guaranteed + # to return true. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__HeightMap__Sequence__init(unitree_go__msg__HeightMap__Sequence * array, size_t size); + +/// Finalize array of msg/HeightMap messages. +/** + * It calls + * unitree_go__msg__HeightMap__fini() + * for each element of the array and frees the memory for the number of + * elements. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__HeightMap__Sequence__fini(unitree_go__msg__HeightMap__Sequence * array); + +/// Create array of msg/HeightMap messages. +/** + * It allocates the memory for the array and calls + * unitree_go__msg__HeightMap__Sequence__init(). + * \param[in] size The size / capacity of the array. + * \return The pointer to the initialized array if successful, otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__HeightMap__Sequence * +unitree_go__msg__HeightMap__Sequence__create(size_t size); + +/// Destroy array of msg/HeightMap messages. +/** + * It calls + * unitree_go__msg__HeightMap__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__HeightMap__Sequence__destroy(unitree_go__msg__HeightMap__Sequence * array); + +/// Check for msg/HeightMap message array equality. +/** + * \param[in] lhs The message array on the left hand size of the equality operator. + * \param[in] rhs The message array on the right hand size of the equality operator. + * \return true if message arrays are equal in size and content, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__HeightMap__Sequence__are_equal(const unitree_go__msg__HeightMap__Sequence * lhs, const unitree_go__msg__HeightMap__Sequence * rhs); + +/// Copy an array of msg/HeightMap messages. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source array pointer. + * \param[out] output The target array pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer + * is null or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__HeightMap__Sequence__copy( + const unitree_go__msg__HeightMap__Sequence * input, + unitree_go__msg__HeightMap__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__HEIGHT_MAP__FUNCTIONS_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__rosidl_typesupport_fastrtps_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 0000000..09b0a40 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,36 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from unitree_go:msg/HeightMap.idl +// generated code does not contain a copyright notice +#ifndef UNITREE_GO__MSG__DETAIL__HEIGHT_MAP__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define UNITREE_GO__MSG__DETAIL__HEIGHT_MAP__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t get_serialized_size_unitree_go__msg__HeightMap( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t max_serialized_size_unitree_go__msg__HeightMap( + bool & full_bounded, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, unitree_go, msg, HeightMap)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__HEIGHT_MAP__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__rosidl_typesupport_fastrtps_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 0000000..2bd56a2 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,79 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from unitree_go:msg/HeightMap.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__HEIGHT_MAP__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__HEIGHT_MAP__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "unitree_go/msg/detail/height_map__struct.hpp" + +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-parameter" +# ifdef __clang__ +# pragma clang diagnostic ignored "-Wdeprecated-register" +# pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +# endif +#endif +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif + +#include "fastcdr/Cdr.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_serialize( + const unitree_go::msg::HeightMap & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + unitree_go::msg::HeightMap & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +get_serialized_size( + const unitree_go::msg::HeightMap & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +max_serialized_size_HeightMap( + bool & full_bounded, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace unitree_go + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, unitree_go, msg, HeightMap)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__HEIGHT_MAP__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__rosidl_typesupport_introspection_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__rosidl_typesupport_introspection_c.h new file mode 100644 index 0000000..989f851 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from unitree_go:msg/HeightMap.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__HEIGHT_MAP__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define UNITREE_GO__MSG__DETAIL__HEIGHT_MAP__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, HeightMap)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__HEIGHT_MAP__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__rosidl_typesupport_introspection_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 0000000..691189f --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from unitree_go:msg/HeightMap.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__HEIGHT_MAP__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__HEIGHT_MAP__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +// TODO(dirk-thomas) these visibility macros should be message package specific +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, HeightMap)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__HEIGHT_MAP__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__struct.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__struct.h new file mode 100644 index 0000000..965a83b --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__struct.h @@ -0,0 +1,52 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from unitree_go:msg/HeightMap.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__HEIGHT_MAP__STRUCT_H_ +#define UNITREE_GO__MSG__DETAIL__HEIGHT_MAP__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'frame_id' +#include "rosidl_runtime_c/string.h" +// Member 'data' +#include "rosidl_runtime_c/primitives_sequence.h" + +// Struct defined in msg/HeightMap in the package unitree_go. +typedef struct unitree_go__msg__HeightMap +{ + double stamp; + rosidl_runtime_c__String frame_id; + float resolution; + uint32_t width; + uint32_t height; + float origin[2]; + rosidl_runtime_c__float__Sequence data; +} unitree_go__msg__HeightMap; + +// Struct for a sequence of unitree_go__msg__HeightMap. +typedef struct unitree_go__msg__HeightMap__Sequence +{ + unitree_go__msg__HeightMap * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} unitree_go__msg__HeightMap__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__HEIGHT_MAP__STRUCT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__struct.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__struct.hpp new file mode 100644 index 0000000..4775967 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__struct.hpp @@ -0,0 +1,213 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from unitree_go:msg/HeightMap.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__HEIGHT_MAP__STRUCT_HPP_ +#define UNITREE_GO__MSG__DETAIL__HEIGHT_MAP__STRUCT_HPP_ + +#include +#include +#include +#include +#include +#include +#include + + +#ifndef _WIN32 +# define DEPRECATED__unitree_go__msg__HeightMap __attribute__((deprecated)) +#else +# define DEPRECATED__unitree_go__msg__HeightMap __declspec(deprecated) +#endif + +namespace unitree_go +{ + +namespace msg +{ + +// message struct +template +struct HeightMap_ +{ + using Type = HeightMap_; + + explicit HeightMap_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->stamp = 0.0; + this->frame_id = ""; + this->resolution = 0.0f; + this->width = 0ul; + this->height = 0ul; + std::fill::iterator, float>(this->origin.begin(), this->origin.end(), 0.0f); + } + } + + explicit HeightMap_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : frame_id(_alloc), + origin(_alloc) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->stamp = 0.0; + this->frame_id = ""; + this->resolution = 0.0f; + this->width = 0ul; + this->height = 0ul; + std::fill::iterator, float>(this->origin.begin(), this->origin.end(), 0.0f); + } + } + + // field types and members + using _stamp_type = + double; + _stamp_type stamp; + using _frame_id_type = + std::basic_string, typename ContainerAllocator::template rebind::other>; + _frame_id_type frame_id; + using _resolution_type = + float; + _resolution_type resolution; + using _width_type = + uint32_t; + _width_type width; + using _height_type = + uint32_t; + _height_type height; + using _origin_type = + std::array; + _origin_type origin; + using _data_type = + std::vector::other>; + _data_type data; + + // setters for named parameter idiom + Type & set__stamp( + const double & _arg) + { + this->stamp = _arg; + return *this; + } + Type & set__frame_id( + const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + { + this->frame_id = _arg; + return *this; + } + Type & set__resolution( + const float & _arg) + { + this->resolution = _arg; + return *this; + } + Type & set__width( + const uint32_t & _arg) + { + this->width = _arg; + return *this; + } + Type & set__height( + const uint32_t & _arg) + { + this->height = _arg; + return *this; + } + Type & set__origin( + const std::array & _arg) + { + this->origin = _arg; + return *this; + } + Type & set__data( + const std::vector::other> & _arg) + { + this->data = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + unitree_go::msg::HeightMap_ *; + using ConstRawPtr = + const unitree_go::msg::HeightMap_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr const>; + + // pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead + // NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly + typedef DEPRECATED__unitree_go__msg__HeightMap + std::shared_ptr> + Ptr; + typedef DEPRECATED__unitree_go__msg__HeightMap + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const HeightMap_ & other) const + { + if (this->stamp != other.stamp) { + return false; + } + if (this->frame_id != other.frame_id) { + return false; + } + if (this->resolution != other.resolution) { + return false; + } + if (this->width != other.width) { + return false; + } + if (this->height != other.height) { + return false; + } + if (this->origin != other.origin) { + return false; + } + if (this->data != other.data) { + return false; + } + return true; + } + bool operator!=(const HeightMap_ & other) const + { + return !this->operator==(other); + } +}; // struct HeightMap_ + +// alias to use template instance with default allocator +using HeightMap = + unitree_go::msg::HeightMap_>; + +// constant definitions + +} // namespace msg + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__HEIGHT_MAP__STRUCT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__traits.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__traits.hpp new file mode 100644 index 0000000..336ecbc --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__traits.hpp @@ -0,0 +1,42 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from unitree_go:msg/HeightMap.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__HEIGHT_MAP__TRAITS_HPP_ +#define UNITREE_GO__MSG__DETAIL__HEIGHT_MAP__TRAITS_HPP_ + +#include "unitree_go/msg/detail/height_map__struct.hpp" +#include +#include +#include + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "unitree_go::msg::HeightMap"; +} + +template<> +inline const char * name() +{ + return "unitree_go/msg/HeightMap"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UNITREE_GO__MSG__DETAIL__HEIGHT_MAP__TRAITS_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__type_support.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__type_support.c new file mode 100644 index 0000000..c25acf8 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__type_support.c @@ -0,0 +1,177 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from unitree_go:msg/HeightMap.idl +// generated code does not contain a copyright notice + +#include +#include "unitree_go/msg/detail/height_map__rosidl_typesupport_introspection_c.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" +#include "rosidl_typesupport_introspection_c/field_types.h" +#include "rosidl_typesupport_introspection_c/identifier.h" +#include "rosidl_typesupport_introspection_c/message_introspection.h" +#include "unitree_go/msg/detail/height_map__functions.h" +#include "unitree_go/msg/detail/height_map__struct.h" + + +// Include directives for member types +// Member `frame_id` +#include "rosidl_runtime_c/string_functions.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void HeightMap__rosidl_typesupport_introspection_c__HeightMap_init_function( + void * message_memory, enum rosidl_runtime_c__message_initialization _init) +{ + // TODO(karsten1987): initializers are not yet implemented for typesupport c + // see https://github.com/ros2/ros2/issues/397 + (void) _init; + unitree_go__msg__HeightMap__init(message_memory); +} + +void HeightMap__rosidl_typesupport_introspection_c__HeightMap_fini_function(void * message_memory) +{ + unitree_go__msg__HeightMap__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember HeightMap__rosidl_typesupport_introspection_c__HeightMap_message_member_array[7] = { + { + "stamp", // name + rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__HeightMap, stamp), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "frame_id", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__HeightMap, frame_id), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "resolution", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__HeightMap, resolution), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "width", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__HeightMap, width), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "height", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__HeightMap, height), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "origin", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 2, // array size + false, // is upper bound + offsetof(unitree_go__msg__HeightMap, origin), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__HeightMap, data), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers HeightMap__rosidl_typesupport_introspection_c__HeightMap_message_members = { + "unitree_go__msg", // message namespace + "HeightMap", // message name + 7, // number of fields + sizeof(unitree_go__msg__HeightMap), + HeightMap__rosidl_typesupport_introspection_c__HeightMap_message_member_array, // message members + HeightMap__rosidl_typesupport_introspection_c__HeightMap_init_function, // function to initialize message memory (memory has to be allocated) + HeightMap__rosidl_typesupport_introspection_c__HeightMap_fini_function // function to terminate message instance (will not free memory) +}; + +// this is not const since it must be initialized on first access +// since C does not allow non-integral compile-time constants +static rosidl_message_type_support_t HeightMap__rosidl_typesupport_introspection_c__HeightMap_message_type_support_handle = { + 0, + &HeightMap__rosidl_typesupport_introspection_c__HeightMap_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, HeightMap)() { + if (!HeightMap__rosidl_typesupport_introspection_c__HeightMap_message_type_support_handle.typesupport_identifier) { + HeightMap__rosidl_typesupport_introspection_c__HeightMap_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &HeightMap__rosidl_typesupport_introspection_c__HeightMap_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__type_support.cpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__type_support.cpp new file mode 100644 index 0000000..8f3c2c0 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__type_support.cpp @@ -0,0 +1,244 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from unitree_go:msg/HeightMap.idl +// generated code does not contain a copyright notice + +#include "array" +#include "cstddef" +#include "string" +#include "vector" +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_cpp/message_type_support.hpp" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/detail/height_map__struct.hpp" +#include "rosidl_typesupport_introspection_cpp/field_types.hpp" +#include "rosidl_typesupport_introspection_cpp/identifier.hpp" +#include "rosidl_typesupport_introspection_cpp/message_introspection.hpp" +#include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void HeightMap_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) unitree_go::msg::HeightMap(_init); +} + +void HeightMap_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~HeightMap(); +} + +size_t size_function__HeightMap__origin(const void * untyped_member) +{ + (void)untyped_member; + return 2; +} + +const void * get_const_function__HeightMap__origin(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__HeightMap__origin(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +size_t size_function__HeightMap__data(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__HeightMap__data(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__HeightMap__data(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void resize_function__HeightMap__data(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember HeightMap_message_member_array[7] = { + { + "stamp", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::HeightMap, stamp), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "frame_id", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::HeightMap, frame_id), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "resolution", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::HeightMap, resolution), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "width", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::HeightMap, width), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "height", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::HeightMap, height), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "origin", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 2, // array size + false, // is upper bound + offsetof(unitree_go::msg::HeightMap, origin), // bytes offset in struct + nullptr, // default value + size_function__HeightMap__origin, // size() function pointer + get_const_function__HeightMap__origin, // get_const(index) function pointer + get_function__HeightMap__origin, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::HeightMap, data), // bytes offset in struct + nullptr, // default value + size_function__HeightMap__data, // size() function pointer + get_const_function__HeightMap__data, // get_const(index) function pointer + get_function__HeightMap__data, // get(index) function pointer + resize_function__HeightMap__data // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers HeightMap_message_members = { + "unitree_go::msg", // message namespace + "HeightMap", // message name + 7, // number of fields + sizeof(unitree_go::msg::HeightMap), + HeightMap_message_member_array, // message members + HeightMap_init_function, // function to initialize message memory (memory has to be allocated) + HeightMap_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t HeightMap_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &HeightMap_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace unitree_go + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::HeightMap_message_type_support_handle; +} + +} // namespace rosidl_typesupport_introspection_cpp + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, HeightMap)() { + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::HeightMap_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__type_support.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__type_support.h new file mode 100644 index 0000000..16e5fbb --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from unitree_go:msg/HeightMap.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__HEIGHT_MAP__TYPE_SUPPORT_H_ +#define UNITREE_GO__MSG__DETAIL__HEIGHT_MAP__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rosidl_runtime_c/message_type_support_struct.h" + +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + unitree_go, + msg, + HeightMap +)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__HEIGHT_MAP__TYPE_SUPPORT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__type_support.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__type_support.hpp new file mode 100644 index 0000000..fc2f4e5 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/height_map__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from unitree_go:msg/HeightMap.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__HEIGHT_MAP__TYPE_SUPPORT_HPP_ +#define UNITREE_GO__MSG__DETAIL__HEIGHT_MAP__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_cpp__visibility_control.hpp" + +#include "rosidl_typesupport_cpp/message_type_support.hpp" + +#ifdef __cplusplus +extern "C" +{ +#endif +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + unitree_go, + msg, + HeightMap +)(); +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__HEIGHT_MAP__TYPE_SUPPORT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__builder.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__builder.hpp new file mode 100644 index 0000000..06ae144 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__builder.hpp @@ -0,0 +1,119 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from unitree_go:msg/IMUState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__IMU_STATE__BUILDER_HPP_ +#define UNITREE_GO__MSG__DETAIL__IMU_STATE__BUILDER_HPP_ + +#include "unitree_go/msg/detail/imu_state__struct.hpp" +#include +#include +#include + + +namespace unitree_go +{ + +namespace msg +{ + +namespace builder +{ + +class Init_IMUState_temperature +{ +public: + explicit Init_IMUState_temperature(::unitree_go::msg::IMUState & msg) + : msg_(msg) + {} + ::unitree_go::msg::IMUState temperature(::unitree_go::msg::IMUState::_temperature_type arg) + { + msg_.temperature = std::move(arg); + return std::move(msg_); + } + +private: + ::unitree_go::msg::IMUState msg_; +}; + +class Init_IMUState_rpy +{ +public: + explicit Init_IMUState_rpy(::unitree_go::msg::IMUState & msg) + : msg_(msg) + {} + Init_IMUState_temperature rpy(::unitree_go::msg::IMUState::_rpy_type arg) + { + msg_.rpy = std::move(arg); + return Init_IMUState_temperature(msg_); + } + +private: + ::unitree_go::msg::IMUState msg_; +}; + +class Init_IMUState_accelerometer +{ +public: + explicit Init_IMUState_accelerometer(::unitree_go::msg::IMUState & msg) + : msg_(msg) + {} + Init_IMUState_rpy accelerometer(::unitree_go::msg::IMUState::_accelerometer_type arg) + { + msg_.accelerometer = std::move(arg); + return Init_IMUState_rpy(msg_); + } + +private: + ::unitree_go::msg::IMUState msg_; +}; + +class Init_IMUState_gyroscope +{ +public: + explicit Init_IMUState_gyroscope(::unitree_go::msg::IMUState & msg) + : msg_(msg) + {} + Init_IMUState_accelerometer gyroscope(::unitree_go::msg::IMUState::_gyroscope_type arg) + { + msg_.gyroscope = std::move(arg); + return Init_IMUState_accelerometer(msg_); + } + +private: + ::unitree_go::msg::IMUState msg_; +}; + +class Init_IMUState_quaternion +{ +public: + Init_IMUState_quaternion() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_IMUState_gyroscope quaternion(::unitree_go::msg::IMUState::_quaternion_type arg) + { + msg_.quaternion = std::move(arg); + return Init_IMUState_gyroscope(msg_); + } + +private: + ::unitree_go::msg::IMUState msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::unitree_go::msg::IMUState>() +{ + return unitree_go::msg::builder::Init_IMUState_quaternion(); +} + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__IMU_STATE__BUILDER_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__functions.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__functions.c new file mode 100644 index 0000000..a19540a --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__functions.c @@ -0,0 +1,279 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from unitree_go:msg/IMUState.idl +// generated code does not contain a copyright notice +#include "unitree_go/msg/detail/imu_state__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +unitree_go__msg__IMUState__init(unitree_go__msg__IMUState * msg) +{ + if (!msg) { + return false; + } + // quaternion + // gyroscope + // accelerometer + // rpy + // temperature + return true; +} + +void +unitree_go__msg__IMUState__fini(unitree_go__msg__IMUState * msg) +{ + if (!msg) { + return; + } + // quaternion + // gyroscope + // accelerometer + // rpy + // temperature +} + +bool +unitree_go__msg__IMUState__are_equal(const unitree_go__msg__IMUState * lhs, const unitree_go__msg__IMUState * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // quaternion + for (size_t i = 0; i < 4; ++i) { + if (lhs->quaternion[i] != rhs->quaternion[i]) { + return false; + } + } + // gyroscope + for (size_t i = 0; i < 3; ++i) { + if (lhs->gyroscope[i] != rhs->gyroscope[i]) { + return false; + } + } + // accelerometer + for (size_t i = 0; i < 3; ++i) { + if (lhs->accelerometer[i] != rhs->accelerometer[i]) { + return false; + } + } + // rpy + for (size_t i = 0; i < 3; ++i) { + if (lhs->rpy[i] != rhs->rpy[i]) { + return false; + } + } + // temperature + if (lhs->temperature != rhs->temperature) { + return false; + } + return true; +} + +bool +unitree_go__msg__IMUState__copy( + const unitree_go__msg__IMUState * input, + unitree_go__msg__IMUState * output) +{ + if (!input || !output) { + return false; + } + // quaternion + for (size_t i = 0; i < 4; ++i) { + output->quaternion[i] = input->quaternion[i]; + } + // gyroscope + for (size_t i = 0; i < 3; ++i) { + output->gyroscope[i] = input->gyroscope[i]; + } + // accelerometer + for (size_t i = 0; i < 3; ++i) { + output->accelerometer[i] = input->accelerometer[i]; + } + // rpy + for (size_t i = 0; i < 3; ++i) { + output->rpy[i] = input->rpy[i]; + } + // temperature + output->temperature = input->temperature; + return true; +} + +unitree_go__msg__IMUState * +unitree_go__msg__IMUState__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__IMUState * msg = (unitree_go__msg__IMUState *)allocator.allocate(sizeof(unitree_go__msg__IMUState), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(unitree_go__msg__IMUState)); + bool success = unitree_go__msg__IMUState__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +unitree_go__msg__IMUState__destroy(unitree_go__msg__IMUState * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + unitree_go__msg__IMUState__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +unitree_go__msg__IMUState__Sequence__init(unitree_go__msg__IMUState__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__IMUState * data = NULL; + + if (size) { + data = (unitree_go__msg__IMUState *)allocator.zero_allocate(size, sizeof(unitree_go__msg__IMUState), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = unitree_go__msg__IMUState__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + unitree_go__msg__IMUState__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +unitree_go__msg__IMUState__Sequence__fini(unitree_go__msg__IMUState__Sequence * array) +{ + if (!array) { + return; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + + if (array->data) { + // ensure that data and capacity values are consistent + assert(array->capacity > 0); + // finalize all array elements + for (size_t i = 0; i < array->capacity; ++i) { + unitree_go__msg__IMUState__fini(&array->data[i]); + } + allocator.deallocate(array->data, allocator.state); + array->data = NULL; + array->size = 0; + array->capacity = 0; + } else { + // ensure that data, size, and capacity values are consistent + assert(0 == array->size); + assert(0 == array->capacity); + } +} + +unitree_go__msg__IMUState__Sequence * +unitree_go__msg__IMUState__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__IMUState__Sequence * array = (unitree_go__msg__IMUState__Sequence *)allocator.allocate(sizeof(unitree_go__msg__IMUState__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = unitree_go__msg__IMUState__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +unitree_go__msg__IMUState__Sequence__destroy(unitree_go__msg__IMUState__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + unitree_go__msg__IMUState__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +unitree_go__msg__IMUState__Sequence__are_equal(const unitree_go__msg__IMUState__Sequence * lhs, const unitree_go__msg__IMUState__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!unitree_go__msg__IMUState__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +unitree_go__msg__IMUState__Sequence__copy( + const unitree_go__msg__IMUState__Sequence * input, + unitree_go__msg__IMUState__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(unitree_go__msg__IMUState); + unitree_go__msg__IMUState * data = + (unitree_go__msg__IMUState *)realloc(output->data, allocation_size); + if (!data) { + return false; + } + for (size_t i = output->capacity; i < input->size; ++i) { + if (!unitree_go__msg__IMUState__init(&data[i])) { + /* free currently allocated and return false */ + for (; i-- > output->capacity; ) { + unitree_go__msg__IMUState__fini(&data[i]); + } + free(data); + return false; + } + } + output->data = data; + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!unitree_go__msg__IMUState__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__functions.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__functions.h new file mode 100644 index 0000000..c9d4485 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from unitree_go:msg/IMUState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__IMU_STATE__FUNCTIONS_H_ +#define UNITREE_GO__MSG__DETAIL__IMU_STATE__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#include "unitree_go/msg/detail/imu_state__struct.h" + +/// Initialize msg/IMUState message. +/** + * If the init function is called twice for the same message without + * calling fini inbetween previously allocated memory will be leaked. + * \param[in,out] msg The previously allocated message pointer. + * Fields without a default value will not be initialized by this function. + * You might want to call memset(msg, 0, sizeof( + * unitree_go__msg__IMUState + * )) before or use + * unitree_go__msg__IMUState__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__IMUState__init(unitree_go__msg__IMUState * msg); + +/// Finalize msg/IMUState message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__IMUState__fini(unitree_go__msg__IMUState * msg); + +/// Create msg/IMUState message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * unitree_go__msg__IMUState__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__IMUState * +unitree_go__msg__IMUState__create(); + +/// Destroy msg/IMUState message. +/** + * It calls + * unitree_go__msg__IMUState__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__IMUState__destroy(unitree_go__msg__IMUState * msg); + +/// Check for msg/IMUState message equality. +/** + * \param[in] lhs The message on the left hand size of the equality operator. + * \param[in] rhs The message on the right hand size of the equality operator. + * \return true if messages are equal, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__IMUState__are_equal(const unitree_go__msg__IMUState * lhs, const unitree_go__msg__IMUState * rhs); + +/// Copy a msg/IMUState message. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source message pointer. + * \param[out] output The target message pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer is null + * or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__IMUState__copy( + const unitree_go__msg__IMUState * input, + unitree_go__msg__IMUState * output); + +/// Initialize array of msg/IMUState messages. +/** + * It allocates the memory for the number of elements and calls + * unitree_go__msg__IMUState__init() + * for each element of the array. + * \param[in,out] array The allocated array pointer. + * \param[in] size The size / capacity of the array. + * \return true if initialization was successful, otherwise false + * If the array pointer is valid and the size is zero it is guaranteed + # to return true. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__IMUState__Sequence__init(unitree_go__msg__IMUState__Sequence * array, size_t size); + +/// Finalize array of msg/IMUState messages. +/** + * It calls + * unitree_go__msg__IMUState__fini() + * for each element of the array and frees the memory for the number of + * elements. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__IMUState__Sequence__fini(unitree_go__msg__IMUState__Sequence * array); + +/// Create array of msg/IMUState messages. +/** + * It allocates the memory for the array and calls + * unitree_go__msg__IMUState__Sequence__init(). + * \param[in] size The size / capacity of the array. + * \return The pointer to the initialized array if successful, otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__IMUState__Sequence * +unitree_go__msg__IMUState__Sequence__create(size_t size); + +/// Destroy array of msg/IMUState messages. +/** + * It calls + * unitree_go__msg__IMUState__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__IMUState__Sequence__destroy(unitree_go__msg__IMUState__Sequence * array); + +/// Check for msg/IMUState message array equality. +/** + * \param[in] lhs The message array on the left hand size of the equality operator. + * \param[in] rhs The message array on the right hand size of the equality operator. + * \return true if message arrays are equal in size and content, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__IMUState__Sequence__are_equal(const unitree_go__msg__IMUState__Sequence * lhs, const unitree_go__msg__IMUState__Sequence * rhs); + +/// Copy an array of msg/IMUState messages. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source array pointer. + * \param[out] output The target array pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer + * is null or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__IMUState__Sequence__copy( + const unitree_go__msg__IMUState__Sequence * input, + unitree_go__msg__IMUState__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__IMU_STATE__FUNCTIONS_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__rosidl_typesupport_fastrtps_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 0000000..90eface --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,36 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from unitree_go:msg/IMUState.idl +// generated code does not contain a copyright notice +#ifndef UNITREE_GO__MSG__DETAIL__IMU_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define UNITREE_GO__MSG__DETAIL__IMU_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t get_serialized_size_unitree_go__msg__IMUState( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t max_serialized_size_unitree_go__msg__IMUState( + bool & full_bounded, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, unitree_go, msg, IMUState)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__IMU_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__rosidl_typesupport_fastrtps_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 0000000..eeb2a9b --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,79 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from unitree_go:msg/IMUState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__IMU_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__IMU_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "unitree_go/msg/detail/imu_state__struct.hpp" + +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-parameter" +# ifdef __clang__ +# pragma clang diagnostic ignored "-Wdeprecated-register" +# pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +# endif +#endif +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif + +#include "fastcdr/Cdr.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_serialize( + const unitree_go::msg::IMUState & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + unitree_go::msg::IMUState & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +get_serialized_size( + const unitree_go::msg::IMUState & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +max_serialized_size_IMUState( + bool & full_bounded, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace unitree_go + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, unitree_go, msg, IMUState)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__IMU_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__rosidl_typesupport_introspection_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__rosidl_typesupport_introspection_c.h new file mode 100644 index 0000000..0fcafb6 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from unitree_go:msg/IMUState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__IMU_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define UNITREE_GO__MSG__DETAIL__IMU_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, IMUState)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__IMU_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__rosidl_typesupport_introspection_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 0000000..c956adc --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from unitree_go:msg/IMUState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__IMU_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__IMU_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +// TODO(dirk-thomas) these visibility macros should be message package specific +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, IMUState)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__IMU_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__struct.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__struct.h new file mode 100644 index 0000000..ad1d2c0 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__struct.h @@ -0,0 +1,44 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from unitree_go:msg/IMUState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__IMU_STATE__STRUCT_H_ +#define UNITREE_GO__MSG__DETAIL__IMU_STATE__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Struct defined in msg/IMUState in the package unitree_go. +typedef struct unitree_go__msg__IMUState +{ + float quaternion[4]; + float gyroscope[3]; + float accelerometer[3]; + float rpy[3]; + int8_t temperature; +} unitree_go__msg__IMUState; + +// Struct for a sequence of unitree_go__msg__IMUState. +typedef struct unitree_go__msg__IMUState__Sequence +{ + unitree_go__msg__IMUState * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} unitree_go__msg__IMUState__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__IMU_STATE__STRUCT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__struct.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__struct.hpp new file mode 100644 index 0000000..2f71461 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__struct.hpp @@ -0,0 +1,189 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from unitree_go:msg/IMUState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__IMU_STATE__STRUCT_HPP_ +#define UNITREE_GO__MSG__DETAIL__IMU_STATE__STRUCT_HPP_ + +#include +#include +#include +#include +#include +#include +#include + + +#ifndef _WIN32 +# define DEPRECATED__unitree_go__msg__IMUState __attribute__((deprecated)) +#else +# define DEPRECATED__unitree_go__msg__IMUState __declspec(deprecated) +#endif + +namespace unitree_go +{ + +namespace msg +{ + +// message struct +template +struct IMUState_ +{ + using Type = IMUState_; + + explicit IMUState_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + std::fill::iterator, float>(this->quaternion.begin(), this->quaternion.end(), 0.0f); + std::fill::iterator, float>(this->gyroscope.begin(), this->gyroscope.end(), 0.0f); + std::fill::iterator, float>(this->accelerometer.begin(), this->accelerometer.end(), 0.0f); + std::fill::iterator, float>(this->rpy.begin(), this->rpy.end(), 0.0f); + this->temperature = 0; + } + } + + explicit IMUState_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : quaternion(_alloc), + gyroscope(_alloc), + accelerometer(_alloc), + rpy(_alloc) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + std::fill::iterator, float>(this->quaternion.begin(), this->quaternion.end(), 0.0f); + std::fill::iterator, float>(this->gyroscope.begin(), this->gyroscope.end(), 0.0f); + std::fill::iterator, float>(this->accelerometer.begin(), this->accelerometer.end(), 0.0f); + std::fill::iterator, float>(this->rpy.begin(), this->rpy.end(), 0.0f); + this->temperature = 0; + } + } + + // field types and members + using _quaternion_type = + std::array; + _quaternion_type quaternion; + using _gyroscope_type = + std::array; + _gyroscope_type gyroscope; + using _accelerometer_type = + std::array; + _accelerometer_type accelerometer; + using _rpy_type = + std::array; + _rpy_type rpy; + using _temperature_type = + int8_t; + _temperature_type temperature; + + // setters for named parameter idiom + Type & set__quaternion( + const std::array & _arg) + { + this->quaternion = _arg; + return *this; + } + Type & set__gyroscope( + const std::array & _arg) + { + this->gyroscope = _arg; + return *this; + } + Type & set__accelerometer( + const std::array & _arg) + { + this->accelerometer = _arg; + return *this; + } + Type & set__rpy( + const std::array & _arg) + { + this->rpy = _arg; + return *this; + } + Type & set__temperature( + const int8_t & _arg) + { + this->temperature = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + unitree_go::msg::IMUState_ *; + using ConstRawPtr = + const unitree_go::msg::IMUState_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr const>; + + // pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead + // NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly + typedef DEPRECATED__unitree_go__msg__IMUState + std::shared_ptr> + Ptr; + typedef DEPRECATED__unitree_go__msg__IMUState + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const IMUState_ & other) const + { + if (this->quaternion != other.quaternion) { + return false; + } + if (this->gyroscope != other.gyroscope) { + return false; + } + if (this->accelerometer != other.accelerometer) { + return false; + } + if (this->rpy != other.rpy) { + return false; + } + if (this->temperature != other.temperature) { + return false; + } + return true; + } + bool operator!=(const IMUState_ & other) const + { + return !this->operator==(other); + } +}; // struct IMUState_ + +// alias to use template instance with default allocator +using IMUState = + unitree_go::msg::IMUState_>; + +// constant definitions + +} // namespace msg + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__IMU_STATE__STRUCT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__traits.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__traits.hpp new file mode 100644 index 0000000..bc49936 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__traits.hpp @@ -0,0 +1,42 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from unitree_go:msg/IMUState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__IMU_STATE__TRAITS_HPP_ +#define UNITREE_GO__MSG__DETAIL__IMU_STATE__TRAITS_HPP_ + +#include "unitree_go/msg/detail/imu_state__struct.hpp" +#include +#include +#include + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "unitree_go::msg::IMUState"; +} + +template<> +inline const char * name() +{ + return "unitree_go/msg/IMUState"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UNITREE_GO__MSG__DETAIL__IMU_STATE__TRAITS_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__type_support.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__type_support.c new file mode 100644 index 0000000..c9006db --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__type_support.c @@ -0,0 +1,141 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from unitree_go:msg/IMUState.idl +// generated code does not contain a copyright notice + +#include +#include "unitree_go/msg/detail/imu_state__rosidl_typesupport_introspection_c.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" +#include "rosidl_typesupport_introspection_c/field_types.h" +#include "rosidl_typesupport_introspection_c/identifier.h" +#include "rosidl_typesupport_introspection_c/message_introspection.h" +#include "unitree_go/msg/detail/imu_state__functions.h" +#include "unitree_go/msg/detail/imu_state__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void IMUState__rosidl_typesupport_introspection_c__IMUState_init_function( + void * message_memory, enum rosidl_runtime_c__message_initialization _init) +{ + // TODO(karsten1987): initializers are not yet implemented for typesupport c + // see https://github.com/ros2/ros2/issues/397 + (void) _init; + unitree_go__msg__IMUState__init(message_memory); +} + +void IMUState__rosidl_typesupport_introspection_c__IMUState_fini_function(void * message_memory) +{ + unitree_go__msg__IMUState__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember IMUState__rosidl_typesupport_introspection_c__IMUState_message_member_array[5] = { + { + "quaternion", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 4, // array size + false, // is upper bound + offsetof(unitree_go__msg__IMUState, quaternion), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "gyroscope", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 3, // array size + false, // is upper bound + offsetof(unitree_go__msg__IMUState, gyroscope), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "accelerometer", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 3, // array size + false, // is upper bound + offsetof(unitree_go__msg__IMUState, accelerometer), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "rpy", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 3, // array size + false, // is upper bound + offsetof(unitree_go__msg__IMUState, rpy), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "temperature", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__IMUState, temperature), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers IMUState__rosidl_typesupport_introspection_c__IMUState_message_members = { + "unitree_go__msg", // message namespace + "IMUState", // message name + 5, // number of fields + sizeof(unitree_go__msg__IMUState), + IMUState__rosidl_typesupport_introspection_c__IMUState_message_member_array, // message members + IMUState__rosidl_typesupport_introspection_c__IMUState_init_function, // function to initialize message memory (memory has to be allocated) + IMUState__rosidl_typesupport_introspection_c__IMUState_fini_function // function to terminate message instance (will not free memory) +}; + +// this is not const since it must be initialized on first access +// since C does not allow non-integral compile-time constants +static rosidl_message_type_support_t IMUState__rosidl_typesupport_introspection_c__IMUState_message_type_support_handle = { + 0, + &IMUState__rosidl_typesupport_introspection_c__IMUState_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, IMUState)() { + if (!IMUState__rosidl_typesupport_introspection_c__IMUState_message_type_support_handle.typesupport_identifier) { + IMUState__rosidl_typesupport_introspection_c__IMUState_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &IMUState__rosidl_typesupport_introspection_c__IMUState_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__type_support.cpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__type_support.cpp new file mode 100644 index 0000000..19067c1 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__type_support.cpp @@ -0,0 +1,247 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from unitree_go:msg/IMUState.idl +// generated code does not contain a copyright notice + +#include "array" +#include "cstddef" +#include "string" +#include "vector" +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_cpp/message_type_support.hpp" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/detail/imu_state__struct.hpp" +#include "rosidl_typesupport_introspection_cpp/field_types.hpp" +#include "rosidl_typesupport_introspection_cpp/identifier.hpp" +#include "rosidl_typesupport_introspection_cpp/message_introspection.hpp" +#include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void IMUState_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) unitree_go::msg::IMUState(_init); +} + +void IMUState_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~IMUState(); +} + +size_t size_function__IMUState__quaternion(const void * untyped_member) +{ + (void)untyped_member; + return 4; +} + +const void * get_const_function__IMUState__quaternion(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__IMUState__quaternion(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +size_t size_function__IMUState__gyroscope(const void * untyped_member) +{ + (void)untyped_member; + return 3; +} + +const void * get_const_function__IMUState__gyroscope(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__IMUState__gyroscope(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +size_t size_function__IMUState__accelerometer(const void * untyped_member) +{ + (void)untyped_member; + return 3; +} + +const void * get_const_function__IMUState__accelerometer(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__IMUState__accelerometer(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +size_t size_function__IMUState__rpy(const void * untyped_member) +{ + (void)untyped_member; + return 3; +} + +const void * get_const_function__IMUState__rpy(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__IMUState__rpy(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember IMUState_message_member_array[5] = { + { + "quaternion", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 4, // array size + false, // is upper bound + offsetof(unitree_go::msg::IMUState, quaternion), // bytes offset in struct + nullptr, // default value + size_function__IMUState__quaternion, // size() function pointer + get_const_function__IMUState__quaternion, // get_const(index) function pointer + get_function__IMUState__quaternion, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "gyroscope", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 3, // array size + false, // is upper bound + offsetof(unitree_go::msg::IMUState, gyroscope), // bytes offset in struct + nullptr, // default value + size_function__IMUState__gyroscope, // size() function pointer + get_const_function__IMUState__gyroscope, // get_const(index) function pointer + get_function__IMUState__gyroscope, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "accelerometer", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 3, // array size + false, // is upper bound + offsetof(unitree_go::msg::IMUState, accelerometer), // bytes offset in struct + nullptr, // default value + size_function__IMUState__accelerometer, // size() function pointer + get_const_function__IMUState__accelerometer, // get_const(index) function pointer + get_function__IMUState__accelerometer, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "rpy", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 3, // array size + false, // is upper bound + offsetof(unitree_go::msg::IMUState, rpy), // bytes offset in struct + nullptr, // default value + size_function__IMUState__rpy, // size() function pointer + get_const_function__IMUState__rpy, // get_const(index) function pointer + get_function__IMUState__rpy, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "temperature", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::IMUState, temperature), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers IMUState_message_members = { + "unitree_go::msg", // message namespace + "IMUState", // message name + 5, // number of fields + sizeof(unitree_go::msg::IMUState), + IMUState_message_member_array, // message members + IMUState_init_function, // function to initialize message memory (memory has to be allocated) + IMUState_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t IMUState_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &IMUState_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace unitree_go + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::IMUState_message_type_support_handle; +} + +} // namespace rosidl_typesupport_introspection_cpp + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, IMUState)() { + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::IMUState_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__type_support.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__type_support.h new file mode 100644 index 0000000..43fca1b --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from unitree_go:msg/IMUState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__IMU_STATE__TYPE_SUPPORT_H_ +#define UNITREE_GO__MSG__DETAIL__IMU_STATE__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rosidl_runtime_c/message_type_support_struct.h" + +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + unitree_go, + msg, + IMUState +)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__IMU_STATE__TYPE_SUPPORT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__type_support.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__type_support.hpp new file mode 100644 index 0000000..4914aa9 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/imu_state__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from unitree_go:msg/IMUState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__IMU_STATE__TYPE_SUPPORT_HPP_ +#define UNITREE_GO__MSG__DETAIL__IMU_STATE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_cpp__visibility_control.hpp" + +#include "rosidl_typesupport_cpp/message_type_support.hpp" + +#ifdef __cplusplus +extern "C" +{ +#endif +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + unitree_go, + msg, + IMUState +)(); +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__IMU_STATE__TYPE_SUPPORT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__builder.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__builder.hpp new file mode 100644 index 0000000..8da7e4e --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__builder.hpp @@ -0,0 +1,87 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from unitree_go:msg/InterfaceConfig.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__INTERFACE_CONFIG__BUILDER_HPP_ +#define UNITREE_GO__MSG__DETAIL__INTERFACE_CONFIG__BUILDER_HPP_ + +#include "unitree_go/msg/detail/interface_config__struct.hpp" +#include +#include +#include + + +namespace unitree_go +{ + +namespace msg +{ + +namespace builder +{ + +class Init_InterfaceConfig_reserve +{ +public: + explicit Init_InterfaceConfig_reserve(::unitree_go::msg::InterfaceConfig & msg) + : msg_(msg) + {} + ::unitree_go::msg::InterfaceConfig reserve(::unitree_go::msg::InterfaceConfig::_reserve_type arg) + { + msg_.reserve = std::move(arg); + return std::move(msg_); + } + +private: + ::unitree_go::msg::InterfaceConfig msg_; +}; + +class Init_InterfaceConfig_value +{ +public: + explicit Init_InterfaceConfig_value(::unitree_go::msg::InterfaceConfig & msg) + : msg_(msg) + {} + Init_InterfaceConfig_reserve value(::unitree_go::msg::InterfaceConfig::_value_type arg) + { + msg_.value = std::move(arg); + return Init_InterfaceConfig_reserve(msg_); + } + +private: + ::unitree_go::msg::InterfaceConfig msg_; +}; + +class Init_InterfaceConfig_mode +{ +public: + Init_InterfaceConfig_mode() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_InterfaceConfig_value mode(::unitree_go::msg::InterfaceConfig::_mode_type arg) + { + msg_.mode = std::move(arg); + return Init_InterfaceConfig_value(msg_); + } + +private: + ::unitree_go::msg::InterfaceConfig msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::unitree_go::msg::InterfaceConfig>() +{ + return unitree_go::msg::builder::Init_InterfaceConfig_mode(); +} + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__INTERFACE_CONFIG__BUILDER_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__functions.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__functions.c new file mode 100644 index 0000000..0a9503f --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__functions.c @@ -0,0 +1,251 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from unitree_go:msg/InterfaceConfig.idl +// generated code does not contain a copyright notice +#include "unitree_go/msg/detail/interface_config__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +unitree_go__msg__InterfaceConfig__init(unitree_go__msg__InterfaceConfig * msg) +{ + if (!msg) { + return false; + } + // mode + // value + // reserve + return true; +} + +void +unitree_go__msg__InterfaceConfig__fini(unitree_go__msg__InterfaceConfig * msg) +{ + if (!msg) { + return; + } + // mode + // value + // reserve +} + +bool +unitree_go__msg__InterfaceConfig__are_equal(const unitree_go__msg__InterfaceConfig * lhs, const unitree_go__msg__InterfaceConfig * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // mode + if (lhs->mode != rhs->mode) { + return false; + } + // value + if (lhs->value != rhs->value) { + return false; + } + // reserve + for (size_t i = 0; i < 2; ++i) { + if (lhs->reserve[i] != rhs->reserve[i]) { + return false; + } + } + return true; +} + +bool +unitree_go__msg__InterfaceConfig__copy( + const unitree_go__msg__InterfaceConfig * input, + unitree_go__msg__InterfaceConfig * output) +{ + if (!input || !output) { + return false; + } + // mode + output->mode = input->mode; + // value + output->value = input->value; + // reserve + for (size_t i = 0; i < 2; ++i) { + output->reserve[i] = input->reserve[i]; + } + return true; +} + +unitree_go__msg__InterfaceConfig * +unitree_go__msg__InterfaceConfig__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__InterfaceConfig * msg = (unitree_go__msg__InterfaceConfig *)allocator.allocate(sizeof(unitree_go__msg__InterfaceConfig), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(unitree_go__msg__InterfaceConfig)); + bool success = unitree_go__msg__InterfaceConfig__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +unitree_go__msg__InterfaceConfig__destroy(unitree_go__msg__InterfaceConfig * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + unitree_go__msg__InterfaceConfig__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +unitree_go__msg__InterfaceConfig__Sequence__init(unitree_go__msg__InterfaceConfig__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__InterfaceConfig * data = NULL; + + if (size) { + data = (unitree_go__msg__InterfaceConfig *)allocator.zero_allocate(size, sizeof(unitree_go__msg__InterfaceConfig), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = unitree_go__msg__InterfaceConfig__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + unitree_go__msg__InterfaceConfig__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +unitree_go__msg__InterfaceConfig__Sequence__fini(unitree_go__msg__InterfaceConfig__Sequence * array) +{ + if (!array) { + return; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + + if (array->data) { + // ensure that data and capacity values are consistent + assert(array->capacity > 0); + // finalize all array elements + for (size_t i = 0; i < array->capacity; ++i) { + unitree_go__msg__InterfaceConfig__fini(&array->data[i]); + } + allocator.deallocate(array->data, allocator.state); + array->data = NULL; + array->size = 0; + array->capacity = 0; + } else { + // ensure that data, size, and capacity values are consistent + assert(0 == array->size); + assert(0 == array->capacity); + } +} + +unitree_go__msg__InterfaceConfig__Sequence * +unitree_go__msg__InterfaceConfig__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__InterfaceConfig__Sequence * array = (unitree_go__msg__InterfaceConfig__Sequence *)allocator.allocate(sizeof(unitree_go__msg__InterfaceConfig__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = unitree_go__msg__InterfaceConfig__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +unitree_go__msg__InterfaceConfig__Sequence__destroy(unitree_go__msg__InterfaceConfig__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + unitree_go__msg__InterfaceConfig__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +unitree_go__msg__InterfaceConfig__Sequence__are_equal(const unitree_go__msg__InterfaceConfig__Sequence * lhs, const unitree_go__msg__InterfaceConfig__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!unitree_go__msg__InterfaceConfig__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +unitree_go__msg__InterfaceConfig__Sequence__copy( + const unitree_go__msg__InterfaceConfig__Sequence * input, + unitree_go__msg__InterfaceConfig__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(unitree_go__msg__InterfaceConfig); + unitree_go__msg__InterfaceConfig * data = + (unitree_go__msg__InterfaceConfig *)realloc(output->data, allocation_size); + if (!data) { + return false; + } + for (size_t i = output->capacity; i < input->size; ++i) { + if (!unitree_go__msg__InterfaceConfig__init(&data[i])) { + /* free currently allocated and return false */ + for (; i-- > output->capacity; ) { + unitree_go__msg__InterfaceConfig__fini(&data[i]); + } + free(data); + return false; + } + } + output->data = data; + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!unitree_go__msg__InterfaceConfig__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__functions.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__functions.h new file mode 100644 index 0000000..de103af --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from unitree_go:msg/InterfaceConfig.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__INTERFACE_CONFIG__FUNCTIONS_H_ +#define UNITREE_GO__MSG__DETAIL__INTERFACE_CONFIG__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#include "unitree_go/msg/detail/interface_config__struct.h" + +/// Initialize msg/InterfaceConfig message. +/** + * If the init function is called twice for the same message without + * calling fini inbetween previously allocated memory will be leaked. + * \param[in,out] msg The previously allocated message pointer. + * Fields without a default value will not be initialized by this function. + * You might want to call memset(msg, 0, sizeof( + * unitree_go__msg__InterfaceConfig + * )) before or use + * unitree_go__msg__InterfaceConfig__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__InterfaceConfig__init(unitree_go__msg__InterfaceConfig * msg); + +/// Finalize msg/InterfaceConfig message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__InterfaceConfig__fini(unitree_go__msg__InterfaceConfig * msg); + +/// Create msg/InterfaceConfig message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * unitree_go__msg__InterfaceConfig__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__InterfaceConfig * +unitree_go__msg__InterfaceConfig__create(); + +/// Destroy msg/InterfaceConfig message. +/** + * It calls + * unitree_go__msg__InterfaceConfig__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__InterfaceConfig__destroy(unitree_go__msg__InterfaceConfig * msg); + +/// Check for msg/InterfaceConfig message equality. +/** + * \param[in] lhs The message on the left hand size of the equality operator. + * \param[in] rhs The message on the right hand size of the equality operator. + * \return true if messages are equal, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__InterfaceConfig__are_equal(const unitree_go__msg__InterfaceConfig * lhs, const unitree_go__msg__InterfaceConfig * rhs); + +/// Copy a msg/InterfaceConfig message. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source message pointer. + * \param[out] output The target message pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer is null + * or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__InterfaceConfig__copy( + const unitree_go__msg__InterfaceConfig * input, + unitree_go__msg__InterfaceConfig * output); + +/// Initialize array of msg/InterfaceConfig messages. +/** + * It allocates the memory for the number of elements and calls + * unitree_go__msg__InterfaceConfig__init() + * for each element of the array. + * \param[in,out] array The allocated array pointer. + * \param[in] size The size / capacity of the array. + * \return true if initialization was successful, otherwise false + * If the array pointer is valid and the size is zero it is guaranteed + # to return true. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__InterfaceConfig__Sequence__init(unitree_go__msg__InterfaceConfig__Sequence * array, size_t size); + +/// Finalize array of msg/InterfaceConfig messages. +/** + * It calls + * unitree_go__msg__InterfaceConfig__fini() + * for each element of the array and frees the memory for the number of + * elements. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__InterfaceConfig__Sequence__fini(unitree_go__msg__InterfaceConfig__Sequence * array); + +/// Create array of msg/InterfaceConfig messages. +/** + * It allocates the memory for the array and calls + * unitree_go__msg__InterfaceConfig__Sequence__init(). + * \param[in] size The size / capacity of the array. + * \return The pointer to the initialized array if successful, otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__InterfaceConfig__Sequence * +unitree_go__msg__InterfaceConfig__Sequence__create(size_t size); + +/// Destroy array of msg/InterfaceConfig messages. +/** + * It calls + * unitree_go__msg__InterfaceConfig__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__InterfaceConfig__Sequence__destroy(unitree_go__msg__InterfaceConfig__Sequence * array); + +/// Check for msg/InterfaceConfig message array equality. +/** + * \param[in] lhs The message array on the left hand size of the equality operator. + * \param[in] rhs The message array on the right hand size of the equality operator. + * \return true if message arrays are equal in size and content, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__InterfaceConfig__Sequence__are_equal(const unitree_go__msg__InterfaceConfig__Sequence * lhs, const unitree_go__msg__InterfaceConfig__Sequence * rhs); + +/// Copy an array of msg/InterfaceConfig messages. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source array pointer. + * \param[out] output The target array pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer + * is null or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__InterfaceConfig__Sequence__copy( + const unitree_go__msg__InterfaceConfig__Sequence * input, + unitree_go__msg__InterfaceConfig__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__INTERFACE_CONFIG__FUNCTIONS_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__rosidl_typesupport_fastrtps_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 0000000..0c54fcc --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,36 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from unitree_go:msg/InterfaceConfig.idl +// generated code does not contain a copyright notice +#ifndef UNITREE_GO__MSG__DETAIL__INTERFACE_CONFIG__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define UNITREE_GO__MSG__DETAIL__INTERFACE_CONFIG__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t get_serialized_size_unitree_go__msg__InterfaceConfig( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t max_serialized_size_unitree_go__msg__InterfaceConfig( + bool & full_bounded, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, unitree_go, msg, InterfaceConfig)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__INTERFACE_CONFIG__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__rosidl_typesupport_fastrtps_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 0000000..561b9ad --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,79 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from unitree_go:msg/InterfaceConfig.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__INTERFACE_CONFIG__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__INTERFACE_CONFIG__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "unitree_go/msg/detail/interface_config__struct.hpp" + +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-parameter" +# ifdef __clang__ +# pragma clang diagnostic ignored "-Wdeprecated-register" +# pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +# endif +#endif +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif + +#include "fastcdr/Cdr.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_serialize( + const unitree_go::msg::InterfaceConfig & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + unitree_go::msg::InterfaceConfig & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +get_serialized_size( + const unitree_go::msg::InterfaceConfig & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +max_serialized_size_InterfaceConfig( + bool & full_bounded, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace unitree_go + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, unitree_go, msg, InterfaceConfig)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__INTERFACE_CONFIG__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__rosidl_typesupport_introspection_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__rosidl_typesupport_introspection_c.h new file mode 100644 index 0000000..42ddd98 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from unitree_go:msg/InterfaceConfig.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__INTERFACE_CONFIG__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define UNITREE_GO__MSG__DETAIL__INTERFACE_CONFIG__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, InterfaceConfig)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__INTERFACE_CONFIG__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__rosidl_typesupport_introspection_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 0000000..3db771c --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from unitree_go:msg/InterfaceConfig.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__INTERFACE_CONFIG__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__INTERFACE_CONFIG__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +// TODO(dirk-thomas) these visibility macros should be message package specific +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, InterfaceConfig)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__INTERFACE_CONFIG__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__struct.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__struct.h new file mode 100644 index 0000000..44d940a --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__struct.h @@ -0,0 +1,42 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from unitree_go:msg/InterfaceConfig.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__INTERFACE_CONFIG__STRUCT_H_ +#define UNITREE_GO__MSG__DETAIL__INTERFACE_CONFIG__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Struct defined in msg/InterfaceConfig in the package unitree_go. +typedef struct unitree_go__msg__InterfaceConfig +{ + uint8_t mode; + uint8_t value; + uint8_t reserve[2]; +} unitree_go__msg__InterfaceConfig; + +// Struct for a sequence of unitree_go__msg__InterfaceConfig. +typedef struct unitree_go__msg__InterfaceConfig__Sequence +{ + unitree_go__msg__InterfaceConfig * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} unitree_go__msg__InterfaceConfig__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__INTERFACE_CONFIG__STRUCT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__struct.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__struct.hpp new file mode 100644 index 0000000..835c98e --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__struct.hpp @@ -0,0 +1,158 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from unitree_go:msg/InterfaceConfig.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__INTERFACE_CONFIG__STRUCT_HPP_ +#define UNITREE_GO__MSG__DETAIL__INTERFACE_CONFIG__STRUCT_HPP_ + +#include +#include +#include +#include +#include +#include +#include + + +#ifndef _WIN32 +# define DEPRECATED__unitree_go__msg__InterfaceConfig __attribute__((deprecated)) +#else +# define DEPRECATED__unitree_go__msg__InterfaceConfig __declspec(deprecated) +#endif + +namespace unitree_go +{ + +namespace msg +{ + +// message struct +template +struct InterfaceConfig_ +{ + using Type = InterfaceConfig_; + + explicit InterfaceConfig_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->mode = 0; + this->value = 0; + std::fill::iterator, uint8_t>(this->reserve.begin(), this->reserve.end(), 0); + } + } + + explicit InterfaceConfig_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : reserve(_alloc) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->mode = 0; + this->value = 0; + std::fill::iterator, uint8_t>(this->reserve.begin(), this->reserve.end(), 0); + } + } + + // field types and members + using _mode_type = + uint8_t; + _mode_type mode; + using _value_type = + uint8_t; + _value_type value; + using _reserve_type = + std::array; + _reserve_type reserve; + + // setters for named parameter idiom + Type & set__mode( + const uint8_t & _arg) + { + this->mode = _arg; + return *this; + } + Type & set__value( + const uint8_t & _arg) + { + this->value = _arg; + return *this; + } + Type & set__reserve( + const std::array & _arg) + { + this->reserve = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + unitree_go::msg::InterfaceConfig_ *; + using ConstRawPtr = + const unitree_go::msg::InterfaceConfig_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr const>; + + // pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead + // NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly + typedef DEPRECATED__unitree_go__msg__InterfaceConfig + std::shared_ptr> + Ptr; + typedef DEPRECATED__unitree_go__msg__InterfaceConfig + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const InterfaceConfig_ & other) const + { + if (this->mode != other.mode) { + return false; + } + if (this->value != other.value) { + return false; + } + if (this->reserve != other.reserve) { + return false; + } + return true; + } + bool operator!=(const InterfaceConfig_ & other) const + { + return !this->operator==(other); + } +}; // struct InterfaceConfig_ + +// alias to use template instance with default allocator +using InterfaceConfig = + unitree_go::msg::InterfaceConfig_>; + +// constant definitions + +} // namespace msg + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__INTERFACE_CONFIG__STRUCT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__traits.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__traits.hpp new file mode 100644 index 0000000..47932e3 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__traits.hpp @@ -0,0 +1,42 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from unitree_go:msg/InterfaceConfig.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__INTERFACE_CONFIG__TRAITS_HPP_ +#define UNITREE_GO__MSG__DETAIL__INTERFACE_CONFIG__TRAITS_HPP_ + +#include "unitree_go/msg/detail/interface_config__struct.hpp" +#include +#include +#include + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "unitree_go::msg::InterfaceConfig"; +} + +template<> +inline const char * name() +{ + return "unitree_go/msg/InterfaceConfig"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UNITREE_GO__MSG__DETAIL__INTERFACE_CONFIG__TRAITS_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__type_support.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__type_support.c new file mode 100644 index 0000000..b6998ee --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__type_support.c @@ -0,0 +1,111 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from unitree_go:msg/InterfaceConfig.idl +// generated code does not contain a copyright notice + +#include +#include "unitree_go/msg/detail/interface_config__rosidl_typesupport_introspection_c.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" +#include "rosidl_typesupport_introspection_c/field_types.h" +#include "rosidl_typesupport_introspection_c/identifier.h" +#include "rosidl_typesupport_introspection_c/message_introspection.h" +#include "unitree_go/msg/detail/interface_config__functions.h" +#include "unitree_go/msg/detail/interface_config__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void InterfaceConfig__rosidl_typesupport_introspection_c__InterfaceConfig_init_function( + void * message_memory, enum rosidl_runtime_c__message_initialization _init) +{ + // TODO(karsten1987): initializers are not yet implemented for typesupport c + // see https://github.com/ros2/ros2/issues/397 + (void) _init; + unitree_go__msg__InterfaceConfig__init(message_memory); +} + +void InterfaceConfig__rosidl_typesupport_introspection_c__InterfaceConfig_fini_function(void * message_memory) +{ + unitree_go__msg__InterfaceConfig__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember InterfaceConfig__rosidl_typesupport_introspection_c__InterfaceConfig_message_member_array[3] = { + { + "mode", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__InterfaceConfig, mode), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "value", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__InterfaceConfig, value), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "reserve", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 2, // array size + false, // is upper bound + offsetof(unitree_go__msg__InterfaceConfig, reserve), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers InterfaceConfig__rosidl_typesupport_introspection_c__InterfaceConfig_message_members = { + "unitree_go__msg", // message namespace + "InterfaceConfig", // message name + 3, // number of fields + sizeof(unitree_go__msg__InterfaceConfig), + InterfaceConfig__rosidl_typesupport_introspection_c__InterfaceConfig_message_member_array, // message members + InterfaceConfig__rosidl_typesupport_introspection_c__InterfaceConfig_init_function, // function to initialize message memory (memory has to be allocated) + InterfaceConfig__rosidl_typesupport_introspection_c__InterfaceConfig_fini_function // function to terminate message instance (will not free memory) +}; + +// this is not const since it must be initialized on first access +// since C does not allow non-integral compile-time constants +static rosidl_message_type_support_t InterfaceConfig__rosidl_typesupport_introspection_c__InterfaceConfig_message_type_support_handle = { + 0, + &InterfaceConfig__rosidl_typesupport_introspection_c__InterfaceConfig_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, InterfaceConfig)() { + if (!InterfaceConfig__rosidl_typesupport_introspection_c__InterfaceConfig_message_type_support_handle.typesupport_identifier) { + InterfaceConfig__rosidl_typesupport_introspection_c__InterfaceConfig_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &InterfaceConfig__rosidl_typesupport_introspection_c__InterfaceConfig_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__type_support.cpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__type_support.cpp new file mode 100644 index 0000000..123f226 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__type_support.cpp @@ -0,0 +1,157 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from unitree_go:msg/InterfaceConfig.idl +// generated code does not contain a copyright notice + +#include "array" +#include "cstddef" +#include "string" +#include "vector" +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_cpp/message_type_support.hpp" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/detail/interface_config__struct.hpp" +#include "rosidl_typesupport_introspection_cpp/field_types.hpp" +#include "rosidl_typesupport_introspection_cpp/identifier.hpp" +#include "rosidl_typesupport_introspection_cpp/message_introspection.hpp" +#include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void InterfaceConfig_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) unitree_go::msg::InterfaceConfig(_init); +} + +void InterfaceConfig_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~InterfaceConfig(); +} + +size_t size_function__InterfaceConfig__reserve(const void * untyped_member) +{ + (void)untyped_member; + return 2; +} + +const void * get_const_function__InterfaceConfig__reserve(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__InterfaceConfig__reserve(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember InterfaceConfig_message_member_array[3] = { + { + "mode", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::InterfaceConfig, mode), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "value", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::InterfaceConfig, value), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "reserve", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 2, // array size + false, // is upper bound + offsetof(unitree_go::msg::InterfaceConfig, reserve), // bytes offset in struct + nullptr, // default value + size_function__InterfaceConfig__reserve, // size() function pointer + get_const_function__InterfaceConfig__reserve, // get_const(index) function pointer + get_function__InterfaceConfig__reserve, // get(index) function pointer + nullptr // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers InterfaceConfig_message_members = { + "unitree_go::msg", // message namespace + "InterfaceConfig", // message name + 3, // number of fields + sizeof(unitree_go::msg::InterfaceConfig), + InterfaceConfig_message_member_array, // message members + InterfaceConfig_init_function, // function to initialize message memory (memory has to be allocated) + InterfaceConfig_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t InterfaceConfig_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &InterfaceConfig_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace unitree_go + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::InterfaceConfig_message_type_support_handle; +} + +} // namespace rosidl_typesupport_introspection_cpp + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, InterfaceConfig)() { + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::InterfaceConfig_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__type_support.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__type_support.h new file mode 100644 index 0000000..e0e628f --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from unitree_go:msg/InterfaceConfig.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__INTERFACE_CONFIG__TYPE_SUPPORT_H_ +#define UNITREE_GO__MSG__DETAIL__INTERFACE_CONFIG__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rosidl_runtime_c/message_type_support_struct.h" + +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + unitree_go, + msg, + InterfaceConfig +)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__INTERFACE_CONFIG__TYPE_SUPPORT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__type_support.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__type_support.hpp new file mode 100644 index 0000000..5e96d7c --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/interface_config__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from unitree_go:msg/InterfaceConfig.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__INTERFACE_CONFIG__TYPE_SUPPORT_HPP_ +#define UNITREE_GO__MSG__DETAIL__INTERFACE_CONFIG__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_cpp__visibility_control.hpp" + +#include "rosidl_typesupport_cpp/message_type_support.hpp" + +#ifdef __cplusplus +extern "C" +{ +#endif +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + unitree_go, + msg, + InterfaceConfig +)(); +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__INTERFACE_CONFIG__TYPE_SUPPORT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__builder.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__builder.hpp new file mode 100644 index 0000000..b6689b9 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__builder.hpp @@ -0,0 +1,311 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from unitree_go:msg/LidarState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__LIDAR_STATE__BUILDER_HPP_ +#define UNITREE_GO__MSG__DETAIL__LIDAR_STATE__BUILDER_HPP_ + +#include "unitree_go/msg/detail/lidar_state__struct.hpp" +#include +#include +#include + + +namespace unitree_go +{ + +namespace msg +{ + +namespace builder +{ + +class Init_LidarState_serial_buffer_read +{ +public: + explicit Init_LidarState_serial_buffer_read(::unitree_go::msg::LidarState & msg) + : msg_(msg) + {} + ::unitree_go::msg::LidarState serial_buffer_read(::unitree_go::msg::LidarState::_serial_buffer_read_type arg) + { + msg_.serial_buffer_read = std::move(arg); + return std::move(msg_); + } + +private: + ::unitree_go::msg::LidarState msg_; +}; + +class Init_LidarState_serial_buffer_size +{ +public: + explicit Init_LidarState_serial_buffer_size(::unitree_go::msg::LidarState & msg) + : msg_(msg) + {} + Init_LidarState_serial_buffer_read serial_buffer_size(::unitree_go::msg::LidarState::_serial_buffer_size_type arg) + { + msg_.serial_buffer_size = std::move(arg); + return Init_LidarState_serial_buffer_read(msg_); + } + +private: + ::unitree_go::msg::LidarState msg_; +}; + +class Init_LidarState_serial_recv_stamp +{ +public: + explicit Init_LidarState_serial_recv_stamp(::unitree_go::msg::LidarState & msg) + : msg_(msg) + {} + Init_LidarState_serial_buffer_size serial_recv_stamp(::unitree_go::msg::LidarState::_serial_recv_stamp_type arg) + { + msg_.serial_recv_stamp = std::move(arg); + return Init_LidarState_serial_buffer_size(msg_); + } + +private: + ::unitree_go::msg::LidarState msg_; +}; + +class Init_LidarState_imu_rpy +{ +public: + explicit Init_LidarState_imu_rpy(::unitree_go::msg::LidarState & msg) + : msg_(msg) + {} + Init_LidarState_serial_recv_stamp imu_rpy(::unitree_go::msg::LidarState::_imu_rpy_type arg) + { + msg_.imu_rpy = std::move(arg); + return Init_LidarState_serial_recv_stamp(msg_); + } + +private: + ::unitree_go::msg::LidarState msg_; +}; + +class Init_LidarState_imu_packet_loss_rate +{ +public: + explicit Init_LidarState_imu_packet_loss_rate(::unitree_go::msg::LidarState & msg) + : msg_(msg) + {} + Init_LidarState_imu_rpy imu_packet_loss_rate(::unitree_go::msg::LidarState::_imu_packet_loss_rate_type arg) + { + msg_.imu_packet_loss_rate = std::move(arg); + return Init_LidarState_imu_rpy(msg_); + } + +private: + ::unitree_go::msg::LidarState msg_; +}; + +class Init_LidarState_imu_frequency +{ +public: + explicit Init_LidarState_imu_frequency(::unitree_go::msg::LidarState & msg) + : msg_(msg) + {} + Init_LidarState_imu_packet_loss_rate imu_frequency(::unitree_go::msg::LidarState::_imu_frequency_type arg) + { + msg_.imu_frequency = std::move(arg); + return Init_LidarState_imu_packet_loss_rate(msg_); + } + +private: + ::unitree_go::msg::LidarState msg_; +}; + +class Init_LidarState_cloud_scan_num +{ +public: + explicit Init_LidarState_cloud_scan_num(::unitree_go::msg::LidarState & msg) + : msg_(msg) + {} + Init_LidarState_imu_frequency cloud_scan_num(::unitree_go::msg::LidarState::_cloud_scan_num_type arg) + { + msg_.cloud_scan_num = std::move(arg); + return Init_LidarState_imu_frequency(msg_); + } + +private: + ::unitree_go::msg::LidarState msg_; +}; + +class Init_LidarState_cloud_size +{ +public: + explicit Init_LidarState_cloud_size(::unitree_go::msg::LidarState & msg) + : msg_(msg) + {} + Init_LidarState_cloud_scan_num cloud_size(::unitree_go::msg::LidarState::_cloud_size_type arg) + { + msg_.cloud_size = std::move(arg); + return Init_LidarState_cloud_scan_num(msg_); + } + +private: + ::unitree_go::msg::LidarState msg_; +}; + +class Init_LidarState_cloud_packet_loss_rate +{ +public: + explicit Init_LidarState_cloud_packet_loss_rate(::unitree_go::msg::LidarState & msg) + : msg_(msg) + {} + Init_LidarState_cloud_size cloud_packet_loss_rate(::unitree_go::msg::LidarState::_cloud_packet_loss_rate_type arg) + { + msg_.cloud_packet_loss_rate = std::move(arg); + return Init_LidarState_cloud_size(msg_); + } + +private: + ::unitree_go::msg::LidarState msg_; +}; + +class Init_LidarState_cloud_frequency +{ +public: + explicit Init_LidarState_cloud_frequency(::unitree_go::msg::LidarState & msg) + : msg_(msg) + {} + Init_LidarState_cloud_packet_loss_rate cloud_frequency(::unitree_go::msg::LidarState::_cloud_frequency_type arg) + { + msg_.cloud_frequency = std::move(arg); + return Init_LidarState_cloud_packet_loss_rate(msg_); + } + +private: + ::unitree_go::msg::LidarState msg_; +}; + +class Init_LidarState_error_state +{ +public: + explicit Init_LidarState_error_state(::unitree_go::msg::LidarState & msg) + : msg_(msg) + {} + Init_LidarState_cloud_frequency error_state(::unitree_go::msg::LidarState::_error_state_type arg) + { + msg_.error_state = std::move(arg); + return Init_LidarState_cloud_frequency(msg_); + } + +private: + ::unitree_go::msg::LidarState msg_; +}; + +class Init_LidarState_com_rotation_speed +{ +public: + explicit Init_LidarState_com_rotation_speed(::unitree_go::msg::LidarState & msg) + : msg_(msg) + {} + Init_LidarState_error_state com_rotation_speed(::unitree_go::msg::LidarState::_com_rotation_speed_type arg) + { + msg_.com_rotation_speed = std::move(arg); + return Init_LidarState_error_state(msg_); + } + +private: + ::unitree_go::msg::LidarState msg_; +}; + +class Init_LidarState_sys_rotation_speed +{ +public: + explicit Init_LidarState_sys_rotation_speed(::unitree_go::msg::LidarState & msg) + : msg_(msg) + {} + Init_LidarState_com_rotation_speed sys_rotation_speed(::unitree_go::msg::LidarState::_sys_rotation_speed_type arg) + { + msg_.sys_rotation_speed = std::move(arg); + return Init_LidarState_com_rotation_speed(msg_); + } + +private: + ::unitree_go::msg::LidarState msg_; +}; + +class Init_LidarState_sdk_version +{ +public: + explicit Init_LidarState_sdk_version(::unitree_go::msg::LidarState & msg) + : msg_(msg) + {} + Init_LidarState_sys_rotation_speed sdk_version(::unitree_go::msg::LidarState::_sdk_version_type arg) + { + msg_.sdk_version = std::move(arg); + return Init_LidarState_sys_rotation_speed(msg_); + } + +private: + ::unitree_go::msg::LidarState msg_; +}; + +class Init_LidarState_software_version +{ +public: + explicit Init_LidarState_software_version(::unitree_go::msg::LidarState & msg) + : msg_(msg) + {} + Init_LidarState_sdk_version software_version(::unitree_go::msg::LidarState::_software_version_type arg) + { + msg_.software_version = std::move(arg); + return Init_LidarState_sdk_version(msg_); + } + +private: + ::unitree_go::msg::LidarState msg_; +}; + +class Init_LidarState_firmware_version +{ +public: + explicit Init_LidarState_firmware_version(::unitree_go::msg::LidarState & msg) + : msg_(msg) + {} + Init_LidarState_software_version firmware_version(::unitree_go::msg::LidarState::_firmware_version_type arg) + { + msg_.firmware_version = std::move(arg); + return Init_LidarState_software_version(msg_); + } + +private: + ::unitree_go::msg::LidarState msg_; +}; + +class Init_LidarState_stamp +{ +public: + Init_LidarState_stamp() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_LidarState_firmware_version stamp(::unitree_go::msg::LidarState::_stamp_type arg) + { + msg_.stamp = std::move(arg); + return Init_LidarState_firmware_version(msg_); + } + +private: + ::unitree_go::msg::LidarState msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::unitree_go::msg::LidarState>() +{ + return unitree_go::msg::builder::Init_LidarState_stamp(); +} + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__LIDAR_STATE__BUILDER_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__functions.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__functions.c new file mode 100644 index 0000000..86a7388 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__functions.c @@ -0,0 +1,402 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from unitree_go:msg/LidarState.idl +// generated code does not contain a copyright notice +#include "unitree_go/msg/detail/lidar_state__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `firmware_version` +// Member `software_version` +// Member `sdk_version` +#include "rosidl_runtime_c/string_functions.h" + +bool +unitree_go__msg__LidarState__init(unitree_go__msg__LidarState * msg) +{ + if (!msg) { + return false; + } + // stamp + // firmware_version + if (!rosidl_runtime_c__String__init(&msg->firmware_version)) { + unitree_go__msg__LidarState__fini(msg); + return false; + } + // software_version + if (!rosidl_runtime_c__String__init(&msg->software_version)) { + unitree_go__msg__LidarState__fini(msg); + return false; + } + // sdk_version + if (!rosidl_runtime_c__String__init(&msg->sdk_version)) { + unitree_go__msg__LidarState__fini(msg); + return false; + } + // sys_rotation_speed + // com_rotation_speed + // error_state + // cloud_frequency + // cloud_packet_loss_rate + // cloud_size + // cloud_scan_num + // imu_frequency + // imu_packet_loss_rate + // imu_rpy + // serial_recv_stamp + // serial_buffer_size + // serial_buffer_read + return true; +} + +void +unitree_go__msg__LidarState__fini(unitree_go__msg__LidarState * msg) +{ + if (!msg) { + return; + } + // stamp + // firmware_version + rosidl_runtime_c__String__fini(&msg->firmware_version); + // software_version + rosidl_runtime_c__String__fini(&msg->software_version); + // sdk_version + rosidl_runtime_c__String__fini(&msg->sdk_version); + // sys_rotation_speed + // com_rotation_speed + // error_state + // cloud_frequency + // cloud_packet_loss_rate + // cloud_size + // cloud_scan_num + // imu_frequency + // imu_packet_loss_rate + // imu_rpy + // serial_recv_stamp + // serial_buffer_size + // serial_buffer_read +} + +bool +unitree_go__msg__LidarState__are_equal(const unitree_go__msg__LidarState * lhs, const unitree_go__msg__LidarState * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // stamp + if (lhs->stamp != rhs->stamp) { + return false; + } + // firmware_version + if (!rosidl_runtime_c__String__are_equal( + &(lhs->firmware_version), &(rhs->firmware_version))) + { + return false; + } + // software_version + if (!rosidl_runtime_c__String__are_equal( + &(lhs->software_version), &(rhs->software_version))) + { + return false; + } + // sdk_version + if (!rosidl_runtime_c__String__are_equal( + &(lhs->sdk_version), &(rhs->sdk_version))) + { + return false; + } + // sys_rotation_speed + if (lhs->sys_rotation_speed != rhs->sys_rotation_speed) { + return false; + } + // com_rotation_speed + if (lhs->com_rotation_speed != rhs->com_rotation_speed) { + return false; + } + // error_state + if (lhs->error_state != rhs->error_state) { + return false; + } + // cloud_frequency + if (lhs->cloud_frequency != rhs->cloud_frequency) { + return false; + } + // cloud_packet_loss_rate + if (lhs->cloud_packet_loss_rate != rhs->cloud_packet_loss_rate) { + return false; + } + // cloud_size + if (lhs->cloud_size != rhs->cloud_size) { + return false; + } + // cloud_scan_num + if (lhs->cloud_scan_num != rhs->cloud_scan_num) { + return false; + } + // imu_frequency + if (lhs->imu_frequency != rhs->imu_frequency) { + return false; + } + // imu_packet_loss_rate + if (lhs->imu_packet_loss_rate != rhs->imu_packet_loss_rate) { + return false; + } + // imu_rpy + for (size_t i = 0; i < 3; ++i) { + if (lhs->imu_rpy[i] != rhs->imu_rpy[i]) { + return false; + } + } + // serial_recv_stamp + if (lhs->serial_recv_stamp != rhs->serial_recv_stamp) { + return false; + } + // serial_buffer_size + if (lhs->serial_buffer_size != rhs->serial_buffer_size) { + return false; + } + // serial_buffer_read + if (lhs->serial_buffer_read != rhs->serial_buffer_read) { + return false; + } + return true; +} + +bool +unitree_go__msg__LidarState__copy( + const unitree_go__msg__LidarState * input, + unitree_go__msg__LidarState * output) +{ + if (!input || !output) { + return false; + } + // stamp + output->stamp = input->stamp; + // firmware_version + if (!rosidl_runtime_c__String__copy( + &(input->firmware_version), &(output->firmware_version))) + { + return false; + } + // software_version + if (!rosidl_runtime_c__String__copy( + &(input->software_version), &(output->software_version))) + { + return false; + } + // sdk_version + if (!rosidl_runtime_c__String__copy( + &(input->sdk_version), &(output->sdk_version))) + { + return false; + } + // sys_rotation_speed + output->sys_rotation_speed = input->sys_rotation_speed; + // com_rotation_speed + output->com_rotation_speed = input->com_rotation_speed; + // error_state + output->error_state = input->error_state; + // cloud_frequency + output->cloud_frequency = input->cloud_frequency; + // cloud_packet_loss_rate + output->cloud_packet_loss_rate = input->cloud_packet_loss_rate; + // cloud_size + output->cloud_size = input->cloud_size; + // cloud_scan_num + output->cloud_scan_num = input->cloud_scan_num; + // imu_frequency + output->imu_frequency = input->imu_frequency; + // imu_packet_loss_rate + output->imu_packet_loss_rate = input->imu_packet_loss_rate; + // imu_rpy + for (size_t i = 0; i < 3; ++i) { + output->imu_rpy[i] = input->imu_rpy[i]; + } + // serial_recv_stamp + output->serial_recv_stamp = input->serial_recv_stamp; + // serial_buffer_size + output->serial_buffer_size = input->serial_buffer_size; + // serial_buffer_read + output->serial_buffer_read = input->serial_buffer_read; + return true; +} + +unitree_go__msg__LidarState * +unitree_go__msg__LidarState__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__LidarState * msg = (unitree_go__msg__LidarState *)allocator.allocate(sizeof(unitree_go__msg__LidarState), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(unitree_go__msg__LidarState)); + bool success = unitree_go__msg__LidarState__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +unitree_go__msg__LidarState__destroy(unitree_go__msg__LidarState * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + unitree_go__msg__LidarState__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +unitree_go__msg__LidarState__Sequence__init(unitree_go__msg__LidarState__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__LidarState * data = NULL; + + if (size) { + data = (unitree_go__msg__LidarState *)allocator.zero_allocate(size, sizeof(unitree_go__msg__LidarState), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = unitree_go__msg__LidarState__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + unitree_go__msg__LidarState__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +unitree_go__msg__LidarState__Sequence__fini(unitree_go__msg__LidarState__Sequence * array) +{ + if (!array) { + return; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + + if (array->data) { + // ensure that data and capacity values are consistent + assert(array->capacity > 0); + // finalize all array elements + for (size_t i = 0; i < array->capacity; ++i) { + unitree_go__msg__LidarState__fini(&array->data[i]); + } + allocator.deallocate(array->data, allocator.state); + array->data = NULL; + array->size = 0; + array->capacity = 0; + } else { + // ensure that data, size, and capacity values are consistent + assert(0 == array->size); + assert(0 == array->capacity); + } +} + +unitree_go__msg__LidarState__Sequence * +unitree_go__msg__LidarState__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__LidarState__Sequence * array = (unitree_go__msg__LidarState__Sequence *)allocator.allocate(sizeof(unitree_go__msg__LidarState__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = unitree_go__msg__LidarState__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +unitree_go__msg__LidarState__Sequence__destroy(unitree_go__msg__LidarState__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + unitree_go__msg__LidarState__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +unitree_go__msg__LidarState__Sequence__are_equal(const unitree_go__msg__LidarState__Sequence * lhs, const unitree_go__msg__LidarState__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!unitree_go__msg__LidarState__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +unitree_go__msg__LidarState__Sequence__copy( + const unitree_go__msg__LidarState__Sequence * input, + unitree_go__msg__LidarState__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(unitree_go__msg__LidarState); + unitree_go__msg__LidarState * data = + (unitree_go__msg__LidarState *)realloc(output->data, allocation_size); + if (!data) { + return false; + } + for (size_t i = output->capacity; i < input->size; ++i) { + if (!unitree_go__msg__LidarState__init(&data[i])) { + /* free currently allocated and return false */ + for (; i-- > output->capacity; ) { + unitree_go__msg__LidarState__fini(&data[i]); + } + free(data); + return false; + } + } + output->data = data; + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!unitree_go__msg__LidarState__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__functions.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__functions.h new file mode 100644 index 0000000..fd634b8 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from unitree_go:msg/LidarState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__LIDAR_STATE__FUNCTIONS_H_ +#define UNITREE_GO__MSG__DETAIL__LIDAR_STATE__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#include "unitree_go/msg/detail/lidar_state__struct.h" + +/// Initialize msg/LidarState message. +/** + * If the init function is called twice for the same message without + * calling fini inbetween previously allocated memory will be leaked. + * \param[in,out] msg The previously allocated message pointer. + * Fields without a default value will not be initialized by this function. + * You might want to call memset(msg, 0, sizeof( + * unitree_go__msg__LidarState + * )) before or use + * unitree_go__msg__LidarState__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__LidarState__init(unitree_go__msg__LidarState * msg); + +/// Finalize msg/LidarState message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__LidarState__fini(unitree_go__msg__LidarState * msg); + +/// Create msg/LidarState message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * unitree_go__msg__LidarState__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__LidarState * +unitree_go__msg__LidarState__create(); + +/// Destroy msg/LidarState message. +/** + * It calls + * unitree_go__msg__LidarState__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__LidarState__destroy(unitree_go__msg__LidarState * msg); + +/// Check for msg/LidarState message equality. +/** + * \param[in] lhs The message on the left hand size of the equality operator. + * \param[in] rhs The message on the right hand size of the equality operator. + * \return true if messages are equal, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__LidarState__are_equal(const unitree_go__msg__LidarState * lhs, const unitree_go__msg__LidarState * rhs); + +/// Copy a msg/LidarState message. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source message pointer. + * \param[out] output The target message pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer is null + * or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__LidarState__copy( + const unitree_go__msg__LidarState * input, + unitree_go__msg__LidarState * output); + +/// Initialize array of msg/LidarState messages. +/** + * It allocates the memory for the number of elements and calls + * unitree_go__msg__LidarState__init() + * for each element of the array. + * \param[in,out] array The allocated array pointer. + * \param[in] size The size / capacity of the array. + * \return true if initialization was successful, otherwise false + * If the array pointer is valid and the size is zero it is guaranteed + # to return true. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__LidarState__Sequence__init(unitree_go__msg__LidarState__Sequence * array, size_t size); + +/// Finalize array of msg/LidarState messages. +/** + * It calls + * unitree_go__msg__LidarState__fini() + * for each element of the array and frees the memory for the number of + * elements. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__LidarState__Sequence__fini(unitree_go__msg__LidarState__Sequence * array); + +/// Create array of msg/LidarState messages. +/** + * It allocates the memory for the array and calls + * unitree_go__msg__LidarState__Sequence__init(). + * \param[in] size The size / capacity of the array. + * \return The pointer to the initialized array if successful, otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__LidarState__Sequence * +unitree_go__msg__LidarState__Sequence__create(size_t size); + +/// Destroy array of msg/LidarState messages. +/** + * It calls + * unitree_go__msg__LidarState__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__LidarState__Sequence__destroy(unitree_go__msg__LidarState__Sequence * array); + +/// Check for msg/LidarState message array equality. +/** + * \param[in] lhs The message array on the left hand size of the equality operator. + * \param[in] rhs The message array on the right hand size of the equality operator. + * \return true if message arrays are equal in size and content, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__LidarState__Sequence__are_equal(const unitree_go__msg__LidarState__Sequence * lhs, const unitree_go__msg__LidarState__Sequence * rhs); + +/// Copy an array of msg/LidarState messages. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source array pointer. + * \param[out] output The target array pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer + * is null or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__LidarState__Sequence__copy( + const unitree_go__msg__LidarState__Sequence * input, + unitree_go__msg__LidarState__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__LIDAR_STATE__FUNCTIONS_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__rosidl_typesupport_fastrtps_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 0000000..54e4d69 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,36 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from unitree_go:msg/LidarState.idl +// generated code does not contain a copyright notice +#ifndef UNITREE_GO__MSG__DETAIL__LIDAR_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define UNITREE_GO__MSG__DETAIL__LIDAR_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t get_serialized_size_unitree_go__msg__LidarState( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t max_serialized_size_unitree_go__msg__LidarState( + bool & full_bounded, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, unitree_go, msg, LidarState)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__LIDAR_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__rosidl_typesupport_fastrtps_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 0000000..1ea1cc1 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,79 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from unitree_go:msg/LidarState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__LIDAR_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__LIDAR_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "unitree_go/msg/detail/lidar_state__struct.hpp" + +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-parameter" +# ifdef __clang__ +# pragma clang diagnostic ignored "-Wdeprecated-register" +# pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +# endif +#endif +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif + +#include "fastcdr/Cdr.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_serialize( + const unitree_go::msg::LidarState & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + unitree_go::msg::LidarState & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +get_serialized_size( + const unitree_go::msg::LidarState & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +max_serialized_size_LidarState( + bool & full_bounded, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace unitree_go + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, unitree_go, msg, LidarState)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__LIDAR_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__rosidl_typesupport_introspection_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__rosidl_typesupport_introspection_c.h new file mode 100644 index 0000000..322636c --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from unitree_go:msg/LidarState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__LIDAR_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define UNITREE_GO__MSG__DETAIL__LIDAR_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, LidarState)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__LIDAR_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__rosidl_typesupport_introspection_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 0000000..460abde --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from unitree_go:msg/LidarState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__LIDAR_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__LIDAR_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +// TODO(dirk-thomas) these visibility macros should be message package specific +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, LidarState)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__LIDAR_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__struct.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__struct.h new file mode 100644 index 0000000..b7929f1 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__struct.h @@ -0,0 +1,62 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from unitree_go:msg/LidarState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__LIDAR_STATE__STRUCT_H_ +#define UNITREE_GO__MSG__DETAIL__LIDAR_STATE__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'firmware_version' +// Member 'software_version' +// Member 'sdk_version' +#include "rosidl_runtime_c/string.h" + +// Struct defined in msg/LidarState in the package unitree_go. +typedef struct unitree_go__msg__LidarState +{ + double stamp; + rosidl_runtime_c__String firmware_version; + rosidl_runtime_c__String software_version; + rosidl_runtime_c__String sdk_version; + float sys_rotation_speed; + float com_rotation_speed; + uint8_t error_state; + float cloud_frequency; + float cloud_packet_loss_rate; + uint32_t cloud_size; + uint32_t cloud_scan_num; + float imu_frequency; + float imu_packet_loss_rate; + float imu_rpy[3]; + double serial_recv_stamp; + uint32_t serial_buffer_size; + uint32_t serial_buffer_read; +} unitree_go__msg__LidarState; + +// Struct for a sequence of unitree_go__msg__LidarState. +typedef struct unitree_go__msg__LidarState__Sequence +{ + unitree_go__msg__LidarState * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} unitree_go__msg__LidarState__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__LIDAR_STATE__STRUCT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__struct.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__struct.hpp new file mode 100644 index 0000000..d2726c5 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__struct.hpp @@ -0,0 +1,357 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from unitree_go:msg/LidarState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__LIDAR_STATE__STRUCT_HPP_ +#define UNITREE_GO__MSG__DETAIL__LIDAR_STATE__STRUCT_HPP_ + +#include +#include +#include +#include +#include +#include +#include + + +#ifndef _WIN32 +# define DEPRECATED__unitree_go__msg__LidarState __attribute__((deprecated)) +#else +# define DEPRECATED__unitree_go__msg__LidarState __declspec(deprecated) +#endif + +namespace unitree_go +{ + +namespace msg +{ + +// message struct +template +struct LidarState_ +{ + using Type = LidarState_; + + explicit LidarState_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->stamp = 0.0; + this->firmware_version = ""; + this->software_version = ""; + this->sdk_version = ""; + this->sys_rotation_speed = 0.0f; + this->com_rotation_speed = 0.0f; + this->error_state = 0; + this->cloud_frequency = 0.0f; + this->cloud_packet_loss_rate = 0.0f; + this->cloud_size = 0ul; + this->cloud_scan_num = 0ul; + this->imu_frequency = 0.0f; + this->imu_packet_loss_rate = 0.0f; + std::fill::iterator, float>(this->imu_rpy.begin(), this->imu_rpy.end(), 0.0f); + this->serial_recv_stamp = 0.0; + this->serial_buffer_size = 0ul; + this->serial_buffer_read = 0ul; + } + } + + explicit LidarState_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : firmware_version(_alloc), + software_version(_alloc), + sdk_version(_alloc), + imu_rpy(_alloc) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->stamp = 0.0; + this->firmware_version = ""; + this->software_version = ""; + this->sdk_version = ""; + this->sys_rotation_speed = 0.0f; + this->com_rotation_speed = 0.0f; + this->error_state = 0; + this->cloud_frequency = 0.0f; + this->cloud_packet_loss_rate = 0.0f; + this->cloud_size = 0ul; + this->cloud_scan_num = 0ul; + this->imu_frequency = 0.0f; + this->imu_packet_loss_rate = 0.0f; + std::fill::iterator, float>(this->imu_rpy.begin(), this->imu_rpy.end(), 0.0f); + this->serial_recv_stamp = 0.0; + this->serial_buffer_size = 0ul; + this->serial_buffer_read = 0ul; + } + } + + // field types and members + using _stamp_type = + double; + _stamp_type stamp; + using _firmware_version_type = + std::basic_string, typename ContainerAllocator::template rebind::other>; + _firmware_version_type firmware_version; + using _software_version_type = + std::basic_string, typename ContainerAllocator::template rebind::other>; + _software_version_type software_version; + using _sdk_version_type = + std::basic_string, typename ContainerAllocator::template rebind::other>; + _sdk_version_type sdk_version; + using _sys_rotation_speed_type = + float; + _sys_rotation_speed_type sys_rotation_speed; + using _com_rotation_speed_type = + float; + _com_rotation_speed_type com_rotation_speed; + using _error_state_type = + uint8_t; + _error_state_type error_state; + using _cloud_frequency_type = + float; + _cloud_frequency_type cloud_frequency; + using _cloud_packet_loss_rate_type = + float; + _cloud_packet_loss_rate_type cloud_packet_loss_rate; + using _cloud_size_type = + uint32_t; + _cloud_size_type cloud_size; + using _cloud_scan_num_type = + uint32_t; + _cloud_scan_num_type cloud_scan_num; + using _imu_frequency_type = + float; + _imu_frequency_type imu_frequency; + using _imu_packet_loss_rate_type = + float; + _imu_packet_loss_rate_type imu_packet_loss_rate; + using _imu_rpy_type = + std::array; + _imu_rpy_type imu_rpy; + using _serial_recv_stamp_type = + double; + _serial_recv_stamp_type serial_recv_stamp; + using _serial_buffer_size_type = + uint32_t; + _serial_buffer_size_type serial_buffer_size; + using _serial_buffer_read_type = + uint32_t; + _serial_buffer_read_type serial_buffer_read; + + // setters for named parameter idiom + Type & set__stamp( + const double & _arg) + { + this->stamp = _arg; + return *this; + } + Type & set__firmware_version( + const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + { + this->firmware_version = _arg; + return *this; + } + Type & set__software_version( + const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + { + this->software_version = _arg; + return *this; + } + Type & set__sdk_version( + const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + { + this->sdk_version = _arg; + return *this; + } + Type & set__sys_rotation_speed( + const float & _arg) + { + this->sys_rotation_speed = _arg; + return *this; + } + Type & set__com_rotation_speed( + const float & _arg) + { + this->com_rotation_speed = _arg; + return *this; + } + Type & set__error_state( + const uint8_t & _arg) + { + this->error_state = _arg; + return *this; + } + Type & set__cloud_frequency( + const float & _arg) + { + this->cloud_frequency = _arg; + return *this; + } + Type & set__cloud_packet_loss_rate( + const float & _arg) + { + this->cloud_packet_loss_rate = _arg; + return *this; + } + Type & set__cloud_size( + const uint32_t & _arg) + { + this->cloud_size = _arg; + return *this; + } + Type & set__cloud_scan_num( + const uint32_t & _arg) + { + this->cloud_scan_num = _arg; + return *this; + } + Type & set__imu_frequency( + const float & _arg) + { + this->imu_frequency = _arg; + return *this; + } + Type & set__imu_packet_loss_rate( + const float & _arg) + { + this->imu_packet_loss_rate = _arg; + return *this; + } + Type & set__imu_rpy( + const std::array & _arg) + { + this->imu_rpy = _arg; + return *this; + } + Type & set__serial_recv_stamp( + const double & _arg) + { + this->serial_recv_stamp = _arg; + return *this; + } + Type & set__serial_buffer_size( + const uint32_t & _arg) + { + this->serial_buffer_size = _arg; + return *this; + } + Type & set__serial_buffer_read( + const uint32_t & _arg) + { + this->serial_buffer_read = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + unitree_go::msg::LidarState_ *; + using ConstRawPtr = + const unitree_go::msg::LidarState_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr const>; + + // pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead + // NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly + typedef DEPRECATED__unitree_go__msg__LidarState + std::shared_ptr> + Ptr; + typedef DEPRECATED__unitree_go__msg__LidarState + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const LidarState_ & other) const + { + if (this->stamp != other.stamp) { + return false; + } + if (this->firmware_version != other.firmware_version) { + return false; + } + if (this->software_version != other.software_version) { + return false; + } + if (this->sdk_version != other.sdk_version) { + return false; + } + if (this->sys_rotation_speed != other.sys_rotation_speed) { + return false; + } + if (this->com_rotation_speed != other.com_rotation_speed) { + return false; + } + if (this->error_state != other.error_state) { + return false; + } + if (this->cloud_frequency != other.cloud_frequency) { + return false; + } + if (this->cloud_packet_loss_rate != other.cloud_packet_loss_rate) { + return false; + } + if (this->cloud_size != other.cloud_size) { + return false; + } + if (this->cloud_scan_num != other.cloud_scan_num) { + return false; + } + if (this->imu_frequency != other.imu_frequency) { + return false; + } + if (this->imu_packet_loss_rate != other.imu_packet_loss_rate) { + return false; + } + if (this->imu_rpy != other.imu_rpy) { + return false; + } + if (this->serial_recv_stamp != other.serial_recv_stamp) { + return false; + } + if (this->serial_buffer_size != other.serial_buffer_size) { + return false; + } + if (this->serial_buffer_read != other.serial_buffer_read) { + return false; + } + return true; + } + bool operator!=(const LidarState_ & other) const + { + return !this->operator==(other); + } +}; // struct LidarState_ + +// alias to use template instance with default allocator +using LidarState = + unitree_go::msg::LidarState_>; + +// constant definitions + +} // namespace msg + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__LIDAR_STATE__STRUCT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__traits.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__traits.hpp new file mode 100644 index 0000000..038aac7 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__traits.hpp @@ -0,0 +1,42 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from unitree_go:msg/LidarState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__LIDAR_STATE__TRAITS_HPP_ +#define UNITREE_GO__MSG__DETAIL__LIDAR_STATE__TRAITS_HPP_ + +#include "unitree_go/msg/detail/lidar_state__struct.hpp" +#include +#include +#include + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "unitree_go::msg::LidarState"; +} + +template<> +inline const char * name() +{ + return "unitree_go/msg/LidarState"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UNITREE_GO__MSG__DETAIL__LIDAR_STATE__TRAITS_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__type_support.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__type_support.c new file mode 100644 index 0000000..455c5eb --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__type_support.c @@ -0,0 +1,327 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from unitree_go:msg/LidarState.idl +// generated code does not contain a copyright notice + +#include +#include "unitree_go/msg/detail/lidar_state__rosidl_typesupport_introspection_c.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" +#include "rosidl_typesupport_introspection_c/field_types.h" +#include "rosidl_typesupport_introspection_c/identifier.h" +#include "rosidl_typesupport_introspection_c/message_introspection.h" +#include "unitree_go/msg/detail/lidar_state__functions.h" +#include "unitree_go/msg/detail/lidar_state__struct.h" + + +// Include directives for member types +// Member `firmware_version` +// Member `software_version` +// Member `sdk_version` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void LidarState__rosidl_typesupport_introspection_c__LidarState_init_function( + void * message_memory, enum rosidl_runtime_c__message_initialization _init) +{ + // TODO(karsten1987): initializers are not yet implemented for typesupport c + // see https://github.com/ros2/ros2/issues/397 + (void) _init; + unitree_go__msg__LidarState__init(message_memory); +} + +void LidarState__rosidl_typesupport_introspection_c__LidarState_fini_function(void * message_memory) +{ + unitree_go__msg__LidarState__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember LidarState__rosidl_typesupport_introspection_c__LidarState_message_member_array[17] = { + { + "stamp", // name + rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LidarState, stamp), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "firmware_version", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LidarState, firmware_version), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "software_version", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LidarState, software_version), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "sdk_version", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LidarState, sdk_version), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "sys_rotation_speed", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LidarState, sys_rotation_speed), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "com_rotation_speed", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LidarState, com_rotation_speed), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "error_state", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LidarState, error_state), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "cloud_frequency", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LidarState, cloud_frequency), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "cloud_packet_loss_rate", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LidarState, cloud_packet_loss_rate), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "cloud_size", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LidarState, cloud_size), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "cloud_scan_num", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LidarState, cloud_scan_num), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "imu_frequency", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LidarState, imu_frequency), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "imu_packet_loss_rate", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LidarState, imu_packet_loss_rate), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "imu_rpy", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 3, // array size + false, // is upper bound + offsetof(unitree_go__msg__LidarState, imu_rpy), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "serial_recv_stamp", // name + rosidl_typesupport_introspection_c__ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LidarState, serial_recv_stamp), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "serial_buffer_size", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LidarState, serial_buffer_size), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "serial_buffer_read", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LidarState, serial_buffer_read), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers LidarState__rosidl_typesupport_introspection_c__LidarState_message_members = { + "unitree_go__msg", // message namespace + "LidarState", // message name + 17, // number of fields + sizeof(unitree_go__msg__LidarState), + LidarState__rosidl_typesupport_introspection_c__LidarState_message_member_array, // message members + LidarState__rosidl_typesupport_introspection_c__LidarState_init_function, // function to initialize message memory (memory has to be allocated) + LidarState__rosidl_typesupport_introspection_c__LidarState_fini_function // function to terminate message instance (will not free memory) +}; + +// this is not const since it must be initialized on first access +// since C does not allow non-integral compile-time constants +static rosidl_message_type_support_t LidarState__rosidl_typesupport_introspection_c__LidarState_message_type_support_handle = { + 0, + &LidarState__rosidl_typesupport_introspection_c__LidarState_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, LidarState)() { + if (!LidarState__rosidl_typesupport_introspection_c__LidarState_message_type_support_handle.typesupport_identifier) { + LidarState__rosidl_typesupport_introspection_c__LidarState_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &LidarState__rosidl_typesupport_introspection_c__LidarState_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__type_support.cpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__type_support.cpp new file mode 100644 index 0000000..7678ec7 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__type_support.cpp @@ -0,0 +1,367 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from unitree_go:msg/LidarState.idl +// generated code does not contain a copyright notice + +#include "array" +#include "cstddef" +#include "string" +#include "vector" +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_cpp/message_type_support.hpp" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/detail/lidar_state__struct.hpp" +#include "rosidl_typesupport_introspection_cpp/field_types.hpp" +#include "rosidl_typesupport_introspection_cpp/identifier.hpp" +#include "rosidl_typesupport_introspection_cpp/message_introspection.hpp" +#include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void LidarState_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) unitree_go::msg::LidarState(_init); +} + +void LidarState_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~LidarState(); +} + +size_t size_function__LidarState__imu_rpy(const void * untyped_member) +{ + (void)untyped_member; + return 3; +} + +const void * get_const_function__LidarState__imu_rpy(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__LidarState__imu_rpy(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember LidarState_message_member_array[17] = { + { + "stamp", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LidarState, stamp), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "firmware_version", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LidarState, firmware_version), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "software_version", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LidarState, software_version), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "sdk_version", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LidarState, sdk_version), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "sys_rotation_speed", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LidarState, sys_rotation_speed), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "com_rotation_speed", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LidarState, com_rotation_speed), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "error_state", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LidarState, error_state), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "cloud_frequency", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LidarState, cloud_frequency), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "cloud_packet_loss_rate", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LidarState, cloud_packet_loss_rate), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "cloud_size", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LidarState, cloud_size), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "cloud_scan_num", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LidarState, cloud_scan_num), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "imu_frequency", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LidarState, imu_frequency), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "imu_packet_loss_rate", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LidarState, imu_packet_loss_rate), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "imu_rpy", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 3, // array size + false, // is upper bound + offsetof(unitree_go::msg::LidarState, imu_rpy), // bytes offset in struct + nullptr, // default value + size_function__LidarState__imu_rpy, // size() function pointer + get_const_function__LidarState__imu_rpy, // get_const(index) function pointer + get_function__LidarState__imu_rpy, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "serial_recv_stamp", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_DOUBLE, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LidarState, serial_recv_stamp), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "serial_buffer_size", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LidarState, serial_buffer_size), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "serial_buffer_read", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LidarState, serial_buffer_read), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers LidarState_message_members = { + "unitree_go::msg", // message namespace + "LidarState", // message name + 17, // number of fields + sizeof(unitree_go::msg::LidarState), + LidarState_message_member_array, // message members + LidarState_init_function, // function to initialize message memory (memory has to be allocated) + LidarState_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t LidarState_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &LidarState_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace unitree_go + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::LidarState_message_type_support_handle; +} + +} // namespace rosidl_typesupport_introspection_cpp + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, LidarState)() { + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::LidarState_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__type_support.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__type_support.h new file mode 100644 index 0000000..254eac6 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from unitree_go:msg/LidarState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__LIDAR_STATE__TYPE_SUPPORT_H_ +#define UNITREE_GO__MSG__DETAIL__LIDAR_STATE__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rosidl_runtime_c/message_type_support_struct.h" + +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + unitree_go, + msg, + LidarState +)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__LIDAR_STATE__TYPE_SUPPORT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__type_support.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__type_support.hpp new file mode 100644 index 0000000..78f4939 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/lidar_state__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from unitree_go:msg/LidarState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__LIDAR_STATE__TYPE_SUPPORT_HPP_ +#define UNITREE_GO__MSG__DETAIL__LIDAR_STATE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_cpp__visibility_control.hpp" + +#include "rosidl_typesupport_cpp/message_type_support.hpp" + +#ifdef __cplusplus +extern "C" +{ +#endif +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + unitree_go, + msg, + LidarState +)(); +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__LIDAR_STATE__TYPE_SUPPORT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__builder.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__builder.hpp new file mode 100644 index 0000000..88c0f97 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__builder.hpp @@ -0,0 +1,263 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from unitree_go:msg/LowCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__LOW_CMD__BUILDER_HPP_ +#define UNITREE_GO__MSG__DETAIL__LOW_CMD__BUILDER_HPP_ + +#include "unitree_go/msg/detail/low_cmd__struct.hpp" +#include +#include +#include + + +namespace unitree_go +{ + +namespace msg +{ + +namespace builder +{ + +class Init_LowCmd_crc +{ +public: + explicit Init_LowCmd_crc(::unitree_go::msg::LowCmd & msg) + : msg_(msg) + {} + ::unitree_go::msg::LowCmd crc(::unitree_go::msg::LowCmd::_crc_type arg) + { + msg_.crc = std::move(arg); + return std::move(msg_); + } + +private: + ::unitree_go::msg::LowCmd msg_; +}; + +class Init_LowCmd_reserve +{ +public: + explicit Init_LowCmd_reserve(::unitree_go::msg::LowCmd & msg) + : msg_(msg) + {} + Init_LowCmd_crc reserve(::unitree_go::msg::LowCmd::_reserve_type arg) + { + msg_.reserve = std::move(arg); + return Init_LowCmd_crc(msg_); + } + +private: + ::unitree_go::msg::LowCmd msg_; +}; + +class Init_LowCmd_gpio +{ +public: + explicit Init_LowCmd_gpio(::unitree_go::msg::LowCmd & msg) + : msg_(msg) + {} + Init_LowCmd_reserve gpio(::unitree_go::msg::LowCmd::_gpio_type arg) + { + msg_.gpio = std::move(arg); + return Init_LowCmd_reserve(msg_); + } + +private: + ::unitree_go::msg::LowCmd msg_; +}; + +class Init_LowCmd_fan +{ +public: + explicit Init_LowCmd_fan(::unitree_go::msg::LowCmd & msg) + : msg_(msg) + {} + Init_LowCmd_gpio fan(::unitree_go::msg::LowCmd::_fan_type arg) + { + msg_.fan = std::move(arg); + return Init_LowCmd_gpio(msg_); + } + +private: + ::unitree_go::msg::LowCmd msg_; +}; + +class Init_LowCmd_led +{ +public: + explicit Init_LowCmd_led(::unitree_go::msg::LowCmd & msg) + : msg_(msg) + {} + Init_LowCmd_fan led(::unitree_go::msg::LowCmd::_led_type arg) + { + msg_.led = std::move(arg); + return Init_LowCmd_fan(msg_); + } + +private: + ::unitree_go::msg::LowCmd msg_; +}; + +class Init_LowCmd_wireless_remote +{ +public: + explicit Init_LowCmd_wireless_remote(::unitree_go::msg::LowCmd & msg) + : msg_(msg) + {} + Init_LowCmd_led wireless_remote(::unitree_go::msg::LowCmd::_wireless_remote_type arg) + { + msg_.wireless_remote = std::move(arg); + return Init_LowCmd_led(msg_); + } + +private: + ::unitree_go::msg::LowCmd msg_; +}; + +class Init_LowCmd_bms_cmd +{ +public: + explicit Init_LowCmd_bms_cmd(::unitree_go::msg::LowCmd & msg) + : msg_(msg) + {} + Init_LowCmd_wireless_remote bms_cmd(::unitree_go::msg::LowCmd::_bms_cmd_type arg) + { + msg_.bms_cmd = std::move(arg); + return Init_LowCmd_wireless_remote(msg_); + } + +private: + ::unitree_go::msg::LowCmd msg_; +}; + +class Init_LowCmd_motor_cmd +{ +public: + explicit Init_LowCmd_motor_cmd(::unitree_go::msg::LowCmd & msg) + : msg_(msg) + {} + Init_LowCmd_bms_cmd motor_cmd(::unitree_go::msg::LowCmd::_motor_cmd_type arg) + { + msg_.motor_cmd = std::move(arg); + return Init_LowCmd_bms_cmd(msg_); + } + +private: + ::unitree_go::msg::LowCmd msg_; +}; + +class Init_LowCmd_bandwidth +{ +public: + explicit Init_LowCmd_bandwidth(::unitree_go::msg::LowCmd & msg) + : msg_(msg) + {} + Init_LowCmd_motor_cmd bandwidth(::unitree_go::msg::LowCmd::_bandwidth_type arg) + { + msg_.bandwidth = std::move(arg); + return Init_LowCmd_motor_cmd(msg_); + } + +private: + ::unitree_go::msg::LowCmd msg_; +}; + +class Init_LowCmd_version +{ +public: + explicit Init_LowCmd_version(::unitree_go::msg::LowCmd & msg) + : msg_(msg) + {} + Init_LowCmd_bandwidth version(::unitree_go::msg::LowCmd::_version_type arg) + { + msg_.version = std::move(arg); + return Init_LowCmd_bandwidth(msg_); + } + +private: + ::unitree_go::msg::LowCmd msg_; +}; + +class Init_LowCmd_sn +{ +public: + explicit Init_LowCmd_sn(::unitree_go::msg::LowCmd & msg) + : msg_(msg) + {} + Init_LowCmd_version sn(::unitree_go::msg::LowCmd::_sn_type arg) + { + msg_.sn = std::move(arg); + return Init_LowCmd_version(msg_); + } + +private: + ::unitree_go::msg::LowCmd msg_; +}; + +class Init_LowCmd_frame_reserve +{ +public: + explicit Init_LowCmd_frame_reserve(::unitree_go::msg::LowCmd & msg) + : msg_(msg) + {} + Init_LowCmd_sn frame_reserve(::unitree_go::msg::LowCmd::_frame_reserve_type arg) + { + msg_.frame_reserve = std::move(arg); + return Init_LowCmd_sn(msg_); + } + +private: + ::unitree_go::msg::LowCmd msg_; +}; + +class Init_LowCmd_level_flag +{ +public: + explicit Init_LowCmd_level_flag(::unitree_go::msg::LowCmd & msg) + : msg_(msg) + {} + Init_LowCmd_frame_reserve level_flag(::unitree_go::msg::LowCmd::_level_flag_type arg) + { + msg_.level_flag = std::move(arg); + return Init_LowCmd_frame_reserve(msg_); + } + +private: + ::unitree_go::msg::LowCmd msg_; +}; + +class Init_LowCmd_head +{ +public: + Init_LowCmd_head() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_LowCmd_level_flag head(::unitree_go::msg::LowCmd::_head_type arg) + { + msg_.head = std::move(arg); + return Init_LowCmd_level_flag(msg_); + } + +private: + ::unitree_go::msg::LowCmd msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::unitree_go::msg::LowCmd>() +{ + return unitree_go::msg::builder::Init_LowCmd_head(); +} + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__LOW_CMD__BUILDER_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__functions.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__functions.c new file mode 100644 index 0000000..75f379a --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__functions.c @@ -0,0 +1,395 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from unitree_go:msg/LowCmd.idl +// generated code does not contain a copyright notice +#include "unitree_go/msg/detail/low_cmd__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `motor_cmd` +#include "unitree_go/msg/detail/motor_cmd__functions.h" +// Member `bms_cmd` +#include "unitree_go/msg/detail/bms_cmd__functions.h" + +bool +unitree_go__msg__LowCmd__init(unitree_go__msg__LowCmd * msg) +{ + if (!msg) { + return false; + } + // head + // level_flag + // frame_reserve + // sn + // version + // bandwidth + // motor_cmd + for (size_t i = 0; i < 20; ++i) { + if (!unitree_go__msg__MotorCmd__init(&msg->motor_cmd[i])) { + unitree_go__msg__LowCmd__fini(msg); + return false; + } + } + // bms_cmd + if (!unitree_go__msg__BmsCmd__init(&msg->bms_cmd)) { + unitree_go__msg__LowCmd__fini(msg); + return false; + } + // wireless_remote + // led + // fan + // gpio + // reserve + // crc + return true; +} + +void +unitree_go__msg__LowCmd__fini(unitree_go__msg__LowCmd * msg) +{ + if (!msg) { + return; + } + // head + // level_flag + // frame_reserve + // sn + // version + // bandwidth + // motor_cmd + for (size_t i = 0; i < 20; ++i) { + unitree_go__msg__MotorCmd__fini(&msg->motor_cmd[i]); + } + // bms_cmd + unitree_go__msg__BmsCmd__fini(&msg->bms_cmd); + // wireless_remote + // led + // fan + // gpio + // reserve + // crc +} + +bool +unitree_go__msg__LowCmd__are_equal(const unitree_go__msg__LowCmd * lhs, const unitree_go__msg__LowCmd * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // head + for (size_t i = 0; i < 2; ++i) { + if (lhs->head[i] != rhs->head[i]) { + return false; + } + } + // level_flag + if (lhs->level_flag != rhs->level_flag) { + return false; + } + // frame_reserve + if (lhs->frame_reserve != rhs->frame_reserve) { + return false; + } + // sn + for (size_t i = 0; i < 2; ++i) { + if (lhs->sn[i] != rhs->sn[i]) { + return false; + } + } + // version + for (size_t i = 0; i < 2; ++i) { + if (lhs->version[i] != rhs->version[i]) { + return false; + } + } + // bandwidth + if (lhs->bandwidth != rhs->bandwidth) { + return false; + } + // motor_cmd + for (size_t i = 0; i < 20; ++i) { + if (!unitree_go__msg__MotorCmd__are_equal( + &(lhs->motor_cmd[i]), &(rhs->motor_cmd[i]))) + { + return false; + } + } + // bms_cmd + if (!unitree_go__msg__BmsCmd__are_equal( + &(lhs->bms_cmd), &(rhs->bms_cmd))) + { + return false; + } + // wireless_remote + for (size_t i = 0; i < 40; ++i) { + if (lhs->wireless_remote[i] != rhs->wireless_remote[i]) { + return false; + } + } + // led + for (size_t i = 0; i < 12; ++i) { + if (lhs->led[i] != rhs->led[i]) { + return false; + } + } + // fan + for (size_t i = 0; i < 2; ++i) { + if (lhs->fan[i] != rhs->fan[i]) { + return false; + } + } + // gpio + if (lhs->gpio != rhs->gpio) { + return false; + } + // reserve + if (lhs->reserve != rhs->reserve) { + return false; + } + // crc + if (lhs->crc != rhs->crc) { + return false; + } + return true; +} + +bool +unitree_go__msg__LowCmd__copy( + const unitree_go__msg__LowCmd * input, + unitree_go__msg__LowCmd * output) +{ + if (!input || !output) { + return false; + } + // head + for (size_t i = 0; i < 2; ++i) { + output->head[i] = input->head[i]; + } + // level_flag + output->level_flag = input->level_flag; + // frame_reserve + output->frame_reserve = input->frame_reserve; + // sn + for (size_t i = 0; i < 2; ++i) { + output->sn[i] = input->sn[i]; + } + // version + for (size_t i = 0; i < 2; ++i) { + output->version[i] = input->version[i]; + } + // bandwidth + output->bandwidth = input->bandwidth; + // motor_cmd + for (size_t i = 0; i < 20; ++i) { + if (!unitree_go__msg__MotorCmd__copy( + &(input->motor_cmd[i]), &(output->motor_cmd[i]))) + { + return false; + } + } + // bms_cmd + if (!unitree_go__msg__BmsCmd__copy( + &(input->bms_cmd), &(output->bms_cmd))) + { + return false; + } + // wireless_remote + for (size_t i = 0; i < 40; ++i) { + output->wireless_remote[i] = input->wireless_remote[i]; + } + // led + for (size_t i = 0; i < 12; ++i) { + output->led[i] = input->led[i]; + } + // fan + for (size_t i = 0; i < 2; ++i) { + output->fan[i] = input->fan[i]; + } + // gpio + output->gpio = input->gpio; + // reserve + output->reserve = input->reserve; + // crc + output->crc = input->crc; + return true; +} + +unitree_go__msg__LowCmd * +unitree_go__msg__LowCmd__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__LowCmd * msg = (unitree_go__msg__LowCmd *)allocator.allocate(sizeof(unitree_go__msg__LowCmd), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(unitree_go__msg__LowCmd)); + bool success = unitree_go__msg__LowCmd__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +unitree_go__msg__LowCmd__destroy(unitree_go__msg__LowCmd * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + unitree_go__msg__LowCmd__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +unitree_go__msg__LowCmd__Sequence__init(unitree_go__msg__LowCmd__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__LowCmd * data = NULL; + + if (size) { + data = (unitree_go__msg__LowCmd *)allocator.zero_allocate(size, sizeof(unitree_go__msg__LowCmd), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = unitree_go__msg__LowCmd__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + unitree_go__msg__LowCmd__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +unitree_go__msg__LowCmd__Sequence__fini(unitree_go__msg__LowCmd__Sequence * array) +{ + if (!array) { + return; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + + if (array->data) { + // ensure that data and capacity values are consistent + assert(array->capacity > 0); + // finalize all array elements + for (size_t i = 0; i < array->capacity; ++i) { + unitree_go__msg__LowCmd__fini(&array->data[i]); + } + allocator.deallocate(array->data, allocator.state); + array->data = NULL; + array->size = 0; + array->capacity = 0; + } else { + // ensure that data, size, and capacity values are consistent + assert(0 == array->size); + assert(0 == array->capacity); + } +} + +unitree_go__msg__LowCmd__Sequence * +unitree_go__msg__LowCmd__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__LowCmd__Sequence * array = (unitree_go__msg__LowCmd__Sequence *)allocator.allocate(sizeof(unitree_go__msg__LowCmd__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = unitree_go__msg__LowCmd__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +unitree_go__msg__LowCmd__Sequence__destroy(unitree_go__msg__LowCmd__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + unitree_go__msg__LowCmd__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +unitree_go__msg__LowCmd__Sequence__are_equal(const unitree_go__msg__LowCmd__Sequence * lhs, const unitree_go__msg__LowCmd__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!unitree_go__msg__LowCmd__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +unitree_go__msg__LowCmd__Sequence__copy( + const unitree_go__msg__LowCmd__Sequence * input, + unitree_go__msg__LowCmd__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(unitree_go__msg__LowCmd); + unitree_go__msg__LowCmd * data = + (unitree_go__msg__LowCmd *)realloc(output->data, allocation_size); + if (!data) { + return false; + } + for (size_t i = output->capacity; i < input->size; ++i) { + if (!unitree_go__msg__LowCmd__init(&data[i])) { + /* free currently allocated and return false */ + for (; i-- > output->capacity; ) { + unitree_go__msg__LowCmd__fini(&data[i]); + } + free(data); + return false; + } + } + output->data = data; + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!unitree_go__msg__LowCmd__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__functions.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__functions.h new file mode 100644 index 0000000..1c5b4fb --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from unitree_go:msg/LowCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__LOW_CMD__FUNCTIONS_H_ +#define UNITREE_GO__MSG__DETAIL__LOW_CMD__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#include "unitree_go/msg/detail/low_cmd__struct.h" + +/// Initialize msg/LowCmd message. +/** + * If the init function is called twice for the same message without + * calling fini inbetween previously allocated memory will be leaked. + * \param[in,out] msg The previously allocated message pointer. + * Fields without a default value will not be initialized by this function. + * You might want to call memset(msg, 0, sizeof( + * unitree_go__msg__LowCmd + * )) before or use + * unitree_go__msg__LowCmd__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__LowCmd__init(unitree_go__msg__LowCmd * msg); + +/// Finalize msg/LowCmd message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__LowCmd__fini(unitree_go__msg__LowCmd * msg); + +/// Create msg/LowCmd message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * unitree_go__msg__LowCmd__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__LowCmd * +unitree_go__msg__LowCmd__create(); + +/// Destroy msg/LowCmd message. +/** + * It calls + * unitree_go__msg__LowCmd__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__LowCmd__destroy(unitree_go__msg__LowCmd * msg); + +/// Check for msg/LowCmd message equality. +/** + * \param[in] lhs The message on the left hand size of the equality operator. + * \param[in] rhs The message on the right hand size of the equality operator. + * \return true if messages are equal, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__LowCmd__are_equal(const unitree_go__msg__LowCmd * lhs, const unitree_go__msg__LowCmd * rhs); + +/// Copy a msg/LowCmd message. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source message pointer. + * \param[out] output The target message pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer is null + * or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__LowCmd__copy( + const unitree_go__msg__LowCmd * input, + unitree_go__msg__LowCmd * output); + +/// Initialize array of msg/LowCmd messages. +/** + * It allocates the memory for the number of elements and calls + * unitree_go__msg__LowCmd__init() + * for each element of the array. + * \param[in,out] array The allocated array pointer. + * \param[in] size The size / capacity of the array. + * \return true if initialization was successful, otherwise false + * If the array pointer is valid and the size is zero it is guaranteed + # to return true. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__LowCmd__Sequence__init(unitree_go__msg__LowCmd__Sequence * array, size_t size); + +/// Finalize array of msg/LowCmd messages. +/** + * It calls + * unitree_go__msg__LowCmd__fini() + * for each element of the array and frees the memory for the number of + * elements. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__LowCmd__Sequence__fini(unitree_go__msg__LowCmd__Sequence * array); + +/// Create array of msg/LowCmd messages. +/** + * It allocates the memory for the array and calls + * unitree_go__msg__LowCmd__Sequence__init(). + * \param[in] size The size / capacity of the array. + * \return The pointer to the initialized array if successful, otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__LowCmd__Sequence * +unitree_go__msg__LowCmd__Sequence__create(size_t size); + +/// Destroy array of msg/LowCmd messages. +/** + * It calls + * unitree_go__msg__LowCmd__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__LowCmd__Sequence__destroy(unitree_go__msg__LowCmd__Sequence * array); + +/// Check for msg/LowCmd message array equality. +/** + * \param[in] lhs The message array on the left hand size of the equality operator. + * \param[in] rhs The message array on the right hand size of the equality operator. + * \return true if message arrays are equal in size and content, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__LowCmd__Sequence__are_equal(const unitree_go__msg__LowCmd__Sequence * lhs, const unitree_go__msg__LowCmd__Sequence * rhs); + +/// Copy an array of msg/LowCmd messages. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source array pointer. + * \param[out] output The target array pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer + * is null or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__LowCmd__Sequence__copy( + const unitree_go__msg__LowCmd__Sequence * input, + unitree_go__msg__LowCmd__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__LOW_CMD__FUNCTIONS_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__rosidl_typesupport_fastrtps_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 0000000..f505dd9 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,36 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from unitree_go:msg/LowCmd.idl +// generated code does not contain a copyright notice +#ifndef UNITREE_GO__MSG__DETAIL__LOW_CMD__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define UNITREE_GO__MSG__DETAIL__LOW_CMD__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t get_serialized_size_unitree_go__msg__LowCmd( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t max_serialized_size_unitree_go__msg__LowCmd( + bool & full_bounded, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, unitree_go, msg, LowCmd)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__LOW_CMD__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__rosidl_typesupport_fastrtps_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 0000000..1137270 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,79 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from unitree_go:msg/LowCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__LOW_CMD__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__LOW_CMD__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "unitree_go/msg/detail/low_cmd__struct.hpp" + +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-parameter" +# ifdef __clang__ +# pragma clang diagnostic ignored "-Wdeprecated-register" +# pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +# endif +#endif +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif + +#include "fastcdr/Cdr.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_serialize( + const unitree_go::msg::LowCmd & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + unitree_go::msg::LowCmd & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +get_serialized_size( + const unitree_go::msg::LowCmd & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +max_serialized_size_LowCmd( + bool & full_bounded, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace unitree_go + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, unitree_go, msg, LowCmd)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__LOW_CMD__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__rosidl_typesupport_introspection_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__rosidl_typesupport_introspection_c.h new file mode 100644 index 0000000..b254918 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from unitree_go:msg/LowCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__LOW_CMD__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define UNITREE_GO__MSG__DETAIL__LOW_CMD__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, LowCmd)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__LOW_CMD__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__rosidl_typesupport_introspection_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 0000000..aecc3bf --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from unitree_go:msg/LowCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__LOW_CMD__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__LOW_CMD__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +// TODO(dirk-thomas) these visibility macros should be message package specific +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, LowCmd)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__LOW_CMD__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__struct.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__struct.h new file mode 100644 index 0000000..c170ea8 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__struct.h @@ -0,0 +1,59 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from unitree_go:msg/LowCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__LOW_CMD__STRUCT_H_ +#define UNITREE_GO__MSG__DETAIL__LOW_CMD__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'motor_cmd' +#include "unitree_go/msg/detail/motor_cmd__struct.h" +// Member 'bms_cmd' +#include "unitree_go/msg/detail/bms_cmd__struct.h" + +// Struct defined in msg/LowCmd in the package unitree_go. +typedef struct unitree_go__msg__LowCmd +{ + uint8_t head[2]; + uint8_t level_flag; + uint8_t frame_reserve; + uint32_t sn[2]; + uint32_t version[2]; + uint16_t bandwidth; + unitree_go__msg__MotorCmd motor_cmd[20]; + unitree_go__msg__BmsCmd bms_cmd; + uint8_t wireless_remote[40]; + uint8_t led[12]; + uint8_t fan[2]; + uint8_t gpio; + uint32_t reserve; + uint32_t crc; +} unitree_go__msg__LowCmd; + +// Struct for a sequence of unitree_go__msg__LowCmd. +typedef struct unitree_go__msg__LowCmd__Sequence +{ + unitree_go__msg__LowCmd * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} unitree_go__msg__LowCmd__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__LOW_CMD__STRUCT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__struct.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__struct.hpp new file mode 100644 index 0000000..26681c5 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__struct.hpp @@ -0,0 +1,324 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from unitree_go:msg/LowCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__LOW_CMD__STRUCT_HPP_ +#define UNITREE_GO__MSG__DETAIL__LOW_CMD__STRUCT_HPP_ + +#include +#include +#include +#include +#include +#include +#include + + +// Include directives for member types +// Member 'motor_cmd' +#include "unitree_go/msg/detail/motor_cmd__struct.hpp" +// Member 'bms_cmd' +#include "unitree_go/msg/detail/bms_cmd__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__unitree_go__msg__LowCmd __attribute__((deprecated)) +#else +# define DEPRECATED__unitree_go__msg__LowCmd __declspec(deprecated) +#endif + +namespace unitree_go +{ + +namespace msg +{ + +// message struct +template +struct LowCmd_ +{ + using Type = LowCmd_; + + explicit LowCmd_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : bms_cmd(_init) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + std::fill::iterator, uint8_t>(this->head.begin(), this->head.end(), 0); + this->level_flag = 0; + this->frame_reserve = 0; + std::fill::iterator, uint32_t>(this->sn.begin(), this->sn.end(), 0ul); + std::fill::iterator, uint32_t>(this->version.begin(), this->version.end(), 0ul); + this->bandwidth = 0; + this->motor_cmd.fill(unitree_go::msg::MotorCmd_{_init}); + std::fill::iterator, uint8_t>(this->wireless_remote.begin(), this->wireless_remote.end(), 0); + std::fill::iterator, uint8_t>(this->led.begin(), this->led.end(), 0); + std::fill::iterator, uint8_t>(this->fan.begin(), this->fan.end(), 0); + this->gpio = 0; + this->reserve = 0ul; + this->crc = 0ul; + } + } + + explicit LowCmd_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : head(_alloc), + sn(_alloc), + version(_alloc), + motor_cmd(_alloc), + bms_cmd(_alloc, _init), + wireless_remote(_alloc), + led(_alloc), + fan(_alloc) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + std::fill::iterator, uint8_t>(this->head.begin(), this->head.end(), 0); + this->level_flag = 0; + this->frame_reserve = 0; + std::fill::iterator, uint32_t>(this->sn.begin(), this->sn.end(), 0ul); + std::fill::iterator, uint32_t>(this->version.begin(), this->version.end(), 0ul); + this->bandwidth = 0; + this->motor_cmd.fill(unitree_go::msg::MotorCmd_{_alloc, _init}); + std::fill::iterator, uint8_t>(this->wireless_remote.begin(), this->wireless_remote.end(), 0); + std::fill::iterator, uint8_t>(this->led.begin(), this->led.end(), 0); + std::fill::iterator, uint8_t>(this->fan.begin(), this->fan.end(), 0); + this->gpio = 0; + this->reserve = 0ul; + this->crc = 0ul; + } + } + + // field types and members + using _head_type = + std::array; + _head_type head; + using _level_flag_type = + uint8_t; + _level_flag_type level_flag; + using _frame_reserve_type = + uint8_t; + _frame_reserve_type frame_reserve; + using _sn_type = + std::array; + _sn_type sn; + using _version_type = + std::array; + _version_type version; + using _bandwidth_type = + uint16_t; + _bandwidth_type bandwidth; + using _motor_cmd_type = + std::array, 20>; + _motor_cmd_type motor_cmd; + using _bms_cmd_type = + unitree_go::msg::BmsCmd_; + _bms_cmd_type bms_cmd; + using _wireless_remote_type = + std::array; + _wireless_remote_type wireless_remote; + using _led_type = + std::array; + _led_type led; + using _fan_type = + std::array; + _fan_type fan; + using _gpio_type = + uint8_t; + _gpio_type gpio; + using _reserve_type = + uint32_t; + _reserve_type reserve; + using _crc_type = + uint32_t; + _crc_type crc; + + // setters for named parameter idiom + Type & set__head( + const std::array & _arg) + { + this->head = _arg; + return *this; + } + Type & set__level_flag( + const uint8_t & _arg) + { + this->level_flag = _arg; + return *this; + } + Type & set__frame_reserve( + const uint8_t & _arg) + { + this->frame_reserve = _arg; + return *this; + } + Type & set__sn( + const std::array & _arg) + { + this->sn = _arg; + return *this; + } + Type & set__version( + const std::array & _arg) + { + this->version = _arg; + return *this; + } + Type & set__bandwidth( + const uint16_t & _arg) + { + this->bandwidth = _arg; + return *this; + } + Type & set__motor_cmd( + const std::array, 20> & _arg) + { + this->motor_cmd = _arg; + return *this; + } + Type & set__bms_cmd( + const unitree_go::msg::BmsCmd_ & _arg) + { + this->bms_cmd = _arg; + return *this; + } + Type & set__wireless_remote( + const std::array & _arg) + { + this->wireless_remote = _arg; + return *this; + } + Type & set__led( + const std::array & _arg) + { + this->led = _arg; + return *this; + } + Type & set__fan( + const std::array & _arg) + { + this->fan = _arg; + return *this; + } + Type & set__gpio( + const uint8_t & _arg) + { + this->gpio = _arg; + return *this; + } + Type & set__reserve( + const uint32_t & _arg) + { + this->reserve = _arg; + return *this; + } + Type & set__crc( + const uint32_t & _arg) + { + this->crc = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + unitree_go::msg::LowCmd_ *; + using ConstRawPtr = + const unitree_go::msg::LowCmd_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr const>; + + // pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead + // NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly + typedef DEPRECATED__unitree_go__msg__LowCmd + std::shared_ptr> + Ptr; + typedef DEPRECATED__unitree_go__msg__LowCmd + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const LowCmd_ & other) const + { + if (this->head != other.head) { + return false; + } + if (this->level_flag != other.level_flag) { + return false; + } + if (this->frame_reserve != other.frame_reserve) { + return false; + } + if (this->sn != other.sn) { + return false; + } + if (this->version != other.version) { + return false; + } + if (this->bandwidth != other.bandwidth) { + return false; + } + if (this->motor_cmd != other.motor_cmd) { + return false; + } + if (this->bms_cmd != other.bms_cmd) { + return false; + } + if (this->wireless_remote != other.wireless_remote) { + return false; + } + if (this->led != other.led) { + return false; + } + if (this->fan != other.fan) { + return false; + } + if (this->gpio != other.gpio) { + return false; + } + if (this->reserve != other.reserve) { + return false; + } + if (this->crc != other.crc) { + return false; + } + return true; + } + bool operator!=(const LowCmd_ & other) const + { + return !this->operator==(other); + } +}; // struct LowCmd_ + +// alias to use template instance with default allocator +using LowCmd = + unitree_go::msg::LowCmd_>; + +// constant definitions + +} // namespace msg + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__LOW_CMD__STRUCT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__traits.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__traits.hpp new file mode 100644 index 0000000..cc104c8 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__traits.hpp @@ -0,0 +1,48 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from unitree_go:msg/LowCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__LOW_CMD__TRAITS_HPP_ +#define UNITREE_GO__MSG__DETAIL__LOW_CMD__TRAITS_HPP_ + +#include "unitree_go/msg/detail/low_cmd__struct.hpp" +#include +#include +#include + +// Include directives for member types +// Member 'motor_cmd' +#include "unitree_go/msg/detail/motor_cmd__traits.hpp" +// Member 'bms_cmd' +#include "unitree_go/msg/detail/bms_cmd__traits.hpp" + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "unitree_go::msg::LowCmd"; +} + +template<> +inline const char * name() +{ + return "unitree_go/msg/LowCmd"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value && has_fixed_size::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value && has_bounded_size::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UNITREE_GO__MSG__DETAIL__LOW_CMD__TRAITS_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__type_support.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__type_support.c new file mode 100644 index 0000000..d515586 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__type_support.c @@ -0,0 +1,313 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from unitree_go:msg/LowCmd.idl +// generated code does not contain a copyright notice + +#include +#include "unitree_go/msg/detail/low_cmd__rosidl_typesupport_introspection_c.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" +#include "rosidl_typesupport_introspection_c/field_types.h" +#include "rosidl_typesupport_introspection_c/identifier.h" +#include "rosidl_typesupport_introspection_c/message_introspection.h" +#include "unitree_go/msg/detail/low_cmd__functions.h" +#include "unitree_go/msg/detail/low_cmd__struct.h" + + +// Include directives for member types +// Member `motor_cmd` +#include "unitree_go/msg/motor_cmd.h" +// Member `motor_cmd` +#include "unitree_go/msg/detail/motor_cmd__rosidl_typesupport_introspection_c.h" +// Member `bms_cmd` +#include "unitree_go/msg/bms_cmd.h" +// Member `bms_cmd` +#include "unitree_go/msg/detail/bms_cmd__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void LowCmd__rosidl_typesupport_introspection_c__LowCmd_init_function( + void * message_memory, enum rosidl_runtime_c__message_initialization _init) +{ + // TODO(karsten1987): initializers are not yet implemented for typesupport c + // see https://github.com/ros2/ros2/issues/397 + (void) _init; + unitree_go__msg__LowCmd__init(message_memory); +} + +void LowCmd__rosidl_typesupport_introspection_c__LowCmd_fini_function(void * message_memory) +{ + unitree_go__msg__LowCmd__fini(message_memory); +} + +size_t LowCmd__rosidl_typesupport_introspection_c__size_function__MotorCmd__motor_cmd( + const void * untyped_member) +{ + (void)untyped_member; + return 20; +} + +const void * LowCmd__rosidl_typesupport_introspection_c__get_const_function__MotorCmd__motor_cmd( + const void * untyped_member, size_t index) +{ + const unitree_go__msg__MotorCmd ** member = + (const unitree_go__msg__MotorCmd **)(untyped_member); + return &(*member)[index]; +} + +void * LowCmd__rosidl_typesupport_introspection_c__get_function__MotorCmd__motor_cmd( + void * untyped_member, size_t index) +{ + unitree_go__msg__MotorCmd ** member = + (unitree_go__msg__MotorCmd **)(untyped_member); + return &(*member)[index]; +} + +static rosidl_typesupport_introspection_c__MessageMember LowCmd__rosidl_typesupport_introspection_c__LowCmd_message_member_array[14] = { + { + "head", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 2, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowCmd, head), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "level_flag", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowCmd, level_flag), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "frame_reserve", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowCmd, frame_reserve), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "sn", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 2, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowCmd, sn), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "version", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 2, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowCmd, version), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "bandwidth", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT16, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowCmd, bandwidth), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "motor_cmd", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 20, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowCmd, motor_cmd), // bytes offset in struct + NULL, // default value + LowCmd__rosidl_typesupport_introspection_c__size_function__MotorCmd__motor_cmd, // size() function pointer + LowCmd__rosidl_typesupport_introspection_c__get_const_function__MotorCmd__motor_cmd, // get_const(index) function pointer + LowCmd__rosidl_typesupport_introspection_c__get_function__MotorCmd__motor_cmd, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "bms_cmd", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowCmd, bms_cmd), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "wireless_remote", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 40, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowCmd, wireless_remote), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "led", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 12, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowCmd, led), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "fan", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 2, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowCmd, fan), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "gpio", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowCmd, gpio), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "reserve", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowCmd, reserve), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "crc", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowCmd, crc), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers LowCmd__rosidl_typesupport_introspection_c__LowCmd_message_members = { + "unitree_go__msg", // message namespace + "LowCmd", // message name + 14, // number of fields + sizeof(unitree_go__msg__LowCmd), + LowCmd__rosidl_typesupport_introspection_c__LowCmd_message_member_array, // message members + LowCmd__rosidl_typesupport_introspection_c__LowCmd_init_function, // function to initialize message memory (memory has to be allocated) + LowCmd__rosidl_typesupport_introspection_c__LowCmd_fini_function // function to terminate message instance (will not free memory) +}; + +// this is not const since it must be initialized on first access +// since C does not allow non-integral compile-time constants +static rosidl_message_type_support_t LowCmd__rosidl_typesupport_introspection_c__LowCmd_message_type_support_handle = { + 0, + &LowCmd__rosidl_typesupport_introspection_c__LowCmd_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, LowCmd)() { + LowCmd__rosidl_typesupport_introspection_c__LowCmd_message_member_array[6].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, MotorCmd)(); + LowCmd__rosidl_typesupport_introspection_c__LowCmd_message_member_array[7].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, BmsCmd)(); + if (!LowCmd__rosidl_typesupport_introspection_c__LowCmd_message_type_support_handle.typesupport_identifier) { + LowCmd__rosidl_typesupport_introspection_c__LowCmd_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &LowCmd__rosidl_typesupport_introspection_c__LowCmd_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__type_support.cpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__type_support.cpp new file mode 100644 index 0000000..5ecc5d0 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__type_support.cpp @@ -0,0 +1,442 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from unitree_go:msg/LowCmd.idl +// generated code does not contain a copyright notice + +#include "array" +#include "cstddef" +#include "string" +#include "vector" +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_cpp/message_type_support.hpp" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/detail/low_cmd__struct.hpp" +#include "rosidl_typesupport_introspection_cpp/field_types.hpp" +#include "rosidl_typesupport_introspection_cpp/identifier.hpp" +#include "rosidl_typesupport_introspection_cpp/message_introspection.hpp" +#include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void LowCmd_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) unitree_go::msg::LowCmd(_init); +} + +void LowCmd_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~LowCmd(); +} + +size_t size_function__LowCmd__head(const void * untyped_member) +{ + (void)untyped_member; + return 2; +} + +const void * get_const_function__LowCmd__head(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__LowCmd__head(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +size_t size_function__LowCmd__sn(const void * untyped_member) +{ + (void)untyped_member; + return 2; +} + +const void * get_const_function__LowCmd__sn(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__LowCmd__sn(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +size_t size_function__LowCmd__version(const void * untyped_member) +{ + (void)untyped_member; + return 2; +} + +const void * get_const_function__LowCmd__version(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__LowCmd__version(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +size_t size_function__LowCmd__motor_cmd(const void * untyped_member) +{ + (void)untyped_member; + return 20; +} + +const void * get_const_function__LowCmd__motor_cmd(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__LowCmd__motor_cmd(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +size_t size_function__LowCmd__wireless_remote(const void * untyped_member) +{ + (void)untyped_member; + return 40; +} + +const void * get_const_function__LowCmd__wireless_remote(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__LowCmd__wireless_remote(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +size_t size_function__LowCmd__led(const void * untyped_member) +{ + (void)untyped_member; + return 12; +} + +const void * get_const_function__LowCmd__led(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__LowCmd__led(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +size_t size_function__LowCmd__fan(const void * untyped_member) +{ + (void)untyped_member; + return 2; +} + +const void * get_const_function__LowCmd__fan(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__LowCmd__fan(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember LowCmd_message_member_array[14] = { + { + "head", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 2, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowCmd, head), // bytes offset in struct + nullptr, // default value + size_function__LowCmd__head, // size() function pointer + get_const_function__LowCmd__head, // get_const(index) function pointer + get_function__LowCmd__head, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "level_flag", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowCmd, level_flag), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "frame_reserve", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowCmd, frame_reserve), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "sn", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 2, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowCmd, sn), // bytes offset in struct + nullptr, // default value + size_function__LowCmd__sn, // size() function pointer + get_const_function__LowCmd__sn, // get_const(index) function pointer + get_function__LowCmd__sn, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "version", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 2, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowCmd, version), // bytes offset in struct + nullptr, // default value + size_function__LowCmd__version, // size() function pointer + get_const_function__LowCmd__version, // get_const(index) function pointer + get_function__LowCmd__version, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "bandwidth", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT16, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowCmd, bandwidth), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "motor_cmd", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + true, // is array + 20, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowCmd, motor_cmd), // bytes offset in struct + nullptr, // default value + size_function__LowCmd__motor_cmd, // size() function pointer + get_const_function__LowCmd__motor_cmd, // get_const(index) function pointer + get_function__LowCmd__motor_cmd, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "bms_cmd", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowCmd, bms_cmd), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "wireless_remote", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 40, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowCmd, wireless_remote), // bytes offset in struct + nullptr, // default value + size_function__LowCmd__wireless_remote, // size() function pointer + get_const_function__LowCmd__wireless_remote, // get_const(index) function pointer + get_function__LowCmd__wireless_remote, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "led", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 12, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowCmd, led), // bytes offset in struct + nullptr, // default value + size_function__LowCmd__led, // size() function pointer + get_const_function__LowCmd__led, // get_const(index) function pointer + get_function__LowCmd__led, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "fan", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 2, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowCmd, fan), // bytes offset in struct + nullptr, // default value + size_function__LowCmd__fan, // size() function pointer + get_const_function__LowCmd__fan, // get_const(index) function pointer + get_function__LowCmd__fan, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "gpio", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowCmd, gpio), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "reserve", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowCmd, reserve), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "crc", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowCmd, crc), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers LowCmd_message_members = { + "unitree_go::msg", // message namespace + "LowCmd", // message name + 14, // number of fields + sizeof(unitree_go::msg::LowCmd), + LowCmd_message_member_array, // message members + LowCmd_init_function, // function to initialize message memory (memory has to be allocated) + LowCmd_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t LowCmd_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &LowCmd_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace unitree_go + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::LowCmd_message_type_support_handle; +} + +} // namespace rosidl_typesupport_introspection_cpp + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, LowCmd)() { + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::LowCmd_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__type_support.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__type_support.h new file mode 100644 index 0000000..6575c55 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from unitree_go:msg/LowCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__LOW_CMD__TYPE_SUPPORT_H_ +#define UNITREE_GO__MSG__DETAIL__LOW_CMD__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rosidl_runtime_c/message_type_support_struct.h" + +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + unitree_go, + msg, + LowCmd +)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__LOW_CMD__TYPE_SUPPORT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__type_support.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__type_support.hpp new file mode 100644 index 0000000..1b3a9bd --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_cmd__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from unitree_go:msg/LowCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__LOW_CMD__TYPE_SUPPORT_HPP_ +#define UNITREE_GO__MSG__DETAIL__LOW_CMD__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_cpp__visibility_control.hpp" + +#include "rosidl_typesupport_cpp/message_type_support.hpp" + +#ifdef __cplusplus +extern "C" +{ +#endif +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + unitree_go, + msg, + LowCmd +)(); +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__LOW_CMD__TYPE_SUPPORT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__builder.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__builder.hpp new file mode 100644 index 0000000..9b82bde --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__builder.hpp @@ -0,0 +1,391 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from unitree_go:msg/LowState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__LOW_STATE__BUILDER_HPP_ +#define UNITREE_GO__MSG__DETAIL__LOW_STATE__BUILDER_HPP_ + +#include "unitree_go/msg/detail/low_state__struct.hpp" +#include +#include +#include + + +namespace unitree_go +{ + +namespace msg +{ + +namespace builder +{ + +class Init_LowState_crc +{ +public: + explicit Init_LowState_crc(::unitree_go::msg::LowState & msg) + : msg_(msg) + {} + ::unitree_go::msg::LowState crc(::unitree_go::msg::LowState::_crc_type arg) + { + msg_.crc = std::move(arg); + return std::move(msg_); + } + +private: + ::unitree_go::msg::LowState msg_; +}; + +class Init_LowState_reserve +{ +public: + explicit Init_LowState_reserve(::unitree_go::msg::LowState & msg) + : msg_(msg) + {} + Init_LowState_crc reserve(::unitree_go::msg::LowState::_reserve_type arg) + { + msg_.reserve = std::move(arg); + return Init_LowState_crc(msg_); + } + +private: + ::unitree_go::msg::LowState msg_; +}; + +class Init_LowState_fan_frequency +{ +public: + explicit Init_LowState_fan_frequency(::unitree_go::msg::LowState & msg) + : msg_(msg) + {} + Init_LowState_reserve fan_frequency(::unitree_go::msg::LowState::_fan_frequency_type arg) + { + msg_.fan_frequency = std::move(arg); + return Init_LowState_reserve(msg_); + } + +private: + ::unitree_go::msg::LowState msg_; +}; + +class Init_LowState_power_a +{ +public: + explicit Init_LowState_power_a(::unitree_go::msg::LowState & msg) + : msg_(msg) + {} + Init_LowState_fan_frequency power_a(::unitree_go::msg::LowState::_power_a_type arg) + { + msg_.power_a = std::move(arg); + return Init_LowState_fan_frequency(msg_); + } + +private: + ::unitree_go::msg::LowState msg_; +}; + +class Init_LowState_power_v +{ +public: + explicit Init_LowState_power_v(::unitree_go::msg::LowState & msg) + : msg_(msg) + {} + Init_LowState_power_a power_v(::unitree_go::msg::LowState::_power_v_type arg) + { + msg_.power_v = std::move(arg); + return Init_LowState_power_a(msg_); + } + +private: + ::unitree_go::msg::LowState msg_; +}; + +class Init_LowState_temperature_ntc2 +{ +public: + explicit Init_LowState_temperature_ntc2(::unitree_go::msg::LowState & msg) + : msg_(msg) + {} + Init_LowState_power_v temperature_ntc2(::unitree_go::msg::LowState::_temperature_ntc2_type arg) + { + msg_.temperature_ntc2 = std::move(arg); + return Init_LowState_power_v(msg_); + } + +private: + ::unitree_go::msg::LowState msg_; +}; + +class Init_LowState_temperature_ntc1 +{ +public: + explicit Init_LowState_temperature_ntc1(::unitree_go::msg::LowState & msg) + : msg_(msg) + {} + Init_LowState_temperature_ntc2 temperature_ntc1(::unitree_go::msg::LowState::_temperature_ntc1_type arg) + { + msg_.temperature_ntc1 = std::move(arg); + return Init_LowState_temperature_ntc2(msg_); + } + +private: + ::unitree_go::msg::LowState msg_; +}; + +class Init_LowState_adc_reel +{ +public: + explicit Init_LowState_adc_reel(::unitree_go::msg::LowState & msg) + : msg_(msg) + {} + Init_LowState_temperature_ntc1 adc_reel(::unitree_go::msg::LowState::_adc_reel_type arg) + { + msg_.adc_reel = std::move(arg); + return Init_LowState_temperature_ntc1(msg_); + } + +private: + ::unitree_go::msg::LowState msg_; +}; + +class Init_LowState_bit_flag +{ +public: + explicit Init_LowState_bit_flag(::unitree_go::msg::LowState & msg) + : msg_(msg) + {} + Init_LowState_adc_reel bit_flag(::unitree_go::msg::LowState::_bit_flag_type arg) + { + msg_.bit_flag = std::move(arg); + return Init_LowState_adc_reel(msg_); + } + +private: + ::unitree_go::msg::LowState msg_; +}; + +class Init_LowState_wireless_remote +{ +public: + explicit Init_LowState_wireless_remote(::unitree_go::msg::LowState & msg) + : msg_(msg) + {} + Init_LowState_bit_flag wireless_remote(::unitree_go::msg::LowState::_wireless_remote_type arg) + { + msg_.wireless_remote = std::move(arg); + return Init_LowState_bit_flag(msg_); + } + +private: + ::unitree_go::msg::LowState msg_; +}; + +class Init_LowState_tick +{ +public: + explicit Init_LowState_tick(::unitree_go::msg::LowState & msg) + : msg_(msg) + {} + Init_LowState_wireless_remote tick(::unitree_go::msg::LowState::_tick_type arg) + { + msg_.tick = std::move(arg); + return Init_LowState_wireless_remote(msg_); + } + +private: + ::unitree_go::msg::LowState msg_; +}; + +class Init_LowState_foot_force_est +{ +public: + explicit Init_LowState_foot_force_est(::unitree_go::msg::LowState & msg) + : msg_(msg) + {} + Init_LowState_tick foot_force_est(::unitree_go::msg::LowState::_foot_force_est_type arg) + { + msg_.foot_force_est = std::move(arg); + return Init_LowState_tick(msg_); + } + +private: + ::unitree_go::msg::LowState msg_; +}; + +class Init_LowState_foot_force +{ +public: + explicit Init_LowState_foot_force(::unitree_go::msg::LowState & msg) + : msg_(msg) + {} + Init_LowState_foot_force_est foot_force(::unitree_go::msg::LowState::_foot_force_type arg) + { + msg_.foot_force = std::move(arg); + return Init_LowState_foot_force_est(msg_); + } + +private: + ::unitree_go::msg::LowState msg_; +}; + +class Init_LowState_bms_state +{ +public: + explicit Init_LowState_bms_state(::unitree_go::msg::LowState & msg) + : msg_(msg) + {} + Init_LowState_foot_force bms_state(::unitree_go::msg::LowState::_bms_state_type arg) + { + msg_.bms_state = std::move(arg); + return Init_LowState_foot_force(msg_); + } + +private: + ::unitree_go::msg::LowState msg_; +}; + +class Init_LowState_motor_state +{ +public: + explicit Init_LowState_motor_state(::unitree_go::msg::LowState & msg) + : msg_(msg) + {} + Init_LowState_bms_state motor_state(::unitree_go::msg::LowState::_motor_state_type arg) + { + msg_.motor_state = std::move(arg); + return Init_LowState_bms_state(msg_); + } + +private: + ::unitree_go::msg::LowState msg_; +}; + +class Init_LowState_imu_state +{ +public: + explicit Init_LowState_imu_state(::unitree_go::msg::LowState & msg) + : msg_(msg) + {} + Init_LowState_motor_state imu_state(::unitree_go::msg::LowState::_imu_state_type arg) + { + msg_.imu_state = std::move(arg); + return Init_LowState_motor_state(msg_); + } + +private: + ::unitree_go::msg::LowState msg_; +}; + +class Init_LowState_bandwidth +{ +public: + explicit Init_LowState_bandwidth(::unitree_go::msg::LowState & msg) + : msg_(msg) + {} + Init_LowState_imu_state bandwidth(::unitree_go::msg::LowState::_bandwidth_type arg) + { + msg_.bandwidth = std::move(arg); + return Init_LowState_imu_state(msg_); + } + +private: + ::unitree_go::msg::LowState msg_; +}; + +class Init_LowState_version +{ +public: + explicit Init_LowState_version(::unitree_go::msg::LowState & msg) + : msg_(msg) + {} + Init_LowState_bandwidth version(::unitree_go::msg::LowState::_version_type arg) + { + msg_.version = std::move(arg); + return Init_LowState_bandwidth(msg_); + } + +private: + ::unitree_go::msg::LowState msg_; +}; + +class Init_LowState_sn +{ +public: + explicit Init_LowState_sn(::unitree_go::msg::LowState & msg) + : msg_(msg) + {} + Init_LowState_version sn(::unitree_go::msg::LowState::_sn_type arg) + { + msg_.sn = std::move(arg); + return Init_LowState_version(msg_); + } + +private: + ::unitree_go::msg::LowState msg_; +}; + +class Init_LowState_frame_reserve +{ +public: + explicit Init_LowState_frame_reserve(::unitree_go::msg::LowState & msg) + : msg_(msg) + {} + Init_LowState_sn frame_reserve(::unitree_go::msg::LowState::_frame_reserve_type arg) + { + msg_.frame_reserve = std::move(arg); + return Init_LowState_sn(msg_); + } + +private: + ::unitree_go::msg::LowState msg_; +}; + +class Init_LowState_level_flag +{ +public: + explicit Init_LowState_level_flag(::unitree_go::msg::LowState & msg) + : msg_(msg) + {} + Init_LowState_frame_reserve level_flag(::unitree_go::msg::LowState::_level_flag_type arg) + { + msg_.level_flag = std::move(arg); + return Init_LowState_frame_reserve(msg_); + } + +private: + ::unitree_go::msg::LowState msg_; +}; + +class Init_LowState_head +{ +public: + Init_LowState_head() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_LowState_level_flag head(::unitree_go::msg::LowState::_head_type arg) + { + msg_.head = std::move(arg); + return Init_LowState_level_flag(msg_); + } + +private: + ::unitree_go::msg::LowState msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::unitree_go::msg::LowState>() +{ + return unitree_go::msg::builder::Init_LowState_head(); +} + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__LOW_STATE__BUILDER_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__functions.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__functions.c new file mode 100644 index 0000000..2a1acd1 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__functions.c @@ -0,0 +1,476 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from unitree_go:msg/LowState.idl +// generated code does not contain a copyright notice +#include "unitree_go/msg/detail/low_state__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `imu_state` +#include "unitree_go/msg/detail/imu_state__functions.h" +// Member `motor_state` +#include "unitree_go/msg/detail/motor_state__functions.h" +// Member `bms_state` +#include "unitree_go/msg/detail/bms_state__functions.h" + +bool +unitree_go__msg__LowState__init(unitree_go__msg__LowState * msg) +{ + if (!msg) { + return false; + } + // head + // level_flag + // frame_reserve + // sn + // version + // bandwidth + // imu_state + if (!unitree_go__msg__IMUState__init(&msg->imu_state)) { + unitree_go__msg__LowState__fini(msg); + return false; + } + // motor_state + for (size_t i = 0; i < 20; ++i) { + if (!unitree_go__msg__MotorState__init(&msg->motor_state[i])) { + unitree_go__msg__LowState__fini(msg); + return false; + } + } + // bms_state + if (!unitree_go__msg__BmsState__init(&msg->bms_state)) { + unitree_go__msg__LowState__fini(msg); + return false; + } + // foot_force + // foot_force_est + // tick + // wireless_remote + // bit_flag + // adc_reel + // temperature_ntc1 + // temperature_ntc2 + // power_v + // power_a + // fan_frequency + // reserve + // crc + return true; +} + +void +unitree_go__msg__LowState__fini(unitree_go__msg__LowState * msg) +{ + if (!msg) { + return; + } + // head + // level_flag + // frame_reserve + // sn + // version + // bandwidth + // imu_state + unitree_go__msg__IMUState__fini(&msg->imu_state); + // motor_state + for (size_t i = 0; i < 20; ++i) { + unitree_go__msg__MotorState__fini(&msg->motor_state[i]); + } + // bms_state + unitree_go__msg__BmsState__fini(&msg->bms_state); + // foot_force + // foot_force_est + // tick + // wireless_remote + // bit_flag + // adc_reel + // temperature_ntc1 + // temperature_ntc2 + // power_v + // power_a + // fan_frequency + // reserve + // crc +} + +bool +unitree_go__msg__LowState__are_equal(const unitree_go__msg__LowState * lhs, const unitree_go__msg__LowState * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // head + for (size_t i = 0; i < 2; ++i) { + if (lhs->head[i] != rhs->head[i]) { + return false; + } + } + // level_flag + if (lhs->level_flag != rhs->level_flag) { + return false; + } + // frame_reserve + if (lhs->frame_reserve != rhs->frame_reserve) { + return false; + } + // sn + for (size_t i = 0; i < 2; ++i) { + if (lhs->sn[i] != rhs->sn[i]) { + return false; + } + } + // version + for (size_t i = 0; i < 2; ++i) { + if (lhs->version[i] != rhs->version[i]) { + return false; + } + } + // bandwidth + if (lhs->bandwidth != rhs->bandwidth) { + return false; + } + // imu_state + if (!unitree_go__msg__IMUState__are_equal( + &(lhs->imu_state), &(rhs->imu_state))) + { + return false; + } + // motor_state + for (size_t i = 0; i < 20; ++i) { + if (!unitree_go__msg__MotorState__are_equal( + &(lhs->motor_state[i]), &(rhs->motor_state[i]))) + { + return false; + } + } + // bms_state + if (!unitree_go__msg__BmsState__are_equal( + &(lhs->bms_state), &(rhs->bms_state))) + { + return false; + } + // foot_force + for (size_t i = 0; i < 4; ++i) { + if (lhs->foot_force[i] != rhs->foot_force[i]) { + return false; + } + } + // foot_force_est + for (size_t i = 0; i < 4; ++i) { + if (lhs->foot_force_est[i] != rhs->foot_force_est[i]) { + return false; + } + } + // tick + if (lhs->tick != rhs->tick) { + return false; + } + // wireless_remote + for (size_t i = 0; i < 40; ++i) { + if (lhs->wireless_remote[i] != rhs->wireless_remote[i]) { + return false; + } + } + // bit_flag + if (lhs->bit_flag != rhs->bit_flag) { + return false; + } + // adc_reel + if (lhs->adc_reel != rhs->adc_reel) { + return false; + } + // temperature_ntc1 + if (lhs->temperature_ntc1 != rhs->temperature_ntc1) { + return false; + } + // temperature_ntc2 + if (lhs->temperature_ntc2 != rhs->temperature_ntc2) { + return false; + } + // power_v + if (lhs->power_v != rhs->power_v) { + return false; + } + // power_a + if (lhs->power_a != rhs->power_a) { + return false; + } + // fan_frequency + for (size_t i = 0; i < 4; ++i) { + if (lhs->fan_frequency[i] != rhs->fan_frequency[i]) { + return false; + } + } + // reserve + if (lhs->reserve != rhs->reserve) { + return false; + } + // crc + if (lhs->crc != rhs->crc) { + return false; + } + return true; +} + +bool +unitree_go__msg__LowState__copy( + const unitree_go__msg__LowState * input, + unitree_go__msg__LowState * output) +{ + if (!input || !output) { + return false; + } + // head + for (size_t i = 0; i < 2; ++i) { + output->head[i] = input->head[i]; + } + // level_flag + output->level_flag = input->level_flag; + // frame_reserve + output->frame_reserve = input->frame_reserve; + // sn + for (size_t i = 0; i < 2; ++i) { + output->sn[i] = input->sn[i]; + } + // version + for (size_t i = 0; i < 2; ++i) { + output->version[i] = input->version[i]; + } + // bandwidth + output->bandwidth = input->bandwidth; + // imu_state + if (!unitree_go__msg__IMUState__copy( + &(input->imu_state), &(output->imu_state))) + { + return false; + } + // motor_state + for (size_t i = 0; i < 20; ++i) { + if (!unitree_go__msg__MotorState__copy( + &(input->motor_state[i]), &(output->motor_state[i]))) + { + return false; + } + } + // bms_state + if (!unitree_go__msg__BmsState__copy( + &(input->bms_state), &(output->bms_state))) + { + return false; + } + // foot_force + for (size_t i = 0; i < 4; ++i) { + output->foot_force[i] = input->foot_force[i]; + } + // foot_force_est + for (size_t i = 0; i < 4; ++i) { + output->foot_force_est[i] = input->foot_force_est[i]; + } + // tick + output->tick = input->tick; + // wireless_remote + for (size_t i = 0; i < 40; ++i) { + output->wireless_remote[i] = input->wireless_remote[i]; + } + // bit_flag + output->bit_flag = input->bit_flag; + // adc_reel + output->adc_reel = input->adc_reel; + // temperature_ntc1 + output->temperature_ntc1 = input->temperature_ntc1; + // temperature_ntc2 + output->temperature_ntc2 = input->temperature_ntc2; + // power_v + output->power_v = input->power_v; + // power_a + output->power_a = input->power_a; + // fan_frequency + for (size_t i = 0; i < 4; ++i) { + output->fan_frequency[i] = input->fan_frequency[i]; + } + // reserve + output->reserve = input->reserve; + // crc + output->crc = input->crc; + return true; +} + +unitree_go__msg__LowState * +unitree_go__msg__LowState__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__LowState * msg = (unitree_go__msg__LowState *)allocator.allocate(sizeof(unitree_go__msg__LowState), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(unitree_go__msg__LowState)); + bool success = unitree_go__msg__LowState__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +unitree_go__msg__LowState__destroy(unitree_go__msg__LowState * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + unitree_go__msg__LowState__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +unitree_go__msg__LowState__Sequence__init(unitree_go__msg__LowState__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__LowState * data = NULL; + + if (size) { + data = (unitree_go__msg__LowState *)allocator.zero_allocate(size, sizeof(unitree_go__msg__LowState), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = unitree_go__msg__LowState__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + unitree_go__msg__LowState__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +unitree_go__msg__LowState__Sequence__fini(unitree_go__msg__LowState__Sequence * array) +{ + if (!array) { + return; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + + if (array->data) { + // ensure that data and capacity values are consistent + assert(array->capacity > 0); + // finalize all array elements + for (size_t i = 0; i < array->capacity; ++i) { + unitree_go__msg__LowState__fini(&array->data[i]); + } + allocator.deallocate(array->data, allocator.state); + array->data = NULL; + array->size = 0; + array->capacity = 0; + } else { + // ensure that data, size, and capacity values are consistent + assert(0 == array->size); + assert(0 == array->capacity); + } +} + +unitree_go__msg__LowState__Sequence * +unitree_go__msg__LowState__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__LowState__Sequence * array = (unitree_go__msg__LowState__Sequence *)allocator.allocate(sizeof(unitree_go__msg__LowState__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = unitree_go__msg__LowState__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +unitree_go__msg__LowState__Sequence__destroy(unitree_go__msg__LowState__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + unitree_go__msg__LowState__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +unitree_go__msg__LowState__Sequence__are_equal(const unitree_go__msg__LowState__Sequence * lhs, const unitree_go__msg__LowState__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!unitree_go__msg__LowState__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +unitree_go__msg__LowState__Sequence__copy( + const unitree_go__msg__LowState__Sequence * input, + unitree_go__msg__LowState__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(unitree_go__msg__LowState); + unitree_go__msg__LowState * data = + (unitree_go__msg__LowState *)realloc(output->data, allocation_size); + if (!data) { + return false; + } + for (size_t i = output->capacity; i < input->size; ++i) { + if (!unitree_go__msg__LowState__init(&data[i])) { + /* free currently allocated and return false */ + for (; i-- > output->capacity; ) { + unitree_go__msg__LowState__fini(&data[i]); + } + free(data); + return false; + } + } + output->data = data; + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!unitree_go__msg__LowState__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__functions.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__functions.h new file mode 100644 index 0000000..8f73c27 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from unitree_go:msg/LowState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__LOW_STATE__FUNCTIONS_H_ +#define UNITREE_GO__MSG__DETAIL__LOW_STATE__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#include "unitree_go/msg/detail/low_state__struct.h" + +/// Initialize msg/LowState message. +/** + * If the init function is called twice for the same message without + * calling fini inbetween previously allocated memory will be leaked. + * \param[in,out] msg The previously allocated message pointer. + * Fields without a default value will not be initialized by this function. + * You might want to call memset(msg, 0, sizeof( + * unitree_go__msg__LowState + * )) before or use + * unitree_go__msg__LowState__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__LowState__init(unitree_go__msg__LowState * msg); + +/// Finalize msg/LowState message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__LowState__fini(unitree_go__msg__LowState * msg); + +/// Create msg/LowState message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * unitree_go__msg__LowState__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__LowState * +unitree_go__msg__LowState__create(); + +/// Destroy msg/LowState message. +/** + * It calls + * unitree_go__msg__LowState__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__LowState__destroy(unitree_go__msg__LowState * msg); + +/// Check for msg/LowState message equality. +/** + * \param[in] lhs The message on the left hand size of the equality operator. + * \param[in] rhs The message on the right hand size of the equality operator. + * \return true if messages are equal, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__LowState__are_equal(const unitree_go__msg__LowState * lhs, const unitree_go__msg__LowState * rhs); + +/// Copy a msg/LowState message. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source message pointer. + * \param[out] output The target message pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer is null + * or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__LowState__copy( + const unitree_go__msg__LowState * input, + unitree_go__msg__LowState * output); + +/// Initialize array of msg/LowState messages. +/** + * It allocates the memory for the number of elements and calls + * unitree_go__msg__LowState__init() + * for each element of the array. + * \param[in,out] array The allocated array pointer. + * \param[in] size The size / capacity of the array. + * \return true if initialization was successful, otherwise false + * If the array pointer is valid and the size is zero it is guaranteed + # to return true. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__LowState__Sequence__init(unitree_go__msg__LowState__Sequence * array, size_t size); + +/// Finalize array of msg/LowState messages. +/** + * It calls + * unitree_go__msg__LowState__fini() + * for each element of the array and frees the memory for the number of + * elements. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__LowState__Sequence__fini(unitree_go__msg__LowState__Sequence * array); + +/// Create array of msg/LowState messages. +/** + * It allocates the memory for the array and calls + * unitree_go__msg__LowState__Sequence__init(). + * \param[in] size The size / capacity of the array. + * \return The pointer to the initialized array if successful, otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__LowState__Sequence * +unitree_go__msg__LowState__Sequence__create(size_t size); + +/// Destroy array of msg/LowState messages. +/** + * It calls + * unitree_go__msg__LowState__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__LowState__Sequence__destroy(unitree_go__msg__LowState__Sequence * array); + +/// Check for msg/LowState message array equality. +/** + * \param[in] lhs The message array on the left hand size of the equality operator. + * \param[in] rhs The message array on the right hand size of the equality operator. + * \return true if message arrays are equal in size and content, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__LowState__Sequence__are_equal(const unitree_go__msg__LowState__Sequence * lhs, const unitree_go__msg__LowState__Sequence * rhs); + +/// Copy an array of msg/LowState messages. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source array pointer. + * \param[out] output The target array pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer + * is null or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__LowState__Sequence__copy( + const unitree_go__msg__LowState__Sequence * input, + unitree_go__msg__LowState__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__LOW_STATE__FUNCTIONS_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__rosidl_typesupport_fastrtps_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 0000000..c6e07b6 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,36 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from unitree_go:msg/LowState.idl +// generated code does not contain a copyright notice +#ifndef UNITREE_GO__MSG__DETAIL__LOW_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define UNITREE_GO__MSG__DETAIL__LOW_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t get_serialized_size_unitree_go__msg__LowState( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t max_serialized_size_unitree_go__msg__LowState( + bool & full_bounded, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, unitree_go, msg, LowState)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__LOW_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__rosidl_typesupport_fastrtps_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 0000000..311b055 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,79 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from unitree_go:msg/LowState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__LOW_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__LOW_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "unitree_go/msg/detail/low_state__struct.hpp" + +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-parameter" +# ifdef __clang__ +# pragma clang diagnostic ignored "-Wdeprecated-register" +# pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +# endif +#endif +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif + +#include "fastcdr/Cdr.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_serialize( + const unitree_go::msg::LowState & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + unitree_go::msg::LowState & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +get_serialized_size( + const unitree_go::msg::LowState & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +max_serialized_size_LowState( + bool & full_bounded, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace unitree_go + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, unitree_go, msg, LowState)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__LOW_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__rosidl_typesupport_introspection_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__rosidl_typesupport_introspection_c.h new file mode 100644 index 0000000..9aeb2d0 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from unitree_go:msg/LowState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__LOW_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define UNITREE_GO__MSG__DETAIL__LOW_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, LowState)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__LOW_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__rosidl_typesupport_introspection_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 0000000..c6c5d40 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from unitree_go:msg/LowState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__LOW_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__LOW_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +// TODO(dirk-thomas) these visibility macros should be message package specific +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, LowState)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__LOW_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__struct.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__struct.h new file mode 100644 index 0000000..4300ff0 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__struct.h @@ -0,0 +1,69 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from unitree_go:msg/LowState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__LOW_STATE__STRUCT_H_ +#define UNITREE_GO__MSG__DETAIL__LOW_STATE__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'imu_state' +#include "unitree_go/msg/detail/imu_state__struct.h" +// Member 'motor_state' +#include "unitree_go/msg/detail/motor_state__struct.h" +// Member 'bms_state' +#include "unitree_go/msg/detail/bms_state__struct.h" + +// Struct defined in msg/LowState in the package unitree_go. +typedef struct unitree_go__msg__LowState +{ + uint8_t head[2]; + uint8_t level_flag; + uint8_t frame_reserve; + uint32_t sn[2]; + uint32_t version[2]; + uint16_t bandwidth; + unitree_go__msg__IMUState imu_state; + unitree_go__msg__MotorState motor_state[20]; + unitree_go__msg__BmsState bms_state; + int16_t foot_force[4]; + int16_t foot_force_est[4]; + uint32_t tick; + uint8_t wireless_remote[40]; + uint8_t bit_flag; + float adc_reel; + int8_t temperature_ntc1; + int8_t temperature_ntc2; + float power_v; + float power_a; + uint16_t fan_frequency[4]; + uint32_t reserve; + uint32_t crc; +} unitree_go__msg__LowState; + +// Struct for a sequence of unitree_go__msg__LowState. +typedef struct unitree_go__msg__LowState__Sequence +{ + unitree_go__msg__LowState * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} unitree_go__msg__LowState__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__LOW_STATE__STRUCT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__struct.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__struct.hpp new file mode 100644 index 0000000..1168725 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__struct.hpp @@ -0,0 +1,439 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from unitree_go:msg/LowState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__LOW_STATE__STRUCT_HPP_ +#define UNITREE_GO__MSG__DETAIL__LOW_STATE__STRUCT_HPP_ + +#include +#include +#include +#include +#include +#include +#include + + +// Include directives for member types +// Member 'imu_state' +#include "unitree_go/msg/detail/imu_state__struct.hpp" +// Member 'motor_state' +#include "unitree_go/msg/detail/motor_state__struct.hpp" +// Member 'bms_state' +#include "unitree_go/msg/detail/bms_state__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__unitree_go__msg__LowState __attribute__((deprecated)) +#else +# define DEPRECATED__unitree_go__msg__LowState __declspec(deprecated) +#endif + +namespace unitree_go +{ + +namespace msg +{ + +// message struct +template +struct LowState_ +{ + using Type = LowState_; + + explicit LowState_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : imu_state(_init), + bms_state(_init) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + std::fill::iterator, uint8_t>(this->head.begin(), this->head.end(), 0); + this->level_flag = 0; + this->frame_reserve = 0; + std::fill::iterator, uint32_t>(this->sn.begin(), this->sn.end(), 0ul); + std::fill::iterator, uint32_t>(this->version.begin(), this->version.end(), 0ul); + this->bandwidth = 0; + this->motor_state.fill(unitree_go::msg::MotorState_{_init}); + std::fill::iterator, int16_t>(this->foot_force.begin(), this->foot_force.end(), 0); + std::fill::iterator, int16_t>(this->foot_force_est.begin(), this->foot_force_est.end(), 0); + this->tick = 0ul; + std::fill::iterator, uint8_t>(this->wireless_remote.begin(), this->wireless_remote.end(), 0); + this->bit_flag = 0; + this->adc_reel = 0.0f; + this->temperature_ntc1 = 0; + this->temperature_ntc2 = 0; + this->power_v = 0.0f; + this->power_a = 0.0f; + std::fill::iterator, uint16_t>(this->fan_frequency.begin(), this->fan_frequency.end(), 0); + this->reserve = 0ul; + this->crc = 0ul; + } + } + + explicit LowState_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : head(_alloc), + sn(_alloc), + version(_alloc), + imu_state(_alloc, _init), + motor_state(_alloc), + bms_state(_alloc, _init), + foot_force(_alloc), + foot_force_est(_alloc), + wireless_remote(_alloc), + fan_frequency(_alloc) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + std::fill::iterator, uint8_t>(this->head.begin(), this->head.end(), 0); + this->level_flag = 0; + this->frame_reserve = 0; + std::fill::iterator, uint32_t>(this->sn.begin(), this->sn.end(), 0ul); + std::fill::iterator, uint32_t>(this->version.begin(), this->version.end(), 0ul); + this->bandwidth = 0; + this->motor_state.fill(unitree_go::msg::MotorState_{_alloc, _init}); + std::fill::iterator, int16_t>(this->foot_force.begin(), this->foot_force.end(), 0); + std::fill::iterator, int16_t>(this->foot_force_est.begin(), this->foot_force_est.end(), 0); + this->tick = 0ul; + std::fill::iterator, uint8_t>(this->wireless_remote.begin(), this->wireless_remote.end(), 0); + this->bit_flag = 0; + this->adc_reel = 0.0f; + this->temperature_ntc1 = 0; + this->temperature_ntc2 = 0; + this->power_v = 0.0f; + this->power_a = 0.0f; + std::fill::iterator, uint16_t>(this->fan_frequency.begin(), this->fan_frequency.end(), 0); + this->reserve = 0ul; + this->crc = 0ul; + } + } + + // field types and members + using _head_type = + std::array; + _head_type head; + using _level_flag_type = + uint8_t; + _level_flag_type level_flag; + using _frame_reserve_type = + uint8_t; + _frame_reserve_type frame_reserve; + using _sn_type = + std::array; + _sn_type sn; + using _version_type = + std::array; + _version_type version; + using _bandwidth_type = + uint16_t; + _bandwidth_type bandwidth; + using _imu_state_type = + unitree_go::msg::IMUState_; + _imu_state_type imu_state; + using _motor_state_type = + std::array, 20>; + _motor_state_type motor_state; + using _bms_state_type = + unitree_go::msg::BmsState_; + _bms_state_type bms_state; + using _foot_force_type = + std::array; + _foot_force_type foot_force; + using _foot_force_est_type = + std::array; + _foot_force_est_type foot_force_est; + using _tick_type = + uint32_t; + _tick_type tick; + using _wireless_remote_type = + std::array; + _wireless_remote_type wireless_remote; + using _bit_flag_type = + uint8_t; + _bit_flag_type bit_flag; + using _adc_reel_type = + float; + _adc_reel_type adc_reel; + using _temperature_ntc1_type = + int8_t; + _temperature_ntc1_type temperature_ntc1; + using _temperature_ntc2_type = + int8_t; + _temperature_ntc2_type temperature_ntc2; + using _power_v_type = + float; + _power_v_type power_v; + using _power_a_type = + float; + _power_a_type power_a; + using _fan_frequency_type = + std::array; + _fan_frequency_type fan_frequency; + using _reserve_type = + uint32_t; + _reserve_type reserve; + using _crc_type = + uint32_t; + _crc_type crc; + + // setters for named parameter idiom + Type & set__head( + const std::array & _arg) + { + this->head = _arg; + return *this; + } + Type & set__level_flag( + const uint8_t & _arg) + { + this->level_flag = _arg; + return *this; + } + Type & set__frame_reserve( + const uint8_t & _arg) + { + this->frame_reserve = _arg; + return *this; + } + Type & set__sn( + const std::array & _arg) + { + this->sn = _arg; + return *this; + } + Type & set__version( + const std::array & _arg) + { + this->version = _arg; + return *this; + } + Type & set__bandwidth( + const uint16_t & _arg) + { + this->bandwidth = _arg; + return *this; + } + Type & set__imu_state( + const unitree_go::msg::IMUState_ & _arg) + { + this->imu_state = _arg; + return *this; + } + Type & set__motor_state( + const std::array, 20> & _arg) + { + this->motor_state = _arg; + return *this; + } + Type & set__bms_state( + const unitree_go::msg::BmsState_ & _arg) + { + this->bms_state = _arg; + return *this; + } + Type & set__foot_force( + const std::array & _arg) + { + this->foot_force = _arg; + return *this; + } + Type & set__foot_force_est( + const std::array & _arg) + { + this->foot_force_est = _arg; + return *this; + } + Type & set__tick( + const uint32_t & _arg) + { + this->tick = _arg; + return *this; + } + Type & set__wireless_remote( + const std::array & _arg) + { + this->wireless_remote = _arg; + return *this; + } + Type & set__bit_flag( + const uint8_t & _arg) + { + this->bit_flag = _arg; + return *this; + } + Type & set__adc_reel( + const float & _arg) + { + this->adc_reel = _arg; + return *this; + } + Type & set__temperature_ntc1( + const int8_t & _arg) + { + this->temperature_ntc1 = _arg; + return *this; + } + Type & set__temperature_ntc2( + const int8_t & _arg) + { + this->temperature_ntc2 = _arg; + return *this; + } + Type & set__power_v( + const float & _arg) + { + this->power_v = _arg; + return *this; + } + Type & set__power_a( + const float & _arg) + { + this->power_a = _arg; + return *this; + } + Type & set__fan_frequency( + const std::array & _arg) + { + this->fan_frequency = _arg; + return *this; + } + Type & set__reserve( + const uint32_t & _arg) + { + this->reserve = _arg; + return *this; + } + Type & set__crc( + const uint32_t & _arg) + { + this->crc = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + unitree_go::msg::LowState_ *; + using ConstRawPtr = + const unitree_go::msg::LowState_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr const>; + + // pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead + // NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly + typedef DEPRECATED__unitree_go__msg__LowState + std::shared_ptr> + Ptr; + typedef DEPRECATED__unitree_go__msg__LowState + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const LowState_ & other) const + { + if (this->head != other.head) { + return false; + } + if (this->level_flag != other.level_flag) { + return false; + } + if (this->frame_reserve != other.frame_reserve) { + return false; + } + if (this->sn != other.sn) { + return false; + } + if (this->version != other.version) { + return false; + } + if (this->bandwidth != other.bandwidth) { + return false; + } + if (this->imu_state != other.imu_state) { + return false; + } + if (this->motor_state != other.motor_state) { + return false; + } + if (this->bms_state != other.bms_state) { + return false; + } + if (this->foot_force != other.foot_force) { + return false; + } + if (this->foot_force_est != other.foot_force_est) { + return false; + } + if (this->tick != other.tick) { + return false; + } + if (this->wireless_remote != other.wireless_remote) { + return false; + } + if (this->bit_flag != other.bit_flag) { + return false; + } + if (this->adc_reel != other.adc_reel) { + return false; + } + if (this->temperature_ntc1 != other.temperature_ntc1) { + return false; + } + if (this->temperature_ntc2 != other.temperature_ntc2) { + return false; + } + if (this->power_v != other.power_v) { + return false; + } + if (this->power_a != other.power_a) { + return false; + } + if (this->fan_frequency != other.fan_frequency) { + return false; + } + if (this->reserve != other.reserve) { + return false; + } + if (this->crc != other.crc) { + return false; + } + return true; + } + bool operator!=(const LowState_ & other) const + { + return !this->operator==(other); + } +}; // struct LowState_ + +// alias to use template instance with default allocator +using LowState = + unitree_go::msg::LowState_>; + +// constant definitions + +} // namespace msg + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__LOW_STATE__STRUCT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__traits.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__traits.hpp new file mode 100644 index 0000000..1a80d34 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__traits.hpp @@ -0,0 +1,50 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from unitree_go:msg/LowState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__LOW_STATE__TRAITS_HPP_ +#define UNITREE_GO__MSG__DETAIL__LOW_STATE__TRAITS_HPP_ + +#include "unitree_go/msg/detail/low_state__struct.hpp" +#include +#include +#include + +// Include directives for member types +// Member 'imu_state' +#include "unitree_go/msg/detail/imu_state__traits.hpp" +// Member 'motor_state' +#include "unitree_go/msg/detail/motor_state__traits.hpp" +// Member 'bms_state' +#include "unitree_go/msg/detail/bms_state__traits.hpp" + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "unitree_go::msg::LowState"; +} + +template<> +inline const char * name() +{ + return "unitree_go/msg/LowState"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value && has_fixed_size::value && has_fixed_size::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value && has_bounded_size::value && has_bounded_size::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UNITREE_GO__MSG__DETAIL__LOW_STATE__TRAITS_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__type_support.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__type_support.c new file mode 100644 index 0000000..efa7f04 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__type_support.c @@ -0,0 +1,439 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from unitree_go:msg/LowState.idl +// generated code does not contain a copyright notice + +#include +#include "unitree_go/msg/detail/low_state__rosidl_typesupport_introspection_c.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" +#include "rosidl_typesupport_introspection_c/field_types.h" +#include "rosidl_typesupport_introspection_c/identifier.h" +#include "rosidl_typesupport_introspection_c/message_introspection.h" +#include "unitree_go/msg/detail/low_state__functions.h" +#include "unitree_go/msg/detail/low_state__struct.h" + + +// Include directives for member types +// Member `imu_state` +#include "unitree_go/msg/imu_state.h" +// Member `imu_state` +#include "unitree_go/msg/detail/imu_state__rosidl_typesupport_introspection_c.h" +// Member `motor_state` +#include "unitree_go/msg/motor_state.h" +// Member `motor_state` +#include "unitree_go/msg/detail/motor_state__rosidl_typesupport_introspection_c.h" +// Member `bms_state` +#include "unitree_go/msg/bms_state.h" +// Member `bms_state` +#include "unitree_go/msg/detail/bms_state__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void LowState__rosidl_typesupport_introspection_c__LowState_init_function( + void * message_memory, enum rosidl_runtime_c__message_initialization _init) +{ + // TODO(karsten1987): initializers are not yet implemented for typesupport c + // see https://github.com/ros2/ros2/issues/397 + (void) _init; + unitree_go__msg__LowState__init(message_memory); +} + +void LowState__rosidl_typesupport_introspection_c__LowState_fini_function(void * message_memory) +{ + unitree_go__msg__LowState__fini(message_memory); +} + +size_t LowState__rosidl_typesupport_introspection_c__size_function__MotorState__motor_state( + const void * untyped_member) +{ + (void)untyped_member; + return 20; +} + +const void * LowState__rosidl_typesupport_introspection_c__get_const_function__MotorState__motor_state( + const void * untyped_member, size_t index) +{ + const unitree_go__msg__MotorState ** member = + (const unitree_go__msg__MotorState **)(untyped_member); + return &(*member)[index]; +} + +void * LowState__rosidl_typesupport_introspection_c__get_function__MotorState__motor_state( + void * untyped_member, size_t index) +{ + unitree_go__msg__MotorState ** member = + (unitree_go__msg__MotorState **)(untyped_member); + return &(*member)[index]; +} + +static rosidl_typesupport_introspection_c__MessageMember LowState__rosidl_typesupport_introspection_c__LowState_message_member_array[22] = { + { + "head", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 2, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowState, head), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "level_flag", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowState, level_flag), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "frame_reserve", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowState, frame_reserve), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "sn", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 2, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowState, sn), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "version", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 2, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowState, version), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "bandwidth", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT16, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowState, bandwidth), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "imu_state", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowState, imu_state), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "motor_state", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 20, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowState, motor_state), // bytes offset in struct + NULL, // default value + LowState__rosidl_typesupport_introspection_c__size_function__MotorState__motor_state, // size() function pointer + LowState__rosidl_typesupport_introspection_c__get_const_function__MotorState__motor_state, // get_const(index) function pointer + LowState__rosidl_typesupport_introspection_c__get_function__MotorState__motor_state, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "bms_state", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowState, bms_state), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "foot_force", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT16, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 4, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowState, foot_force), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "foot_force_est", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT16, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 4, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowState, foot_force_est), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "tick", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowState, tick), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "wireless_remote", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 40, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowState, wireless_remote), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "bit_flag", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowState, bit_flag), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "adc_reel", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowState, adc_reel), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "temperature_ntc1", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowState, temperature_ntc1), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "temperature_ntc2", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowState, temperature_ntc2), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "power_v", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowState, power_v), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "power_a", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowState, power_a), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "fan_frequency", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT16, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 4, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowState, fan_frequency), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "reserve", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowState, reserve), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "crc", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__LowState, crc), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers LowState__rosidl_typesupport_introspection_c__LowState_message_members = { + "unitree_go__msg", // message namespace + "LowState", // message name + 22, // number of fields + sizeof(unitree_go__msg__LowState), + LowState__rosidl_typesupport_introspection_c__LowState_message_member_array, // message members + LowState__rosidl_typesupport_introspection_c__LowState_init_function, // function to initialize message memory (memory has to be allocated) + LowState__rosidl_typesupport_introspection_c__LowState_fini_function // function to terminate message instance (will not free memory) +}; + +// this is not const since it must be initialized on first access +// since C does not allow non-integral compile-time constants +static rosidl_message_type_support_t LowState__rosidl_typesupport_introspection_c__LowState_message_type_support_handle = { + 0, + &LowState__rosidl_typesupport_introspection_c__LowState_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, LowState)() { + LowState__rosidl_typesupport_introspection_c__LowState_message_member_array[6].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, IMUState)(); + LowState__rosidl_typesupport_introspection_c__LowState_message_member_array[7].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, MotorState)(); + LowState__rosidl_typesupport_introspection_c__LowState_message_member_array[8].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, BmsState)(); + if (!LowState__rosidl_typesupport_introspection_c__LowState_message_type_support_handle.typesupport_identifier) { + LowState__rosidl_typesupport_introspection_c__LowState_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &LowState__rosidl_typesupport_introspection_c__LowState_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__type_support.cpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__type_support.cpp new file mode 100644 index 0000000..f7c2ef1 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__type_support.cpp @@ -0,0 +1,582 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from unitree_go:msg/LowState.idl +// generated code does not contain a copyright notice + +#include "array" +#include "cstddef" +#include "string" +#include "vector" +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_cpp/message_type_support.hpp" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/detail/low_state__struct.hpp" +#include "rosidl_typesupport_introspection_cpp/field_types.hpp" +#include "rosidl_typesupport_introspection_cpp/identifier.hpp" +#include "rosidl_typesupport_introspection_cpp/message_introspection.hpp" +#include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void LowState_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) unitree_go::msg::LowState(_init); +} + +void LowState_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~LowState(); +} + +size_t size_function__LowState__head(const void * untyped_member) +{ + (void)untyped_member; + return 2; +} + +const void * get_const_function__LowState__head(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__LowState__head(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +size_t size_function__LowState__sn(const void * untyped_member) +{ + (void)untyped_member; + return 2; +} + +const void * get_const_function__LowState__sn(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__LowState__sn(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +size_t size_function__LowState__version(const void * untyped_member) +{ + (void)untyped_member; + return 2; +} + +const void * get_const_function__LowState__version(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__LowState__version(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +size_t size_function__LowState__motor_state(const void * untyped_member) +{ + (void)untyped_member; + return 20; +} + +const void * get_const_function__LowState__motor_state(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__LowState__motor_state(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +size_t size_function__LowState__foot_force(const void * untyped_member) +{ + (void)untyped_member; + return 4; +} + +const void * get_const_function__LowState__foot_force(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__LowState__foot_force(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +size_t size_function__LowState__foot_force_est(const void * untyped_member) +{ + (void)untyped_member; + return 4; +} + +const void * get_const_function__LowState__foot_force_est(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__LowState__foot_force_est(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +size_t size_function__LowState__wireless_remote(const void * untyped_member) +{ + (void)untyped_member; + return 40; +} + +const void * get_const_function__LowState__wireless_remote(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__LowState__wireless_remote(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +size_t size_function__LowState__fan_frequency(const void * untyped_member) +{ + (void)untyped_member; + return 4; +} + +const void * get_const_function__LowState__fan_frequency(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__LowState__fan_frequency(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember LowState_message_member_array[22] = { + { + "head", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 2, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowState, head), // bytes offset in struct + nullptr, // default value + size_function__LowState__head, // size() function pointer + get_const_function__LowState__head, // get_const(index) function pointer + get_function__LowState__head, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "level_flag", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowState, level_flag), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "frame_reserve", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowState, frame_reserve), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "sn", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 2, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowState, sn), // bytes offset in struct + nullptr, // default value + size_function__LowState__sn, // size() function pointer + get_const_function__LowState__sn, // get_const(index) function pointer + get_function__LowState__sn, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "version", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 2, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowState, version), // bytes offset in struct + nullptr, // default value + size_function__LowState__version, // size() function pointer + get_const_function__LowState__version, // get_const(index) function pointer + get_function__LowState__version, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "bandwidth", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT16, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowState, bandwidth), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "imu_state", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowState, imu_state), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "motor_state", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + true, // is array + 20, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowState, motor_state), // bytes offset in struct + nullptr, // default value + size_function__LowState__motor_state, // size() function pointer + get_const_function__LowState__motor_state, // get_const(index) function pointer + get_function__LowState__motor_state, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "bms_state", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowState, bms_state), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "foot_force", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT16, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 4, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowState, foot_force), // bytes offset in struct + nullptr, // default value + size_function__LowState__foot_force, // size() function pointer + get_const_function__LowState__foot_force, // get_const(index) function pointer + get_function__LowState__foot_force, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "foot_force_est", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT16, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 4, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowState, foot_force_est), // bytes offset in struct + nullptr, // default value + size_function__LowState__foot_force_est, // size() function pointer + get_const_function__LowState__foot_force_est, // get_const(index) function pointer + get_function__LowState__foot_force_est, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "tick", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowState, tick), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "wireless_remote", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 40, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowState, wireless_remote), // bytes offset in struct + nullptr, // default value + size_function__LowState__wireless_remote, // size() function pointer + get_const_function__LowState__wireless_remote, // get_const(index) function pointer + get_function__LowState__wireless_remote, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "bit_flag", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowState, bit_flag), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "adc_reel", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowState, adc_reel), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "temperature_ntc1", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowState, temperature_ntc1), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "temperature_ntc2", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowState, temperature_ntc2), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "power_v", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowState, power_v), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "power_a", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowState, power_a), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "fan_frequency", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT16, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 4, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowState, fan_frequency), // bytes offset in struct + nullptr, // default value + size_function__LowState__fan_frequency, // size() function pointer + get_const_function__LowState__fan_frequency, // get_const(index) function pointer + get_function__LowState__fan_frequency, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "reserve", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowState, reserve), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "crc", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::LowState, crc), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers LowState_message_members = { + "unitree_go::msg", // message namespace + "LowState", // message name + 22, // number of fields + sizeof(unitree_go::msg::LowState), + LowState_message_member_array, // message members + LowState_init_function, // function to initialize message memory (memory has to be allocated) + LowState_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t LowState_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &LowState_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace unitree_go + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::LowState_message_type_support_handle; +} + +} // namespace rosidl_typesupport_introspection_cpp + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, LowState)() { + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::LowState_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__type_support.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__type_support.h new file mode 100644 index 0000000..7a261b9 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from unitree_go:msg/LowState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__LOW_STATE__TYPE_SUPPORT_H_ +#define UNITREE_GO__MSG__DETAIL__LOW_STATE__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rosidl_runtime_c/message_type_support_struct.h" + +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + unitree_go, + msg, + LowState +)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__LOW_STATE__TYPE_SUPPORT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__type_support.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__type_support.hpp new file mode 100644 index 0000000..28235cf --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/low_state__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from unitree_go:msg/LowState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__LOW_STATE__TYPE_SUPPORT_HPP_ +#define UNITREE_GO__MSG__DETAIL__LOW_STATE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_cpp__visibility_control.hpp" + +#include "rosidl_typesupport_cpp/message_type_support.hpp" + +#ifdef __cplusplus +extern "C" +{ +#endif +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + unitree_go, + msg, + LowState +)(); +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__LOW_STATE__TYPE_SUPPORT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__builder.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__builder.hpp new file mode 100644 index 0000000..964d0bb --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__builder.hpp @@ -0,0 +1,151 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from unitree_go:msg/MotorCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__MOTOR_CMD__BUILDER_HPP_ +#define UNITREE_GO__MSG__DETAIL__MOTOR_CMD__BUILDER_HPP_ + +#include "unitree_go/msg/detail/motor_cmd__struct.hpp" +#include +#include +#include + + +namespace unitree_go +{ + +namespace msg +{ + +namespace builder +{ + +class Init_MotorCmd_reserve +{ +public: + explicit Init_MotorCmd_reserve(::unitree_go::msg::MotorCmd & msg) + : msg_(msg) + {} + ::unitree_go::msg::MotorCmd reserve(::unitree_go::msg::MotorCmd::_reserve_type arg) + { + msg_.reserve = std::move(arg); + return std::move(msg_); + } + +private: + ::unitree_go::msg::MotorCmd msg_; +}; + +class Init_MotorCmd_kd +{ +public: + explicit Init_MotorCmd_kd(::unitree_go::msg::MotorCmd & msg) + : msg_(msg) + {} + Init_MotorCmd_reserve kd(::unitree_go::msg::MotorCmd::_kd_type arg) + { + msg_.kd = std::move(arg); + return Init_MotorCmd_reserve(msg_); + } + +private: + ::unitree_go::msg::MotorCmd msg_; +}; + +class Init_MotorCmd_kp +{ +public: + explicit Init_MotorCmd_kp(::unitree_go::msg::MotorCmd & msg) + : msg_(msg) + {} + Init_MotorCmd_kd kp(::unitree_go::msg::MotorCmd::_kp_type arg) + { + msg_.kp = std::move(arg); + return Init_MotorCmd_kd(msg_); + } + +private: + ::unitree_go::msg::MotorCmd msg_; +}; + +class Init_MotorCmd_tau +{ +public: + explicit Init_MotorCmd_tau(::unitree_go::msg::MotorCmd & msg) + : msg_(msg) + {} + Init_MotorCmd_kp tau(::unitree_go::msg::MotorCmd::_tau_type arg) + { + msg_.tau = std::move(arg); + return Init_MotorCmd_kp(msg_); + } + +private: + ::unitree_go::msg::MotorCmd msg_; +}; + +class Init_MotorCmd_dq +{ +public: + explicit Init_MotorCmd_dq(::unitree_go::msg::MotorCmd & msg) + : msg_(msg) + {} + Init_MotorCmd_tau dq(::unitree_go::msg::MotorCmd::_dq_type arg) + { + msg_.dq = std::move(arg); + return Init_MotorCmd_tau(msg_); + } + +private: + ::unitree_go::msg::MotorCmd msg_; +}; + +class Init_MotorCmd_q +{ +public: + explicit Init_MotorCmd_q(::unitree_go::msg::MotorCmd & msg) + : msg_(msg) + {} + Init_MotorCmd_dq q(::unitree_go::msg::MotorCmd::_q_type arg) + { + msg_.q = std::move(arg); + return Init_MotorCmd_dq(msg_); + } + +private: + ::unitree_go::msg::MotorCmd msg_; +}; + +class Init_MotorCmd_mode +{ +public: + Init_MotorCmd_mode() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_MotorCmd_q mode(::unitree_go::msg::MotorCmd::_mode_type arg) + { + msg_.mode = std::move(arg); + return Init_MotorCmd_q(msg_); + } + +private: + ::unitree_go::msg::MotorCmd msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::unitree_go::msg::MotorCmd>() +{ + return unitree_go::msg::builder::Init_MotorCmd_mode(); +} + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__MOTOR_CMD__BUILDER_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__functions.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__functions.c new file mode 100644 index 0000000..e644e1e --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__functions.c @@ -0,0 +1,283 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from unitree_go:msg/MotorCmd.idl +// generated code does not contain a copyright notice +#include "unitree_go/msg/detail/motor_cmd__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +unitree_go__msg__MotorCmd__init(unitree_go__msg__MotorCmd * msg) +{ + if (!msg) { + return false; + } + // mode + // q + // dq + // tau + // kp + // kd + // reserve + return true; +} + +void +unitree_go__msg__MotorCmd__fini(unitree_go__msg__MotorCmd * msg) +{ + if (!msg) { + return; + } + // mode + // q + // dq + // tau + // kp + // kd + // reserve +} + +bool +unitree_go__msg__MotorCmd__are_equal(const unitree_go__msg__MotorCmd * lhs, const unitree_go__msg__MotorCmd * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // mode + if (lhs->mode != rhs->mode) { + return false; + } + // q + if (lhs->q != rhs->q) { + return false; + } + // dq + if (lhs->dq != rhs->dq) { + return false; + } + // tau + if (lhs->tau != rhs->tau) { + return false; + } + // kp + if (lhs->kp != rhs->kp) { + return false; + } + // kd + if (lhs->kd != rhs->kd) { + return false; + } + // reserve + for (size_t i = 0; i < 3; ++i) { + if (lhs->reserve[i] != rhs->reserve[i]) { + return false; + } + } + return true; +} + +bool +unitree_go__msg__MotorCmd__copy( + const unitree_go__msg__MotorCmd * input, + unitree_go__msg__MotorCmd * output) +{ + if (!input || !output) { + return false; + } + // mode + output->mode = input->mode; + // q + output->q = input->q; + // dq + output->dq = input->dq; + // tau + output->tau = input->tau; + // kp + output->kp = input->kp; + // kd + output->kd = input->kd; + // reserve + for (size_t i = 0; i < 3; ++i) { + output->reserve[i] = input->reserve[i]; + } + return true; +} + +unitree_go__msg__MotorCmd * +unitree_go__msg__MotorCmd__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__MotorCmd * msg = (unitree_go__msg__MotorCmd *)allocator.allocate(sizeof(unitree_go__msg__MotorCmd), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(unitree_go__msg__MotorCmd)); + bool success = unitree_go__msg__MotorCmd__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +unitree_go__msg__MotorCmd__destroy(unitree_go__msg__MotorCmd * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + unitree_go__msg__MotorCmd__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +unitree_go__msg__MotorCmd__Sequence__init(unitree_go__msg__MotorCmd__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__MotorCmd * data = NULL; + + if (size) { + data = (unitree_go__msg__MotorCmd *)allocator.zero_allocate(size, sizeof(unitree_go__msg__MotorCmd), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = unitree_go__msg__MotorCmd__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + unitree_go__msg__MotorCmd__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +unitree_go__msg__MotorCmd__Sequence__fini(unitree_go__msg__MotorCmd__Sequence * array) +{ + if (!array) { + return; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + + if (array->data) { + // ensure that data and capacity values are consistent + assert(array->capacity > 0); + // finalize all array elements + for (size_t i = 0; i < array->capacity; ++i) { + unitree_go__msg__MotorCmd__fini(&array->data[i]); + } + allocator.deallocate(array->data, allocator.state); + array->data = NULL; + array->size = 0; + array->capacity = 0; + } else { + // ensure that data, size, and capacity values are consistent + assert(0 == array->size); + assert(0 == array->capacity); + } +} + +unitree_go__msg__MotorCmd__Sequence * +unitree_go__msg__MotorCmd__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__MotorCmd__Sequence * array = (unitree_go__msg__MotorCmd__Sequence *)allocator.allocate(sizeof(unitree_go__msg__MotorCmd__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = unitree_go__msg__MotorCmd__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +unitree_go__msg__MotorCmd__Sequence__destroy(unitree_go__msg__MotorCmd__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + unitree_go__msg__MotorCmd__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +unitree_go__msg__MotorCmd__Sequence__are_equal(const unitree_go__msg__MotorCmd__Sequence * lhs, const unitree_go__msg__MotorCmd__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!unitree_go__msg__MotorCmd__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +unitree_go__msg__MotorCmd__Sequence__copy( + const unitree_go__msg__MotorCmd__Sequence * input, + unitree_go__msg__MotorCmd__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(unitree_go__msg__MotorCmd); + unitree_go__msg__MotorCmd * data = + (unitree_go__msg__MotorCmd *)realloc(output->data, allocation_size); + if (!data) { + return false; + } + for (size_t i = output->capacity; i < input->size; ++i) { + if (!unitree_go__msg__MotorCmd__init(&data[i])) { + /* free currently allocated and return false */ + for (; i-- > output->capacity; ) { + unitree_go__msg__MotorCmd__fini(&data[i]); + } + free(data); + return false; + } + } + output->data = data; + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!unitree_go__msg__MotorCmd__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__functions.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__functions.h new file mode 100644 index 0000000..a8876fb --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from unitree_go:msg/MotorCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__MOTOR_CMD__FUNCTIONS_H_ +#define UNITREE_GO__MSG__DETAIL__MOTOR_CMD__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#include "unitree_go/msg/detail/motor_cmd__struct.h" + +/// Initialize msg/MotorCmd message. +/** + * If the init function is called twice for the same message without + * calling fini inbetween previously allocated memory will be leaked. + * \param[in,out] msg The previously allocated message pointer. + * Fields without a default value will not be initialized by this function. + * You might want to call memset(msg, 0, sizeof( + * unitree_go__msg__MotorCmd + * )) before or use + * unitree_go__msg__MotorCmd__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__MotorCmd__init(unitree_go__msg__MotorCmd * msg); + +/// Finalize msg/MotorCmd message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__MotorCmd__fini(unitree_go__msg__MotorCmd * msg); + +/// Create msg/MotorCmd message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * unitree_go__msg__MotorCmd__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__MotorCmd * +unitree_go__msg__MotorCmd__create(); + +/// Destroy msg/MotorCmd message. +/** + * It calls + * unitree_go__msg__MotorCmd__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__MotorCmd__destroy(unitree_go__msg__MotorCmd * msg); + +/// Check for msg/MotorCmd message equality. +/** + * \param[in] lhs The message on the left hand size of the equality operator. + * \param[in] rhs The message on the right hand size of the equality operator. + * \return true if messages are equal, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__MotorCmd__are_equal(const unitree_go__msg__MotorCmd * lhs, const unitree_go__msg__MotorCmd * rhs); + +/// Copy a msg/MotorCmd message. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source message pointer. + * \param[out] output The target message pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer is null + * or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__MotorCmd__copy( + const unitree_go__msg__MotorCmd * input, + unitree_go__msg__MotorCmd * output); + +/// Initialize array of msg/MotorCmd messages. +/** + * It allocates the memory for the number of elements and calls + * unitree_go__msg__MotorCmd__init() + * for each element of the array. + * \param[in,out] array The allocated array pointer. + * \param[in] size The size / capacity of the array. + * \return true if initialization was successful, otherwise false + * If the array pointer is valid and the size is zero it is guaranteed + # to return true. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__MotorCmd__Sequence__init(unitree_go__msg__MotorCmd__Sequence * array, size_t size); + +/// Finalize array of msg/MotorCmd messages. +/** + * It calls + * unitree_go__msg__MotorCmd__fini() + * for each element of the array and frees the memory for the number of + * elements. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__MotorCmd__Sequence__fini(unitree_go__msg__MotorCmd__Sequence * array); + +/// Create array of msg/MotorCmd messages. +/** + * It allocates the memory for the array and calls + * unitree_go__msg__MotorCmd__Sequence__init(). + * \param[in] size The size / capacity of the array. + * \return The pointer to the initialized array if successful, otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__MotorCmd__Sequence * +unitree_go__msg__MotorCmd__Sequence__create(size_t size); + +/// Destroy array of msg/MotorCmd messages. +/** + * It calls + * unitree_go__msg__MotorCmd__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__MotorCmd__Sequence__destroy(unitree_go__msg__MotorCmd__Sequence * array); + +/// Check for msg/MotorCmd message array equality. +/** + * \param[in] lhs The message array on the left hand size of the equality operator. + * \param[in] rhs The message array on the right hand size of the equality operator. + * \return true if message arrays are equal in size and content, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__MotorCmd__Sequence__are_equal(const unitree_go__msg__MotorCmd__Sequence * lhs, const unitree_go__msg__MotorCmd__Sequence * rhs); + +/// Copy an array of msg/MotorCmd messages. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source array pointer. + * \param[out] output The target array pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer + * is null or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__MotorCmd__Sequence__copy( + const unitree_go__msg__MotorCmd__Sequence * input, + unitree_go__msg__MotorCmd__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__MOTOR_CMD__FUNCTIONS_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__rosidl_typesupport_fastrtps_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 0000000..b57aab6 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,36 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from unitree_go:msg/MotorCmd.idl +// generated code does not contain a copyright notice +#ifndef UNITREE_GO__MSG__DETAIL__MOTOR_CMD__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define UNITREE_GO__MSG__DETAIL__MOTOR_CMD__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t get_serialized_size_unitree_go__msg__MotorCmd( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t max_serialized_size_unitree_go__msg__MotorCmd( + bool & full_bounded, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, unitree_go, msg, MotorCmd)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__MOTOR_CMD__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__rosidl_typesupport_fastrtps_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 0000000..a29343c --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,79 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from unitree_go:msg/MotorCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__MOTOR_CMD__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__MOTOR_CMD__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "unitree_go/msg/detail/motor_cmd__struct.hpp" + +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-parameter" +# ifdef __clang__ +# pragma clang diagnostic ignored "-Wdeprecated-register" +# pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +# endif +#endif +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif + +#include "fastcdr/Cdr.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_serialize( + const unitree_go::msg::MotorCmd & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + unitree_go::msg::MotorCmd & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +get_serialized_size( + const unitree_go::msg::MotorCmd & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +max_serialized_size_MotorCmd( + bool & full_bounded, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace unitree_go + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, unitree_go, msg, MotorCmd)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__MOTOR_CMD__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__rosidl_typesupport_introspection_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__rosidl_typesupport_introspection_c.h new file mode 100644 index 0000000..b0ab8a8 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from unitree_go:msg/MotorCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__MOTOR_CMD__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define UNITREE_GO__MSG__DETAIL__MOTOR_CMD__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, MotorCmd)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__MOTOR_CMD__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__rosidl_typesupport_introspection_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 0000000..7c49286 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from unitree_go:msg/MotorCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__MOTOR_CMD__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__MOTOR_CMD__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +// TODO(dirk-thomas) these visibility macros should be message package specific +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, MotorCmd)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__MOTOR_CMD__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__struct.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__struct.h new file mode 100644 index 0000000..08580f3 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__struct.h @@ -0,0 +1,46 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from unitree_go:msg/MotorCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__MOTOR_CMD__STRUCT_H_ +#define UNITREE_GO__MSG__DETAIL__MOTOR_CMD__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Struct defined in msg/MotorCmd in the package unitree_go. +typedef struct unitree_go__msg__MotorCmd +{ + uint8_t mode; + float q; + float dq; + float tau; + float kp; + float kd; + uint32_t reserve[3]; +} unitree_go__msg__MotorCmd; + +// Struct for a sequence of unitree_go__msg__MotorCmd. +typedef struct unitree_go__msg__MotorCmd__Sequence +{ + unitree_go__msg__MotorCmd * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} unitree_go__msg__MotorCmd__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__MOTOR_CMD__STRUCT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__struct.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__struct.hpp new file mode 100644 index 0000000..987eb7a --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__struct.hpp @@ -0,0 +1,214 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from unitree_go:msg/MotorCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__MOTOR_CMD__STRUCT_HPP_ +#define UNITREE_GO__MSG__DETAIL__MOTOR_CMD__STRUCT_HPP_ + +#include +#include +#include +#include +#include +#include +#include + + +#ifndef _WIN32 +# define DEPRECATED__unitree_go__msg__MotorCmd __attribute__((deprecated)) +#else +# define DEPRECATED__unitree_go__msg__MotorCmd __declspec(deprecated) +#endif + +namespace unitree_go +{ + +namespace msg +{ + +// message struct +template +struct MotorCmd_ +{ + using Type = MotorCmd_; + + explicit MotorCmd_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->mode = 0; + this->q = 0.0f; + this->dq = 0.0f; + this->tau = 0.0f; + this->kp = 0.0f; + this->kd = 0.0f; + std::fill::iterator, uint32_t>(this->reserve.begin(), this->reserve.end(), 0ul); + } + } + + explicit MotorCmd_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : reserve(_alloc) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->mode = 0; + this->q = 0.0f; + this->dq = 0.0f; + this->tau = 0.0f; + this->kp = 0.0f; + this->kd = 0.0f; + std::fill::iterator, uint32_t>(this->reserve.begin(), this->reserve.end(), 0ul); + } + } + + // field types and members + using _mode_type = + uint8_t; + _mode_type mode; + using _q_type = + float; + _q_type q; + using _dq_type = + float; + _dq_type dq; + using _tau_type = + float; + _tau_type tau; + using _kp_type = + float; + _kp_type kp; + using _kd_type = + float; + _kd_type kd; + using _reserve_type = + std::array; + _reserve_type reserve; + + // setters for named parameter idiom + Type & set__mode( + const uint8_t & _arg) + { + this->mode = _arg; + return *this; + } + Type & set__q( + const float & _arg) + { + this->q = _arg; + return *this; + } + Type & set__dq( + const float & _arg) + { + this->dq = _arg; + return *this; + } + Type & set__tau( + const float & _arg) + { + this->tau = _arg; + return *this; + } + Type & set__kp( + const float & _arg) + { + this->kp = _arg; + return *this; + } + Type & set__kd( + const float & _arg) + { + this->kd = _arg; + return *this; + } + Type & set__reserve( + const std::array & _arg) + { + this->reserve = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + unitree_go::msg::MotorCmd_ *; + using ConstRawPtr = + const unitree_go::msg::MotorCmd_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr const>; + + // pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead + // NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly + typedef DEPRECATED__unitree_go__msg__MotorCmd + std::shared_ptr> + Ptr; + typedef DEPRECATED__unitree_go__msg__MotorCmd + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const MotorCmd_ & other) const + { + if (this->mode != other.mode) { + return false; + } + if (this->q != other.q) { + return false; + } + if (this->dq != other.dq) { + return false; + } + if (this->tau != other.tau) { + return false; + } + if (this->kp != other.kp) { + return false; + } + if (this->kd != other.kd) { + return false; + } + if (this->reserve != other.reserve) { + return false; + } + return true; + } + bool operator!=(const MotorCmd_ & other) const + { + return !this->operator==(other); + } +}; // struct MotorCmd_ + +// alias to use template instance with default allocator +using MotorCmd = + unitree_go::msg::MotorCmd_>; + +// constant definitions + +} // namespace msg + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__MOTOR_CMD__STRUCT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__traits.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__traits.hpp new file mode 100644 index 0000000..c1ea718 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__traits.hpp @@ -0,0 +1,42 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from unitree_go:msg/MotorCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__MOTOR_CMD__TRAITS_HPP_ +#define UNITREE_GO__MSG__DETAIL__MOTOR_CMD__TRAITS_HPP_ + +#include "unitree_go/msg/detail/motor_cmd__struct.hpp" +#include +#include +#include + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "unitree_go::msg::MotorCmd"; +} + +template<> +inline const char * name() +{ + return "unitree_go/msg/MotorCmd"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UNITREE_GO__MSG__DETAIL__MOTOR_CMD__TRAITS_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__type_support.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__type_support.c new file mode 100644 index 0000000..7a7b7b6 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__type_support.c @@ -0,0 +1,171 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from unitree_go:msg/MotorCmd.idl +// generated code does not contain a copyright notice + +#include +#include "unitree_go/msg/detail/motor_cmd__rosidl_typesupport_introspection_c.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" +#include "rosidl_typesupport_introspection_c/field_types.h" +#include "rosidl_typesupport_introspection_c/identifier.h" +#include "rosidl_typesupport_introspection_c/message_introspection.h" +#include "unitree_go/msg/detail/motor_cmd__functions.h" +#include "unitree_go/msg/detail/motor_cmd__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void MotorCmd__rosidl_typesupport_introspection_c__MotorCmd_init_function( + void * message_memory, enum rosidl_runtime_c__message_initialization _init) +{ + // TODO(karsten1987): initializers are not yet implemented for typesupport c + // see https://github.com/ros2/ros2/issues/397 + (void) _init; + unitree_go__msg__MotorCmd__init(message_memory); +} + +void MotorCmd__rosidl_typesupport_introspection_c__MotorCmd_fini_function(void * message_memory) +{ + unitree_go__msg__MotorCmd__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember MotorCmd__rosidl_typesupport_introspection_c__MotorCmd_message_member_array[7] = { + { + "mode", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__MotorCmd, mode), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "q", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__MotorCmd, q), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "dq", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__MotorCmd, dq), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "tau", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__MotorCmd, tau), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "kp", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__MotorCmd, kp), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "kd", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__MotorCmd, kd), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "reserve", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 3, // array size + false, // is upper bound + offsetof(unitree_go__msg__MotorCmd, reserve), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers MotorCmd__rosidl_typesupport_introspection_c__MotorCmd_message_members = { + "unitree_go__msg", // message namespace + "MotorCmd", // message name + 7, // number of fields + sizeof(unitree_go__msg__MotorCmd), + MotorCmd__rosidl_typesupport_introspection_c__MotorCmd_message_member_array, // message members + MotorCmd__rosidl_typesupport_introspection_c__MotorCmd_init_function, // function to initialize message memory (memory has to be allocated) + MotorCmd__rosidl_typesupport_introspection_c__MotorCmd_fini_function // function to terminate message instance (will not free memory) +}; + +// this is not const since it must be initialized on first access +// since C does not allow non-integral compile-time constants +static rosidl_message_type_support_t MotorCmd__rosidl_typesupport_introspection_c__MotorCmd_message_type_support_handle = { + 0, + &MotorCmd__rosidl_typesupport_introspection_c__MotorCmd_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, MotorCmd)() { + if (!MotorCmd__rosidl_typesupport_introspection_c__MotorCmd_message_type_support_handle.typesupport_identifier) { + MotorCmd__rosidl_typesupport_introspection_c__MotorCmd_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &MotorCmd__rosidl_typesupport_introspection_c__MotorCmd_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__type_support.cpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__type_support.cpp new file mode 100644 index 0000000..acbca4f --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__type_support.cpp @@ -0,0 +1,217 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from unitree_go:msg/MotorCmd.idl +// generated code does not contain a copyright notice + +#include "array" +#include "cstddef" +#include "string" +#include "vector" +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_cpp/message_type_support.hpp" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/detail/motor_cmd__struct.hpp" +#include "rosidl_typesupport_introspection_cpp/field_types.hpp" +#include "rosidl_typesupport_introspection_cpp/identifier.hpp" +#include "rosidl_typesupport_introspection_cpp/message_introspection.hpp" +#include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void MotorCmd_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) unitree_go::msg::MotorCmd(_init); +} + +void MotorCmd_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~MotorCmd(); +} + +size_t size_function__MotorCmd__reserve(const void * untyped_member) +{ + (void)untyped_member; + return 3; +} + +const void * get_const_function__MotorCmd__reserve(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__MotorCmd__reserve(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember MotorCmd_message_member_array[7] = { + { + "mode", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::MotorCmd, mode), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "q", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::MotorCmd, q), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "dq", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::MotorCmd, dq), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "tau", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::MotorCmd, tau), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "kp", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::MotorCmd, kp), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "kd", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::MotorCmd, kd), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "reserve", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 3, // array size + false, // is upper bound + offsetof(unitree_go::msg::MotorCmd, reserve), // bytes offset in struct + nullptr, // default value + size_function__MotorCmd__reserve, // size() function pointer + get_const_function__MotorCmd__reserve, // get_const(index) function pointer + get_function__MotorCmd__reserve, // get(index) function pointer + nullptr // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers MotorCmd_message_members = { + "unitree_go::msg", // message namespace + "MotorCmd", // message name + 7, // number of fields + sizeof(unitree_go::msg::MotorCmd), + MotorCmd_message_member_array, // message members + MotorCmd_init_function, // function to initialize message memory (memory has to be allocated) + MotorCmd_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t MotorCmd_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &MotorCmd_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace unitree_go + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::MotorCmd_message_type_support_handle; +} + +} // namespace rosidl_typesupport_introspection_cpp + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, MotorCmd)() { + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::MotorCmd_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__type_support.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__type_support.h new file mode 100644 index 0000000..3592b44 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from unitree_go:msg/MotorCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__MOTOR_CMD__TYPE_SUPPORT_H_ +#define UNITREE_GO__MSG__DETAIL__MOTOR_CMD__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rosidl_runtime_c/message_type_support_struct.h" + +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + unitree_go, + msg, + MotorCmd +)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__MOTOR_CMD__TYPE_SUPPORT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__type_support.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__type_support.hpp new file mode 100644 index 0000000..f5a4dd5 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_cmd__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from unitree_go:msg/MotorCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__MOTOR_CMD__TYPE_SUPPORT_HPP_ +#define UNITREE_GO__MSG__DETAIL__MOTOR_CMD__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_cpp__visibility_control.hpp" + +#include "rosidl_typesupport_cpp/message_type_support.hpp" + +#ifdef __cplusplus +extern "C" +{ +#endif +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + unitree_go, + msg, + MotorCmd +)(); +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__MOTOR_CMD__TYPE_SUPPORT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__builder.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__builder.hpp new file mode 100644 index 0000000..bf44597 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__builder.hpp @@ -0,0 +1,215 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from unitree_go:msg/MotorState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__MOTOR_STATE__BUILDER_HPP_ +#define UNITREE_GO__MSG__DETAIL__MOTOR_STATE__BUILDER_HPP_ + +#include "unitree_go/msg/detail/motor_state__struct.hpp" +#include +#include +#include + + +namespace unitree_go +{ + +namespace msg +{ + +namespace builder +{ + +class Init_MotorState_reserve +{ +public: + explicit Init_MotorState_reserve(::unitree_go::msg::MotorState & msg) + : msg_(msg) + {} + ::unitree_go::msg::MotorState reserve(::unitree_go::msg::MotorState::_reserve_type arg) + { + msg_.reserve = std::move(arg); + return std::move(msg_); + } + +private: + ::unitree_go::msg::MotorState msg_; +}; + +class Init_MotorState_lost +{ +public: + explicit Init_MotorState_lost(::unitree_go::msg::MotorState & msg) + : msg_(msg) + {} + Init_MotorState_reserve lost(::unitree_go::msg::MotorState::_lost_type arg) + { + msg_.lost = std::move(arg); + return Init_MotorState_reserve(msg_); + } + +private: + ::unitree_go::msg::MotorState msg_; +}; + +class Init_MotorState_temperature +{ +public: + explicit Init_MotorState_temperature(::unitree_go::msg::MotorState & msg) + : msg_(msg) + {} + Init_MotorState_lost temperature(::unitree_go::msg::MotorState::_temperature_type arg) + { + msg_.temperature = std::move(arg); + return Init_MotorState_lost(msg_); + } + +private: + ::unitree_go::msg::MotorState msg_; +}; + +class Init_MotorState_ddq_raw +{ +public: + explicit Init_MotorState_ddq_raw(::unitree_go::msg::MotorState & msg) + : msg_(msg) + {} + Init_MotorState_temperature ddq_raw(::unitree_go::msg::MotorState::_ddq_raw_type arg) + { + msg_.ddq_raw = std::move(arg); + return Init_MotorState_temperature(msg_); + } + +private: + ::unitree_go::msg::MotorState msg_; +}; + +class Init_MotorState_dq_raw +{ +public: + explicit Init_MotorState_dq_raw(::unitree_go::msg::MotorState & msg) + : msg_(msg) + {} + Init_MotorState_ddq_raw dq_raw(::unitree_go::msg::MotorState::_dq_raw_type arg) + { + msg_.dq_raw = std::move(arg); + return Init_MotorState_ddq_raw(msg_); + } + +private: + ::unitree_go::msg::MotorState msg_; +}; + +class Init_MotorState_q_raw +{ +public: + explicit Init_MotorState_q_raw(::unitree_go::msg::MotorState & msg) + : msg_(msg) + {} + Init_MotorState_dq_raw q_raw(::unitree_go::msg::MotorState::_q_raw_type arg) + { + msg_.q_raw = std::move(arg); + return Init_MotorState_dq_raw(msg_); + } + +private: + ::unitree_go::msg::MotorState msg_; +}; + +class Init_MotorState_tau_est +{ +public: + explicit Init_MotorState_tau_est(::unitree_go::msg::MotorState & msg) + : msg_(msg) + {} + Init_MotorState_q_raw tau_est(::unitree_go::msg::MotorState::_tau_est_type arg) + { + msg_.tau_est = std::move(arg); + return Init_MotorState_q_raw(msg_); + } + +private: + ::unitree_go::msg::MotorState msg_; +}; + +class Init_MotorState_ddq +{ +public: + explicit Init_MotorState_ddq(::unitree_go::msg::MotorState & msg) + : msg_(msg) + {} + Init_MotorState_tau_est ddq(::unitree_go::msg::MotorState::_ddq_type arg) + { + msg_.ddq = std::move(arg); + return Init_MotorState_tau_est(msg_); + } + +private: + ::unitree_go::msg::MotorState msg_; +}; + +class Init_MotorState_dq +{ +public: + explicit Init_MotorState_dq(::unitree_go::msg::MotorState & msg) + : msg_(msg) + {} + Init_MotorState_ddq dq(::unitree_go::msg::MotorState::_dq_type arg) + { + msg_.dq = std::move(arg); + return Init_MotorState_ddq(msg_); + } + +private: + ::unitree_go::msg::MotorState msg_; +}; + +class Init_MotorState_q +{ +public: + explicit Init_MotorState_q(::unitree_go::msg::MotorState & msg) + : msg_(msg) + {} + Init_MotorState_dq q(::unitree_go::msg::MotorState::_q_type arg) + { + msg_.q = std::move(arg); + return Init_MotorState_dq(msg_); + } + +private: + ::unitree_go::msg::MotorState msg_; +}; + +class Init_MotorState_mode +{ +public: + Init_MotorState_mode() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_MotorState_q mode(::unitree_go::msg::MotorState::_mode_type arg) + { + msg_.mode = std::move(arg); + return Init_MotorState_q(msg_); + } + +private: + ::unitree_go::msg::MotorState msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::unitree_go::msg::MotorState>() +{ + return unitree_go::msg::builder::Init_MotorState_mode(); +} + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__MOTOR_STATE__BUILDER_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__functions.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__functions.c new file mode 100644 index 0000000..ff2301e --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__functions.c @@ -0,0 +1,315 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from unitree_go:msg/MotorState.idl +// generated code does not contain a copyright notice +#include "unitree_go/msg/detail/motor_state__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +unitree_go__msg__MotorState__init(unitree_go__msg__MotorState * msg) +{ + if (!msg) { + return false; + } + // mode + // q + // dq + // ddq + // tau_est + // q_raw + // dq_raw + // ddq_raw + // temperature + // lost + // reserve + return true; +} + +void +unitree_go__msg__MotorState__fini(unitree_go__msg__MotorState * msg) +{ + if (!msg) { + return; + } + // mode + // q + // dq + // ddq + // tau_est + // q_raw + // dq_raw + // ddq_raw + // temperature + // lost + // reserve +} + +bool +unitree_go__msg__MotorState__are_equal(const unitree_go__msg__MotorState * lhs, const unitree_go__msg__MotorState * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // mode + if (lhs->mode != rhs->mode) { + return false; + } + // q + if (lhs->q != rhs->q) { + return false; + } + // dq + if (lhs->dq != rhs->dq) { + return false; + } + // ddq + if (lhs->ddq != rhs->ddq) { + return false; + } + // tau_est + if (lhs->tau_est != rhs->tau_est) { + return false; + } + // q_raw + if (lhs->q_raw != rhs->q_raw) { + return false; + } + // dq_raw + if (lhs->dq_raw != rhs->dq_raw) { + return false; + } + // ddq_raw + if (lhs->ddq_raw != rhs->ddq_raw) { + return false; + } + // temperature + if (lhs->temperature != rhs->temperature) { + return false; + } + // lost + if (lhs->lost != rhs->lost) { + return false; + } + // reserve + for (size_t i = 0; i < 2; ++i) { + if (lhs->reserve[i] != rhs->reserve[i]) { + return false; + } + } + return true; +} + +bool +unitree_go__msg__MotorState__copy( + const unitree_go__msg__MotorState * input, + unitree_go__msg__MotorState * output) +{ + if (!input || !output) { + return false; + } + // mode + output->mode = input->mode; + // q + output->q = input->q; + // dq + output->dq = input->dq; + // ddq + output->ddq = input->ddq; + // tau_est + output->tau_est = input->tau_est; + // q_raw + output->q_raw = input->q_raw; + // dq_raw + output->dq_raw = input->dq_raw; + // ddq_raw + output->ddq_raw = input->ddq_raw; + // temperature + output->temperature = input->temperature; + // lost + output->lost = input->lost; + // reserve + for (size_t i = 0; i < 2; ++i) { + output->reserve[i] = input->reserve[i]; + } + return true; +} + +unitree_go__msg__MotorState * +unitree_go__msg__MotorState__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__MotorState * msg = (unitree_go__msg__MotorState *)allocator.allocate(sizeof(unitree_go__msg__MotorState), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(unitree_go__msg__MotorState)); + bool success = unitree_go__msg__MotorState__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +unitree_go__msg__MotorState__destroy(unitree_go__msg__MotorState * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + unitree_go__msg__MotorState__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +unitree_go__msg__MotorState__Sequence__init(unitree_go__msg__MotorState__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__MotorState * data = NULL; + + if (size) { + data = (unitree_go__msg__MotorState *)allocator.zero_allocate(size, sizeof(unitree_go__msg__MotorState), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = unitree_go__msg__MotorState__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + unitree_go__msg__MotorState__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +unitree_go__msg__MotorState__Sequence__fini(unitree_go__msg__MotorState__Sequence * array) +{ + if (!array) { + return; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + + if (array->data) { + // ensure that data and capacity values are consistent + assert(array->capacity > 0); + // finalize all array elements + for (size_t i = 0; i < array->capacity; ++i) { + unitree_go__msg__MotorState__fini(&array->data[i]); + } + allocator.deallocate(array->data, allocator.state); + array->data = NULL; + array->size = 0; + array->capacity = 0; + } else { + // ensure that data, size, and capacity values are consistent + assert(0 == array->size); + assert(0 == array->capacity); + } +} + +unitree_go__msg__MotorState__Sequence * +unitree_go__msg__MotorState__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__MotorState__Sequence * array = (unitree_go__msg__MotorState__Sequence *)allocator.allocate(sizeof(unitree_go__msg__MotorState__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = unitree_go__msg__MotorState__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +unitree_go__msg__MotorState__Sequence__destroy(unitree_go__msg__MotorState__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + unitree_go__msg__MotorState__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +unitree_go__msg__MotorState__Sequence__are_equal(const unitree_go__msg__MotorState__Sequence * lhs, const unitree_go__msg__MotorState__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!unitree_go__msg__MotorState__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +unitree_go__msg__MotorState__Sequence__copy( + const unitree_go__msg__MotorState__Sequence * input, + unitree_go__msg__MotorState__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(unitree_go__msg__MotorState); + unitree_go__msg__MotorState * data = + (unitree_go__msg__MotorState *)realloc(output->data, allocation_size); + if (!data) { + return false; + } + for (size_t i = output->capacity; i < input->size; ++i) { + if (!unitree_go__msg__MotorState__init(&data[i])) { + /* free currently allocated and return false */ + for (; i-- > output->capacity; ) { + unitree_go__msg__MotorState__fini(&data[i]); + } + free(data); + return false; + } + } + output->data = data; + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!unitree_go__msg__MotorState__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__functions.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__functions.h new file mode 100644 index 0000000..ed99679 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from unitree_go:msg/MotorState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__MOTOR_STATE__FUNCTIONS_H_ +#define UNITREE_GO__MSG__DETAIL__MOTOR_STATE__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#include "unitree_go/msg/detail/motor_state__struct.h" + +/// Initialize msg/MotorState message. +/** + * If the init function is called twice for the same message without + * calling fini inbetween previously allocated memory will be leaked. + * \param[in,out] msg The previously allocated message pointer. + * Fields without a default value will not be initialized by this function. + * You might want to call memset(msg, 0, sizeof( + * unitree_go__msg__MotorState + * )) before or use + * unitree_go__msg__MotorState__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__MotorState__init(unitree_go__msg__MotorState * msg); + +/// Finalize msg/MotorState message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__MotorState__fini(unitree_go__msg__MotorState * msg); + +/// Create msg/MotorState message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * unitree_go__msg__MotorState__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__MotorState * +unitree_go__msg__MotorState__create(); + +/// Destroy msg/MotorState message. +/** + * It calls + * unitree_go__msg__MotorState__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__MotorState__destroy(unitree_go__msg__MotorState * msg); + +/// Check for msg/MotorState message equality. +/** + * \param[in] lhs The message on the left hand size of the equality operator. + * \param[in] rhs The message on the right hand size of the equality operator. + * \return true if messages are equal, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__MotorState__are_equal(const unitree_go__msg__MotorState * lhs, const unitree_go__msg__MotorState * rhs); + +/// Copy a msg/MotorState message. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source message pointer. + * \param[out] output The target message pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer is null + * or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__MotorState__copy( + const unitree_go__msg__MotorState * input, + unitree_go__msg__MotorState * output); + +/// Initialize array of msg/MotorState messages. +/** + * It allocates the memory for the number of elements and calls + * unitree_go__msg__MotorState__init() + * for each element of the array. + * \param[in,out] array The allocated array pointer. + * \param[in] size The size / capacity of the array. + * \return true if initialization was successful, otherwise false + * If the array pointer is valid and the size is zero it is guaranteed + # to return true. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__MotorState__Sequence__init(unitree_go__msg__MotorState__Sequence * array, size_t size); + +/// Finalize array of msg/MotorState messages. +/** + * It calls + * unitree_go__msg__MotorState__fini() + * for each element of the array and frees the memory for the number of + * elements. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__MotorState__Sequence__fini(unitree_go__msg__MotorState__Sequence * array); + +/// Create array of msg/MotorState messages. +/** + * It allocates the memory for the array and calls + * unitree_go__msg__MotorState__Sequence__init(). + * \param[in] size The size / capacity of the array. + * \return The pointer to the initialized array if successful, otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__MotorState__Sequence * +unitree_go__msg__MotorState__Sequence__create(size_t size); + +/// Destroy array of msg/MotorState messages. +/** + * It calls + * unitree_go__msg__MotorState__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__MotorState__Sequence__destroy(unitree_go__msg__MotorState__Sequence * array); + +/// Check for msg/MotorState message array equality. +/** + * \param[in] lhs The message array on the left hand size of the equality operator. + * \param[in] rhs The message array on the right hand size of the equality operator. + * \return true if message arrays are equal in size and content, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__MotorState__Sequence__are_equal(const unitree_go__msg__MotorState__Sequence * lhs, const unitree_go__msg__MotorState__Sequence * rhs); + +/// Copy an array of msg/MotorState messages. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source array pointer. + * \param[out] output The target array pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer + * is null or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__MotorState__Sequence__copy( + const unitree_go__msg__MotorState__Sequence * input, + unitree_go__msg__MotorState__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__MOTOR_STATE__FUNCTIONS_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__rosidl_typesupport_fastrtps_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 0000000..c3b4398 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,36 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from unitree_go:msg/MotorState.idl +// generated code does not contain a copyright notice +#ifndef UNITREE_GO__MSG__DETAIL__MOTOR_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define UNITREE_GO__MSG__DETAIL__MOTOR_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t get_serialized_size_unitree_go__msg__MotorState( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t max_serialized_size_unitree_go__msg__MotorState( + bool & full_bounded, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, unitree_go, msg, MotorState)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__MOTOR_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__rosidl_typesupport_fastrtps_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 0000000..5698ffb --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,79 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from unitree_go:msg/MotorState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__MOTOR_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__MOTOR_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "unitree_go/msg/detail/motor_state__struct.hpp" + +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-parameter" +# ifdef __clang__ +# pragma clang diagnostic ignored "-Wdeprecated-register" +# pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +# endif +#endif +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif + +#include "fastcdr/Cdr.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_serialize( + const unitree_go::msg::MotorState & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + unitree_go::msg::MotorState & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +get_serialized_size( + const unitree_go::msg::MotorState & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +max_serialized_size_MotorState( + bool & full_bounded, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace unitree_go + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, unitree_go, msg, MotorState)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__MOTOR_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__rosidl_typesupport_introspection_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__rosidl_typesupport_introspection_c.h new file mode 100644 index 0000000..75a202a --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from unitree_go:msg/MotorState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__MOTOR_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define UNITREE_GO__MSG__DETAIL__MOTOR_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, MotorState)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__MOTOR_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__rosidl_typesupport_introspection_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 0000000..1213021 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from unitree_go:msg/MotorState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__MOTOR_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__MOTOR_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +// TODO(dirk-thomas) these visibility macros should be message package specific +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, MotorState)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__MOTOR_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__struct.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__struct.h new file mode 100644 index 0000000..c662d90 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__struct.h @@ -0,0 +1,50 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from unitree_go:msg/MotorState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__MOTOR_STATE__STRUCT_H_ +#define UNITREE_GO__MSG__DETAIL__MOTOR_STATE__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Struct defined in msg/MotorState in the package unitree_go. +typedef struct unitree_go__msg__MotorState +{ + uint8_t mode; + float q; + float dq; + float ddq; + float tau_est; + float q_raw; + float dq_raw; + float ddq_raw; + int8_t temperature; + uint32_t lost; + uint32_t reserve[2]; +} unitree_go__msg__MotorState; + +// Struct for a sequence of unitree_go__msg__MotorState. +typedef struct unitree_go__msg__MotorState__Sequence +{ + unitree_go__msg__MotorState * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} unitree_go__msg__MotorState__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__MOTOR_STATE__STRUCT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__struct.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__struct.hpp new file mode 100644 index 0000000..5b3a0ad --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__struct.hpp @@ -0,0 +1,270 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from unitree_go:msg/MotorState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__MOTOR_STATE__STRUCT_HPP_ +#define UNITREE_GO__MSG__DETAIL__MOTOR_STATE__STRUCT_HPP_ + +#include +#include +#include +#include +#include +#include +#include + + +#ifndef _WIN32 +# define DEPRECATED__unitree_go__msg__MotorState __attribute__((deprecated)) +#else +# define DEPRECATED__unitree_go__msg__MotorState __declspec(deprecated) +#endif + +namespace unitree_go +{ + +namespace msg +{ + +// message struct +template +struct MotorState_ +{ + using Type = MotorState_; + + explicit MotorState_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->mode = 0; + this->q = 0.0f; + this->dq = 0.0f; + this->ddq = 0.0f; + this->tau_est = 0.0f; + this->q_raw = 0.0f; + this->dq_raw = 0.0f; + this->ddq_raw = 0.0f; + this->temperature = 0; + this->lost = 0ul; + std::fill::iterator, uint32_t>(this->reserve.begin(), this->reserve.end(), 0ul); + } + } + + explicit MotorState_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : reserve(_alloc) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->mode = 0; + this->q = 0.0f; + this->dq = 0.0f; + this->ddq = 0.0f; + this->tau_est = 0.0f; + this->q_raw = 0.0f; + this->dq_raw = 0.0f; + this->ddq_raw = 0.0f; + this->temperature = 0; + this->lost = 0ul; + std::fill::iterator, uint32_t>(this->reserve.begin(), this->reserve.end(), 0ul); + } + } + + // field types and members + using _mode_type = + uint8_t; + _mode_type mode; + using _q_type = + float; + _q_type q; + using _dq_type = + float; + _dq_type dq; + using _ddq_type = + float; + _ddq_type ddq; + using _tau_est_type = + float; + _tau_est_type tau_est; + using _q_raw_type = + float; + _q_raw_type q_raw; + using _dq_raw_type = + float; + _dq_raw_type dq_raw; + using _ddq_raw_type = + float; + _ddq_raw_type ddq_raw; + using _temperature_type = + int8_t; + _temperature_type temperature; + using _lost_type = + uint32_t; + _lost_type lost; + using _reserve_type = + std::array; + _reserve_type reserve; + + // setters for named parameter idiom + Type & set__mode( + const uint8_t & _arg) + { + this->mode = _arg; + return *this; + } + Type & set__q( + const float & _arg) + { + this->q = _arg; + return *this; + } + Type & set__dq( + const float & _arg) + { + this->dq = _arg; + return *this; + } + Type & set__ddq( + const float & _arg) + { + this->ddq = _arg; + return *this; + } + Type & set__tau_est( + const float & _arg) + { + this->tau_est = _arg; + return *this; + } + Type & set__q_raw( + const float & _arg) + { + this->q_raw = _arg; + return *this; + } + Type & set__dq_raw( + const float & _arg) + { + this->dq_raw = _arg; + return *this; + } + Type & set__ddq_raw( + const float & _arg) + { + this->ddq_raw = _arg; + return *this; + } + Type & set__temperature( + const int8_t & _arg) + { + this->temperature = _arg; + return *this; + } + Type & set__lost( + const uint32_t & _arg) + { + this->lost = _arg; + return *this; + } + Type & set__reserve( + const std::array & _arg) + { + this->reserve = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + unitree_go::msg::MotorState_ *; + using ConstRawPtr = + const unitree_go::msg::MotorState_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr const>; + + // pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead + // NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly + typedef DEPRECATED__unitree_go__msg__MotorState + std::shared_ptr> + Ptr; + typedef DEPRECATED__unitree_go__msg__MotorState + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const MotorState_ & other) const + { + if (this->mode != other.mode) { + return false; + } + if (this->q != other.q) { + return false; + } + if (this->dq != other.dq) { + return false; + } + if (this->ddq != other.ddq) { + return false; + } + if (this->tau_est != other.tau_est) { + return false; + } + if (this->q_raw != other.q_raw) { + return false; + } + if (this->dq_raw != other.dq_raw) { + return false; + } + if (this->ddq_raw != other.ddq_raw) { + return false; + } + if (this->temperature != other.temperature) { + return false; + } + if (this->lost != other.lost) { + return false; + } + if (this->reserve != other.reserve) { + return false; + } + return true; + } + bool operator!=(const MotorState_ & other) const + { + return !this->operator==(other); + } +}; // struct MotorState_ + +// alias to use template instance with default allocator +using MotorState = + unitree_go::msg::MotorState_>; + +// constant definitions + +} // namespace msg + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__MOTOR_STATE__STRUCT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__traits.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__traits.hpp new file mode 100644 index 0000000..b928e75 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__traits.hpp @@ -0,0 +1,42 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from unitree_go:msg/MotorState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__MOTOR_STATE__TRAITS_HPP_ +#define UNITREE_GO__MSG__DETAIL__MOTOR_STATE__TRAITS_HPP_ + +#include "unitree_go/msg/detail/motor_state__struct.hpp" +#include +#include +#include + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "unitree_go::msg::MotorState"; +} + +template<> +inline const char * name() +{ + return "unitree_go/msg/MotorState"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UNITREE_GO__MSG__DETAIL__MOTOR_STATE__TRAITS_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__type_support.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__type_support.c new file mode 100644 index 0000000..7ea060c --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__type_support.c @@ -0,0 +1,231 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from unitree_go:msg/MotorState.idl +// generated code does not contain a copyright notice + +#include +#include "unitree_go/msg/detail/motor_state__rosidl_typesupport_introspection_c.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" +#include "rosidl_typesupport_introspection_c/field_types.h" +#include "rosidl_typesupport_introspection_c/identifier.h" +#include "rosidl_typesupport_introspection_c/message_introspection.h" +#include "unitree_go/msg/detail/motor_state__functions.h" +#include "unitree_go/msg/detail/motor_state__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void MotorState__rosidl_typesupport_introspection_c__MotorState_init_function( + void * message_memory, enum rosidl_runtime_c__message_initialization _init) +{ + // TODO(karsten1987): initializers are not yet implemented for typesupport c + // see https://github.com/ros2/ros2/issues/397 + (void) _init; + unitree_go__msg__MotorState__init(message_memory); +} + +void MotorState__rosidl_typesupport_introspection_c__MotorState_fini_function(void * message_memory) +{ + unitree_go__msg__MotorState__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember MotorState__rosidl_typesupport_introspection_c__MotorState_message_member_array[11] = { + { + "mode", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__MotorState, mode), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "q", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__MotorState, q), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "dq", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__MotorState, dq), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "ddq", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__MotorState, ddq), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "tau_est", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__MotorState, tau_est), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "q_raw", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__MotorState, q_raw), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "dq_raw", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__MotorState, dq_raw), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "ddq_raw", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__MotorState, ddq_raw), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "temperature", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__MotorState, temperature), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "lost", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__MotorState, lost), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "reserve", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 2, // array size + false, // is upper bound + offsetof(unitree_go__msg__MotorState, reserve), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers MotorState__rosidl_typesupport_introspection_c__MotorState_message_members = { + "unitree_go__msg", // message namespace + "MotorState", // message name + 11, // number of fields + sizeof(unitree_go__msg__MotorState), + MotorState__rosidl_typesupport_introspection_c__MotorState_message_member_array, // message members + MotorState__rosidl_typesupport_introspection_c__MotorState_init_function, // function to initialize message memory (memory has to be allocated) + MotorState__rosidl_typesupport_introspection_c__MotorState_fini_function // function to terminate message instance (will not free memory) +}; + +// this is not const since it must be initialized on first access +// since C does not allow non-integral compile-time constants +static rosidl_message_type_support_t MotorState__rosidl_typesupport_introspection_c__MotorState_message_type_support_handle = { + 0, + &MotorState__rosidl_typesupport_introspection_c__MotorState_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, MotorState)() { + if (!MotorState__rosidl_typesupport_introspection_c__MotorState_message_type_support_handle.typesupport_identifier) { + MotorState__rosidl_typesupport_introspection_c__MotorState_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &MotorState__rosidl_typesupport_introspection_c__MotorState_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__type_support.cpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__type_support.cpp new file mode 100644 index 0000000..2f9d84c --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__type_support.cpp @@ -0,0 +1,277 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from unitree_go:msg/MotorState.idl +// generated code does not contain a copyright notice + +#include "array" +#include "cstddef" +#include "string" +#include "vector" +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_cpp/message_type_support.hpp" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/detail/motor_state__struct.hpp" +#include "rosidl_typesupport_introspection_cpp/field_types.hpp" +#include "rosidl_typesupport_introspection_cpp/identifier.hpp" +#include "rosidl_typesupport_introspection_cpp/message_introspection.hpp" +#include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void MotorState_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) unitree_go::msg::MotorState(_init); +} + +void MotorState_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~MotorState(); +} + +size_t size_function__MotorState__reserve(const void * untyped_member) +{ + (void)untyped_member; + return 2; +} + +const void * get_const_function__MotorState__reserve(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__MotorState__reserve(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember MotorState_message_member_array[11] = { + { + "mode", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::MotorState, mode), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "q", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::MotorState, q), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "dq", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::MotorState, dq), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "ddq", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::MotorState, ddq), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "tau_est", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::MotorState, tau_est), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "q_raw", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::MotorState, q_raw), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "dq_raw", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::MotorState, dq_raw), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "ddq_raw", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::MotorState, ddq_raw), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "temperature", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::MotorState, temperature), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "lost", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::MotorState, lost), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "reserve", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 2, // array size + false, // is upper bound + offsetof(unitree_go::msg::MotorState, reserve), // bytes offset in struct + nullptr, // default value + size_function__MotorState__reserve, // size() function pointer + get_const_function__MotorState__reserve, // get_const(index) function pointer + get_function__MotorState__reserve, // get(index) function pointer + nullptr // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers MotorState_message_members = { + "unitree_go::msg", // message namespace + "MotorState", // message name + 11, // number of fields + sizeof(unitree_go::msg::MotorState), + MotorState_message_member_array, // message members + MotorState_init_function, // function to initialize message memory (memory has to be allocated) + MotorState_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t MotorState_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &MotorState_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace unitree_go + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::MotorState_message_type_support_handle; +} + +} // namespace rosidl_typesupport_introspection_cpp + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, MotorState)() { + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::MotorState_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__type_support.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__type_support.h new file mode 100644 index 0000000..656c602 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from unitree_go:msg/MotorState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__MOTOR_STATE__TYPE_SUPPORT_H_ +#define UNITREE_GO__MSG__DETAIL__MOTOR_STATE__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rosidl_runtime_c/message_type_support_struct.h" + +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + unitree_go, + msg, + MotorState +)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__MOTOR_STATE__TYPE_SUPPORT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__type_support.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__type_support.hpp new file mode 100644 index 0000000..c551d2d --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/motor_state__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from unitree_go:msg/MotorState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__MOTOR_STATE__TYPE_SUPPORT_HPP_ +#define UNITREE_GO__MSG__DETAIL__MOTOR_STATE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_cpp__visibility_control.hpp" + +#include "rosidl_typesupport_cpp/message_type_support.hpp" + +#ifdef __cplusplus +extern "C" +{ +#endif +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + unitree_go, + msg, + MotorState +)(); +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__MOTOR_STATE__TYPE_SUPPORT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__builder.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__builder.hpp new file mode 100644 index 0000000..480e4f7 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__builder.hpp @@ -0,0 +1,151 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from unitree_go:msg/PathPoint.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__PATH_POINT__BUILDER_HPP_ +#define UNITREE_GO__MSG__DETAIL__PATH_POINT__BUILDER_HPP_ + +#include "unitree_go/msg/detail/path_point__struct.hpp" +#include +#include +#include + + +namespace unitree_go +{ + +namespace msg +{ + +namespace builder +{ + +class Init_PathPoint_vyaw +{ +public: + explicit Init_PathPoint_vyaw(::unitree_go::msg::PathPoint & msg) + : msg_(msg) + {} + ::unitree_go::msg::PathPoint vyaw(::unitree_go::msg::PathPoint::_vyaw_type arg) + { + msg_.vyaw = std::move(arg); + return std::move(msg_); + } + +private: + ::unitree_go::msg::PathPoint msg_; +}; + +class Init_PathPoint_vy +{ +public: + explicit Init_PathPoint_vy(::unitree_go::msg::PathPoint & msg) + : msg_(msg) + {} + Init_PathPoint_vyaw vy(::unitree_go::msg::PathPoint::_vy_type arg) + { + msg_.vy = std::move(arg); + return Init_PathPoint_vyaw(msg_); + } + +private: + ::unitree_go::msg::PathPoint msg_; +}; + +class Init_PathPoint_vx +{ +public: + explicit Init_PathPoint_vx(::unitree_go::msg::PathPoint & msg) + : msg_(msg) + {} + Init_PathPoint_vy vx(::unitree_go::msg::PathPoint::_vx_type arg) + { + msg_.vx = std::move(arg); + return Init_PathPoint_vy(msg_); + } + +private: + ::unitree_go::msg::PathPoint msg_; +}; + +class Init_PathPoint_yaw +{ +public: + explicit Init_PathPoint_yaw(::unitree_go::msg::PathPoint & msg) + : msg_(msg) + {} + Init_PathPoint_vx yaw(::unitree_go::msg::PathPoint::_yaw_type arg) + { + msg_.yaw = std::move(arg); + return Init_PathPoint_vx(msg_); + } + +private: + ::unitree_go::msg::PathPoint msg_; +}; + +class Init_PathPoint_y +{ +public: + explicit Init_PathPoint_y(::unitree_go::msg::PathPoint & msg) + : msg_(msg) + {} + Init_PathPoint_yaw y(::unitree_go::msg::PathPoint::_y_type arg) + { + msg_.y = std::move(arg); + return Init_PathPoint_yaw(msg_); + } + +private: + ::unitree_go::msg::PathPoint msg_; +}; + +class Init_PathPoint_x +{ +public: + explicit Init_PathPoint_x(::unitree_go::msg::PathPoint & msg) + : msg_(msg) + {} + Init_PathPoint_y x(::unitree_go::msg::PathPoint::_x_type arg) + { + msg_.x = std::move(arg); + return Init_PathPoint_y(msg_); + } + +private: + ::unitree_go::msg::PathPoint msg_; +}; + +class Init_PathPoint_t_from_start +{ +public: + Init_PathPoint_t_from_start() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_PathPoint_x t_from_start(::unitree_go::msg::PathPoint::_t_from_start_type arg) + { + msg_.t_from_start = std::move(arg); + return Init_PathPoint_x(msg_); + } + +private: + ::unitree_go::msg::PathPoint msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::unitree_go::msg::PathPoint>() +{ + return unitree_go::msg::builder::Init_PathPoint_t_from_start(); +} + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__PATH_POINT__BUILDER_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__functions.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__functions.c new file mode 100644 index 0000000..ee9e885 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__functions.c @@ -0,0 +1,279 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from unitree_go:msg/PathPoint.idl +// generated code does not contain a copyright notice +#include "unitree_go/msg/detail/path_point__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +unitree_go__msg__PathPoint__init(unitree_go__msg__PathPoint * msg) +{ + if (!msg) { + return false; + } + // t_from_start + // x + // y + // yaw + // vx + // vy + // vyaw + return true; +} + +void +unitree_go__msg__PathPoint__fini(unitree_go__msg__PathPoint * msg) +{ + if (!msg) { + return; + } + // t_from_start + // x + // y + // yaw + // vx + // vy + // vyaw +} + +bool +unitree_go__msg__PathPoint__are_equal(const unitree_go__msg__PathPoint * lhs, const unitree_go__msg__PathPoint * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // t_from_start + if (lhs->t_from_start != rhs->t_from_start) { + return false; + } + // x + if (lhs->x != rhs->x) { + return false; + } + // y + if (lhs->y != rhs->y) { + return false; + } + // yaw + if (lhs->yaw != rhs->yaw) { + return false; + } + // vx + if (lhs->vx != rhs->vx) { + return false; + } + // vy + if (lhs->vy != rhs->vy) { + return false; + } + // vyaw + if (lhs->vyaw != rhs->vyaw) { + return false; + } + return true; +} + +bool +unitree_go__msg__PathPoint__copy( + const unitree_go__msg__PathPoint * input, + unitree_go__msg__PathPoint * output) +{ + if (!input || !output) { + return false; + } + // t_from_start + output->t_from_start = input->t_from_start; + // x + output->x = input->x; + // y + output->y = input->y; + // yaw + output->yaw = input->yaw; + // vx + output->vx = input->vx; + // vy + output->vy = input->vy; + // vyaw + output->vyaw = input->vyaw; + return true; +} + +unitree_go__msg__PathPoint * +unitree_go__msg__PathPoint__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__PathPoint * msg = (unitree_go__msg__PathPoint *)allocator.allocate(sizeof(unitree_go__msg__PathPoint), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(unitree_go__msg__PathPoint)); + bool success = unitree_go__msg__PathPoint__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +unitree_go__msg__PathPoint__destroy(unitree_go__msg__PathPoint * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + unitree_go__msg__PathPoint__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +unitree_go__msg__PathPoint__Sequence__init(unitree_go__msg__PathPoint__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__PathPoint * data = NULL; + + if (size) { + data = (unitree_go__msg__PathPoint *)allocator.zero_allocate(size, sizeof(unitree_go__msg__PathPoint), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = unitree_go__msg__PathPoint__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + unitree_go__msg__PathPoint__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +unitree_go__msg__PathPoint__Sequence__fini(unitree_go__msg__PathPoint__Sequence * array) +{ + if (!array) { + return; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + + if (array->data) { + // ensure that data and capacity values are consistent + assert(array->capacity > 0); + // finalize all array elements + for (size_t i = 0; i < array->capacity; ++i) { + unitree_go__msg__PathPoint__fini(&array->data[i]); + } + allocator.deallocate(array->data, allocator.state); + array->data = NULL; + array->size = 0; + array->capacity = 0; + } else { + // ensure that data, size, and capacity values are consistent + assert(0 == array->size); + assert(0 == array->capacity); + } +} + +unitree_go__msg__PathPoint__Sequence * +unitree_go__msg__PathPoint__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__PathPoint__Sequence * array = (unitree_go__msg__PathPoint__Sequence *)allocator.allocate(sizeof(unitree_go__msg__PathPoint__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = unitree_go__msg__PathPoint__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +unitree_go__msg__PathPoint__Sequence__destroy(unitree_go__msg__PathPoint__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + unitree_go__msg__PathPoint__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +unitree_go__msg__PathPoint__Sequence__are_equal(const unitree_go__msg__PathPoint__Sequence * lhs, const unitree_go__msg__PathPoint__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!unitree_go__msg__PathPoint__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +unitree_go__msg__PathPoint__Sequence__copy( + const unitree_go__msg__PathPoint__Sequence * input, + unitree_go__msg__PathPoint__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(unitree_go__msg__PathPoint); + unitree_go__msg__PathPoint * data = + (unitree_go__msg__PathPoint *)realloc(output->data, allocation_size); + if (!data) { + return false; + } + for (size_t i = output->capacity; i < input->size; ++i) { + if (!unitree_go__msg__PathPoint__init(&data[i])) { + /* free currently allocated and return false */ + for (; i-- > output->capacity; ) { + unitree_go__msg__PathPoint__fini(&data[i]); + } + free(data); + return false; + } + } + output->data = data; + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!unitree_go__msg__PathPoint__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__functions.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__functions.h new file mode 100644 index 0000000..679f242 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from unitree_go:msg/PathPoint.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__PATH_POINT__FUNCTIONS_H_ +#define UNITREE_GO__MSG__DETAIL__PATH_POINT__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#include "unitree_go/msg/detail/path_point__struct.h" + +/// Initialize msg/PathPoint message. +/** + * If the init function is called twice for the same message without + * calling fini inbetween previously allocated memory will be leaked. + * \param[in,out] msg The previously allocated message pointer. + * Fields without a default value will not be initialized by this function. + * You might want to call memset(msg, 0, sizeof( + * unitree_go__msg__PathPoint + * )) before or use + * unitree_go__msg__PathPoint__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__PathPoint__init(unitree_go__msg__PathPoint * msg); + +/// Finalize msg/PathPoint message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__PathPoint__fini(unitree_go__msg__PathPoint * msg); + +/// Create msg/PathPoint message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * unitree_go__msg__PathPoint__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__PathPoint * +unitree_go__msg__PathPoint__create(); + +/// Destroy msg/PathPoint message. +/** + * It calls + * unitree_go__msg__PathPoint__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__PathPoint__destroy(unitree_go__msg__PathPoint * msg); + +/// Check for msg/PathPoint message equality. +/** + * \param[in] lhs The message on the left hand size of the equality operator. + * \param[in] rhs The message on the right hand size of the equality operator. + * \return true if messages are equal, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__PathPoint__are_equal(const unitree_go__msg__PathPoint * lhs, const unitree_go__msg__PathPoint * rhs); + +/// Copy a msg/PathPoint message. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source message pointer. + * \param[out] output The target message pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer is null + * or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__PathPoint__copy( + const unitree_go__msg__PathPoint * input, + unitree_go__msg__PathPoint * output); + +/// Initialize array of msg/PathPoint messages. +/** + * It allocates the memory for the number of elements and calls + * unitree_go__msg__PathPoint__init() + * for each element of the array. + * \param[in,out] array The allocated array pointer. + * \param[in] size The size / capacity of the array. + * \return true if initialization was successful, otherwise false + * If the array pointer is valid and the size is zero it is guaranteed + # to return true. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__PathPoint__Sequence__init(unitree_go__msg__PathPoint__Sequence * array, size_t size); + +/// Finalize array of msg/PathPoint messages. +/** + * It calls + * unitree_go__msg__PathPoint__fini() + * for each element of the array and frees the memory for the number of + * elements. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__PathPoint__Sequence__fini(unitree_go__msg__PathPoint__Sequence * array); + +/// Create array of msg/PathPoint messages. +/** + * It allocates the memory for the array and calls + * unitree_go__msg__PathPoint__Sequence__init(). + * \param[in] size The size / capacity of the array. + * \return The pointer to the initialized array if successful, otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__PathPoint__Sequence * +unitree_go__msg__PathPoint__Sequence__create(size_t size); + +/// Destroy array of msg/PathPoint messages. +/** + * It calls + * unitree_go__msg__PathPoint__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__PathPoint__Sequence__destroy(unitree_go__msg__PathPoint__Sequence * array); + +/// Check for msg/PathPoint message array equality. +/** + * \param[in] lhs The message array on the left hand size of the equality operator. + * \param[in] rhs The message array on the right hand size of the equality operator. + * \return true if message arrays are equal in size and content, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__PathPoint__Sequence__are_equal(const unitree_go__msg__PathPoint__Sequence * lhs, const unitree_go__msg__PathPoint__Sequence * rhs); + +/// Copy an array of msg/PathPoint messages. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source array pointer. + * \param[out] output The target array pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer + * is null or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__PathPoint__Sequence__copy( + const unitree_go__msg__PathPoint__Sequence * input, + unitree_go__msg__PathPoint__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__PATH_POINT__FUNCTIONS_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__rosidl_typesupport_fastrtps_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 0000000..f1ee400 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,36 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from unitree_go:msg/PathPoint.idl +// generated code does not contain a copyright notice +#ifndef UNITREE_GO__MSG__DETAIL__PATH_POINT__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define UNITREE_GO__MSG__DETAIL__PATH_POINT__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t get_serialized_size_unitree_go__msg__PathPoint( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t max_serialized_size_unitree_go__msg__PathPoint( + bool & full_bounded, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, unitree_go, msg, PathPoint)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__PATH_POINT__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__rosidl_typesupport_fastrtps_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 0000000..2218e77 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,79 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from unitree_go:msg/PathPoint.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__PATH_POINT__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__PATH_POINT__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "unitree_go/msg/detail/path_point__struct.hpp" + +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-parameter" +# ifdef __clang__ +# pragma clang diagnostic ignored "-Wdeprecated-register" +# pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +# endif +#endif +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif + +#include "fastcdr/Cdr.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_serialize( + const unitree_go::msg::PathPoint & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + unitree_go::msg::PathPoint & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +get_serialized_size( + const unitree_go::msg::PathPoint & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +max_serialized_size_PathPoint( + bool & full_bounded, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace unitree_go + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, unitree_go, msg, PathPoint)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__PATH_POINT__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__rosidl_typesupport_introspection_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__rosidl_typesupport_introspection_c.h new file mode 100644 index 0000000..a3d256b --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from unitree_go:msg/PathPoint.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__PATH_POINT__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define UNITREE_GO__MSG__DETAIL__PATH_POINT__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, PathPoint)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__PATH_POINT__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__rosidl_typesupport_introspection_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 0000000..26eaf44 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from unitree_go:msg/PathPoint.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__PATH_POINT__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__PATH_POINT__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +// TODO(dirk-thomas) these visibility macros should be message package specific +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, PathPoint)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__PATH_POINT__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__struct.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__struct.h new file mode 100644 index 0000000..10d75fe --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__struct.h @@ -0,0 +1,46 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from unitree_go:msg/PathPoint.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__PATH_POINT__STRUCT_H_ +#define UNITREE_GO__MSG__DETAIL__PATH_POINT__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Struct defined in msg/PathPoint in the package unitree_go. +typedef struct unitree_go__msg__PathPoint +{ + float t_from_start; + float x; + float y; + float yaw; + float vx; + float vy; + float vyaw; +} unitree_go__msg__PathPoint; + +// Struct for a sequence of unitree_go__msg__PathPoint. +typedef struct unitree_go__msg__PathPoint__Sequence +{ + unitree_go__msg__PathPoint * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} unitree_go__msg__PathPoint__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__PATH_POINT__STRUCT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__struct.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__struct.hpp new file mode 100644 index 0000000..81630fb --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__struct.hpp @@ -0,0 +1,214 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from unitree_go:msg/PathPoint.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__PATH_POINT__STRUCT_HPP_ +#define UNITREE_GO__MSG__DETAIL__PATH_POINT__STRUCT_HPP_ + +#include +#include +#include +#include +#include +#include +#include + + +#ifndef _WIN32 +# define DEPRECATED__unitree_go__msg__PathPoint __attribute__((deprecated)) +#else +# define DEPRECATED__unitree_go__msg__PathPoint __declspec(deprecated) +#endif + +namespace unitree_go +{ + +namespace msg +{ + +// message struct +template +struct PathPoint_ +{ + using Type = PathPoint_; + + explicit PathPoint_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->t_from_start = 0.0f; + this->x = 0.0f; + this->y = 0.0f; + this->yaw = 0.0f; + this->vx = 0.0f; + this->vy = 0.0f; + this->vyaw = 0.0f; + } + } + + explicit PathPoint_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + (void)_alloc; + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->t_from_start = 0.0f; + this->x = 0.0f; + this->y = 0.0f; + this->yaw = 0.0f; + this->vx = 0.0f; + this->vy = 0.0f; + this->vyaw = 0.0f; + } + } + + // field types and members + using _t_from_start_type = + float; + _t_from_start_type t_from_start; + using _x_type = + float; + _x_type x; + using _y_type = + float; + _y_type y; + using _yaw_type = + float; + _yaw_type yaw; + using _vx_type = + float; + _vx_type vx; + using _vy_type = + float; + _vy_type vy; + using _vyaw_type = + float; + _vyaw_type vyaw; + + // setters for named parameter idiom + Type & set__t_from_start( + const float & _arg) + { + this->t_from_start = _arg; + return *this; + } + Type & set__x( + const float & _arg) + { + this->x = _arg; + return *this; + } + Type & set__y( + const float & _arg) + { + this->y = _arg; + return *this; + } + Type & set__yaw( + const float & _arg) + { + this->yaw = _arg; + return *this; + } + Type & set__vx( + const float & _arg) + { + this->vx = _arg; + return *this; + } + Type & set__vy( + const float & _arg) + { + this->vy = _arg; + return *this; + } + Type & set__vyaw( + const float & _arg) + { + this->vyaw = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + unitree_go::msg::PathPoint_ *; + using ConstRawPtr = + const unitree_go::msg::PathPoint_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr const>; + + // pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead + // NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly + typedef DEPRECATED__unitree_go__msg__PathPoint + std::shared_ptr> + Ptr; + typedef DEPRECATED__unitree_go__msg__PathPoint + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const PathPoint_ & other) const + { + if (this->t_from_start != other.t_from_start) { + return false; + } + if (this->x != other.x) { + return false; + } + if (this->y != other.y) { + return false; + } + if (this->yaw != other.yaw) { + return false; + } + if (this->vx != other.vx) { + return false; + } + if (this->vy != other.vy) { + return false; + } + if (this->vyaw != other.vyaw) { + return false; + } + return true; + } + bool operator!=(const PathPoint_ & other) const + { + return !this->operator==(other); + } +}; // struct PathPoint_ + +// alias to use template instance with default allocator +using PathPoint = + unitree_go::msg::PathPoint_>; + +// constant definitions + +} // namespace msg + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__PATH_POINT__STRUCT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__traits.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__traits.hpp new file mode 100644 index 0000000..ed48ad0 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__traits.hpp @@ -0,0 +1,42 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from unitree_go:msg/PathPoint.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__PATH_POINT__TRAITS_HPP_ +#define UNITREE_GO__MSG__DETAIL__PATH_POINT__TRAITS_HPP_ + +#include "unitree_go/msg/detail/path_point__struct.hpp" +#include +#include +#include + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "unitree_go::msg::PathPoint"; +} + +template<> +inline const char * name() +{ + return "unitree_go/msg/PathPoint"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UNITREE_GO__MSG__DETAIL__PATH_POINT__TRAITS_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__type_support.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__type_support.c new file mode 100644 index 0000000..866f188 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__type_support.c @@ -0,0 +1,171 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from unitree_go:msg/PathPoint.idl +// generated code does not contain a copyright notice + +#include +#include "unitree_go/msg/detail/path_point__rosidl_typesupport_introspection_c.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" +#include "rosidl_typesupport_introspection_c/field_types.h" +#include "rosidl_typesupport_introspection_c/identifier.h" +#include "rosidl_typesupport_introspection_c/message_introspection.h" +#include "unitree_go/msg/detail/path_point__functions.h" +#include "unitree_go/msg/detail/path_point__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void PathPoint__rosidl_typesupport_introspection_c__PathPoint_init_function( + void * message_memory, enum rosidl_runtime_c__message_initialization _init) +{ + // TODO(karsten1987): initializers are not yet implemented for typesupport c + // see https://github.com/ros2/ros2/issues/397 + (void) _init; + unitree_go__msg__PathPoint__init(message_memory); +} + +void PathPoint__rosidl_typesupport_introspection_c__PathPoint_fini_function(void * message_memory) +{ + unitree_go__msg__PathPoint__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember PathPoint__rosidl_typesupport_introspection_c__PathPoint_message_member_array[7] = { + { + "t_from_start", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__PathPoint, t_from_start), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "x", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__PathPoint, x), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "y", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__PathPoint, y), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "yaw", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__PathPoint, yaw), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "vx", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__PathPoint, vx), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "vy", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__PathPoint, vy), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "vyaw", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__PathPoint, vyaw), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers PathPoint__rosidl_typesupport_introspection_c__PathPoint_message_members = { + "unitree_go__msg", // message namespace + "PathPoint", // message name + 7, // number of fields + sizeof(unitree_go__msg__PathPoint), + PathPoint__rosidl_typesupport_introspection_c__PathPoint_message_member_array, // message members + PathPoint__rosidl_typesupport_introspection_c__PathPoint_init_function, // function to initialize message memory (memory has to be allocated) + PathPoint__rosidl_typesupport_introspection_c__PathPoint_fini_function // function to terminate message instance (will not free memory) +}; + +// this is not const since it must be initialized on first access +// since C does not allow non-integral compile-time constants +static rosidl_message_type_support_t PathPoint__rosidl_typesupport_introspection_c__PathPoint_message_type_support_handle = { + 0, + &PathPoint__rosidl_typesupport_introspection_c__PathPoint_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, PathPoint)() { + if (!PathPoint__rosidl_typesupport_introspection_c__PathPoint_message_type_support_handle.typesupport_identifier) { + PathPoint__rosidl_typesupport_introspection_c__PathPoint_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &PathPoint__rosidl_typesupport_introspection_c__PathPoint_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__type_support.cpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__type_support.cpp new file mode 100644 index 0000000..1b07bc5 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__type_support.cpp @@ -0,0 +1,197 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from unitree_go:msg/PathPoint.idl +// generated code does not contain a copyright notice + +#include "array" +#include "cstddef" +#include "string" +#include "vector" +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_cpp/message_type_support.hpp" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/detail/path_point__struct.hpp" +#include "rosidl_typesupport_introspection_cpp/field_types.hpp" +#include "rosidl_typesupport_introspection_cpp/identifier.hpp" +#include "rosidl_typesupport_introspection_cpp/message_introspection.hpp" +#include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void PathPoint_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) unitree_go::msg::PathPoint(_init); +} + +void PathPoint_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~PathPoint(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember PathPoint_message_member_array[7] = { + { + "t_from_start", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::PathPoint, t_from_start), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "x", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::PathPoint, x), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "y", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::PathPoint, y), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "yaw", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::PathPoint, yaw), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "vx", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::PathPoint, vx), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "vy", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::PathPoint, vy), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "vyaw", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::PathPoint, vyaw), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers PathPoint_message_members = { + "unitree_go::msg", // message namespace + "PathPoint", // message name + 7, // number of fields + sizeof(unitree_go::msg::PathPoint), + PathPoint_message_member_array, // message members + PathPoint_init_function, // function to initialize message memory (memory has to be allocated) + PathPoint_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t PathPoint_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &PathPoint_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace unitree_go + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::PathPoint_message_type_support_handle; +} + +} // namespace rosidl_typesupport_introspection_cpp + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, PathPoint)() { + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::PathPoint_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__type_support.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__type_support.h new file mode 100644 index 0000000..78f2d25 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from unitree_go:msg/PathPoint.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__PATH_POINT__TYPE_SUPPORT_H_ +#define UNITREE_GO__MSG__DETAIL__PATH_POINT__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rosidl_runtime_c/message_type_support_struct.h" + +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + unitree_go, + msg, + PathPoint +)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__PATH_POINT__TYPE_SUPPORT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__type_support.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__type_support.hpp new file mode 100644 index 0000000..f890102 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/path_point__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from unitree_go:msg/PathPoint.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__PATH_POINT__TYPE_SUPPORT_HPP_ +#define UNITREE_GO__MSG__DETAIL__PATH_POINT__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_cpp__visibility_control.hpp" + +#include "rosidl_typesupport_cpp/message_type_support.hpp" + +#ifdef __cplusplus +extern "C" +{ +#endif +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + unitree_go, + msg, + PathPoint +)(); +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__PATH_POINT__TYPE_SUPPORT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__builder.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__builder.hpp new file mode 100644 index 0000000..ee1922b --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__builder.hpp @@ -0,0 +1,71 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from unitree_go:msg/Req.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__REQ__BUILDER_HPP_ +#define UNITREE_GO__MSG__DETAIL__REQ__BUILDER_HPP_ + +#include "unitree_go/msg/detail/req__struct.hpp" +#include +#include +#include + + +namespace unitree_go +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Req_body +{ +public: + explicit Init_Req_body(::unitree_go::msg::Req & msg) + : msg_(msg) + {} + ::unitree_go::msg::Req body(::unitree_go::msg::Req::_body_type arg) + { + msg_.body = std::move(arg); + return std::move(msg_); + } + +private: + ::unitree_go::msg::Req msg_; +}; + +class Init_Req_uuid +{ +public: + Init_Req_uuid() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_Req_body uuid(::unitree_go::msg::Req::_uuid_type arg) + { + msg_.uuid = std::move(arg); + return Init_Req_body(msg_); + } + +private: + ::unitree_go::msg::Req msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::unitree_go::msg::Req>() +{ + return unitree_go::msg::builder::Init_Req_uuid(); +} + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__REQ__BUILDER_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__functions.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__functions.c new file mode 100644 index 0000000..648e054 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__functions.c @@ -0,0 +1,266 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from unitree_go:msg/Req.idl +// generated code does not contain a copyright notice +#include "unitree_go/msg/detail/req__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `uuid` +// Member `body` +#include "rosidl_runtime_c/string_functions.h" + +bool +unitree_go__msg__Req__init(unitree_go__msg__Req * msg) +{ + if (!msg) { + return false; + } + // uuid + if (!rosidl_runtime_c__String__init(&msg->uuid)) { + unitree_go__msg__Req__fini(msg); + return false; + } + // body + if (!rosidl_runtime_c__String__init(&msg->body)) { + unitree_go__msg__Req__fini(msg); + return false; + } + return true; +} + +void +unitree_go__msg__Req__fini(unitree_go__msg__Req * msg) +{ + if (!msg) { + return; + } + // uuid + rosidl_runtime_c__String__fini(&msg->uuid); + // body + rosidl_runtime_c__String__fini(&msg->body); +} + +bool +unitree_go__msg__Req__are_equal(const unitree_go__msg__Req * lhs, const unitree_go__msg__Req * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // uuid + if (!rosidl_runtime_c__String__are_equal( + &(lhs->uuid), &(rhs->uuid))) + { + return false; + } + // body + if (!rosidl_runtime_c__String__are_equal( + &(lhs->body), &(rhs->body))) + { + return false; + } + return true; +} + +bool +unitree_go__msg__Req__copy( + const unitree_go__msg__Req * input, + unitree_go__msg__Req * output) +{ + if (!input || !output) { + return false; + } + // uuid + if (!rosidl_runtime_c__String__copy( + &(input->uuid), &(output->uuid))) + { + return false; + } + // body + if (!rosidl_runtime_c__String__copy( + &(input->body), &(output->body))) + { + return false; + } + return true; +} + +unitree_go__msg__Req * +unitree_go__msg__Req__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__Req * msg = (unitree_go__msg__Req *)allocator.allocate(sizeof(unitree_go__msg__Req), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(unitree_go__msg__Req)); + bool success = unitree_go__msg__Req__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +unitree_go__msg__Req__destroy(unitree_go__msg__Req * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + unitree_go__msg__Req__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +unitree_go__msg__Req__Sequence__init(unitree_go__msg__Req__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__Req * data = NULL; + + if (size) { + data = (unitree_go__msg__Req *)allocator.zero_allocate(size, sizeof(unitree_go__msg__Req), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = unitree_go__msg__Req__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + unitree_go__msg__Req__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +unitree_go__msg__Req__Sequence__fini(unitree_go__msg__Req__Sequence * array) +{ + if (!array) { + return; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + + if (array->data) { + // ensure that data and capacity values are consistent + assert(array->capacity > 0); + // finalize all array elements + for (size_t i = 0; i < array->capacity; ++i) { + unitree_go__msg__Req__fini(&array->data[i]); + } + allocator.deallocate(array->data, allocator.state); + array->data = NULL; + array->size = 0; + array->capacity = 0; + } else { + // ensure that data, size, and capacity values are consistent + assert(0 == array->size); + assert(0 == array->capacity); + } +} + +unitree_go__msg__Req__Sequence * +unitree_go__msg__Req__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__Req__Sequence * array = (unitree_go__msg__Req__Sequence *)allocator.allocate(sizeof(unitree_go__msg__Req__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = unitree_go__msg__Req__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +unitree_go__msg__Req__Sequence__destroy(unitree_go__msg__Req__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + unitree_go__msg__Req__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +unitree_go__msg__Req__Sequence__are_equal(const unitree_go__msg__Req__Sequence * lhs, const unitree_go__msg__Req__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!unitree_go__msg__Req__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +unitree_go__msg__Req__Sequence__copy( + const unitree_go__msg__Req__Sequence * input, + unitree_go__msg__Req__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(unitree_go__msg__Req); + unitree_go__msg__Req * data = + (unitree_go__msg__Req *)realloc(output->data, allocation_size); + if (!data) { + return false; + } + for (size_t i = output->capacity; i < input->size; ++i) { + if (!unitree_go__msg__Req__init(&data[i])) { + /* free currently allocated and return false */ + for (; i-- > output->capacity; ) { + unitree_go__msg__Req__fini(&data[i]); + } + free(data); + return false; + } + } + output->data = data; + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!unitree_go__msg__Req__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__functions.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__functions.h new file mode 100644 index 0000000..32d6d67 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from unitree_go:msg/Req.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__REQ__FUNCTIONS_H_ +#define UNITREE_GO__MSG__DETAIL__REQ__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#include "unitree_go/msg/detail/req__struct.h" + +/// Initialize msg/Req message. +/** + * If the init function is called twice for the same message without + * calling fini inbetween previously allocated memory will be leaked. + * \param[in,out] msg The previously allocated message pointer. + * Fields without a default value will not be initialized by this function. + * You might want to call memset(msg, 0, sizeof( + * unitree_go__msg__Req + * )) before or use + * unitree_go__msg__Req__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__Req__init(unitree_go__msg__Req * msg); + +/// Finalize msg/Req message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__Req__fini(unitree_go__msg__Req * msg); + +/// Create msg/Req message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * unitree_go__msg__Req__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__Req * +unitree_go__msg__Req__create(); + +/// Destroy msg/Req message. +/** + * It calls + * unitree_go__msg__Req__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__Req__destroy(unitree_go__msg__Req * msg); + +/// Check for msg/Req message equality. +/** + * \param[in] lhs The message on the left hand size of the equality operator. + * \param[in] rhs The message on the right hand size of the equality operator. + * \return true if messages are equal, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__Req__are_equal(const unitree_go__msg__Req * lhs, const unitree_go__msg__Req * rhs); + +/// Copy a msg/Req message. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source message pointer. + * \param[out] output The target message pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer is null + * or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__Req__copy( + const unitree_go__msg__Req * input, + unitree_go__msg__Req * output); + +/// Initialize array of msg/Req messages. +/** + * It allocates the memory for the number of elements and calls + * unitree_go__msg__Req__init() + * for each element of the array. + * \param[in,out] array The allocated array pointer. + * \param[in] size The size / capacity of the array. + * \return true if initialization was successful, otherwise false + * If the array pointer is valid and the size is zero it is guaranteed + # to return true. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__Req__Sequence__init(unitree_go__msg__Req__Sequence * array, size_t size); + +/// Finalize array of msg/Req messages. +/** + * It calls + * unitree_go__msg__Req__fini() + * for each element of the array and frees the memory for the number of + * elements. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__Req__Sequence__fini(unitree_go__msg__Req__Sequence * array); + +/// Create array of msg/Req messages. +/** + * It allocates the memory for the array and calls + * unitree_go__msg__Req__Sequence__init(). + * \param[in] size The size / capacity of the array. + * \return The pointer to the initialized array if successful, otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__Req__Sequence * +unitree_go__msg__Req__Sequence__create(size_t size); + +/// Destroy array of msg/Req messages. +/** + * It calls + * unitree_go__msg__Req__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__Req__Sequence__destroy(unitree_go__msg__Req__Sequence * array); + +/// Check for msg/Req message array equality. +/** + * \param[in] lhs The message array on the left hand size of the equality operator. + * \param[in] rhs The message array on the right hand size of the equality operator. + * \return true if message arrays are equal in size and content, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__Req__Sequence__are_equal(const unitree_go__msg__Req__Sequence * lhs, const unitree_go__msg__Req__Sequence * rhs); + +/// Copy an array of msg/Req messages. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source array pointer. + * \param[out] output The target array pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer + * is null or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__Req__Sequence__copy( + const unitree_go__msg__Req__Sequence * input, + unitree_go__msg__Req__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__REQ__FUNCTIONS_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__rosidl_typesupport_fastrtps_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 0000000..8a60f3b --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,36 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from unitree_go:msg/Req.idl +// generated code does not contain a copyright notice +#ifndef UNITREE_GO__MSG__DETAIL__REQ__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define UNITREE_GO__MSG__DETAIL__REQ__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t get_serialized_size_unitree_go__msg__Req( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t max_serialized_size_unitree_go__msg__Req( + bool & full_bounded, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, unitree_go, msg, Req)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__REQ__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__rosidl_typesupport_fastrtps_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 0000000..b888527 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,79 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from unitree_go:msg/Req.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__REQ__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__REQ__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "unitree_go/msg/detail/req__struct.hpp" + +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-parameter" +# ifdef __clang__ +# pragma clang diagnostic ignored "-Wdeprecated-register" +# pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +# endif +#endif +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif + +#include "fastcdr/Cdr.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_serialize( + const unitree_go::msg::Req & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + unitree_go::msg::Req & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +get_serialized_size( + const unitree_go::msg::Req & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +max_serialized_size_Req( + bool & full_bounded, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace unitree_go + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, unitree_go, msg, Req)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__REQ__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__rosidl_typesupport_introspection_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__rosidl_typesupport_introspection_c.h new file mode 100644 index 0000000..76f8331 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from unitree_go:msg/Req.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__REQ__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define UNITREE_GO__MSG__DETAIL__REQ__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, Req)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__REQ__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__rosidl_typesupport_introspection_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 0000000..1c49e1e --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from unitree_go:msg/Req.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__REQ__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__REQ__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +// TODO(dirk-thomas) these visibility macros should be message package specific +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, Req)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__REQ__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__struct.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__struct.h new file mode 100644 index 0000000..dfda661 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__struct.h @@ -0,0 +1,46 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from unitree_go:msg/Req.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__REQ__STRUCT_H_ +#define UNITREE_GO__MSG__DETAIL__REQ__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'uuid' +// Member 'body' +#include "rosidl_runtime_c/string.h" + +// Struct defined in msg/Req in the package unitree_go. +typedef struct unitree_go__msg__Req +{ + rosidl_runtime_c__String uuid; + rosidl_runtime_c__String body; +} unitree_go__msg__Req; + +// Struct for a sequence of unitree_go__msg__Req. +typedef struct unitree_go__msg__Req__Sequence +{ + unitree_go__msg__Req * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} unitree_go__msg__Req__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__REQ__STRUCT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__struct.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__struct.hpp new file mode 100644 index 0000000..c21935c --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__struct.hpp @@ -0,0 +1,145 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from unitree_go:msg/Req.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__REQ__STRUCT_HPP_ +#define UNITREE_GO__MSG__DETAIL__REQ__STRUCT_HPP_ + +#include +#include +#include +#include +#include +#include +#include + + +#ifndef _WIN32 +# define DEPRECATED__unitree_go__msg__Req __attribute__((deprecated)) +#else +# define DEPRECATED__unitree_go__msg__Req __declspec(deprecated) +#endif + +namespace unitree_go +{ + +namespace msg +{ + +// message struct +template +struct Req_ +{ + using Type = Req_; + + explicit Req_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->uuid = ""; + this->body = ""; + } + } + + explicit Req_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : uuid(_alloc), + body(_alloc) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->uuid = ""; + this->body = ""; + } + } + + // field types and members + using _uuid_type = + std::basic_string, typename ContainerAllocator::template rebind::other>; + _uuid_type uuid; + using _body_type = + std::basic_string, typename ContainerAllocator::template rebind::other>; + _body_type body; + + // setters for named parameter idiom + Type & set__uuid( + const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + { + this->uuid = _arg; + return *this; + } + Type & set__body( + const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + { + this->body = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + unitree_go::msg::Req_ *; + using ConstRawPtr = + const unitree_go::msg::Req_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr const>; + + // pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead + // NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly + typedef DEPRECATED__unitree_go__msg__Req + std::shared_ptr> + Ptr; + typedef DEPRECATED__unitree_go__msg__Req + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Req_ & other) const + { + if (this->uuid != other.uuid) { + return false; + } + if (this->body != other.body) { + return false; + } + return true; + } + bool operator!=(const Req_ & other) const + { + return !this->operator==(other); + } +}; // struct Req_ + +// alias to use template instance with default allocator +using Req = + unitree_go::msg::Req_>; + +// constant definitions + +} // namespace msg + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__REQ__STRUCT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__traits.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__traits.hpp new file mode 100644 index 0000000..5fc99c1 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__traits.hpp @@ -0,0 +1,42 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from unitree_go:msg/Req.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__REQ__TRAITS_HPP_ +#define UNITREE_GO__MSG__DETAIL__REQ__TRAITS_HPP_ + +#include "unitree_go/msg/detail/req__struct.hpp" +#include +#include +#include + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "unitree_go::msg::Req"; +} + +template<> +inline const char * name() +{ + return "unitree_go/msg/Req"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UNITREE_GO__MSG__DETAIL__REQ__TRAITS_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__type_support.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__type_support.c new file mode 100644 index 0000000..29996a1 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__type_support.c @@ -0,0 +1,101 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from unitree_go:msg/Req.idl +// generated code does not contain a copyright notice + +#include +#include "unitree_go/msg/detail/req__rosidl_typesupport_introspection_c.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" +#include "rosidl_typesupport_introspection_c/field_types.h" +#include "rosidl_typesupport_introspection_c/identifier.h" +#include "rosidl_typesupport_introspection_c/message_introspection.h" +#include "unitree_go/msg/detail/req__functions.h" +#include "unitree_go/msg/detail/req__struct.h" + + +// Include directives for member types +// Member `uuid` +// Member `body` +#include "rosidl_runtime_c/string_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void Req__rosidl_typesupport_introspection_c__Req_init_function( + void * message_memory, enum rosidl_runtime_c__message_initialization _init) +{ + // TODO(karsten1987): initializers are not yet implemented for typesupport c + // see https://github.com/ros2/ros2/issues/397 + (void) _init; + unitree_go__msg__Req__init(message_memory); +} + +void Req__rosidl_typesupport_introspection_c__Req_fini_function(void * message_memory) +{ + unitree_go__msg__Req__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember Req__rosidl_typesupport_introspection_c__Req_message_member_array[2] = { + { + "uuid", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__Req, uuid), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "body", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__Req, body), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers Req__rosidl_typesupport_introspection_c__Req_message_members = { + "unitree_go__msg", // message namespace + "Req", // message name + 2, // number of fields + sizeof(unitree_go__msg__Req), + Req__rosidl_typesupport_introspection_c__Req_message_member_array, // message members + Req__rosidl_typesupport_introspection_c__Req_init_function, // function to initialize message memory (memory has to be allocated) + Req__rosidl_typesupport_introspection_c__Req_fini_function // function to terminate message instance (will not free memory) +}; + +// this is not const since it must be initialized on first access +// since C does not allow non-integral compile-time constants +static rosidl_message_type_support_t Req__rosidl_typesupport_introspection_c__Req_message_type_support_handle = { + 0, + &Req__rosidl_typesupport_introspection_c__Req_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, Req)() { + if (!Req__rosidl_typesupport_introspection_c__Req_message_type_support_handle.typesupport_identifier) { + Req__rosidl_typesupport_introspection_c__Req_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &Req__rosidl_typesupport_introspection_c__Req_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__type_support.cpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__type_support.cpp new file mode 100644 index 0000000..0f8d54e --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__type_support.cpp @@ -0,0 +1,122 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from unitree_go:msg/Req.idl +// generated code does not contain a copyright notice + +#include "array" +#include "cstddef" +#include "string" +#include "vector" +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_cpp/message_type_support.hpp" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/detail/req__struct.hpp" +#include "rosidl_typesupport_introspection_cpp/field_types.hpp" +#include "rosidl_typesupport_introspection_cpp/identifier.hpp" +#include "rosidl_typesupport_introspection_cpp/message_introspection.hpp" +#include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Req_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) unitree_go::msg::Req(_init); +} + +void Req_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Req(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Req_message_member_array[2] = { + { + "uuid", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::Req, uuid), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "body", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::Req, body), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers Req_message_members = { + "unitree_go::msg", // message namespace + "Req", // message name + 2, // number of fields + sizeof(unitree_go::msg::Req), + Req_message_member_array, // message members + Req_init_function, // function to initialize message memory (memory has to be allocated) + Req_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Req_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Req_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace unitree_go + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::Req_message_type_support_handle; +} + +} // namespace rosidl_typesupport_introspection_cpp + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, Req)() { + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::Req_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__type_support.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__type_support.h new file mode 100644 index 0000000..b62b1e6 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from unitree_go:msg/Req.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__REQ__TYPE_SUPPORT_H_ +#define UNITREE_GO__MSG__DETAIL__REQ__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rosidl_runtime_c/message_type_support_struct.h" + +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + unitree_go, + msg, + Req +)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__REQ__TYPE_SUPPORT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__type_support.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__type_support.hpp new file mode 100644 index 0000000..f7ee4bc --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/req__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from unitree_go:msg/Req.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__REQ__TYPE_SUPPORT_HPP_ +#define UNITREE_GO__MSG__DETAIL__REQ__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_cpp__visibility_control.hpp" + +#include "rosidl_typesupport_cpp/message_type_support.hpp" + +#ifdef __cplusplus +extern "C" +{ +#endif +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + unitree_go, + msg, + Req +)(); +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__REQ__TYPE_SUPPORT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__builder.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__builder.hpp new file mode 100644 index 0000000..734b284 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__builder.hpp @@ -0,0 +1,87 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from unitree_go:msg/Res.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__RES__BUILDER_HPP_ +#define UNITREE_GO__MSG__DETAIL__RES__BUILDER_HPP_ + +#include "unitree_go/msg/detail/res__struct.hpp" +#include +#include +#include + + +namespace unitree_go +{ + +namespace msg +{ + +namespace builder +{ + +class Init_Res_body +{ +public: + explicit Init_Res_body(::unitree_go::msg::Res & msg) + : msg_(msg) + {} + ::unitree_go::msg::Res body(::unitree_go::msg::Res::_body_type arg) + { + msg_.body = std::move(arg); + return std::move(msg_); + } + +private: + ::unitree_go::msg::Res msg_; +}; + +class Init_Res_data +{ +public: + explicit Init_Res_data(::unitree_go::msg::Res & msg) + : msg_(msg) + {} + Init_Res_body data(::unitree_go::msg::Res::_data_type arg) + { + msg_.data = std::move(arg); + return Init_Res_body(msg_); + } + +private: + ::unitree_go::msg::Res msg_; +}; + +class Init_Res_uuid +{ +public: + Init_Res_uuid() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_Res_data uuid(::unitree_go::msg::Res::_uuid_type arg) + { + msg_.uuid = std::move(arg); + return Init_Res_data(msg_); + } + +private: + ::unitree_go::msg::Res msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::unitree_go::msg::Res>() +{ + return unitree_go::msg::builder::Init_Res_uuid(); +} + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__RES__BUILDER_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__functions.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__functions.c new file mode 100644 index 0000000..1a6194e --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__functions.c @@ -0,0 +1,287 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from unitree_go:msg/Res.idl +// generated code does not contain a copyright notice +#include "unitree_go/msg/detail/res__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `uuid` +// Member `body` +#include "rosidl_runtime_c/string_functions.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +bool +unitree_go__msg__Res__init(unitree_go__msg__Res * msg) +{ + if (!msg) { + return false; + } + // uuid + if (!rosidl_runtime_c__String__init(&msg->uuid)) { + unitree_go__msg__Res__fini(msg); + return false; + } + // data + if (!rosidl_runtime_c__uint8__Sequence__init(&msg->data, 0)) { + unitree_go__msg__Res__fini(msg); + return false; + } + // body + if (!rosidl_runtime_c__String__init(&msg->body)) { + unitree_go__msg__Res__fini(msg); + return false; + } + return true; +} + +void +unitree_go__msg__Res__fini(unitree_go__msg__Res * msg) +{ + if (!msg) { + return; + } + // uuid + rosidl_runtime_c__String__fini(&msg->uuid); + // data + rosidl_runtime_c__uint8__Sequence__fini(&msg->data); + // body + rosidl_runtime_c__String__fini(&msg->body); +} + +bool +unitree_go__msg__Res__are_equal(const unitree_go__msg__Res * lhs, const unitree_go__msg__Res * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // uuid + if (!rosidl_runtime_c__String__are_equal( + &(lhs->uuid), &(rhs->uuid))) + { + return false; + } + // data + if (!rosidl_runtime_c__uint8__Sequence__are_equal( + &(lhs->data), &(rhs->data))) + { + return false; + } + // body + if (!rosidl_runtime_c__String__are_equal( + &(lhs->body), &(rhs->body))) + { + return false; + } + return true; +} + +bool +unitree_go__msg__Res__copy( + const unitree_go__msg__Res * input, + unitree_go__msg__Res * output) +{ + if (!input || !output) { + return false; + } + // uuid + if (!rosidl_runtime_c__String__copy( + &(input->uuid), &(output->uuid))) + { + return false; + } + // data + if (!rosidl_runtime_c__uint8__Sequence__copy( + &(input->data), &(output->data))) + { + return false; + } + // body + if (!rosidl_runtime_c__String__copy( + &(input->body), &(output->body))) + { + return false; + } + return true; +} + +unitree_go__msg__Res * +unitree_go__msg__Res__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__Res * msg = (unitree_go__msg__Res *)allocator.allocate(sizeof(unitree_go__msg__Res), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(unitree_go__msg__Res)); + bool success = unitree_go__msg__Res__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +unitree_go__msg__Res__destroy(unitree_go__msg__Res * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + unitree_go__msg__Res__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +unitree_go__msg__Res__Sequence__init(unitree_go__msg__Res__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__Res * data = NULL; + + if (size) { + data = (unitree_go__msg__Res *)allocator.zero_allocate(size, sizeof(unitree_go__msg__Res), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = unitree_go__msg__Res__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + unitree_go__msg__Res__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +unitree_go__msg__Res__Sequence__fini(unitree_go__msg__Res__Sequence * array) +{ + if (!array) { + return; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + + if (array->data) { + // ensure that data and capacity values are consistent + assert(array->capacity > 0); + // finalize all array elements + for (size_t i = 0; i < array->capacity; ++i) { + unitree_go__msg__Res__fini(&array->data[i]); + } + allocator.deallocate(array->data, allocator.state); + array->data = NULL; + array->size = 0; + array->capacity = 0; + } else { + // ensure that data, size, and capacity values are consistent + assert(0 == array->size); + assert(0 == array->capacity); + } +} + +unitree_go__msg__Res__Sequence * +unitree_go__msg__Res__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__Res__Sequence * array = (unitree_go__msg__Res__Sequence *)allocator.allocate(sizeof(unitree_go__msg__Res__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = unitree_go__msg__Res__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +unitree_go__msg__Res__Sequence__destroy(unitree_go__msg__Res__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + unitree_go__msg__Res__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +unitree_go__msg__Res__Sequence__are_equal(const unitree_go__msg__Res__Sequence * lhs, const unitree_go__msg__Res__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!unitree_go__msg__Res__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +unitree_go__msg__Res__Sequence__copy( + const unitree_go__msg__Res__Sequence * input, + unitree_go__msg__Res__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(unitree_go__msg__Res); + unitree_go__msg__Res * data = + (unitree_go__msg__Res *)realloc(output->data, allocation_size); + if (!data) { + return false; + } + for (size_t i = output->capacity; i < input->size; ++i) { + if (!unitree_go__msg__Res__init(&data[i])) { + /* free currently allocated and return false */ + for (; i-- > output->capacity; ) { + unitree_go__msg__Res__fini(&data[i]); + } + free(data); + return false; + } + } + output->data = data; + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!unitree_go__msg__Res__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__functions.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__functions.h new file mode 100644 index 0000000..81fddbe --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from unitree_go:msg/Res.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__RES__FUNCTIONS_H_ +#define UNITREE_GO__MSG__DETAIL__RES__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#include "unitree_go/msg/detail/res__struct.h" + +/// Initialize msg/Res message. +/** + * If the init function is called twice for the same message without + * calling fini inbetween previously allocated memory will be leaked. + * \param[in,out] msg The previously allocated message pointer. + * Fields without a default value will not be initialized by this function. + * You might want to call memset(msg, 0, sizeof( + * unitree_go__msg__Res + * )) before or use + * unitree_go__msg__Res__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__Res__init(unitree_go__msg__Res * msg); + +/// Finalize msg/Res message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__Res__fini(unitree_go__msg__Res * msg); + +/// Create msg/Res message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * unitree_go__msg__Res__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__Res * +unitree_go__msg__Res__create(); + +/// Destroy msg/Res message. +/** + * It calls + * unitree_go__msg__Res__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__Res__destroy(unitree_go__msg__Res * msg); + +/// Check for msg/Res message equality. +/** + * \param[in] lhs The message on the left hand size of the equality operator. + * \param[in] rhs The message on the right hand size of the equality operator. + * \return true if messages are equal, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__Res__are_equal(const unitree_go__msg__Res * lhs, const unitree_go__msg__Res * rhs); + +/// Copy a msg/Res message. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source message pointer. + * \param[out] output The target message pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer is null + * or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__Res__copy( + const unitree_go__msg__Res * input, + unitree_go__msg__Res * output); + +/// Initialize array of msg/Res messages. +/** + * It allocates the memory for the number of elements and calls + * unitree_go__msg__Res__init() + * for each element of the array. + * \param[in,out] array The allocated array pointer. + * \param[in] size The size / capacity of the array. + * \return true if initialization was successful, otherwise false + * If the array pointer is valid and the size is zero it is guaranteed + # to return true. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__Res__Sequence__init(unitree_go__msg__Res__Sequence * array, size_t size); + +/// Finalize array of msg/Res messages. +/** + * It calls + * unitree_go__msg__Res__fini() + * for each element of the array and frees the memory for the number of + * elements. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__Res__Sequence__fini(unitree_go__msg__Res__Sequence * array); + +/// Create array of msg/Res messages. +/** + * It allocates the memory for the array and calls + * unitree_go__msg__Res__Sequence__init(). + * \param[in] size The size / capacity of the array. + * \return The pointer to the initialized array if successful, otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__Res__Sequence * +unitree_go__msg__Res__Sequence__create(size_t size); + +/// Destroy array of msg/Res messages. +/** + * It calls + * unitree_go__msg__Res__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__Res__Sequence__destroy(unitree_go__msg__Res__Sequence * array); + +/// Check for msg/Res message array equality. +/** + * \param[in] lhs The message array on the left hand size of the equality operator. + * \param[in] rhs The message array on the right hand size of the equality operator. + * \return true if message arrays are equal in size and content, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__Res__Sequence__are_equal(const unitree_go__msg__Res__Sequence * lhs, const unitree_go__msg__Res__Sequence * rhs); + +/// Copy an array of msg/Res messages. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source array pointer. + * \param[out] output The target array pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer + * is null or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__Res__Sequence__copy( + const unitree_go__msg__Res__Sequence * input, + unitree_go__msg__Res__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__RES__FUNCTIONS_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__rosidl_typesupport_fastrtps_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 0000000..40ae30f --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,36 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from unitree_go:msg/Res.idl +// generated code does not contain a copyright notice +#ifndef UNITREE_GO__MSG__DETAIL__RES__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define UNITREE_GO__MSG__DETAIL__RES__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t get_serialized_size_unitree_go__msg__Res( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t max_serialized_size_unitree_go__msg__Res( + bool & full_bounded, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, unitree_go, msg, Res)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__RES__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__rosidl_typesupport_fastrtps_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 0000000..eacf6e5 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,79 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from unitree_go:msg/Res.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__RES__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__RES__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "unitree_go/msg/detail/res__struct.hpp" + +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-parameter" +# ifdef __clang__ +# pragma clang diagnostic ignored "-Wdeprecated-register" +# pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +# endif +#endif +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif + +#include "fastcdr/Cdr.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_serialize( + const unitree_go::msg::Res & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + unitree_go::msg::Res & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +get_serialized_size( + const unitree_go::msg::Res & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +max_serialized_size_Res( + bool & full_bounded, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace unitree_go + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, unitree_go, msg, Res)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__RES__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__rosidl_typesupport_introspection_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__rosidl_typesupport_introspection_c.h new file mode 100644 index 0000000..a4af5bd --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from unitree_go:msg/Res.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__RES__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define UNITREE_GO__MSG__DETAIL__RES__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, Res)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__RES__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__rosidl_typesupport_introspection_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 0000000..d3e3967 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from unitree_go:msg/Res.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__RES__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__RES__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +// TODO(dirk-thomas) these visibility macros should be message package specific +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, Res)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__RES__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__struct.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__struct.h new file mode 100644 index 0000000..ac3ce4b --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__struct.h @@ -0,0 +1,49 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from unitree_go:msg/Res.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__RES__STRUCT_H_ +#define UNITREE_GO__MSG__DETAIL__RES__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'uuid' +// Member 'body' +#include "rosidl_runtime_c/string.h" +// Member 'data' +#include "rosidl_runtime_c/primitives_sequence.h" + +// Struct defined in msg/Res in the package unitree_go. +typedef struct unitree_go__msg__Res +{ + rosidl_runtime_c__String uuid; + rosidl_runtime_c__uint8__Sequence data; + rosidl_runtime_c__String body; +} unitree_go__msg__Res; + +// Struct for a sequence of unitree_go__msg__Res. +typedef struct unitree_go__msg__Res__Sequence +{ + unitree_go__msg__Res * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} unitree_go__msg__Res__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__RES__STRUCT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__struct.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__struct.hpp new file mode 100644 index 0000000..6b17a00 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__struct.hpp @@ -0,0 +1,157 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from unitree_go:msg/Res.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__RES__STRUCT_HPP_ +#define UNITREE_GO__MSG__DETAIL__RES__STRUCT_HPP_ + +#include +#include +#include +#include +#include +#include +#include + + +#ifndef _WIN32 +# define DEPRECATED__unitree_go__msg__Res __attribute__((deprecated)) +#else +# define DEPRECATED__unitree_go__msg__Res __declspec(deprecated) +#endif + +namespace unitree_go +{ + +namespace msg +{ + +// message struct +template +struct Res_ +{ + using Type = Res_; + + explicit Res_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->uuid = ""; + this->body = ""; + } + } + + explicit Res_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : uuid(_alloc), + body(_alloc) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->uuid = ""; + this->body = ""; + } + } + + // field types and members + using _uuid_type = + std::basic_string, typename ContainerAllocator::template rebind::other>; + _uuid_type uuid; + using _data_type = + std::vector::other>; + _data_type data; + using _body_type = + std::basic_string, typename ContainerAllocator::template rebind::other>; + _body_type body; + + // setters for named parameter idiom + Type & set__uuid( + const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + { + this->uuid = _arg; + return *this; + } + Type & set__data( + const std::vector::other> & _arg) + { + this->data = _arg; + return *this; + } + Type & set__body( + const std::basic_string, typename ContainerAllocator::template rebind::other> & _arg) + { + this->body = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + unitree_go::msg::Res_ *; + using ConstRawPtr = + const unitree_go::msg::Res_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr const>; + + // pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead + // NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly + typedef DEPRECATED__unitree_go__msg__Res + std::shared_ptr> + Ptr; + typedef DEPRECATED__unitree_go__msg__Res + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const Res_ & other) const + { + if (this->uuid != other.uuid) { + return false; + } + if (this->data != other.data) { + return false; + } + if (this->body != other.body) { + return false; + } + return true; + } + bool operator!=(const Res_ & other) const + { + return !this->operator==(other); + } +}; // struct Res_ + +// alias to use template instance with default allocator +using Res = + unitree_go::msg::Res_>; + +// constant definitions + +} // namespace msg + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__RES__STRUCT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__traits.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__traits.hpp new file mode 100644 index 0000000..f75a121 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__traits.hpp @@ -0,0 +1,42 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from unitree_go:msg/Res.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__RES__TRAITS_HPP_ +#define UNITREE_GO__MSG__DETAIL__RES__TRAITS_HPP_ + +#include "unitree_go/msg/detail/res__struct.hpp" +#include +#include +#include + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "unitree_go::msg::Res"; +} + +template<> +inline const char * name() +{ + return "unitree_go/msg/Res"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UNITREE_GO__MSG__DETAIL__RES__TRAITS_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__type_support.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__type_support.c new file mode 100644 index 0000000..bec88c1 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__type_support.c @@ -0,0 +1,118 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from unitree_go:msg/Res.idl +// generated code does not contain a copyright notice + +#include +#include "unitree_go/msg/detail/res__rosidl_typesupport_introspection_c.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" +#include "rosidl_typesupport_introspection_c/field_types.h" +#include "rosidl_typesupport_introspection_c/identifier.h" +#include "rosidl_typesupport_introspection_c/message_introspection.h" +#include "unitree_go/msg/detail/res__functions.h" +#include "unitree_go/msg/detail/res__struct.h" + + +// Include directives for member types +// Member `uuid` +// Member `body` +#include "rosidl_runtime_c/string_functions.h" +// Member `data` +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void Res__rosidl_typesupport_introspection_c__Res_init_function( + void * message_memory, enum rosidl_runtime_c__message_initialization _init) +{ + // TODO(karsten1987): initializers are not yet implemented for typesupport c + // see https://github.com/ros2/ros2/issues/397 + (void) _init; + unitree_go__msg__Res__init(message_memory); +} + +void Res__rosidl_typesupport_introspection_c__Res_fini_function(void * message_memory) +{ + unitree_go__msg__Res__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember Res__rosidl_typesupport_introspection_c__Res_message_member_array[3] = { + { + "uuid", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__Res, uuid), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "data", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__Res, data), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "body", // name + rosidl_typesupport_introspection_c__ROS_TYPE_STRING, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__Res, body), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers Res__rosidl_typesupport_introspection_c__Res_message_members = { + "unitree_go__msg", // message namespace + "Res", // message name + 3, // number of fields + sizeof(unitree_go__msg__Res), + Res__rosidl_typesupport_introspection_c__Res_message_member_array, // message members + Res__rosidl_typesupport_introspection_c__Res_init_function, // function to initialize message memory (memory has to be allocated) + Res__rosidl_typesupport_introspection_c__Res_fini_function // function to terminate message instance (will not free memory) +}; + +// this is not const since it must be initialized on first access +// since C does not allow non-integral compile-time constants +static rosidl_message_type_support_t Res__rosidl_typesupport_introspection_c__Res_message_type_support_handle = { + 0, + &Res__rosidl_typesupport_introspection_c__Res_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, Res)() { + if (!Res__rosidl_typesupport_introspection_c__Res_message_type_support_handle.typesupport_identifier) { + Res__rosidl_typesupport_introspection_c__Res_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &Res__rosidl_typesupport_introspection_c__Res_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__type_support.cpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__type_support.cpp new file mode 100644 index 0000000..e489ff8 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__type_support.cpp @@ -0,0 +1,164 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from unitree_go:msg/Res.idl +// generated code does not contain a copyright notice + +#include "array" +#include "cstddef" +#include "string" +#include "vector" +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_cpp/message_type_support.hpp" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/detail/res__struct.hpp" +#include "rosidl_typesupport_introspection_cpp/field_types.hpp" +#include "rosidl_typesupport_introspection_cpp/identifier.hpp" +#include "rosidl_typesupport_introspection_cpp/message_introspection.hpp" +#include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void Res_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) unitree_go::msg::Res(_init); +} + +void Res_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~Res(); +} + +size_t size_function__Res__data(const void * untyped_member) +{ + const auto * member = reinterpret_cast *>(untyped_member); + return member->size(); +} + +const void * get_const_function__Res__data(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__Res__data(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void resize_function__Res__data(void * untyped_member, size_t size) +{ + auto * member = + reinterpret_cast *>(untyped_member); + member->resize(size); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember Res_message_member_array[3] = { + { + "uuid", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::Res, uuid), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "data", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::Res, data), // bytes offset in struct + nullptr, // default value + size_function__Res__data, // size() function pointer + get_const_function__Res__data, // get_const(index) function pointer + get_function__Res__data, // get(index) function pointer + resize_function__Res__data // resize(index) function pointer + }, + { + "body", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_STRING, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::Res, body), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers Res_message_members = { + "unitree_go::msg", // message namespace + "Res", // message name + 3, // number of fields + sizeof(unitree_go::msg::Res), + Res_message_member_array, // message members + Res_init_function, // function to initialize message memory (memory has to be allocated) + Res_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t Res_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &Res_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace unitree_go + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::Res_message_type_support_handle; +} + +} // namespace rosidl_typesupport_introspection_cpp + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, Res)() { + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::Res_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__type_support.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__type_support.h new file mode 100644 index 0000000..cdc5a32 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from unitree_go:msg/Res.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__RES__TYPE_SUPPORT_H_ +#define UNITREE_GO__MSG__DETAIL__RES__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rosidl_runtime_c/message_type_support_struct.h" + +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + unitree_go, + msg, + Res +)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__RES__TYPE_SUPPORT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__type_support.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__type_support.hpp new file mode 100644 index 0000000..910817b --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/res__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from unitree_go:msg/Res.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__RES__TYPE_SUPPORT_HPP_ +#define UNITREE_GO__MSG__DETAIL__RES__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_cpp__visibility_control.hpp" + +#include "rosidl_typesupport_cpp/message_type_support.hpp" + +#ifdef __cplusplus +extern "C" +{ +#endif +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + unitree_go, + msg, + Res +)(); +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__RES__TYPE_SUPPORT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__builder.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__builder.hpp new file mode 100644 index 0000000..1763725 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__builder.hpp @@ -0,0 +1,215 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from unitree_go:msg/SportModeCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__SPORT_MODE_CMD__BUILDER_HPP_ +#define UNITREE_GO__MSG__DETAIL__SPORT_MODE_CMD__BUILDER_HPP_ + +#include "unitree_go/msg/detail/sport_mode_cmd__struct.hpp" +#include +#include +#include + + +namespace unitree_go +{ + +namespace msg +{ + +namespace builder +{ + +class Init_SportModeCmd_path_point +{ +public: + explicit Init_SportModeCmd_path_point(::unitree_go::msg::SportModeCmd & msg) + : msg_(msg) + {} + ::unitree_go::msg::SportModeCmd path_point(::unitree_go::msg::SportModeCmd::_path_point_type arg) + { + msg_.path_point = std::move(arg); + return std::move(msg_); + } + +private: + ::unitree_go::msg::SportModeCmd msg_; +}; + +class Init_SportModeCmd_bms_cmd +{ +public: + explicit Init_SportModeCmd_bms_cmd(::unitree_go::msg::SportModeCmd & msg) + : msg_(msg) + {} + Init_SportModeCmd_path_point bms_cmd(::unitree_go::msg::SportModeCmd::_bms_cmd_type arg) + { + msg_.bms_cmd = std::move(arg); + return Init_SportModeCmd_path_point(msg_); + } + +private: + ::unitree_go::msg::SportModeCmd msg_; +}; + +class Init_SportModeCmd_yaw_speed +{ +public: + explicit Init_SportModeCmd_yaw_speed(::unitree_go::msg::SportModeCmd & msg) + : msg_(msg) + {} + Init_SportModeCmd_bms_cmd yaw_speed(::unitree_go::msg::SportModeCmd::_yaw_speed_type arg) + { + msg_.yaw_speed = std::move(arg); + return Init_SportModeCmd_bms_cmd(msg_); + } + +private: + ::unitree_go::msg::SportModeCmd msg_; +}; + +class Init_SportModeCmd_velocity +{ +public: + explicit Init_SportModeCmd_velocity(::unitree_go::msg::SportModeCmd & msg) + : msg_(msg) + {} + Init_SportModeCmd_yaw_speed velocity(::unitree_go::msg::SportModeCmd::_velocity_type arg) + { + msg_.velocity = std::move(arg); + return Init_SportModeCmd_yaw_speed(msg_); + } + +private: + ::unitree_go::msg::SportModeCmd msg_; +}; + +class Init_SportModeCmd_euler +{ +public: + explicit Init_SportModeCmd_euler(::unitree_go::msg::SportModeCmd & msg) + : msg_(msg) + {} + Init_SportModeCmd_velocity euler(::unitree_go::msg::SportModeCmd::_euler_type arg) + { + msg_.euler = std::move(arg); + return Init_SportModeCmd_velocity(msg_); + } + +private: + ::unitree_go::msg::SportModeCmd msg_; +}; + +class Init_SportModeCmd_position +{ +public: + explicit Init_SportModeCmd_position(::unitree_go::msg::SportModeCmd & msg) + : msg_(msg) + {} + Init_SportModeCmd_euler position(::unitree_go::msg::SportModeCmd::_position_type arg) + { + msg_.position = std::move(arg); + return Init_SportModeCmd_euler(msg_); + } + +private: + ::unitree_go::msg::SportModeCmd msg_; +}; + +class Init_SportModeCmd_body_height +{ +public: + explicit Init_SportModeCmd_body_height(::unitree_go::msg::SportModeCmd & msg) + : msg_(msg) + {} + Init_SportModeCmd_position body_height(::unitree_go::msg::SportModeCmd::_body_height_type arg) + { + msg_.body_height = std::move(arg); + return Init_SportModeCmd_position(msg_); + } + +private: + ::unitree_go::msg::SportModeCmd msg_; +}; + +class Init_SportModeCmd_foot_raise_height +{ +public: + explicit Init_SportModeCmd_foot_raise_height(::unitree_go::msg::SportModeCmd & msg) + : msg_(msg) + {} + Init_SportModeCmd_body_height foot_raise_height(::unitree_go::msg::SportModeCmd::_foot_raise_height_type arg) + { + msg_.foot_raise_height = std::move(arg); + return Init_SportModeCmd_body_height(msg_); + } + +private: + ::unitree_go::msg::SportModeCmd msg_; +}; + +class Init_SportModeCmd_speed_level +{ +public: + explicit Init_SportModeCmd_speed_level(::unitree_go::msg::SportModeCmd & msg) + : msg_(msg) + {} + Init_SportModeCmd_foot_raise_height speed_level(::unitree_go::msg::SportModeCmd::_speed_level_type arg) + { + msg_.speed_level = std::move(arg); + return Init_SportModeCmd_foot_raise_height(msg_); + } + +private: + ::unitree_go::msg::SportModeCmd msg_; +}; + +class Init_SportModeCmd_gait_type +{ +public: + explicit Init_SportModeCmd_gait_type(::unitree_go::msg::SportModeCmd & msg) + : msg_(msg) + {} + Init_SportModeCmd_speed_level gait_type(::unitree_go::msg::SportModeCmd::_gait_type_type arg) + { + msg_.gait_type = std::move(arg); + return Init_SportModeCmd_speed_level(msg_); + } + +private: + ::unitree_go::msg::SportModeCmd msg_; +}; + +class Init_SportModeCmd_mode +{ +public: + Init_SportModeCmd_mode() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_SportModeCmd_gait_type mode(::unitree_go::msg::SportModeCmd::_mode_type arg) + { + msg_.mode = std::move(arg); + return Init_SportModeCmd_gait_type(msg_); + } + +private: + ::unitree_go::msg::SportModeCmd msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::unitree_go::msg::SportModeCmd>() +{ + return unitree_go::msg::builder::Init_SportModeCmd_mode(); +} + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__SPORT_MODE_CMD__BUILDER_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__functions.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__functions.c new file mode 100644 index 0000000..9f72fd6 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__functions.c @@ -0,0 +1,359 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from unitree_go:msg/SportModeCmd.idl +// generated code does not contain a copyright notice +#include "unitree_go/msg/detail/sport_mode_cmd__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `bms_cmd` +#include "unitree_go/msg/detail/bms_cmd__functions.h" +// Member `path_point` +#include "unitree_go/msg/detail/path_point__functions.h" + +bool +unitree_go__msg__SportModeCmd__init(unitree_go__msg__SportModeCmd * msg) +{ + if (!msg) { + return false; + } + // mode + // gait_type + // speed_level + // foot_raise_height + // body_height + // position + // euler + // velocity + // yaw_speed + // bms_cmd + if (!unitree_go__msg__BmsCmd__init(&msg->bms_cmd)) { + unitree_go__msg__SportModeCmd__fini(msg); + return false; + } + // path_point + for (size_t i = 0; i < 30; ++i) { + if (!unitree_go__msg__PathPoint__init(&msg->path_point[i])) { + unitree_go__msg__SportModeCmd__fini(msg); + return false; + } + } + return true; +} + +void +unitree_go__msg__SportModeCmd__fini(unitree_go__msg__SportModeCmd * msg) +{ + if (!msg) { + return; + } + // mode + // gait_type + // speed_level + // foot_raise_height + // body_height + // position + // euler + // velocity + // yaw_speed + // bms_cmd + unitree_go__msg__BmsCmd__fini(&msg->bms_cmd); + // path_point + for (size_t i = 0; i < 30; ++i) { + unitree_go__msg__PathPoint__fini(&msg->path_point[i]); + } +} + +bool +unitree_go__msg__SportModeCmd__are_equal(const unitree_go__msg__SportModeCmd * lhs, const unitree_go__msg__SportModeCmd * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // mode + if (lhs->mode != rhs->mode) { + return false; + } + // gait_type + if (lhs->gait_type != rhs->gait_type) { + return false; + } + // speed_level + if (lhs->speed_level != rhs->speed_level) { + return false; + } + // foot_raise_height + if (lhs->foot_raise_height != rhs->foot_raise_height) { + return false; + } + // body_height + if (lhs->body_height != rhs->body_height) { + return false; + } + // position + for (size_t i = 0; i < 2; ++i) { + if (lhs->position[i] != rhs->position[i]) { + return false; + } + } + // euler + for (size_t i = 0; i < 3; ++i) { + if (lhs->euler[i] != rhs->euler[i]) { + return false; + } + } + // velocity + for (size_t i = 0; i < 2; ++i) { + if (lhs->velocity[i] != rhs->velocity[i]) { + return false; + } + } + // yaw_speed + if (lhs->yaw_speed != rhs->yaw_speed) { + return false; + } + // bms_cmd + if (!unitree_go__msg__BmsCmd__are_equal( + &(lhs->bms_cmd), &(rhs->bms_cmd))) + { + return false; + } + // path_point + for (size_t i = 0; i < 30; ++i) { + if (!unitree_go__msg__PathPoint__are_equal( + &(lhs->path_point[i]), &(rhs->path_point[i]))) + { + return false; + } + } + return true; +} + +bool +unitree_go__msg__SportModeCmd__copy( + const unitree_go__msg__SportModeCmd * input, + unitree_go__msg__SportModeCmd * output) +{ + if (!input || !output) { + return false; + } + // mode + output->mode = input->mode; + // gait_type + output->gait_type = input->gait_type; + // speed_level + output->speed_level = input->speed_level; + // foot_raise_height + output->foot_raise_height = input->foot_raise_height; + // body_height + output->body_height = input->body_height; + // position + for (size_t i = 0; i < 2; ++i) { + output->position[i] = input->position[i]; + } + // euler + for (size_t i = 0; i < 3; ++i) { + output->euler[i] = input->euler[i]; + } + // velocity + for (size_t i = 0; i < 2; ++i) { + output->velocity[i] = input->velocity[i]; + } + // yaw_speed + output->yaw_speed = input->yaw_speed; + // bms_cmd + if (!unitree_go__msg__BmsCmd__copy( + &(input->bms_cmd), &(output->bms_cmd))) + { + return false; + } + // path_point + for (size_t i = 0; i < 30; ++i) { + if (!unitree_go__msg__PathPoint__copy( + &(input->path_point[i]), &(output->path_point[i]))) + { + return false; + } + } + return true; +} + +unitree_go__msg__SportModeCmd * +unitree_go__msg__SportModeCmd__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__SportModeCmd * msg = (unitree_go__msg__SportModeCmd *)allocator.allocate(sizeof(unitree_go__msg__SportModeCmd), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(unitree_go__msg__SportModeCmd)); + bool success = unitree_go__msg__SportModeCmd__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +unitree_go__msg__SportModeCmd__destroy(unitree_go__msg__SportModeCmd * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + unitree_go__msg__SportModeCmd__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +unitree_go__msg__SportModeCmd__Sequence__init(unitree_go__msg__SportModeCmd__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__SportModeCmd * data = NULL; + + if (size) { + data = (unitree_go__msg__SportModeCmd *)allocator.zero_allocate(size, sizeof(unitree_go__msg__SportModeCmd), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = unitree_go__msg__SportModeCmd__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + unitree_go__msg__SportModeCmd__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +unitree_go__msg__SportModeCmd__Sequence__fini(unitree_go__msg__SportModeCmd__Sequence * array) +{ + if (!array) { + return; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + + if (array->data) { + // ensure that data and capacity values are consistent + assert(array->capacity > 0); + // finalize all array elements + for (size_t i = 0; i < array->capacity; ++i) { + unitree_go__msg__SportModeCmd__fini(&array->data[i]); + } + allocator.deallocate(array->data, allocator.state); + array->data = NULL; + array->size = 0; + array->capacity = 0; + } else { + // ensure that data, size, and capacity values are consistent + assert(0 == array->size); + assert(0 == array->capacity); + } +} + +unitree_go__msg__SportModeCmd__Sequence * +unitree_go__msg__SportModeCmd__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__SportModeCmd__Sequence * array = (unitree_go__msg__SportModeCmd__Sequence *)allocator.allocate(sizeof(unitree_go__msg__SportModeCmd__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = unitree_go__msg__SportModeCmd__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +unitree_go__msg__SportModeCmd__Sequence__destroy(unitree_go__msg__SportModeCmd__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + unitree_go__msg__SportModeCmd__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +unitree_go__msg__SportModeCmd__Sequence__are_equal(const unitree_go__msg__SportModeCmd__Sequence * lhs, const unitree_go__msg__SportModeCmd__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!unitree_go__msg__SportModeCmd__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +unitree_go__msg__SportModeCmd__Sequence__copy( + const unitree_go__msg__SportModeCmd__Sequence * input, + unitree_go__msg__SportModeCmd__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(unitree_go__msg__SportModeCmd); + unitree_go__msg__SportModeCmd * data = + (unitree_go__msg__SportModeCmd *)realloc(output->data, allocation_size); + if (!data) { + return false; + } + for (size_t i = output->capacity; i < input->size; ++i) { + if (!unitree_go__msg__SportModeCmd__init(&data[i])) { + /* free currently allocated and return false */ + for (; i-- > output->capacity; ) { + unitree_go__msg__SportModeCmd__fini(&data[i]); + } + free(data); + return false; + } + } + output->data = data; + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!unitree_go__msg__SportModeCmd__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__functions.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__functions.h new file mode 100644 index 0000000..d8208f1 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from unitree_go:msg/SportModeCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__SPORT_MODE_CMD__FUNCTIONS_H_ +#define UNITREE_GO__MSG__DETAIL__SPORT_MODE_CMD__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#include "unitree_go/msg/detail/sport_mode_cmd__struct.h" + +/// Initialize msg/SportModeCmd message. +/** + * If the init function is called twice for the same message without + * calling fini inbetween previously allocated memory will be leaked. + * \param[in,out] msg The previously allocated message pointer. + * Fields without a default value will not be initialized by this function. + * You might want to call memset(msg, 0, sizeof( + * unitree_go__msg__SportModeCmd + * )) before or use + * unitree_go__msg__SportModeCmd__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__SportModeCmd__init(unitree_go__msg__SportModeCmd * msg); + +/// Finalize msg/SportModeCmd message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__SportModeCmd__fini(unitree_go__msg__SportModeCmd * msg); + +/// Create msg/SportModeCmd message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * unitree_go__msg__SportModeCmd__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__SportModeCmd * +unitree_go__msg__SportModeCmd__create(); + +/// Destroy msg/SportModeCmd message. +/** + * It calls + * unitree_go__msg__SportModeCmd__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__SportModeCmd__destroy(unitree_go__msg__SportModeCmd * msg); + +/// Check for msg/SportModeCmd message equality. +/** + * \param[in] lhs The message on the left hand size of the equality operator. + * \param[in] rhs The message on the right hand size of the equality operator. + * \return true if messages are equal, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__SportModeCmd__are_equal(const unitree_go__msg__SportModeCmd * lhs, const unitree_go__msg__SportModeCmd * rhs); + +/// Copy a msg/SportModeCmd message. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source message pointer. + * \param[out] output The target message pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer is null + * or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__SportModeCmd__copy( + const unitree_go__msg__SportModeCmd * input, + unitree_go__msg__SportModeCmd * output); + +/// Initialize array of msg/SportModeCmd messages. +/** + * It allocates the memory for the number of elements and calls + * unitree_go__msg__SportModeCmd__init() + * for each element of the array. + * \param[in,out] array The allocated array pointer. + * \param[in] size The size / capacity of the array. + * \return true if initialization was successful, otherwise false + * If the array pointer is valid and the size is zero it is guaranteed + # to return true. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__SportModeCmd__Sequence__init(unitree_go__msg__SportModeCmd__Sequence * array, size_t size); + +/// Finalize array of msg/SportModeCmd messages. +/** + * It calls + * unitree_go__msg__SportModeCmd__fini() + * for each element of the array and frees the memory for the number of + * elements. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__SportModeCmd__Sequence__fini(unitree_go__msg__SportModeCmd__Sequence * array); + +/// Create array of msg/SportModeCmd messages. +/** + * It allocates the memory for the array and calls + * unitree_go__msg__SportModeCmd__Sequence__init(). + * \param[in] size The size / capacity of the array. + * \return The pointer to the initialized array if successful, otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__SportModeCmd__Sequence * +unitree_go__msg__SportModeCmd__Sequence__create(size_t size); + +/// Destroy array of msg/SportModeCmd messages. +/** + * It calls + * unitree_go__msg__SportModeCmd__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__SportModeCmd__Sequence__destroy(unitree_go__msg__SportModeCmd__Sequence * array); + +/// Check for msg/SportModeCmd message array equality. +/** + * \param[in] lhs The message array on the left hand size of the equality operator. + * \param[in] rhs The message array on the right hand size of the equality operator. + * \return true if message arrays are equal in size and content, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__SportModeCmd__Sequence__are_equal(const unitree_go__msg__SportModeCmd__Sequence * lhs, const unitree_go__msg__SportModeCmd__Sequence * rhs); + +/// Copy an array of msg/SportModeCmd messages. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source array pointer. + * \param[out] output The target array pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer + * is null or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__SportModeCmd__Sequence__copy( + const unitree_go__msg__SportModeCmd__Sequence * input, + unitree_go__msg__SportModeCmd__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__SPORT_MODE_CMD__FUNCTIONS_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__rosidl_typesupport_fastrtps_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 0000000..d0dd1a6 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,36 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from unitree_go:msg/SportModeCmd.idl +// generated code does not contain a copyright notice +#ifndef UNITREE_GO__MSG__DETAIL__SPORT_MODE_CMD__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define UNITREE_GO__MSG__DETAIL__SPORT_MODE_CMD__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t get_serialized_size_unitree_go__msg__SportModeCmd( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t max_serialized_size_unitree_go__msg__SportModeCmd( + bool & full_bounded, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, unitree_go, msg, SportModeCmd)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__SPORT_MODE_CMD__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__rosidl_typesupport_fastrtps_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 0000000..e7ba0cc --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,79 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from unitree_go:msg/SportModeCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__SPORT_MODE_CMD__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__SPORT_MODE_CMD__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "unitree_go/msg/detail/sport_mode_cmd__struct.hpp" + +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-parameter" +# ifdef __clang__ +# pragma clang diagnostic ignored "-Wdeprecated-register" +# pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +# endif +#endif +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif + +#include "fastcdr/Cdr.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_serialize( + const unitree_go::msg::SportModeCmd & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + unitree_go::msg::SportModeCmd & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +get_serialized_size( + const unitree_go::msg::SportModeCmd & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +max_serialized_size_SportModeCmd( + bool & full_bounded, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace unitree_go + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, unitree_go, msg, SportModeCmd)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__SPORT_MODE_CMD__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__rosidl_typesupport_introspection_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__rosidl_typesupport_introspection_c.h new file mode 100644 index 0000000..9a221af --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from unitree_go:msg/SportModeCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__SPORT_MODE_CMD__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define UNITREE_GO__MSG__DETAIL__SPORT_MODE_CMD__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, SportModeCmd)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__SPORT_MODE_CMD__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__rosidl_typesupport_introspection_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 0000000..4c17d5f --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from unitree_go:msg/SportModeCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__SPORT_MODE_CMD__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__SPORT_MODE_CMD__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +// TODO(dirk-thomas) these visibility macros should be message package specific +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, SportModeCmd)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__SPORT_MODE_CMD__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__struct.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__struct.h new file mode 100644 index 0000000..94d8bb7 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__struct.h @@ -0,0 +1,56 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from unitree_go:msg/SportModeCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__SPORT_MODE_CMD__STRUCT_H_ +#define UNITREE_GO__MSG__DETAIL__SPORT_MODE_CMD__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'bms_cmd' +#include "unitree_go/msg/detail/bms_cmd__struct.h" +// Member 'path_point' +#include "unitree_go/msg/detail/path_point__struct.h" + +// Struct defined in msg/SportModeCmd in the package unitree_go. +typedef struct unitree_go__msg__SportModeCmd +{ + uint8_t mode; + uint8_t gait_type; + uint8_t speed_level; + float foot_raise_height; + float body_height; + float position[2]; + float euler[3]; + float velocity[2]; + float yaw_speed; + unitree_go__msg__BmsCmd bms_cmd; + unitree_go__msg__PathPoint path_point[30]; +} unitree_go__msg__SportModeCmd; + +// Struct for a sequence of unitree_go__msg__SportModeCmd. +typedef struct unitree_go__msg__SportModeCmd__Sequence +{ + unitree_go__msg__SportModeCmd * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} unitree_go__msg__SportModeCmd__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__SPORT_MODE_CMD__STRUCT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__struct.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__struct.hpp new file mode 100644 index 0000000..7c92570 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__struct.hpp @@ -0,0 +1,279 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from unitree_go:msg/SportModeCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__SPORT_MODE_CMD__STRUCT_HPP_ +#define UNITREE_GO__MSG__DETAIL__SPORT_MODE_CMD__STRUCT_HPP_ + +#include +#include +#include +#include +#include +#include +#include + + +// Include directives for member types +// Member 'bms_cmd' +#include "unitree_go/msg/detail/bms_cmd__struct.hpp" +// Member 'path_point' +#include "unitree_go/msg/detail/path_point__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__unitree_go__msg__SportModeCmd __attribute__((deprecated)) +#else +# define DEPRECATED__unitree_go__msg__SportModeCmd __declspec(deprecated) +#endif + +namespace unitree_go +{ + +namespace msg +{ + +// message struct +template +struct SportModeCmd_ +{ + using Type = SportModeCmd_; + + explicit SportModeCmd_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : bms_cmd(_init) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->mode = 0; + this->gait_type = 0; + this->speed_level = 0; + this->foot_raise_height = 0.0f; + this->body_height = 0.0f; + std::fill::iterator, float>(this->position.begin(), this->position.end(), 0.0f); + std::fill::iterator, float>(this->euler.begin(), this->euler.end(), 0.0f); + std::fill::iterator, float>(this->velocity.begin(), this->velocity.end(), 0.0f); + this->yaw_speed = 0.0f; + this->path_point.fill(unitree_go::msg::PathPoint_{_init}); + } + } + + explicit SportModeCmd_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : position(_alloc), + euler(_alloc), + velocity(_alloc), + bms_cmd(_alloc, _init), + path_point(_alloc) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->mode = 0; + this->gait_type = 0; + this->speed_level = 0; + this->foot_raise_height = 0.0f; + this->body_height = 0.0f; + std::fill::iterator, float>(this->position.begin(), this->position.end(), 0.0f); + std::fill::iterator, float>(this->euler.begin(), this->euler.end(), 0.0f); + std::fill::iterator, float>(this->velocity.begin(), this->velocity.end(), 0.0f); + this->yaw_speed = 0.0f; + this->path_point.fill(unitree_go::msg::PathPoint_{_alloc, _init}); + } + } + + // field types and members + using _mode_type = + uint8_t; + _mode_type mode; + using _gait_type_type = + uint8_t; + _gait_type_type gait_type; + using _speed_level_type = + uint8_t; + _speed_level_type speed_level; + using _foot_raise_height_type = + float; + _foot_raise_height_type foot_raise_height; + using _body_height_type = + float; + _body_height_type body_height; + using _position_type = + std::array; + _position_type position; + using _euler_type = + std::array; + _euler_type euler; + using _velocity_type = + std::array; + _velocity_type velocity; + using _yaw_speed_type = + float; + _yaw_speed_type yaw_speed; + using _bms_cmd_type = + unitree_go::msg::BmsCmd_; + _bms_cmd_type bms_cmd; + using _path_point_type = + std::array, 30>; + _path_point_type path_point; + + // setters for named parameter idiom + Type & set__mode( + const uint8_t & _arg) + { + this->mode = _arg; + return *this; + } + Type & set__gait_type( + const uint8_t & _arg) + { + this->gait_type = _arg; + return *this; + } + Type & set__speed_level( + const uint8_t & _arg) + { + this->speed_level = _arg; + return *this; + } + Type & set__foot_raise_height( + const float & _arg) + { + this->foot_raise_height = _arg; + return *this; + } + Type & set__body_height( + const float & _arg) + { + this->body_height = _arg; + return *this; + } + Type & set__position( + const std::array & _arg) + { + this->position = _arg; + return *this; + } + Type & set__euler( + const std::array & _arg) + { + this->euler = _arg; + return *this; + } + Type & set__velocity( + const std::array & _arg) + { + this->velocity = _arg; + return *this; + } + Type & set__yaw_speed( + const float & _arg) + { + this->yaw_speed = _arg; + return *this; + } + Type & set__bms_cmd( + const unitree_go::msg::BmsCmd_ & _arg) + { + this->bms_cmd = _arg; + return *this; + } + Type & set__path_point( + const std::array, 30> & _arg) + { + this->path_point = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + unitree_go::msg::SportModeCmd_ *; + using ConstRawPtr = + const unitree_go::msg::SportModeCmd_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr const>; + + // pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead + // NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly + typedef DEPRECATED__unitree_go__msg__SportModeCmd + std::shared_ptr> + Ptr; + typedef DEPRECATED__unitree_go__msg__SportModeCmd + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const SportModeCmd_ & other) const + { + if (this->mode != other.mode) { + return false; + } + if (this->gait_type != other.gait_type) { + return false; + } + if (this->speed_level != other.speed_level) { + return false; + } + if (this->foot_raise_height != other.foot_raise_height) { + return false; + } + if (this->body_height != other.body_height) { + return false; + } + if (this->position != other.position) { + return false; + } + if (this->euler != other.euler) { + return false; + } + if (this->velocity != other.velocity) { + return false; + } + if (this->yaw_speed != other.yaw_speed) { + return false; + } + if (this->bms_cmd != other.bms_cmd) { + return false; + } + if (this->path_point != other.path_point) { + return false; + } + return true; + } + bool operator!=(const SportModeCmd_ & other) const + { + return !this->operator==(other); + } +}; // struct SportModeCmd_ + +// alias to use template instance with default allocator +using SportModeCmd = + unitree_go::msg::SportModeCmd_>; + +// constant definitions + +} // namespace msg + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__SPORT_MODE_CMD__STRUCT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__traits.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__traits.hpp new file mode 100644 index 0000000..90843ed --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__traits.hpp @@ -0,0 +1,48 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from unitree_go:msg/SportModeCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__SPORT_MODE_CMD__TRAITS_HPP_ +#define UNITREE_GO__MSG__DETAIL__SPORT_MODE_CMD__TRAITS_HPP_ + +#include "unitree_go/msg/detail/sport_mode_cmd__struct.hpp" +#include +#include +#include + +// Include directives for member types +// Member 'bms_cmd' +#include "unitree_go/msg/detail/bms_cmd__traits.hpp" +// Member 'path_point' +#include "unitree_go/msg/detail/path_point__traits.hpp" + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "unitree_go::msg::SportModeCmd"; +} + +template<> +inline const char * name() +{ + return "unitree_go/msg/SportModeCmd"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value && has_fixed_size::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value && has_bounded_size::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UNITREE_GO__MSG__DETAIL__SPORT_MODE_CMD__TRAITS_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__type_support.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__type_support.c new file mode 100644 index 0000000..722d826 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__type_support.c @@ -0,0 +1,268 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from unitree_go:msg/SportModeCmd.idl +// generated code does not contain a copyright notice + +#include +#include "unitree_go/msg/detail/sport_mode_cmd__rosidl_typesupport_introspection_c.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" +#include "rosidl_typesupport_introspection_c/field_types.h" +#include "rosidl_typesupport_introspection_c/identifier.h" +#include "rosidl_typesupport_introspection_c/message_introspection.h" +#include "unitree_go/msg/detail/sport_mode_cmd__functions.h" +#include "unitree_go/msg/detail/sport_mode_cmd__struct.h" + + +// Include directives for member types +// Member `bms_cmd` +#include "unitree_go/msg/bms_cmd.h" +// Member `bms_cmd` +#include "unitree_go/msg/detail/bms_cmd__rosidl_typesupport_introspection_c.h" +// Member `path_point` +#include "unitree_go/msg/path_point.h" +// Member `path_point` +#include "unitree_go/msg/detail/path_point__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void SportModeCmd__rosidl_typesupport_introspection_c__SportModeCmd_init_function( + void * message_memory, enum rosidl_runtime_c__message_initialization _init) +{ + // TODO(karsten1987): initializers are not yet implemented for typesupport c + // see https://github.com/ros2/ros2/issues/397 + (void) _init; + unitree_go__msg__SportModeCmd__init(message_memory); +} + +void SportModeCmd__rosidl_typesupport_introspection_c__SportModeCmd_fini_function(void * message_memory) +{ + unitree_go__msg__SportModeCmd__fini(message_memory); +} + +size_t SportModeCmd__rosidl_typesupport_introspection_c__size_function__PathPoint__path_point( + const void * untyped_member) +{ + (void)untyped_member; + return 30; +} + +const void * SportModeCmd__rosidl_typesupport_introspection_c__get_const_function__PathPoint__path_point( + const void * untyped_member, size_t index) +{ + const unitree_go__msg__PathPoint ** member = + (const unitree_go__msg__PathPoint **)(untyped_member); + return &(*member)[index]; +} + +void * SportModeCmd__rosidl_typesupport_introspection_c__get_function__PathPoint__path_point( + void * untyped_member, size_t index) +{ + unitree_go__msg__PathPoint ** member = + (unitree_go__msg__PathPoint **)(untyped_member); + return &(*member)[index]; +} + +static rosidl_typesupport_introspection_c__MessageMember SportModeCmd__rosidl_typesupport_introspection_c__SportModeCmd_message_member_array[11] = { + { + "mode", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__SportModeCmd, mode), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "gait_type", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__SportModeCmd, gait_type), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "speed_level", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__SportModeCmd, speed_level), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "foot_raise_height", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__SportModeCmd, foot_raise_height), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "body_height", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__SportModeCmd, body_height), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "position", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 2, // array size + false, // is upper bound + offsetof(unitree_go__msg__SportModeCmd, position), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "euler", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 3, // array size + false, // is upper bound + offsetof(unitree_go__msg__SportModeCmd, euler), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "velocity", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 2, // array size + false, // is upper bound + offsetof(unitree_go__msg__SportModeCmd, velocity), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "yaw_speed", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__SportModeCmd, yaw_speed), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "bms_cmd", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__SportModeCmd, bms_cmd), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "path_point", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + true, // is array + 30, // array size + false, // is upper bound + offsetof(unitree_go__msg__SportModeCmd, path_point), // bytes offset in struct + NULL, // default value + SportModeCmd__rosidl_typesupport_introspection_c__size_function__PathPoint__path_point, // size() function pointer + SportModeCmd__rosidl_typesupport_introspection_c__get_const_function__PathPoint__path_point, // get_const(index) function pointer + SportModeCmd__rosidl_typesupport_introspection_c__get_function__PathPoint__path_point, // get(index) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers SportModeCmd__rosidl_typesupport_introspection_c__SportModeCmd_message_members = { + "unitree_go__msg", // message namespace + "SportModeCmd", // message name + 11, // number of fields + sizeof(unitree_go__msg__SportModeCmd), + SportModeCmd__rosidl_typesupport_introspection_c__SportModeCmd_message_member_array, // message members + SportModeCmd__rosidl_typesupport_introspection_c__SportModeCmd_init_function, // function to initialize message memory (memory has to be allocated) + SportModeCmd__rosidl_typesupport_introspection_c__SportModeCmd_fini_function // function to terminate message instance (will not free memory) +}; + +// this is not const since it must be initialized on first access +// since C does not allow non-integral compile-time constants +static rosidl_message_type_support_t SportModeCmd__rosidl_typesupport_introspection_c__SportModeCmd_message_type_support_handle = { + 0, + &SportModeCmd__rosidl_typesupport_introspection_c__SportModeCmd_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, SportModeCmd)() { + SportModeCmd__rosidl_typesupport_introspection_c__SportModeCmd_message_member_array[9].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, BmsCmd)(); + SportModeCmd__rosidl_typesupport_introspection_c__SportModeCmd_message_member_array[10].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, PathPoint)(); + if (!SportModeCmd__rosidl_typesupport_introspection_c__SportModeCmd_message_type_support_handle.typesupport_identifier) { + SportModeCmd__rosidl_typesupport_introspection_c__SportModeCmd_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &SportModeCmd__rosidl_typesupport_introspection_c__SportModeCmd_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__type_support.cpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__type_support.cpp new file mode 100644 index 0000000..6dbc31b --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__type_support.cpp @@ -0,0 +1,337 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from unitree_go:msg/SportModeCmd.idl +// generated code does not contain a copyright notice + +#include "array" +#include "cstddef" +#include "string" +#include "vector" +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_cpp/message_type_support.hpp" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/detail/sport_mode_cmd__struct.hpp" +#include "rosidl_typesupport_introspection_cpp/field_types.hpp" +#include "rosidl_typesupport_introspection_cpp/identifier.hpp" +#include "rosidl_typesupport_introspection_cpp/message_introspection.hpp" +#include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void SportModeCmd_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) unitree_go::msg::SportModeCmd(_init); +} + +void SportModeCmd_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~SportModeCmd(); +} + +size_t size_function__SportModeCmd__position(const void * untyped_member) +{ + (void)untyped_member; + return 2; +} + +const void * get_const_function__SportModeCmd__position(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__SportModeCmd__position(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +size_t size_function__SportModeCmd__euler(const void * untyped_member) +{ + (void)untyped_member; + return 3; +} + +const void * get_const_function__SportModeCmd__euler(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__SportModeCmd__euler(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +size_t size_function__SportModeCmd__velocity(const void * untyped_member) +{ + (void)untyped_member; + return 2; +} + +const void * get_const_function__SportModeCmd__velocity(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__SportModeCmd__velocity(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +size_t size_function__SportModeCmd__path_point(const void * untyped_member) +{ + (void)untyped_member; + return 30; +} + +const void * get_const_function__SportModeCmd__path_point(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__SportModeCmd__path_point(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember SportModeCmd_message_member_array[11] = { + { + "mode", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::SportModeCmd, mode), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "gait_type", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::SportModeCmd, gait_type), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "speed_level", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::SportModeCmd, speed_level), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "foot_raise_height", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::SportModeCmd, foot_raise_height), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "body_height", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::SportModeCmd, body_height), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "position", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 2, // array size + false, // is upper bound + offsetof(unitree_go::msg::SportModeCmd, position), // bytes offset in struct + nullptr, // default value + size_function__SportModeCmd__position, // size() function pointer + get_const_function__SportModeCmd__position, // get_const(index) function pointer + get_function__SportModeCmd__position, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "euler", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 3, // array size + false, // is upper bound + offsetof(unitree_go::msg::SportModeCmd, euler), // bytes offset in struct + nullptr, // default value + size_function__SportModeCmd__euler, // size() function pointer + get_const_function__SportModeCmd__euler, // get_const(index) function pointer + get_function__SportModeCmd__euler, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "velocity", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 2, // array size + false, // is upper bound + offsetof(unitree_go::msg::SportModeCmd, velocity), // bytes offset in struct + nullptr, // default value + size_function__SportModeCmd__velocity, // size() function pointer + get_const_function__SportModeCmd__velocity, // get_const(index) function pointer + get_function__SportModeCmd__velocity, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "yaw_speed", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::SportModeCmd, yaw_speed), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "bms_cmd", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::SportModeCmd, bms_cmd), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "path_point", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + true, // is array + 30, // array size + false, // is upper bound + offsetof(unitree_go::msg::SportModeCmd, path_point), // bytes offset in struct + nullptr, // default value + size_function__SportModeCmd__path_point, // size() function pointer + get_const_function__SportModeCmd__path_point, // get_const(index) function pointer + get_function__SportModeCmd__path_point, // get(index) function pointer + nullptr // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers SportModeCmd_message_members = { + "unitree_go::msg", // message namespace + "SportModeCmd", // message name + 11, // number of fields + sizeof(unitree_go::msg::SportModeCmd), + SportModeCmd_message_member_array, // message members + SportModeCmd_init_function, // function to initialize message memory (memory has to be allocated) + SportModeCmd_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t SportModeCmd_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &SportModeCmd_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace unitree_go + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::SportModeCmd_message_type_support_handle; +} + +} // namespace rosidl_typesupport_introspection_cpp + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, SportModeCmd)() { + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::SportModeCmd_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__type_support.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__type_support.h new file mode 100644 index 0000000..4d9c4cb --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from unitree_go:msg/SportModeCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__SPORT_MODE_CMD__TYPE_SUPPORT_H_ +#define UNITREE_GO__MSG__DETAIL__SPORT_MODE_CMD__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rosidl_runtime_c/message_type_support_struct.h" + +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + unitree_go, + msg, + SportModeCmd +)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__SPORT_MODE_CMD__TYPE_SUPPORT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__type_support.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__type_support.hpp new file mode 100644 index 0000000..70d77da --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_cmd__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from unitree_go:msg/SportModeCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__SPORT_MODE_CMD__TYPE_SUPPORT_HPP_ +#define UNITREE_GO__MSG__DETAIL__SPORT_MODE_CMD__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_cpp__visibility_control.hpp" + +#include "rosidl_typesupport_cpp/message_type_support.hpp" + +#ifdef __cplusplus +extern "C" +{ +#endif +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + unitree_go, + msg, + SportModeCmd +)(); +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__SPORT_MODE_CMD__TYPE_SUPPORT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__builder.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__builder.hpp new file mode 100644 index 0000000..d4a8fe8 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__builder.hpp @@ -0,0 +1,279 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from unitree_go:msg/SportModeState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__SPORT_MODE_STATE__BUILDER_HPP_ +#define UNITREE_GO__MSG__DETAIL__SPORT_MODE_STATE__BUILDER_HPP_ + +#include "unitree_go/msg/detail/sport_mode_state__struct.hpp" +#include +#include +#include + + +namespace unitree_go +{ + +namespace msg +{ + +namespace builder +{ + +class Init_SportModeState_foot_speed_body +{ +public: + explicit Init_SportModeState_foot_speed_body(::unitree_go::msg::SportModeState & msg) + : msg_(msg) + {} + ::unitree_go::msg::SportModeState foot_speed_body(::unitree_go::msg::SportModeState::_foot_speed_body_type arg) + { + msg_.foot_speed_body = std::move(arg); + return std::move(msg_); + } + +private: + ::unitree_go::msg::SportModeState msg_; +}; + +class Init_SportModeState_foot_position_body +{ +public: + explicit Init_SportModeState_foot_position_body(::unitree_go::msg::SportModeState & msg) + : msg_(msg) + {} + Init_SportModeState_foot_speed_body foot_position_body(::unitree_go::msg::SportModeState::_foot_position_body_type arg) + { + msg_.foot_position_body = std::move(arg); + return Init_SportModeState_foot_speed_body(msg_); + } + +private: + ::unitree_go::msg::SportModeState msg_; +}; + +class Init_SportModeState_foot_force +{ +public: + explicit Init_SportModeState_foot_force(::unitree_go::msg::SportModeState & msg) + : msg_(msg) + {} + Init_SportModeState_foot_position_body foot_force(::unitree_go::msg::SportModeState::_foot_force_type arg) + { + msg_.foot_force = std::move(arg); + return Init_SportModeState_foot_position_body(msg_); + } + +private: + ::unitree_go::msg::SportModeState msg_; +}; + +class Init_SportModeState_range_obstacle +{ +public: + explicit Init_SportModeState_range_obstacle(::unitree_go::msg::SportModeState & msg) + : msg_(msg) + {} + Init_SportModeState_foot_force range_obstacle(::unitree_go::msg::SportModeState::_range_obstacle_type arg) + { + msg_.range_obstacle = std::move(arg); + return Init_SportModeState_foot_force(msg_); + } + +private: + ::unitree_go::msg::SportModeState msg_; +}; + +class Init_SportModeState_yaw_speed +{ +public: + explicit Init_SportModeState_yaw_speed(::unitree_go::msg::SportModeState & msg) + : msg_(msg) + {} + Init_SportModeState_range_obstacle yaw_speed(::unitree_go::msg::SportModeState::_yaw_speed_type arg) + { + msg_.yaw_speed = std::move(arg); + return Init_SportModeState_range_obstacle(msg_); + } + +private: + ::unitree_go::msg::SportModeState msg_; +}; + +class Init_SportModeState_velocity +{ +public: + explicit Init_SportModeState_velocity(::unitree_go::msg::SportModeState & msg) + : msg_(msg) + {} + Init_SportModeState_yaw_speed velocity(::unitree_go::msg::SportModeState::_velocity_type arg) + { + msg_.velocity = std::move(arg); + return Init_SportModeState_yaw_speed(msg_); + } + +private: + ::unitree_go::msg::SportModeState msg_; +}; + +class Init_SportModeState_body_height +{ +public: + explicit Init_SportModeState_body_height(::unitree_go::msg::SportModeState & msg) + : msg_(msg) + {} + Init_SportModeState_velocity body_height(::unitree_go::msg::SportModeState::_body_height_type arg) + { + msg_.body_height = std::move(arg); + return Init_SportModeState_velocity(msg_); + } + +private: + ::unitree_go::msg::SportModeState msg_; +}; + +class Init_SportModeState_position +{ +public: + explicit Init_SportModeState_position(::unitree_go::msg::SportModeState & msg) + : msg_(msg) + {} + Init_SportModeState_body_height position(::unitree_go::msg::SportModeState::_position_type arg) + { + msg_.position = std::move(arg); + return Init_SportModeState_body_height(msg_); + } + +private: + ::unitree_go::msg::SportModeState msg_; +}; + +class Init_SportModeState_foot_raise_height +{ +public: + explicit Init_SportModeState_foot_raise_height(::unitree_go::msg::SportModeState & msg) + : msg_(msg) + {} + Init_SportModeState_position foot_raise_height(::unitree_go::msg::SportModeState::_foot_raise_height_type arg) + { + msg_.foot_raise_height = std::move(arg); + return Init_SportModeState_position(msg_); + } + +private: + ::unitree_go::msg::SportModeState msg_; +}; + +class Init_SportModeState_gait_type +{ +public: + explicit Init_SportModeState_gait_type(::unitree_go::msg::SportModeState & msg) + : msg_(msg) + {} + Init_SportModeState_foot_raise_height gait_type(::unitree_go::msg::SportModeState::_gait_type_type arg) + { + msg_.gait_type = std::move(arg); + return Init_SportModeState_foot_raise_height(msg_); + } + +private: + ::unitree_go::msg::SportModeState msg_; +}; + +class Init_SportModeState_progress +{ +public: + explicit Init_SportModeState_progress(::unitree_go::msg::SportModeState & msg) + : msg_(msg) + {} + Init_SportModeState_gait_type progress(::unitree_go::msg::SportModeState::_progress_type arg) + { + msg_.progress = std::move(arg); + return Init_SportModeState_gait_type(msg_); + } + +private: + ::unitree_go::msg::SportModeState msg_; +}; + +class Init_SportModeState_mode +{ +public: + explicit Init_SportModeState_mode(::unitree_go::msg::SportModeState & msg) + : msg_(msg) + {} + Init_SportModeState_progress mode(::unitree_go::msg::SportModeState::_mode_type arg) + { + msg_.mode = std::move(arg); + return Init_SportModeState_progress(msg_); + } + +private: + ::unitree_go::msg::SportModeState msg_; +}; + +class Init_SportModeState_imu_state +{ +public: + explicit Init_SportModeState_imu_state(::unitree_go::msg::SportModeState & msg) + : msg_(msg) + {} + Init_SportModeState_mode imu_state(::unitree_go::msg::SportModeState::_imu_state_type arg) + { + msg_.imu_state = std::move(arg); + return Init_SportModeState_mode(msg_); + } + +private: + ::unitree_go::msg::SportModeState msg_; +}; + +class Init_SportModeState_error_code +{ +public: + explicit Init_SportModeState_error_code(::unitree_go::msg::SportModeState & msg) + : msg_(msg) + {} + Init_SportModeState_imu_state error_code(::unitree_go::msg::SportModeState::_error_code_type arg) + { + msg_.error_code = std::move(arg); + return Init_SportModeState_imu_state(msg_); + } + +private: + ::unitree_go::msg::SportModeState msg_; +}; + +class Init_SportModeState_stamp +{ +public: + Init_SportModeState_stamp() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_SportModeState_error_code stamp(::unitree_go::msg::SportModeState::_stamp_type arg) + { + msg_.stamp = std::move(arg); + return Init_SportModeState_error_code(msg_); + } + +private: + ::unitree_go::msg::SportModeState msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::unitree_go::msg::SportModeState>() +{ + return unitree_go::msg::builder::Init_SportModeState_stamp(); +} + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__SPORT_MODE_STATE__BUILDER_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__functions.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__functions.c new file mode 100644 index 0000000..4b9bfd1 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__functions.c @@ -0,0 +1,395 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from unitree_go:msg/SportModeState.idl +// generated code does not contain a copyright notice +#include "unitree_go/msg/detail/sport_mode_state__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +// Include directives for member types +// Member `stamp` +#include "unitree_go/msg/detail/time_spec__functions.h" +// Member `imu_state` +#include "unitree_go/msg/detail/imu_state__functions.h" + +bool +unitree_go__msg__SportModeState__init(unitree_go__msg__SportModeState * msg) +{ + if (!msg) { + return false; + } + // stamp + if (!unitree_go__msg__TimeSpec__init(&msg->stamp)) { + unitree_go__msg__SportModeState__fini(msg); + return false; + } + // error_code + // imu_state + if (!unitree_go__msg__IMUState__init(&msg->imu_state)) { + unitree_go__msg__SportModeState__fini(msg); + return false; + } + // mode + // progress + // gait_type + // foot_raise_height + // position + // body_height + // velocity + // yaw_speed + // range_obstacle + // foot_force + // foot_position_body + // foot_speed_body + return true; +} + +void +unitree_go__msg__SportModeState__fini(unitree_go__msg__SportModeState * msg) +{ + if (!msg) { + return; + } + // stamp + unitree_go__msg__TimeSpec__fini(&msg->stamp); + // error_code + // imu_state + unitree_go__msg__IMUState__fini(&msg->imu_state); + // mode + // progress + // gait_type + // foot_raise_height + // position + // body_height + // velocity + // yaw_speed + // range_obstacle + // foot_force + // foot_position_body + // foot_speed_body +} + +bool +unitree_go__msg__SportModeState__are_equal(const unitree_go__msg__SportModeState * lhs, const unitree_go__msg__SportModeState * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // stamp + if (!unitree_go__msg__TimeSpec__are_equal( + &(lhs->stamp), &(rhs->stamp))) + { + return false; + } + // error_code + if (lhs->error_code != rhs->error_code) { + return false; + } + // imu_state + if (!unitree_go__msg__IMUState__are_equal( + &(lhs->imu_state), &(rhs->imu_state))) + { + return false; + } + // mode + if (lhs->mode != rhs->mode) { + return false; + } + // progress + if (lhs->progress != rhs->progress) { + return false; + } + // gait_type + if (lhs->gait_type != rhs->gait_type) { + return false; + } + // foot_raise_height + if (lhs->foot_raise_height != rhs->foot_raise_height) { + return false; + } + // position + for (size_t i = 0; i < 3; ++i) { + if (lhs->position[i] != rhs->position[i]) { + return false; + } + } + // body_height + if (lhs->body_height != rhs->body_height) { + return false; + } + // velocity + for (size_t i = 0; i < 3; ++i) { + if (lhs->velocity[i] != rhs->velocity[i]) { + return false; + } + } + // yaw_speed + if (lhs->yaw_speed != rhs->yaw_speed) { + return false; + } + // range_obstacle + for (size_t i = 0; i < 4; ++i) { + if (lhs->range_obstacle[i] != rhs->range_obstacle[i]) { + return false; + } + } + // foot_force + for (size_t i = 0; i < 4; ++i) { + if (lhs->foot_force[i] != rhs->foot_force[i]) { + return false; + } + } + // foot_position_body + for (size_t i = 0; i < 12; ++i) { + if (lhs->foot_position_body[i] != rhs->foot_position_body[i]) { + return false; + } + } + // foot_speed_body + for (size_t i = 0; i < 12; ++i) { + if (lhs->foot_speed_body[i] != rhs->foot_speed_body[i]) { + return false; + } + } + return true; +} + +bool +unitree_go__msg__SportModeState__copy( + const unitree_go__msg__SportModeState * input, + unitree_go__msg__SportModeState * output) +{ + if (!input || !output) { + return false; + } + // stamp + if (!unitree_go__msg__TimeSpec__copy( + &(input->stamp), &(output->stamp))) + { + return false; + } + // error_code + output->error_code = input->error_code; + // imu_state + if (!unitree_go__msg__IMUState__copy( + &(input->imu_state), &(output->imu_state))) + { + return false; + } + // mode + output->mode = input->mode; + // progress + output->progress = input->progress; + // gait_type + output->gait_type = input->gait_type; + // foot_raise_height + output->foot_raise_height = input->foot_raise_height; + // position + for (size_t i = 0; i < 3; ++i) { + output->position[i] = input->position[i]; + } + // body_height + output->body_height = input->body_height; + // velocity + for (size_t i = 0; i < 3; ++i) { + output->velocity[i] = input->velocity[i]; + } + // yaw_speed + output->yaw_speed = input->yaw_speed; + // range_obstacle + for (size_t i = 0; i < 4; ++i) { + output->range_obstacle[i] = input->range_obstacle[i]; + } + // foot_force + for (size_t i = 0; i < 4; ++i) { + output->foot_force[i] = input->foot_force[i]; + } + // foot_position_body + for (size_t i = 0; i < 12; ++i) { + output->foot_position_body[i] = input->foot_position_body[i]; + } + // foot_speed_body + for (size_t i = 0; i < 12; ++i) { + output->foot_speed_body[i] = input->foot_speed_body[i]; + } + return true; +} + +unitree_go__msg__SportModeState * +unitree_go__msg__SportModeState__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__SportModeState * msg = (unitree_go__msg__SportModeState *)allocator.allocate(sizeof(unitree_go__msg__SportModeState), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(unitree_go__msg__SportModeState)); + bool success = unitree_go__msg__SportModeState__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +unitree_go__msg__SportModeState__destroy(unitree_go__msg__SportModeState * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + unitree_go__msg__SportModeState__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +unitree_go__msg__SportModeState__Sequence__init(unitree_go__msg__SportModeState__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__SportModeState * data = NULL; + + if (size) { + data = (unitree_go__msg__SportModeState *)allocator.zero_allocate(size, sizeof(unitree_go__msg__SportModeState), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = unitree_go__msg__SportModeState__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + unitree_go__msg__SportModeState__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +unitree_go__msg__SportModeState__Sequence__fini(unitree_go__msg__SportModeState__Sequence * array) +{ + if (!array) { + return; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + + if (array->data) { + // ensure that data and capacity values are consistent + assert(array->capacity > 0); + // finalize all array elements + for (size_t i = 0; i < array->capacity; ++i) { + unitree_go__msg__SportModeState__fini(&array->data[i]); + } + allocator.deallocate(array->data, allocator.state); + array->data = NULL; + array->size = 0; + array->capacity = 0; + } else { + // ensure that data, size, and capacity values are consistent + assert(0 == array->size); + assert(0 == array->capacity); + } +} + +unitree_go__msg__SportModeState__Sequence * +unitree_go__msg__SportModeState__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__SportModeState__Sequence * array = (unitree_go__msg__SportModeState__Sequence *)allocator.allocate(sizeof(unitree_go__msg__SportModeState__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = unitree_go__msg__SportModeState__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +unitree_go__msg__SportModeState__Sequence__destroy(unitree_go__msg__SportModeState__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + unitree_go__msg__SportModeState__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +unitree_go__msg__SportModeState__Sequence__are_equal(const unitree_go__msg__SportModeState__Sequence * lhs, const unitree_go__msg__SportModeState__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!unitree_go__msg__SportModeState__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +unitree_go__msg__SportModeState__Sequence__copy( + const unitree_go__msg__SportModeState__Sequence * input, + unitree_go__msg__SportModeState__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(unitree_go__msg__SportModeState); + unitree_go__msg__SportModeState * data = + (unitree_go__msg__SportModeState *)realloc(output->data, allocation_size); + if (!data) { + return false; + } + for (size_t i = output->capacity; i < input->size; ++i) { + if (!unitree_go__msg__SportModeState__init(&data[i])) { + /* free currently allocated and return false */ + for (; i-- > output->capacity; ) { + unitree_go__msg__SportModeState__fini(&data[i]); + } + free(data); + return false; + } + } + output->data = data; + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!unitree_go__msg__SportModeState__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__functions.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__functions.h new file mode 100644 index 0000000..5943f7e --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from unitree_go:msg/SportModeState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__SPORT_MODE_STATE__FUNCTIONS_H_ +#define UNITREE_GO__MSG__DETAIL__SPORT_MODE_STATE__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#include "unitree_go/msg/detail/sport_mode_state__struct.h" + +/// Initialize msg/SportModeState message. +/** + * If the init function is called twice for the same message without + * calling fini inbetween previously allocated memory will be leaked. + * \param[in,out] msg The previously allocated message pointer. + * Fields without a default value will not be initialized by this function. + * You might want to call memset(msg, 0, sizeof( + * unitree_go__msg__SportModeState + * )) before or use + * unitree_go__msg__SportModeState__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__SportModeState__init(unitree_go__msg__SportModeState * msg); + +/// Finalize msg/SportModeState message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__SportModeState__fini(unitree_go__msg__SportModeState * msg); + +/// Create msg/SportModeState message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * unitree_go__msg__SportModeState__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__SportModeState * +unitree_go__msg__SportModeState__create(); + +/// Destroy msg/SportModeState message. +/** + * It calls + * unitree_go__msg__SportModeState__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__SportModeState__destroy(unitree_go__msg__SportModeState * msg); + +/// Check for msg/SportModeState message equality. +/** + * \param[in] lhs The message on the left hand size of the equality operator. + * \param[in] rhs The message on the right hand size of the equality operator. + * \return true if messages are equal, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__SportModeState__are_equal(const unitree_go__msg__SportModeState * lhs, const unitree_go__msg__SportModeState * rhs); + +/// Copy a msg/SportModeState message. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source message pointer. + * \param[out] output The target message pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer is null + * or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__SportModeState__copy( + const unitree_go__msg__SportModeState * input, + unitree_go__msg__SportModeState * output); + +/// Initialize array of msg/SportModeState messages. +/** + * It allocates the memory for the number of elements and calls + * unitree_go__msg__SportModeState__init() + * for each element of the array. + * \param[in,out] array The allocated array pointer. + * \param[in] size The size / capacity of the array. + * \return true if initialization was successful, otherwise false + * If the array pointer is valid and the size is zero it is guaranteed + # to return true. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__SportModeState__Sequence__init(unitree_go__msg__SportModeState__Sequence * array, size_t size); + +/// Finalize array of msg/SportModeState messages. +/** + * It calls + * unitree_go__msg__SportModeState__fini() + * for each element of the array and frees the memory for the number of + * elements. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__SportModeState__Sequence__fini(unitree_go__msg__SportModeState__Sequence * array); + +/// Create array of msg/SportModeState messages. +/** + * It allocates the memory for the array and calls + * unitree_go__msg__SportModeState__Sequence__init(). + * \param[in] size The size / capacity of the array. + * \return The pointer to the initialized array if successful, otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__SportModeState__Sequence * +unitree_go__msg__SportModeState__Sequence__create(size_t size); + +/// Destroy array of msg/SportModeState messages. +/** + * It calls + * unitree_go__msg__SportModeState__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__SportModeState__Sequence__destroy(unitree_go__msg__SportModeState__Sequence * array); + +/// Check for msg/SportModeState message array equality. +/** + * \param[in] lhs The message array on the left hand size of the equality operator. + * \param[in] rhs The message array on the right hand size of the equality operator. + * \return true if message arrays are equal in size and content, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__SportModeState__Sequence__are_equal(const unitree_go__msg__SportModeState__Sequence * lhs, const unitree_go__msg__SportModeState__Sequence * rhs); + +/// Copy an array of msg/SportModeState messages. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source array pointer. + * \param[out] output The target array pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer + * is null or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__SportModeState__Sequence__copy( + const unitree_go__msg__SportModeState__Sequence * input, + unitree_go__msg__SportModeState__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__SPORT_MODE_STATE__FUNCTIONS_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__rosidl_typesupport_fastrtps_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 0000000..6ea7d97 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,36 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from unitree_go:msg/SportModeState.idl +// generated code does not contain a copyright notice +#ifndef UNITREE_GO__MSG__DETAIL__SPORT_MODE_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define UNITREE_GO__MSG__DETAIL__SPORT_MODE_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t get_serialized_size_unitree_go__msg__SportModeState( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t max_serialized_size_unitree_go__msg__SportModeState( + bool & full_bounded, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, unitree_go, msg, SportModeState)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__SPORT_MODE_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__rosidl_typesupport_fastrtps_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 0000000..a254bc2 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,79 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from unitree_go:msg/SportModeState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__SPORT_MODE_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__SPORT_MODE_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "unitree_go/msg/detail/sport_mode_state__struct.hpp" + +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-parameter" +# ifdef __clang__ +# pragma clang diagnostic ignored "-Wdeprecated-register" +# pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +# endif +#endif +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif + +#include "fastcdr/Cdr.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_serialize( + const unitree_go::msg::SportModeState & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + unitree_go::msg::SportModeState & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +get_serialized_size( + const unitree_go::msg::SportModeState & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +max_serialized_size_SportModeState( + bool & full_bounded, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace unitree_go + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, unitree_go, msg, SportModeState)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__SPORT_MODE_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__rosidl_typesupport_introspection_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__rosidl_typesupport_introspection_c.h new file mode 100644 index 0000000..a6c7219 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from unitree_go:msg/SportModeState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__SPORT_MODE_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define UNITREE_GO__MSG__DETAIL__SPORT_MODE_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, SportModeState)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__SPORT_MODE_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__rosidl_typesupport_introspection_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 0000000..44fc169 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from unitree_go:msg/SportModeState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__SPORT_MODE_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__SPORT_MODE_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +// TODO(dirk-thomas) these visibility macros should be message package specific +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, SportModeState)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__SPORT_MODE_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__struct.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__struct.h new file mode 100644 index 0000000..fd4313d --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__struct.h @@ -0,0 +1,60 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from unitree_go:msg/SportModeState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__SPORT_MODE_STATE__STRUCT_H_ +#define UNITREE_GO__MSG__DETAIL__SPORT_MODE_STATE__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Include directives for member types +// Member 'stamp' +#include "unitree_go/msg/detail/time_spec__struct.h" +// Member 'imu_state' +#include "unitree_go/msg/detail/imu_state__struct.h" + +// Struct defined in msg/SportModeState in the package unitree_go. +typedef struct unitree_go__msg__SportModeState +{ + unitree_go__msg__TimeSpec stamp; + uint32_t error_code; + unitree_go__msg__IMUState imu_state; + uint8_t mode; + float progress; + uint8_t gait_type; + float foot_raise_height; + float position[3]; + float body_height; + float velocity[3]; + float yaw_speed; + float range_obstacle[4]; + int16_t foot_force[4]; + float foot_position_body[12]; + float foot_speed_body[12]; +} unitree_go__msg__SportModeState; + +// Struct for a sequence of unitree_go__msg__SportModeState. +typedef struct unitree_go__msg__SportModeState__Sequence +{ + unitree_go__msg__SportModeState * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} unitree_go__msg__SportModeState__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__SPORT_MODE_STATE__STRUCT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__struct.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__struct.hpp new file mode 100644 index 0000000..96823eb --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__struct.hpp @@ -0,0 +1,337 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from unitree_go:msg/SportModeState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__SPORT_MODE_STATE__STRUCT_HPP_ +#define UNITREE_GO__MSG__DETAIL__SPORT_MODE_STATE__STRUCT_HPP_ + +#include +#include +#include +#include +#include +#include +#include + + +// Include directives for member types +// Member 'stamp' +#include "unitree_go/msg/detail/time_spec__struct.hpp" +// Member 'imu_state' +#include "unitree_go/msg/detail/imu_state__struct.hpp" + +#ifndef _WIN32 +# define DEPRECATED__unitree_go__msg__SportModeState __attribute__((deprecated)) +#else +# define DEPRECATED__unitree_go__msg__SportModeState __declspec(deprecated) +#endif + +namespace unitree_go +{ + +namespace msg +{ + +// message struct +template +struct SportModeState_ +{ + using Type = SportModeState_; + + explicit SportModeState_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : stamp(_init), + imu_state(_init) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->error_code = 0ul; + this->mode = 0; + this->progress = 0.0f; + this->gait_type = 0; + this->foot_raise_height = 0.0f; + std::fill::iterator, float>(this->position.begin(), this->position.end(), 0.0f); + this->body_height = 0.0f; + std::fill::iterator, float>(this->velocity.begin(), this->velocity.end(), 0.0f); + this->yaw_speed = 0.0f; + std::fill::iterator, float>(this->range_obstacle.begin(), this->range_obstacle.end(), 0.0f); + std::fill::iterator, int16_t>(this->foot_force.begin(), this->foot_force.end(), 0); + std::fill::iterator, float>(this->foot_position_body.begin(), this->foot_position_body.end(), 0.0f); + std::fill::iterator, float>(this->foot_speed_body.begin(), this->foot_speed_body.end(), 0.0f); + } + } + + explicit SportModeState_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : stamp(_alloc, _init), + imu_state(_alloc, _init), + position(_alloc), + velocity(_alloc), + range_obstacle(_alloc), + foot_force(_alloc), + foot_position_body(_alloc), + foot_speed_body(_alloc) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->error_code = 0ul; + this->mode = 0; + this->progress = 0.0f; + this->gait_type = 0; + this->foot_raise_height = 0.0f; + std::fill::iterator, float>(this->position.begin(), this->position.end(), 0.0f); + this->body_height = 0.0f; + std::fill::iterator, float>(this->velocity.begin(), this->velocity.end(), 0.0f); + this->yaw_speed = 0.0f; + std::fill::iterator, float>(this->range_obstacle.begin(), this->range_obstacle.end(), 0.0f); + std::fill::iterator, int16_t>(this->foot_force.begin(), this->foot_force.end(), 0); + std::fill::iterator, float>(this->foot_position_body.begin(), this->foot_position_body.end(), 0.0f); + std::fill::iterator, float>(this->foot_speed_body.begin(), this->foot_speed_body.end(), 0.0f); + } + } + + // field types and members + using _stamp_type = + unitree_go::msg::TimeSpec_; + _stamp_type stamp; + using _error_code_type = + uint32_t; + _error_code_type error_code; + using _imu_state_type = + unitree_go::msg::IMUState_; + _imu_state_type imu_state; + using _mode_type = + uint8_t; + _mode_type mode; + using _progress_type = + float; + _progress_type progress; + using _gait_type_type = + uint8_t; + _gait_type_type gait_type; + using _foot_raise_height_type = + float; + _foot_raise_height_type foot_raise_height; + using _position_type = + std::array; + _position_type position; + using _body_height_type = + float; + _body_height_type body_height; + using _velocity_type = + std::array; + _velocity_type velocity; + using _yaw_speed_type = + float; + _yaw_speed_type yaw_speed; + using _range_obstacle_type = + std::array; + _range_obstacle_type range_obstacle; + using _foot_force_type = + std::array; + _foot_force_type foot_force; + using _foot_position_body_type = + std::array; + _foot_position_body_type foot_position_body; + using _foot_speed_body_type = + std::array; + _foot_speed_body_type foot_speed_body; + + // setters for named parameter idiom + Type & set__stamp( + const unitree_go::msg::TimeSpec_ & _arg) + { + this->stamp = _arg; + return *this; + } + Type & set__error_code( + const uint32_t & _arg) + { + this->error_code = _arg; + return *this; + } + Type & set__imu_state( + const unitree_go::msg::IMUState_ & _arg) + { + this->imu_state = _arg; + return *this; + } + Type & set__mode( + const uint8_t & _arg) + { + this->mode = _arg; + return *this; + } + Type & set__progress( + const float & _arg) + { + this->progress = _arg; + return *this; + } + Type & set__gait_type( + const uint8_t & _arg) + { + this->gait_type = _arg; + return *this; + } + Type & set__foot_raise_height( + const float & _arg) + { + this->foot_raise_height = _arg; + return *this; + } + Type & set__position( + const std::array & _arg) + { + this->position = _arg; + return *this; + } + Type & set__body_height( + const float & _arg) + { + this->body_height = _arg; + return *this; + } + Type & set__velocity( + const std::array & _arg) + { + this->velocity = _arg; + return *this; + } + Type & set__yaw_speed( + const float & _arg) + { + this->yaw_speed = _arg; + return *this; + } + Type & set__range_obstacle( + const std::array & _arg) + { + this->range_obstacle = _arg; + return *this; + } + Type & set__foot_force( + const std::array & _arg) + { + this->foot_force = _arg; + return *this; + } + Type & set__foot_position_body( + const std::array & _arg) + { + this->foot_position_body = _arg; + return *this; + } + Type & set__foot_speed_body( + const std::array & _arg) + { + this->foot_speed_body = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + unitree_go::msg::SportModeState_ *; + using ConstRawPtr = + const unitree_go::msg::SportModeState_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr const>; + + // pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead + // NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly + typedef DEPRECATED__unitree_go__msg__SportModeState + std::shared_ptr> + Ptr; + typedef DEPRECATED__unitree_go__msg__SportModeState + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const SportModeState_ & other) const + { + if (this->stamp != other.stamp) { + return false; + } + if (this->error_code != other.error_code) { + return false; + } + if (this->imu_state != other.imu_state) { + return false; + } + if (this->mode != other.mode) { + return false; + } + if (this->progress != other.progress) { + return false; + } + if (this->gait_type != other.gait_type) { + return false; + } + if (this->foot_raise_height != other.foot_raise_height) { + return false; + } + if (this->position != other.position) { + return false; + } + if (this->body_height != other.body_height) { + return false; + } + if (this->velocity != other.velocity) { + return false; + } + if (this->yaw_speed != other.yaw_speed) { + return false; + } + if (this->range_obstacle != other.range_obstacle) { + return false; + } + if (this->foot_force != other.foot_force) { + return false; + } + if (this->foot_position_body != other.foot_position_body) { + return false; + } + if (this->foot_speed_body != other.foot_speed_body) { + return false; + } + return true; + } + bool operator!=(const SportModeState_ & other) const + { + return !this->operator==(other); + } +}; // struct SportModeState_ + +// alias to use template instance with default allocator +using SportModeState = + unitree_go::msg::SportModeState_>; + +// constant definitions + +} // namespace msg + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__SPORT_MODE_STATE__STRUCT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__traits.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__traits.hpp new file mode 100644 index 0000000..e71869f --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__traits.hpp @@ -0,0 +1,48 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from unitree_go:msg/SportModeState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__SPORT_MODE_STATE__TRAITS_HPP_ +#define UNITREE_GO__MSG__DETAIL__SPORT_MODE_STATE__TRAITS_HPP_ + +#include "unitree_go/msg/detail/sport_mode_state__struct.hpp" +#include +#include +#include + +// Include directives for member types +// Member 'stamp' +#include "unitree_go/msg/detail/time_spec__traits.hpp" +// Member 'imu_state' +#include "unitree_go/msg/detail/imu_state__traits.hpp" + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "unitree_go::msg::SportModeState"; +} + +template<> +inline const char * name() +{ + return "unitree_go/msg/SportModeState"; +} + +template<> +struct has_fixed_size + : std::integral_constant::value && has_fixed_size::value> {}; + +template<> +struct has_bounded_size + : std::integral_constant::value && has_bounded_size::value> {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UNITREE_GO__MSG__DETAIL__SPORT_MODE_STATE__TRAITS_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__type_support.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__type_support.c new file mode 100644 index 0000000..83ba35b --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__type_support.c @@ -0,0 +1,305 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from unitree_go:msg/SportModeState.idl +// generated code does not contain a copyright notice + +#include +#include "unitree_go/msg/detail/sport_mode_state__rosidl_typesupport_introspection_c.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" +#include "rosidl_typesupport_introspection_c/field_types.h" +#include "rosidl_typesupport_introspection_c/identifier.h" +#include "rosidl_typesupport_introspection_c/message_introspection.h" +#include "unitree_go/msg/detail/sport_mode_state__functions.h" +#include "unitree_go/msg/detail/sport_mode_state__struct.h" + + +// Include directives for member types +// Member `stamp` +#include "unitree_go/msg/time_spec.h" +// Member `stamp` +#include "unitree_go/msg/detail/time_spec__rosidl_typesupport_introspection_c.h" +// Member `imu_state` +#include "unitree_go/msg/imu_state.h" +// Member `imu_state` +#include "unitree_go/msg/detail/imu_state__rosidl_typesupport_introspection_c.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void SportModeState__rosidl_typesupport_introspection_c__SportModeState_init_function( + void * message_memory, enum rosidl_runtime_c__message_initialization _init) +{ + // TODO(karsten1987): initializers are not yet implemented for typesupport c + // see https://github.com/ros2/ros2/issues/397 + (void) _init; + unitree_go__msg__SportModeState__init(message_memory); +} + +void SportModeState__rosidl_typesupport_introspection_c__SportModeState_fini_function(void * message_memory) +{ + unitree_go__msg__SportModeState__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember SportModeState__rosidl_typesupport_introspection_c__SportModeState_message_member_array[15] = { + { + "stamp", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__SportModeState, stamp), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "error_code", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__SportModeState, error_code), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "imu_state", // name + rosidl_typesupport_introspection_c__ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + NULL, // members of sub message (initialized later) + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__SportModeState, imu_state), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "mode", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__SportModeState, mode), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "progress", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__SportModeState, progress), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "gait_type", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__SportModeState, gait_type), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "foot_raise_height", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__SportModeState, foot_raise_height), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "position", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 3, // array size + false, // is upper bound + offsetof(unitree_go__msg__SportModeState, position), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "body_height", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__SportModeState, body_height), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "velocity", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 3, // array size + false, // is upper bound + offsetof(unitree_go__msg__SportModeState, velocity), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "yaw_speed", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__SportModeState, yaw_speed), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "range_obstacle", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 4, // array size + false, // is upper bound + offsetof(unitree_go__msg__SportModeState, range_obstacle), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "foot_force", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT16, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 4, // array size + false, // is upper bound + offsetof(unitree_go__msg__SportModeState, foot_force), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "foot_position_body", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 12, // array size + false, // is upper bound + offsetof(unitree_go__msg__SportModeState, foot_position_body), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "foot_speed_body", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 12, // array size + false, // is upper bound + offsetof(unitree_go__msg__SportModeState, foot_speed_body), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers SportModeState__rosidl_typesupport_introspection_c__SportModeState_message_members = { + "unitree_go__msg", // message namespace + "SportModeState", // message name + 15, // number of fields + sizeof(unitree_go__msg__SportModeState), + SportModeState__rosidl_typesupport_introspection_c__SportModeState_message_member_array, // message members + SportModeState__rosidl_typesupport_introspection_c__SportModeState_init_function, // function to initialize message memory (memory has to be allocated) + SportModeState__rosidl_typesupport_introspection_c__SportModeState_fini_function // function to terminate message instance (will not free memory) +}; + +// this is not const since it must be initialized on first access +// since C does not allow non-integral compile-time constants +static rosidl_message_type_support_t SportModeState__rosidl_typesupport_introspection_c__SportModeState_message_type_support_handle = { + 0, + &SportModeState__rosidl_typesupport_introspection_c__SportModeState_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, SportModeState)() { + SportModeState__rosidl_typesupport_introspection_c__SportModeState_message_member_array[0].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, TimeSpec)(); + SportModeState__rosidl_typesupport_introspection_c__SportModeState_message_member_array[2].members_ = + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, IMUState)(); + if (!SportModeState__rosidl_typesupport_introspection_c__SportModeState_message_type_support_handle.typesupport_identifier) { + SportModeState__rosidl_typesupport_introspection_c__SportModeState_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &SportModeState__rosidl_typesupport_introspection_c__SportModeState_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__type_support.cpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__type_support.cpp new file mode 100644 index 0000000..6386bc1 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__type_support.cpp @@ -0,0 +1,437 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from unitree_go:msg/SportModeState.idl +// generated code does not contain a copyright notice + +#include "array" +#include "cstddef" +#include "string" +#include "vector" +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_cpp/message_type_support.hpp" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/detail/sport_mode_state__struct.hpp" +#include "rosidl_typesupport_introspection_cpp/field_types.hpp" +#include "rosidl_typesupport_introspection_cpp/identifier.hpp" +#include "rosidl_typesupport_introspection_cpp/message_introspection.hpp" +#include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void SportModeState_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) unitree_go::msg::SportModeState(_init); +} + +void SportModeState_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~SportModeState(); +} + +size_t size_function__SportModeState__position(const void * untyped_member) +{ + (void)untyped_member; + return 3; +} + +const void * get_const_function__SportModeState__position(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__SportModeState__position(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +size_t size_function__SportModeState__velocity(const void * untyped_member) +{ + (void)untyped_member; + return 3; +} + +const void * get_const_function__SportModeState__velocity(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__SportModeState__velocity(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +size_t size_function__SportModeState__range_obstacle(const void * untyped_member) +{ + (void)untyped_member; + return 4; +} + +const void * get_const_function__SportModeState__range_obstacle(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__SportModeState__range_obstacle(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +size_t size_function__SportModeState__foot_force(const void * untyped_member) +{ + (void)untyped_member; + return 4; +} + +const void * get_const_function__SportModeState__foot_force(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__SportModeState__foot_force(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +size_t size_function__SportModeState__foot_position_body(const void * untyped_member) +{ + (void)untyped_member; + return 12; +} + +const void * get_const_function__SportModeState__foot_position_body(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__SportModeState__foot_position_body(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +size_t size_function__SportModeState__foot_speed_body(const void * untyped_member) +{ + (void)untyped_member; + return 12; +} + +const void * get_const_function__SportModeState__foot_speed_body(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__SportModeState__foot_speed_body(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember SportModeState_message_member_array[15] = { + { + "stamp", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::SportModeState, stamp), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "error_code", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::SportModeState, error_code), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "imu_state", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_MESSAGE, // type + 0, // upper bound of string + ::rosidl_typesupport_introspection_cpp::get_message_type_support_handle(), // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::SportModeState, imu_state), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "mode", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::SportModeState, mode), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "progress", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::SportModeState, progress), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "gait_type", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::SportModeState, gait_type), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "foot_raise_height", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::SportModeState, foot_raise_height), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "position", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 3, // array size + false, // is upper bound + offsetof(unitree_go::msg::SportModeState, position), // bytes offset in struct + nullptr, // default value + size_function__SportModeState__position, // size() function pointer + get_const_function__SportModeState__position, // get_const(index) function pointer + get_function__SportModeState__position, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "body_height", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::SportModeState, body_height), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "velocity", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 3, // array size + false, // is upper bound + offsetof(unitree_go::msg::SportModeState, velocity), // bytes offset in struct + nullptr, // default value + size_function__SportModeState__velocity, // size() function pointer + get_const_function__SportModeState__velocity, // get_const(index) function pointer + get_function__SportModeState__velocity, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "yaw_speed", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::SportModeState, yaw_speed), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "range_obstacle", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 4, // array size + false, // is upper bound + offsetof(unitree_go::msg::SportModeState, range_obstacle), // bytes offset in struct + nullptr, // default value + size_function__SportModeState__range_obstacle, // size() function pointer + get_const_function__SportModeState__range_obstacle, // get_const(index) function pointer + get_function__SportModeState__range_obstacle, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "foot_force", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT16, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 4, // array size + false, // is upper bound + offsetof(unitree_go::msg::SportModeState, foot_force), // bytes offset in struct + nullptr, // default value + size_function__SportModeState__foot_force, // size() function pointer + get_const_function__SportModeState__foot_force, // get_const(index) function pointer + get_function__SportModeState__foot_force, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "foot_position_body", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 12, // array size + false, // is upper bound + offsetof(unitree_go::msg::SportModeState, foot_position_body), // bytes offset in struct + nullptr, // default value + size_function__SportModeState__foot_position_body, // size() function pointer + get_const_function__SportModeState__foot_position_body, // get_const(index) function pointer + get_function__SportModeState__foot_position_body, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "foot_speed_body", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 12, // array size + false, // is upper bound + offsetof(unitree_go::msg::SportModeState, foot_speed_body), // bytes offset in struct + nullptr, // default value + size_function__SportModeState__foot_speed_body, // size() function pointer + get_const_function__SportModeState__foot_speed_body, // get_const(index) function pointer + get_function__SportModeState__foot_speed_body, // get(index) function pointer + nullptr // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers SportModeState_message_members = { + "unitree_go::msg", // message namespace + "SportModeState", // message name + 15, // number of fields + sizeof(unitree_go::msg::SportModeState), + SportModeState_message_member_array, // message members + SportModeState_init_function, // function to initialize message memory (memory has to be allocated) + SportModeState_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t SportModeState_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &SportModeState_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace unitree_go + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::SportModeState_message_type_support_handle; +} + +} // namespace rosidl_typesupport_introspection_cpp + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, SportModeState)() { + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::SportModeState_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__type_support.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__type_support.h new file mode 100644 index 0000000..c6e4e33 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from unitree_go:msg/SportModeState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__SPORT_MODE_STATE__TYPE_SUPPORT_H_ +#define UNITREE_GO__MSG__DETAIL__SPORT_MODE_STATE__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rosidl_runtime_c/message_type_support_struct.h" + +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + unitree_go, + msg, + SportModeState +)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__SPORT_MODE_STATE__TYPE_SUPPORT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__type_support.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__type_support.hpp new file mode 100644 index 0000000..529a760 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/sport_mode_state__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from unitree_go:msg/SportModeState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__SPORT_MODE_STATE__TYPE_SUPPORT_HPP_ +#define UNITREE_GO__MSG__DETAIL__SPORT_MODE_STATE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_cpp__visibility_control.hpp" + +#include "rosidl_typesupport_cpp/message_type_support.hpp" + +#ifdef __cplusplus +extern "C" +{ +#endif +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + unitree_go, + msg, + SportModeState +)(); +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__SPORT_MODE_STATE__TYPE_SUPPORT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__builder.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__builder.hpp new file mode 100644 index 0000000..ffe947e --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__builder.hpp @@ -0,0 +1,71 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from unitree_go:msg/TimeSpec.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__TIME_SPEC__BUILDER_HPP_ +#define UNITREE_GO__MSG__DETAIL__TIME_SPEC__BUILDER_HPP_ + +#include "unitree_go/msg/detail/time_spec__struct.hpp" +#include +#include +#include + + +namespace unitree_go +{ + +namespace msg +{ + +namespace builder +{ + +class Init_TimeSpec_nanosec +{ +public: + explicit Init_TimeSpec_nanosec(::unitree_go::msg::TimeSpec & msg) + : msg_(msg) + {} + ::unitree_go::msg::TimeSpec nanosec(::unitree_go::msg::TimeSpec::_nanosec_type arg) + { + msg_.nanosec = std::move(arg); + return std::move(msg_); + } + +private: + ::unitree_go::msg::TimeSpec msg_; +}; + +class Init_TimeSpec_sec +{ +public: + Init_TimeSpec_sec() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_TimeSpec_nanosec sec(::unitree_go::msg::TimeSpec::_sec_type arg) + { + msg_.sec = std::move(arg); + return Init_TimeSpec_nanosec(msg_); + } + +private: + ::unitree_go::msg::TimeSpec msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::unitree_go::msg::TimeSpec>() +{ + return unitree_go::msg::builder::Init_TimeSpec_sec(); +} + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__TIME_SPEC__BUILDER_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__functions.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__functions.c new file mode 100644 index 0000000..4f84c74 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__functions.c @@ -0,0 +1,239 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from unitree_go:msg/TimeSpec.idl +// generated code does not contain a copyright notice +#include "unitree_go/msg/detail/time_spec__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +unitree_go__msg__TimeSpec__init(unitree_go__msg__TimeSpec * msg) +{ + if (!msg) { + return false; + } + // sec + // nanosec + return true; +} + +void +unitree_go__msg__TimeSpec__fini(unitree_go__msg__TimeSpec * msg) +{ + if (!msg) { + return; + } + // sec + // nanosec +} + +bool +unitree_go__msg__TimeSpec__are_equal(const unitree_go__msg__TimeSpec * lhs, const unitree_go__msg__TimeSpec * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // sec + if (lhs->sec != rhs->sec) { + return false; + } + // nanosec + if (lhs->nanosec != rhs->nanosec) { + return false; + } + return true; +} + +bool +unitree_go__msg__TimeSpec__copy( + const unitree_go__msg__TimeSpec * input, + unitree_go__msg__TimeSpec * output) +{ + if (!input || !output) { + return false; + } + // sec + output->sec = input->sec; + // nanosec + output->nanosec = input->nanosec; + return true; +} + +unitree_go__msg__TimeSpec * +unitree_go__msg__TimeSpec__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__TimeSpec * msg = (unitree_go__msg__TimeSpec *)allocator.allocate(sizeof(unitree_go__msg__TimeSpec), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(unitree_go__msg__TimeSpec)); + bool success = unitree_go__msg__TimeSpec__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +unitree_go__msg__TimeSpec__destroy(unitree_go__msg__TimeSpec * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + unitree_go__msg__TimeSpec__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +unitree_go__msg__TimeSpec__Sequence__init(unitree_go__msg__TimeSpec__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__TimeSpec * data = NULL; + + if (size) { + data = (unitree_go__msg__TimeSpec *)allocator.zero_allocate(size, sizeof(unitree_go__msg__TimeSpec), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = unitree_go__msg__TimeSpec__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + unitree_go__msg__TimeSpec__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +unitree_go__msg__TimeSpec__Sequence__fini(unitree_go__msg__TimeSpec__Sequence * array) +{ + if (!array) { + return; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + + if (array->data) { + // ensure that data and capacity values are consistent + assert(array->capacity > 0); + // finalize all array elements + for (size_t i = 0; i < array->capacity; ++i) { + unitree_go__msg__TimeSpec__fini(&array->data[i]); + } + allocator.deallocate(array->data, allocator.state); + array->data = NULL; + array->size = 0; + array->capacity = 0; + } else { + // ensure that data, size, and capacity values are consistent + assert(0 == array->size); + assert(0 == array->capacity); + } +} + +unitree_go__msg__TimeSpec__Sequence * +unitree_go__msg__TimeSpec__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__TimeSpec__Sequence * array = (unitree_go__msg__TimeSpec__Sequence *)allocator.allocate(sizeof(unitree_go__msg__TimeSpec__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = unitree_go__msg__TimeSpec__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +unitree_go__msg__TimeSpec__Sequence__destroy(unitree_go__msg__TimeSpec__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + unitree_go__msg__TimeSpec__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +unitree_go__msg__TimeSpec__Sequence__are_equal(const unitree_go__msg__TimeSpec__Sequence * lhs, const unitree_go__msg__TimeSpec__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!unitree_go__msg__TimeSpec__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +unitree_go__msg__TimeSpec__Sequence__copy( + const unitree_go__msg__TimeSpec__Sequence * input, + unitree_go__msg__TimeSpec__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(unitree_go__msg__TimeSpec); + unitree_go__msg__TimeSpec * data = + (unitree_go__msg__TimeSpec *)realloc(output->data, allocation_size); + if (!data) { + return false; + } + for (size_t i = output->capacity; i < input->size; ++i) { + if (!unitree_go__msg__TimeSpec__init(&data[i])) { + /* free currently allocated and return false */ + for (; i-- > output->capacity; ) { + unitree_go__msg__TimeSpec__fini(&data[i]); + } + free(data); + return false; + } + } + output->data = data; + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!unitree_go__msg__TimeSpec__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__functions.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__functions.h new file mode 100644 index 0000000..b563a81 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from unitree_go:msg/TimeSpec.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__TIME_SPEC__FUNCTIONS_H_ +#define UNITREE_GO__MSG__DETAIL__TIME_SPEC__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#include "unitree_go/msg/detail/time_spec__struct.h" + +/// Initialize msg/TimeSpec message. +/** + * If the init function is called twice for the same message without + * calling fini inbetween previously allocated memory will be leaked. + * \param[in,out] msg The previously allocated message pointer. + * Fields without a default value will not be initialized by this function. + * You might want to call memset(msg, 0, sizeof( + * unitree_go__msg__TimeSpec + * )) before or use + * unitree_go__msg__TimeSpec__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__TimeSpec__init(unitree_go__msg__TimeSpec * msg); + +/// Finalize msg/TimeSpec message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__TimeSpec__fini(unitree_go__msg__TimeSpec * msg); + +/// Create msg/TimeSpec message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * unitree_go__msg__TimeSpec__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__TimeSpec * +unitree_go__msg__TimeSpec__create(); + +/// Destroy msg/TimeSpec message. +/** + * It calls + * unitree_go__msg__TimeSpec__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__TimeSpec__destroy(unitree_go__msg__TimeSpec * msg); + +/// Check for msg/TimeSpec message equality. +/** + * \param[in] lhs The message on the left hand size of the equality operator. + * \param[in] rhs The message on the right hand size of the equality operator. + * \return true if messages are equal, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__TimeSpec__are_equal(const unitree_go__msg__TimeSpec * lhs, const unitree_go__msg__TimeSpec * rhs); + +/// Copy a msg/TimeSpec message. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source message pointer. + * \param[out] output The target message pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer is null + * or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__TimeSpec__copy( + const unitree_go__msg__TimeSpec * input, + unitree_go__msg__TimeSpec * output); + +/// Initialize array of msg/TimeSpec messages. +/** + * It allocates the memory for the number of elements and calls + * unitree_go__msg__TimeSpec__init() + * for each element of the array. + * \param[in,out] array The allocated array pointer. + * \param[in] size The size / capacity of the array. + * \return true if initialization was successful, otherwise false + * If the array pointer is valid and the size is zero it is guaranteed + # to return true. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__TimeSpec__Sequence__init(unitree_go__msg__TimeSpec__Sequence * array, size_t size); + +/// Finalize array of msg/TimeSpec messages. +/** + * It calls + * unitree_go__msg__TimeSpec__fini() + * for each element of the array and frees the memory for the number of + * elements. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__TimeSpec__Sequence__fini(unitree_go__msg__TimeSpec__Sequence * array); + +/// Create array of msg/TimeSpec messages. +/** + * It allocates the memory for the array and calls + * unitree_go__msg__TimeSpec__Sequence__init(). + * \param[in] size The size / capacity of the array. + * \return The pointer to the initialized array if successful, otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__TimeSpec__Sequence * +unitree_go__msg__TimeSpec__Sequence__create(size_t size); + +/// Destroy array of msg/TimeSpec messages. +/** + * It calls + * unitree_go__msg__TimeSpec__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__TimeSpec__Sequence__destroy(unitree_go__msg__TimeSpec__Sequence * array); + +/// Check for msg/TimeSpec message array equality. +/** + * \param[in] lhs The message array on the left hand size of the equality operator. + * \param[in] rhs The message array on the right hand size of the equality operator. + * \return true if message arrays are equal in size and content, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__TimeSpec__Sequence__are_equal(const unitree_go__msg__TimeSpec__Sequence * lhs, const unitree_go__msg__TimeSpec__Sequence * rhs); + +/// Copy an array of msg/TimeSpec messages. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source array pointer. + * \param[out] output The target array pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer + * is null or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__TimeSpec__Sequence__copy( + const unitree_go__msg__TimeSpec__Sequence * input, + unitree_go__msg__TimeSpec__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__TIME_SPEC__FUNCTIONS_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__rosidl_typesupport_fastrtps_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 0000000..3196f3c --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,36 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from unitree_go:msg/TimeSpec.idl +// generated code does not contain a copyright notice +#ifndef UNITREE_GO__MSG__DETAIL__TIME_SPEC__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define UNITREE_GO__MSG__DETAIL__TIME_SPEC__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t get_serialized_size_unitree_go__msg__TimeSpec( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t max_serialized_size_unitree_go__msg__TimeSpec( + bool & full_bounded, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, unitree_go, msg, TimeSpec)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__TIME_SPEC__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__rosidl_typesupport_fastrtps_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 0000000..b4988b4 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,79 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from unitree_go:msg/TimeSpec.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__TIME_SPEC__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__TIME_SPEC__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "unitree_go/msg/detail/time_spec__struct.hpp" + +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-parameter" +# ifdef __clang__ +# pragma clang diagnostic ignored "-Wdeprecated-register" +# pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +# endif +#endif +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif + +#include "fastcdr/Cdr.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_serialize( + const unitree_go::msg::TimeSpec & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + unitree_go::msg::TimeSpec & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +get_serialized_size( + const unitree_go::msg::TimeSpec & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +max_serialized_size_TimeSpec( + bool & full_bounded, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace unitree_go + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, unitree_go, msg, TimeSpec)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__TIME_SPEC__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__rosidl_typesupport_introspection_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__rosidl_typesupport_introspection_c.h new file mode 100644 index 0000000..a30a269 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from unitree_go:msg/TimeSpec.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__TIME_SPEC__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define UNITREE_GO__MSG__DETAIL__TIME_SPEC__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, TimeSpec)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__TIME_SPEC__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__rosidl_typesupport_introspection_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 0000000..7289a13 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from unitree_go:msg/TimeSpec.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__TIME_SPEC__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__TIME_SPEC__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +// TODO(dirk-thomas) these visibility macros should be message package specific +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, TimeSpec)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__TIME_SPEC__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__struct.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__struct.h new file mode 100644 index 0000000..b45f61e --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__struct.h @@ -0,0 +1,41 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from unitree_go:msg/TimeSpec.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__TIME_SPEC__STRUCT_H_ +#define UNITREE_GO__MSG__DETAIL__TIME_SPEC__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Struct defined in msg/TimeSpec in the package unitree_go. +typedef struct unitree_go__msg__TimeSpec +{ + int32_t sec; + uint32_t nanosec; +} unitree_go__msg__TimeSpec; + +// Struct for a sequence of unitree_go__msg__TimeSpec. +typedef struct unitree_go__msg__TimeSpec__Sequence +{ + unitree_go__msg__TimeSpec * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} unitree_go__msg__TimeSpec__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__TIME_SPEC__STRUCT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__struct.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__struct.hpp new file mode 100644 index 0000000..cb9f15b --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__struct.hpp @@ -0,0 +1,144 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from unitree_go:msg/TimeSpec.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__TIME_SPEC__STRUCT_HPP_ +#define UNITREE_GO__MSG__DETAIL__TIME_SPEC__STRUCT_HPP_ + +#include +#include +#include +#include +#include +#include +#include + + +#ifndef _WIN32 +# define DEPRECATED__unitree_go__msg__TimeSpec __attribute__((deprecated)) +#else +# define DEPRECATED__unitree_go__msg__TimeSpec __declspec(deprecated) +#endif + +namespace unitree_go +{ + +namespace msg +{ + +// message struct +template +struct TimeSpec_ +{ + using Type = TimeSpec_; + + explicit TimeSpec_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->sec = 0l; + this->nanosec = 0ul; + } + } + + explicit TimeSpec_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + (void)_alloc; + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->sec = 0l; + this->nanosec = 0ul; + } + } + + // field types and members + using _sec_type = + int32_t; + _sec_type sec; + using _nanosec_type = + uint32_t; + _nanosec_type nanosec; + + // setters for named parameter idiom + Type & set__sec( + const int32_t & _arg) + { + this->sec = _arg; + return *this; + } + Type & set__nanosec( + const uint32_t & _arg) + { + this->nanosec = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + unitree_go::msg::TimeSpec_ *; + using ConstRawPtr = + const unitree_go::msg::TimeSpec_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr const>; + + // pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead + // NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly + typedef DEPRECATED__unitree_go__msg__TimeSpec + std::shared_ptr> + Ptr; + typedef DEPRECATED__unitree_go__msg__TimeSpec + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const TimeSpec_ & other) const + { + if (this->sec != other.sec) { + return false; + } + if (this->nanosec != other.nanosec) { + return false; + } + return true; + } + bool operator!=(const TimeSpec_ & other) const + { + return !this->operator==(other); + } +}; // struct TimeSpec_ + +// alias to use template instance with default allocator +using TimeSpec = + unitree_go::msg::TimeSpec_>; + +// constant definitions + +} // namespace msg + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__TIME_SPEC__STRUCT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__traits.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__traits.hpp new file mode 100644 index 0000000..80eb861 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__traits.hpp @@ -0,0 +1,42 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from unitree_go:msg/TimeSpec.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__TIME_SPEC__TRAITS_HPP_ +#define UNITREE_GO__MSG__DETAIL__TIME_SPEC__TRAITS_HPP_ + +#include "unitree_go/msg/detail/time_spec__struct.hpp" +#include +#include +#include + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "unitree_go::msg::TimeSpec"; +} + +template<> +inline const char * name() +{ + return "unitree_go/msg/TimeSpec"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UNITREE_GO__MSG__DETAIL__TIME_SPEC__TRAITS_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__type_support.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__type_support.c new file mode 100644 index 0000000..d4b9497 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__type_support.c @@ -0,0 +1,96 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from unitree_go:msg/TimeSpec.idl +// generated code does not contain a copyright notice + +#include +#include "unitree_go/msg/detail/time_spec__rosidl_typesupport_introspection_c.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" +#include "rosidl_typesupport_introspection_c/field_types.h" +#include "rosidl_typesupport_introspection_c/identifier.h" +#include "rosidl_typesupport_introspection_c/message_introspection.h" +#include "unitree_go/msg/detail/time_spec__functions.h" +#include "unitree_go/msg/detail/time_spec__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void TimeSpec__rosidl_typesupport_introspection_c__TimeSpec_init_function( + void * message_memory, enum rosidl_runtime_c__message_initialization _init) +{ + // TODO(karsten1987): initializers are not yet implemented for typesupport c + // see https://github.com/ros2/ros2/issues/397 + (void) _init; + unitree_go__msg__TimeSpec__init(message_memory); +} + +void TimeSpec__rosidl_typesupport_introspection_c__TimeSpec_fini_function(void * message_memory) +{ + unitree_go__msg__TimeSpec__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember TimeSpec__rosidl_typesupport_introspection_c__TimeSpec_message_member_array[2] = { + { + "sec", // name + rosidl_typesupport_introspection_c__ROS_TYPE_INT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__TimeSpec, sec), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "nanosec", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT32, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__TimeSpec, nanosec), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers TimeSpec__rosidl_typesupport_introspection_c__TimeSpec_message_members = { + "unitree_go__msg", // message namespace + "TimeSpec", // message name + 2, // number of fields + sizeof(unitree_go__msg__TimeSpec), + TimeSpec__rosidl_typesupport_introspection_c__TimeSpec_message_member_array, // message members + TimeSpec__rosidl_typesupport_introspection_c__TimeSpec_init_function, // function to initialize message memory (memory has to be allocated) + TimeSpec__rosidl_typesupport_introspection_c__TimeSpec_fini_function // function to terminate message instance (will not free memory) +}; + +// this is not const since it must be initialized on first access +// since C does not allow non-integral compile-time constants +static rosidl_message_type_support_t TimeSpec__rosidl_typesupport_introspection_c__TimeSpec_message_type_support_handle = { + 0, + &TimeSpec__rosidl_typesupport_introspection_c__TimeSpec_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, TimeSpec)() { + if (!TimeSpec__rosidl_typesupport_introspection_c__TimeSpec_message_type_support_handle.typesupport_identifier) { + TimeSpec__rosidl_typesupport_introspection_c__TimeSpec_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &TimeSpec__rosidl_typesupport_introspection_c__TimeSpec_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__type_support.cpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__type_support.cpp new file mode 100644 index 0000000..9babcb7 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__type_support.cpp @@ -0,0 +1,122 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from unitree_go:msg/TimeSpec.idl +// generated code does not contain a copyright notice + +#include "array" +#include "cstddef" +#include "string" +#include "vector" +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_cpp/message_type_support.hpp" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/detail/time_spec__struct.hpp" +#include "rosidl_typesupport_introspection_cpp/field_types.hpp" +#include "rosidl_typesupport_introspection_cpp/identifier.hpp" +#include "rosidl_typesupport_introspection_cpp/message_introspection.hpp" +#include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void TimeSpec_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) unitree_go::msg::TimeSpec(_init); +} + +void TimeSpec_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~TimeSpec(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember TimeSpec_message_member_array[2] = { + { + "sec", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_INT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::TimeSpec, sec), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "nanosec", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT32, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::TimeSpec, nanosec), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers TimeSpec_message_members = { + "unitree_go::msg", // message namespace + "TimeSpec", // message name + 2, // number of fields + sizeof(unitree_go::msg::TimeSpec), + TimeSpec_message_member_array, // message members + TimeSpec_init_function, // function to initialize message memory (memory has to be allocated) + TimeSpec_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t TimeSpec_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &TimeSpec_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace unitree_go + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::TimeSpec_message_type_support_handle; +} + +} // namespace rosidl_typesupport_introspection_cpp + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, TimeSpec)() { + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::TimeSpec_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__type_support.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__type_support.h new file mode 100644 index 0000000..50d475d --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from unitree_go:msg/TimeSpec.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__TIME_SPEC__TYPE_SUPPORT_H_ +#define UNITREE_GO__MSG__DETAIL__TIME_SPEC__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rosidl_runtime_c/message_type_support_struct.h" + +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + unitree_go, + msg, + TimeSpec +)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__TIME_SPEC__TYPE_SUPPORT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__type_support.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__type_support.hpp new file mode 100644 index 0000000..dbe73c7 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/time_spec__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from unitree_go:msg/TimeSpec.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__TIME_SPEC__TYPE_SUPPORT_HPP_ +#define UNITREE_GO__MSG__DETAIL__TIME_SPEC__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_cpp__visibility_control.hpp" + +#include "rosidl_typesupport_cpp/message_type_support.hpp" + +#ifdef __cplusplus +extern "C" +{ +#endif +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + unitree_go, + msg, + TimeSpec +)(); +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__TIME_SPEC__TYPE_SUPPORT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__builder.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__builder.hpp new file mode 100644 index 0000000..267c72e --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__builder.hpp @@ -0,0 +1,311 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from unitree_go:msg/UwbState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__UWB_STATE__BUILDER_HPP_ +#define UNITREE_GO__MSG__DETAIL__UWB_STATE__BUILDER_HPP_ + +#include "unitree_go/msg/detail/uwb_state__struct.hpp" +#include +#include +#include + + +namespace unitree_go +{ + +namespace msg +{ + +namespace builder +{ + +class Init_UwbState_enabled_from_app +{ +public: + explicit Init_UwbState_enabled_from_app(::unitree_go::msg::UwbState & msg) + : msg_(msg) + {} + ::unitree_go::msg::UwbState enabled_from_app(::unitree_go::msg::UwbState::_enabled_from_app_type arg) + { + msg_.enabled_from_app = std::move(arg); + return std::move(msg_); + } + +private: + ::unitree_go::msg::UwbState msg_; +}; + +class Init_UwbState_buttons +{ +public: + explicit Init_UwbState_buttons(::unitree_go::msg::UwbState & msg) + : msg_(msg) + {} + Init_UwbState_enabled_from_app buttons(::unitree_go::msg::UwbState::_buttons_type arg) + { + msg_.buttons = std::move(arg); + return Init_UwbState_enabled_from_app(msg_); + } + +private: + ::unitree_go::msg::UwbState msg_; +}; + +class Init_UwbState_error_state +{ +public: + explicit Init_UwbState_error_state(::unitree_go::msg::UwbState & msg) + : msg_(msg) + {} + Init_UwbState_buttons error_state(::unitree_go::msg::UwbState::_error_state_type arg) + { + msg_.error_state = std::move(arg); + return Init_UwbState_buttons(msg_); + } + +private: + ::unitree_go::msg::UwbState msg_; +}; + +class Init_UwbState_joystick +{ +public: + explicit Init_UwbState_joystick(::unitree_go::msg::UwbState & msg) + : msg_(msg) + {} + Init_UwbState_error_state joystick(::unitree_go::msg::UwbState::_joystick_type arg) + { + msg_.joystick = std::move(arg); + return Init_UwbState_error_state(msg_); + } + +private: + ::unitree_go::msg::UwbState msg_; +}; + +class Init_UwbState_base_yaw +{ +public: + explicit Init_UwbState_base_yaw(::unitree_go::msg::UwbState & msg) + : msg_(msg) + {} + Init_UwbState_joystick base_yaw(::unitree_go::msg::UwbState::_base_yaw_type arg) + { + msg_.base_yaw = std::move(arg); + return Init_UwbState_joystick(msg_); + } + +private: + ::unitree_go::msg::UwbState msg_; +}; + +class Init_UwbState_base_pitch +{ +public: + explicit Init_UwbState_base_pitch(::unitree_go::msg::UwbState & msg) + : msg_(msg) + {} + Init_UwbState_base_yaw base_pitch(::unitree_go::msg::UwbState::_base_pitch_type arg) + { + msg_.base_pitch = std::move(arg); + return Init_UwbState_base_yaw(msg_); + } + +private: + ::unitree_go::msg::UwbState msg_; +}; + +class Init_UwbState_base_roll +{ +public: + explicit Init_UwbState_base_roll(::unitree_go::msg::UwbState & msg) + : msg_(msg) + {} + Init_UwbState_base_pitch base_roll(::unitree_go::msg::UwbState::_base_roll_type arg) + { + msg_.base_roll = std::move(arg); + return Init_UwbState_base_pitch(msg_); + } + +private: + ::unitree_go::msg::UwbState msg_; +}; + +class Init_UwbState_tag_yaw +{ +public: + explicit Init_UwbState_tag_yaw(::unitree_go::msg::UwbState & msg) + : msg_(msg) + {} + Init_UwbState_base_roll tag_yaw(::unitree_go::msg::UwbState::_tag_yaw_type arg) + { + msg_.tag_yaw = std::move(arg); + return Init_UwbState_base_roll(msg_); + } + +private: + ::unitree_go::msg::UwbState msg_; +}; + +class Init_UwbState_tag_pitch +{ +public: + explicit Init_UwbState_tag_pitch(::unitree_go::msg::UwbState & msg) + : msg_(msg) + {} + Init_UwbState_tag_yaw tag_pitch(::unitree_go::msg::UwbState::_tag_pitch_type arg) + { + msg_.tag_pitch = std::move(arg); + return Init_UwbState_tag_yaw(msg_); + } + +private: + ::unitree_go::msg::UwbState msg_; +}; + +class Init_UwbState_tag_roll +{ +public: + explicit Init_UwbState_tag_roll(::unitree_go::msg::UwbState & msg) + : msg_(msg) + {} + Init_UwbState_tag_pitch tag_roll(::unitree_go::msg::UwbState::_tag_roll_type arg) + { + msg_.tag_roll = std::move(arg); + return Init_UwbState_tag_pitch(msg_); + } + +private: + ::unitree_go::msg::UwbState msg_; +}; + +class Init_UwbState_yaw_est +{ +public: + explicit Init_UwbState_yaw_est(::unitree_go::msg::UwbState & msg) + : msg_(msg) + {} + Init_UwbState_tag_roll yaw_est(::unitree_go::msg::UwbState::_yaw_est_type arg) + { + msg_.yaw_est = std::move(arg); + return Init_UwbState_tag_roll(msg_); + } + +private: + ::unitree_go::msg::UwbState msg_; +}; + +class Init_UwbState_distance_est +{ +public: + explicit Init_UwbState_distance_est(::unitree_go::msg::UwbState & msg) + : msg_(msg) + {} + Init_UwbState_yaw_est distance_est(::unitree_go::msg::UwbState::_distance_est_type arg) + { + msg_.distance_est = std::move(arg); + return Init_UwbState_yaw_est(msg_); + } + +private: + ::unitree_go::msg::UwbState msg_; +}; + +class Init_UwbState_pitch_est +{ +public: + explicit Init_UwbState_pitch_est(::unitree_go::msg::UwbState & msg) + : msg_(msg) + {} + Init_UwbState_distance_est pitch_est(::unitree_go::msg::UwbState::_pitch_est_type arg) + { + msg_.pitch_est = std::move(arg); + return Init_UwbState_distance_est(msg_); + } + +private: + ::unitree_go::msg::UwbState msg_; +}; + +class Init_UwbState_orientation_est +{ +public: + explicit Init_UwbState_orientation_est(::unitree_go::msg::UwbState & msg) + : msg_(msg) + {} + Init_UwbState_pitch_est orientation_est(::unitree_go::msg::UwbState::_orientation_est_type arg) + { + msg_.orientation_est = std::move(arg); + return Init_UwbState_pitch_est(msg_); + } + +private: + ::unitree_go::msg::UwbState msg_; +}; + +class Init_UwbState_joy_mode +{ +public: + explicit Init_UwbState_joy_mode(::unitree_go::msg::UwbState & msg) + : msg_(msg) + {} + Init_UwbState_orientation_est joy_mode(::unitree_go::msg::UwbState::_joy_mode_type arg) + { + msg_.joy_mode = std::move(arg); + return Init_UwbState_orientation_est(msg_); + } + +private: + ::unitree_go::msg::UwbState msg_; +}; + +class Init_UwbState_channel +{ +public: + explicit Init_UwbState_channel(::unitree_go::msg::UwbState & msg) + : msg_(msg) + {} + Init_UwbState_joy_mode channel(::unitree_go::msg::UwbState::_channel_type arg) + { + msg_.channel = std::move(arg); + return Init_UwbState_joy_mode(msg_); + } + +private: + ::unitree_go::msg::UwbState msg_; +}; + +class Init_UwbState_version +{ +public: + Init_UwbState_version() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_UwbState_channel version(::unitree_go::msg::UwbState::_version_type arg) + { + msg_.version = std::move(arg); + return Init_UwbState_channel(msg_); + } + +private: + ::unitree_go::msg::UwbState msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::unitree_go::msg::UwbState>() +{ + return unitree_go::msg::builder::Init_UwbState_version(); +} + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__UWB_STATE__BUILDER_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__functions.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__functions.c new file mode 100644 index 0000000..5479884 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__functions.c @@ -0,0 +1,367 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from unitree_go:msg/UwbState.idl +// generated code does not contain a copyright notice +#include "unitree_go/msg/detail/uwb_state__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +unitree_go__msg__UwbState__init(unitree_go__msg__UwbState * msg) +{ + if (!msg) { + return false; + } + // version + // channel + // joy_mode + // orientation_est + // pitch_est + // distance_est + // yaw_est + // tag_roll + // tag_pitch + // tag_yaw + // base_roll + // base_pitch + // base_yaw + // joystick + // error_state + // buttons + // enabled_from_app + return true; +} + +void +unitree_go__msg__UwbState__fini(unitree_go__msg__UwbState * msg) +{ + if (!msg) { + return; + } + // version + // channel + // joy_mode + // orientation_est + // pitch_est + // distance_est + // yaw_est + // tag_roll + // tag_pitch + // tag_yaw + // base_roll + // base_pitch + // base_yaw + // joystick + // error_state + // buttons + // enabled_from_app +} + +bool +unitree_go__msg__UwbState__are_equal(const unitree_go__msg__UwbState * lhs, const unitree_go__msg__UwbState * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // version + for (size_t i = 0; i < 2; ++i) { + if (lhs->version[i] != rhs->version[i]) { + return false; + } + } + // channel + if (lhs->channel != rhs->channel) { + return false; + } + // joy_mode + if (lhs->joy_mode != rhs->joy_mode) { + return false; + } + // orientation_est + if (lhs->orientation_est != rhs->orientation_est) { + return false; + } + // pitch_est + if (lhs->pitch_est != rhs->pitch_est) { + return false; + } + // distance_est + if (lhs->distance_est != rhs->distance_est) { + return false; + } + // yaw_est + if (lhs->yaw_est != rhs->yaw_est) { + return false; + } + // tag_roll + if (lhs->tag_roll != rhs->tag_roll) { + return false; + } + // tag_pitch + if (lhs->tag_pitch != rhs->tag_pitch) { + return false; + } + // tag_yaw + if (lhs->tag_yaw != rhs->tag_yaw) { + return false; + } + // base_roll + if (lhs->base_roll != rhs->base_roll) { + return false; + } + // base_pitch + if (lhs->base_pitch != rhs->base_pitch) { + return false; + } + // base_yaw + if (lhs->base_yaw != rhs->base_yaw) { + return false; + } + // joystick + for (size_t i = 0; i < 2; ++i) { + if (lhs->joystick[i] != rhs->joystick[i]) { + return false; + } + } + // error_state + if (lhs->error_state != rhs->error_state) { + return false; + } + // buttons + if (lhs->buttons != rhs->buttons) { + return false; + } + // enabled_from_app + if (lhs->enabled_from_app != rhs->enabled_from_app) { + return false; + } + return true; +} + +bool +unitree_go__msg__UwbState__copy( + const unitree_go__msg__UwbState * input, + unitree_go__msg__UwbState * output) +{ + if (!input || !output) { + return false; + } + // version + for (size_t i = 0; i < 2; ++i) { + output->version[i] = input->version[i]; + } + // channel + output->channel = input->channel; + // joy_mode + output->joy_mode = input->joy_mode; + // orientation_est + output->orientation_est = input->orientation_est; + // pitch_est + output->pitch_est = input->pitch_est; + // distance_est + output->distance_est = input->distance_est; + // yaw_est + output->yaw_est = input->yaw_est; + // tag_roll + output->tag_roll = input->tag_roll; + // tag_pitch + output->tag_pitch = input->tag_pitch; + // tag_yaw + output->tag_yaw = input->tag_yaw; + // base_roll + output->base_roll = input->base_roll; + // base_pitch + output->base_pitch = input->base_pitch; + // base_yaw + output->base_yaw = input->base_yaw; + // joystick + for (size_t i = 0; i < 2; ++i) { + output->joystick[i] = input->joystick[i]; + } + // error_state + output->error_state = input->error_state; + // buttons + output->buttons = input->buttons; + // enabled_from_app + output->enabled_from_app = input->enabled_from_app; + return true; +} + +unitree_go__msg__UwbState * +unitree_go__msg__UwbState__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__UwbState * msg = (unitree_go__msg__UwbState *)allocator.allocate(sizeof(unitree_go__msg__UwbState), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(unitree_go__msg__UwbState)); + bool success = unitree_go__msg__UwbState__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +unitree_go__msg__UwbState__destroy(unitree_go__msg__UwbState * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + unitree_go__msg__UwbState__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +unitree_go__msg__UwbState__Sequence__init(unitree_go__msg__UwbState__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__UwbState * data = NULL; + + if (size) { + data = (unitree_go__msg__UwbState *)allocator.zero_allocate(size, sizeof(unitree_go__msg__UwbState), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = unitree_go__msg__UwbState__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + unitree_go__msg__UwbState__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +unitree_go__msg__UwbState__Sequence__fini(unitree_go__msg__UwbState__Sequence * array) +{ + if (!array) { + return; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + + if (array->data) { + // ensure that data and capacity values are consistent + assert(array->capacity > 0); + // finalize all array elements + for (size_t i = 0; i < array->capacity; ++i) { + unitree_go__msg__UwbState__fini(&array->data[i]); + } + allocator.deallocate(array->data, allocator.state); + array->data = NULL; + array->size = 0; + array->capacity = 0; + } else { + // ensure that data, size, and capacity values are consistent + assert(0 == array->size); + assert(0 == array->capacity); + } +} + +unitree_go__msg__UwbState__Sequence * +unitree_go__msg__UwbState__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__UwbState__Sequence * array = (unitree_go__msg__UwbState__Sequence *)allocator.allocate(sizeof(unitree_go__msg__UwbState__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = unitree_go__msg__UwbState__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +unitree_go__msg__UwbState__Sequence__destroy(unitree_go__msg__UwbState__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + unitree_go__msg__UwbState__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +unitree_go__msg__UwbState__Sequence__are_equal(const unitree_go__msg__UwbState__Sequence * lhs, const unitree_go__msg__UwbState__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!unitree_go__msg__UwbState__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +unitree_go__msg__UwbState__Sequence__copy( + const unitree_go__msg__UwbState__Sequence * input, + unitree_go__msg__UwbState__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(unitree_go__msg__UwbState); + unitree_go__msg__UwbState * data = + (unitree_go__msg__UwbState *)realloc(output->data, allocation_size); + if (!data) { + return false; + } + for (size_t i = output->capacity; i < input->size; ++i) { + if (!unitree_go__msg__UwbState__init(&data[i])) { + /* free currently allocated and return false */ + for (; i-- > output->capacity; ) { + unitree_go__msg__UwbState__fini(&data[i]); + } + free(data); + return false; + } + } + output->data = data; + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!unitree_go__msg__UwbState__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__functions.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__functions.h new file mode 100644 index 0000000..5e5eeed --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from unitree_go:msg/UwbState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__UWB_STATE__FUNCTIONS_H_ +#define UNITREE_GO__MSG__DETAIL__UWB_STATE__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#include "unitree_go/msg/detail/uwb_state__struct.h" + +/// Initialize msg/UwbState message. +/** + * If the init function is called twice for the same message without + * calling fini inbetween previously allocated memory will be leaked. + * \param[in,out] msg The previously allocated message pointer. + * Fields without a default value will not be initialized by this function. + * You might want to call memset(msg, 0, sizeof( + * unitree_go__msg__UwbState + * )) before or use + * unitree_go__msg__UwbState__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__UwbState__init(unitree_go__msg__UwbState * msg); + +/// Finalize msg/UwbState message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__UwbState__fini(unitree_go__msg__UwbState * msg); + +/// Create msg/UwbState message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * unitree_go__msg__UwbState__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__UwbState * +unitree_go__msg__UwbState__create(); + +/// Destroy msg/UwbState message. +/** + * It calls + * unitree_go__msg__UwbState__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__UwbState__destroy(unitree_go__msg__UwbState * msg); + +/// Check for msg/UwbState message equality. +/** + * \param[in] lhs The message on the left hand size of the equality operator. + * \param[in] rhs The message on the right hand size of the equality operator. + * \return true if messages are equal, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__UwbState__are_equal(const unitree_go__msg__UwbState * lhs, const unitree_go__msg__UwbState * rhs); + +/// Copy a msg/UwbState message. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source message pointer. + * \param[out] output The target message pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer is null + * or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__UwbState__copy( + const unitree_go__msg__UwbState * input, + unitree_go__msg__UwbState * output); + +/// Initialize array of msg/UwbState messages. +/** + * It allocates the memory for the number of elements and calls + * unitree_go__msg__UwbState__init() + * for each element of the array. + * \param[in,out] array The allocated array pointer. + * \param[in] size The size / capacity of the array. + * \return true if initialization was successful, otherwise false + * If the array pointer is valid and the size is zero it is guaranteed + # to return true. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__UwbState__Sequence__init(unitree_go__msg__UwbState__Sequence * array, size_t size); + +/// Finalize array of msg/UwbState messages. +/** + * It calls + * unitree_go__msg__UwbState__fini() + * for each element of the array and frees the memory for the number of + * elements. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__UwbState__Sequence__fini(unitree_go__msg__UwbState__Sequence * array); + +/// Create array of msg/UwbState messages. +/** + * It allocates the memory for the array and calls + * unitree_go__msg__UwbState__Sequence__init(). + * \param[in] size The size / capacity of the array. + * \return The pointer to the initialized array if successful, otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__UwbState__Sequence * +unitree_go__msg__UwbState__Sequence__create(size_t size); + +/// Destroy array of msg/UwbState messages. +/** + * It calls + * unitree_go__msg__UwbState__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__UwbState__Sequence__destroy(unitree_go__msg__UwbState__Sequence * array); + +/// Check for msg/UwbState message array equality. +/** + * \param[in] lhs The message array on the left hand size of the equality operator. + * \param[in] rhs The message array on the right hand size of the equality operator. + * \return true if message arrays are equal in size and content, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__UwbState__Sequence__are_equal(const unitree_go__msg__UwbState__Sequence * lhs, const unitree_go__msg__UwbState__Sequence * rhs); + +/// Copy an array of msg/UwbState messages. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source array pointer. + * \param[out] output The target array pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer + * is null or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__UwbState__Sequence__copy( + const unitree_go__msg__UwbState__Sequence * input, + unitree_go__msg__UwbState__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__UWB_STATE__FUNCTIONS_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__rosidl_typesupport_fastrtps_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 0000000..b17eaef --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,36 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from unitree_go:msg/UwbState.idl +// generated code does not contain a copyright notice +#ifndef UNITREE_GO__MSG__DETAIL__UWB_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define UNITREE_GO__MSG__DETAIL__UWB_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t get_serialized_size_unitree_go__msg__UwbState( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t max_serialized_size_unitree_go__msg__UwbState( + bool & full_bounded, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, unitree_go, msg, UwbState)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__UWB_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__rosidl_typesupport_fastrtps_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 0000000..710fd84 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,79 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from unitree_go:msg/UwbState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__UWB_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__UWB_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "unitree_go/msg/detail/uwb_state__struct.hpp" + +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-parameter" +# ifdef __clang__ +# pragma clang diagnostic ignored "-Wdeprecated-register" +# pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +# endif +#endif +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif + +#include "fastcdr/Cdr.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_serialize( + const unitree_go::msg::UwbState & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + unitree_go::msg::UwbState & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +get_serialized_size( + const unitree_go::msg::UwbState & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +max_serialized_size_UwbState( + bool & full_bounded, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace unitree_go + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, unitree_go, msg, UwbState)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__UWB_STATE__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__rosidl_typesupport_introspection_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__rosidl_typesupport_introspection_c.h new file mode 100644 index 0000000..efe19ed --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from unitree_go:msg/UwbState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__UWB_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define UNITREE_GO__MSG__DETAIL__UWB_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, UwbState)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__UWB_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__rosidl_typesupport_introspection_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 0000000..bfd599d --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from unitree_go:msg/UwbState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__UWB_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__UWB_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +// TODO(dirk-thomas) these visibility macros should be message package specific +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, UwbState)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__UWB_STATE__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__struct.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__struct.h new file mode 100644 index 0000000..406e537 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__struct.h @@ -0,0 +1,56 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from unitree_go:msg/UwbState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__UWB_STATE__STRUCT_H_ +#define UNITREE_GO__MSG__DETAIL__UWB_STATE__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Struct defined in msg/UwbState in the package unitree_go. +typedef struct unitree_go__msg__UwbState +{ + uint8_t version[2]; + uint8_t channel; + uint8_t joy_mode; + float orientation_est; + float pitch_est; + float distance_est; + float yaw_est; + float tag_roll; + float tag_pitch; + float tag_yaw; + float base_roll; + float base_pitch; + float base_yaw; + float joystick[2]; + uint8_t error_state; + uint8_t buttons; + uint8_t enabled_from_app; +} unitree_go__msg__UwbState; + +// Struct for a sequence of unitree_go__msg__UwbState. +typedef struct unitree_go__msg__UwbState__Sequence +{ + unitree_go__msg__UwbState * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} unitree_go__msg__UwbState__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__UWB_STATE__STRUCT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__struct.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__struct.hpp new file mode 100644 index 0000000..0d63dc7 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__struct.hpp @@ -0,0 +1,355 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from unitree_go:msg/UwbState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__UWB_STATE__STRUCT_HPP_ +#define UNITREE_GO__MSG__DETAIL__UWB_STATE__STRUCT_HPP_ + +#include +#include +#include +#include +#include +#include +#include + + +#ifndef _WIN32 +# define DEPRECATED__unitree_go__msg__UwbState __attribute__((deprecated)) +#else +# define DEPRECATED__unitree_go__msg__UwbState __declspec(deprecated) +#endif + +namespace unitree_go +{ + +namespace msg +{ + +// message struct +template +struct UwbState_ +{ + using Type = UwbState_; + + explicit UwbState_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + std::fill::iterator, uint8_t>(this->version.begin(), this->version.end(), 0); + this->channel = 0; + this->joy_mode = 0; + this->orientation_est = 0.0f; + this->pitch_est = 0.0f; + this->distance_est = 0.0f; + this->yaw_est = 0.0f; + this->tag_roll = 0.0f; + this->tag_pitch = 0.0f; + this->tag_yaw = 0.0f; + this->base_roll = 0.0f; + this->base_pitch = 0.0f; + this->base_yaw = 0.0f; + std::fill::iterator, float>(this->joystick.begin(), this->joystick.end(), 0.0f); + this->error_state = 0; + this->buttons = 0; + this->enabled_from_app = 0; + } + } + + explicit UwbState_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + : version(_alloc), + joystick(_alloc) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + std::fill::iterator, uint8_t>(this->version.begin(), this->version.end(), 0); + this->channel = 0; + this->joy_mode = 0; + this->orientation_est = 0.0f; + this->pitch_est = 0.0f; + this->distance_est = 0.0f; + this->yaw_est = 0.0f; + this->tag_roll = 0.0f; + this->tag_pitch = 0.0f; + this->tag_yaw = 0.0f; + this->base_roll = 0.0f; + this->base_pitch = 0.0f; + this->base_yaw = 0.0f; + std::fill::iterator, float>(this->joystick.begin(), this->joystick.end(), 0.0f); + this->error_state = 0; + this->buttons = 0; + this->enabled_from_app = 0; + } + } + + // field types and members + using _version_type = + std::array; + _version_type version; + using _channel_type = + uint8_t; + _channel_type channel; + using _joy_mode_type = + uint8_t; + _joy_mode_type joy_mode; + using _orientation_est_type = + float; + _orientation_est_type orientation_est; + using _pitch_est_type = + float; + _pitch_est_type pitch_est; + using _distance_est_type = + float; + _distance_est_type distance_est; + using _yaw_est_type = + float; + _yaw_est_type yaw_est; + using _tag_roll_type = + float; + _tag_roll_type tag_roll; + using _tag_pitch_type = + float; + _tag_pitch_type tag_pitch; + using _tag_yaw_type = + float; + _tag_yaw_type tag_yaw; + using _base_roll_type = + float; + _base_roll_type base_roll; + using _base_pitch_type = + float; + _base_pitch_type base_pitch; + using _base_yaw_type = + float; + _base_yaw_type base_yaw; + using _joystick_type = + std::array; + _joystick_type joystick; + using _error_state_type = + uint8_t; + _error_state_type error_state; + using _buttons_type = + uint8_t; + _buttons_type buttons; + using _enabled_from_app_type = + uint8_t; + _enabled_from_app_type enabled_from_app; + + // setters for named parameter idiom + Type & set__version( + const std::array & _arg) + { + this->version = _arg; + return *this; + } + Type & set__channel( + const uint8_t & _arg) + { + this->channel = _arg; + return *this; + } + Type & set__joy_mode( + const uint8_t & _arg) + { + this->joy_mode = _arg; + return *this; + } + Type & set__orientation_est( + const float & _arg) + { + this->orientation_est = _arg; + return *this; + } + Type & set__pitch_est( + const float & _arg) + { + this->pitch_est = _arg; + return *this; + } + Type & set__distance_est( + const float & _arg) + { + this->distance_est = _arg; + return *this; + } + Type & set__yaw_est( + const float & _arg) + { + this->yaw_est = _arg; + return *this; + } + Type & set__tag_roll( + const float & _arg) + { + this->tag_roll = _arg; + return *this; + } + Type & set__tag_pitch( + const float & _arg) + { + this->tag_pitch = _arg; + return *this; + } + Type & set__tag_yaw( + const float & _arg) + { + this->tag_yaw = _arg; + return *this; + } + Type & set__base_roll( + const float & _arg) + { + this->base_roll = _arg; + return *this; + } + Type & set__base_pitch( + const float & _arg) + { + this->base_pitch = _arg; + return *this; + } + Type & set__base_yaw( + const float & _arg) + { + this->base_yaw = _arg; + return *this; + } + Type & set__joystick( + const std::array & _arg) + { + this->joystick = _arg; + return *this; + } + Type & set__error_state( + const uint8_t & _arg) + { + this->error_state = _arg; + return *this; + } + Type & set__buttons( + const uint8_t & _arg) + { + this->buttons = _arg; + return *this; + } + Type & set__enabled_from_app( + const uint8_t & _arg) + { + this->enabled_from_app = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + unitree_go::msg::UwbState_ *; + using ConstRawPtr = + const unitree_go::msg::UwbState_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr const>; + + // pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead + // NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly + typedef DEPRECATED__unitree_go__msg__UwbState + std::shared_ptr> + Ptr; + typedef DEPRECATED__unitree_go__msg__UwbState + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const UwbState_ & other) const + { + if (this->version != other.version) { + return false; + } + if (this->channel != other.channel) { + return false; + } + if (this->joy_mode != other.joy_mode) { + return false; + } + if (this->orientation_est != other.orientation_est) { + return false; + } + if (this->pitch_est != other.pitch_est) { + return false; + } + if (this->distance_est != other.distance_est) { + return false; + } + if (this->yaw_est != other.yaw_est) { + return false; + } + if (this->tag_roll != other.tag_roll) { + return false; + } + if (this->tag_pitch != other.tag_pitch) { + return false; + } + if (this->tag_yaw != other.tag_yaw) { + return false; + } + if (this->base_roll != other.base_roll) { + return false; + } + if (this->base_pitch != other.base_pitch) { + return false; + } + if (this->base_yaw != other.base_yaw) { + return false; + } + if (this->joystick != other.joystick) { + return false; + } + if (this->error_state != other.error_state) { + return false; + } + if (this->buttons != other.buttons) { + return false; + } + if (this->enabled_from_app != other.enabled_from_app) { + return false; + } + return true; + } + bool operator!=(const UwbState_ & other) const + { + return !this->operator==(other); + } +}; // struct UwbState_ + +// alias to use template instance with default allocator +using UwbState = + unitree_go::msg::UwbState_>; + +// constant definitions + +} // namespace msg + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__UWB_STATE__STRUCT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__traits.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__traits.hpp new file mode 100644 index 0000000..cc7b0cd --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__traits.hpp @@ -0,0 +1,42 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from unitree_go:msg/UwbState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__UWB_STATE__TRAITS_HPP_ +#define UNITREE_GO__MSG__DETAIL__UWB_STATE__TRAITS_HPP_ + +#include "unitree_go/msg/detail/uwb_state__struct.hpp" +#include +#include +#include + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "unitree_go::msg::UwbState"; +} + +template<> +inline const char * name() +{ + return "unitree_go/msg/UwbState"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UNITREE_GO__MSG__DETAIL__UWB_STATE__TRAITS_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__type_support.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__type_support.c new file mode 100644 index 0000000..79ba49b --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__type_support.c @@ -0,0 +1,321 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from unitree_go:msg/UwbState.idl +// generated code does not contain a copyright notice + +#include +#include "unitree_go/msg/detail/uwb_state__rosidl_typesupport_introspection_c.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" +#include "rosidl_typesupport_introspection_c/field_types.h" +#include "rosidl_typesupport_introspection_c/identifier.h" +#include "rosidl_typesupport_introspection_c/message_introspection.h" +#include "unitree_go/msg/detail/uwb_state__functions.h" +#include "unitree_go/msg/detail/uwb_state__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void UwbState__rosidl_typesupport_introspection_c__UwbState_init_function( + void * message_memory, enum rosidl_runtime_c__message_initialization _init) +{ + // TODO(karsten1987): initializers are not yet implemented for typesupport c + // see https://github.com/ros2/ros2/issues/397 + (void) _init; + unitree_go__msg__UwbState__init(message_memory); +} + +void UwbState__rosidl_typesupport_introspection_c__UwbState_fini_function(void * message_memory) +{ + unitree_go__msg__UwbState__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember UwbState__rosidl_typesupport_introspection_c__UwbState_message_member_array[17] = { + { + "version", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 2, // array size + false, // is upper bound + offsetof(unitree_go__msg__UwbState, version), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "channel", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__UwbState, channel), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "joy_mode", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__UwbState, joy_mode), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "orientation_est", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__UwbState, orientation_est), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "pitch_est", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__UwbState, pitch_est), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "distance_est", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__UwbState, distance_est), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "yaw_est", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__UwbState, yaw_est), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "tag_roll", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__UwbState, tag_roll), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "tag_pitch", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__UwbState, tag_pitch), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "tag_yaw", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__UwbState, tag_yaw), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "base_roll", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__UwbState, base_roll), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "base_pitch", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__UwbState, base_pitch), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "base_yaw", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__UwbState, base_yaw), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "joystick", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + true, // is array + 2, // array size + false, // is upper bound + offsetof(unitree_go__msg__UwbState, joystick), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "error_state", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__UwbState, error_state), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "buttons", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__UwbState, buttons), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "enabled_from_app", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__UwbState, enabled_from_app), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers UwbState__rosidl_typesupport_introspection_c__UwbState_message_members = { + "unitree_go__msg", // message namespace + "UwbState", // message name + 17, // number of fields + sizeof(unitree_go__msg__UwbState), + UwbState__rosidl_typesupport_introspection_c__UwbState_message_member_array, // message members + UwbState__rosidl_typesupport_introspection_c__UwbState_init_function, // function to initialize message memory (memory has to be allocated) + UwbState__rosidl_typesupport_introspection_c__UwbState_fini_function // function to terminate message instance (will not free memory) +}; + +// this is not const since it must be initialized on first access +// since C does not allow non-integral compile-time constants +static rosidl_message_type_support_t UwbState__rosidl_typesupport_introspection_c__UwbState_message_type_support_handle = { + 0, + &UwbState__rosidl_typesupport_introspection_c__UwbState_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, UwbState)() { + if (!UwbState__rosidl_typesupport_introspection_c__UwbState_message_type_support_handle.typesupport_identifier) { + UwbState__rosidl_typesupport_introspection_c__UwbState_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &UwbState__rosidl_typesupport_introspection_c__UwbState_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__type_support.cpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__type_support.cpp new file mode 100644 index 0000000..ef785d2 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__type_support.cpp @@ -0,0 +1,387 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from unitree_go:msg/UwbState.idl +// generated code does not contain a copyright notice + +#include "array" +#include "cstddef" +#include "string" +#include "vector" +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_cpp/message_type_support.hpp" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/detail/uwb_state__struct.hpp" +#include "rosidl_typesupport_introspection_cpp/field_types.hpp" +#include "rosidl_typesupport_introspection_cpp/identifier.hpp" +#include "rosidl_typesupport_introspection_cpp/message_introspection.hpp" +#include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void UwbState_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) unitree_go::msg::UwbState(_init); +} + +void UwbState_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~UwbState(); +} + +size_t size_function__UwbState__version(const void * untyped_member) +{ + (void)untyped_member; + return 2; +} + +const void * get_const_function__UwbState__version(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__UwbState__version(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +size_t size_function__UwbState__joystick(const void * untyped_member) +{ + (void)untyped_member; + return 2; +} + +const void * get_const_function__UwbState__joystick(const void * untyped_member, size_t index) +{ + const auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +void * get_function__UwbState__joystick(void * untyped_member, size_t index) +{ + auto & member = + *reinterpret_cast *>(untyped_member); + return &member[index]; +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember UwbState_message_member_array[17] = { + { + "version", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 2, // array size + false, // is upper bound + offsetof(unitree_go::msg::UwbState, version), // bytes offset in struct + nullptr, // default value + size_function__UwbState__version, // size() function pointer + get_const_function__UwbState__version, // get_const(index) function pointer + get_function__UwbState__version, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "channel", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::UwbState, channel), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "joy_mode", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::UwbState, joy_mode), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "orientation_est", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::UwbState, orientation_est), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "pitch_est", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::UwbState, pitch_est), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "distance_est", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::UwbState, distance_est), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "yaw_est", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::UwbState, yaw_est), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "tag_roll", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::UwbState, tag_roll), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "tag_pitch", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::UwbState, tag_pitch), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "tag_yaw", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::UwbState, tag_yaw), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "base_roll", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::UwbState, base_roll), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "base_pitch", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::UwbState, base_pitch), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "base_yaw", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::UwbState, base_yaw), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "joystick", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + true, // is array + 2, // array size + false, // is upper bound + offsetof(unitree_go::msg::UwbState, joystick), // bytes offset in struct + nullptr, // default value + size_function__UwbState__joystick, // size() function pointer + get_const_function__UwbState__joystick, // get_const(index) function pointer + get_function__UwbState__joystick, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "error_state", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::UwbState, error_state), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "buttons", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::UwbState, buttons), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "enabled_from_app", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::UwbState, enabled_from_app), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers UwbState_message_members = { + "unitree_go::msg", // message namespace + "UwbState", // message name + 17, // number of fields + sizeof(unitree_go::msg::UwbState), + UwbState_message_member_array, // message members + UwbState_init_function, // function to initialize message memory (memory has to be allocated) + UwbState_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t UwbState_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &UwbState_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace unitree_go + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::UwbState_message_type_support_handle; +} + +} // namespace rosidl_typesupport_introspection_cpp + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, UwbState)() { + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::UwbState_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__type_support.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__type_support.h new file mode 100644 index 0000000..edda64e --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from unitree_go:msg/UwbState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__UWB_STATE__TYPE_SUPPORT_H_ +#define UNITREE_GO__MSG__DETAIL__UWB_STATE__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rosidl_runtime_c/message_type_support_struct.h" + +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + unitree_go, + msg, + UwbState +)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__UWB_STATE__TYPE_SUPPORT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__type_support.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__type_support.hpp new file mode 100644 index 0000000..c2bdb62 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_state__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from unitree_go:msg/UwbState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__UWB_STATE__TYPE_SUPPORT_HPP_ +#define UNITREE_GO__MSG__DETAIL__UWB_STATE__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_cpp__visibility_control.hpp" + +#include "rosidl_typesupport_cpp/message_type_support.hpp" + +#ifdef __cplusplus +extern "C" +{ +#endif +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + unitree_go, + msg, + UwbState +)(); +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__UWB_STATE__TYPE_SUPPORT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__builder.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__builder.hpp new file mode 100644 index 0000000..9f6dc91 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__builder.hpp @@ -0,0 +1,55 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from unitree_go:msg/UwbSwitch.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__UWB_SWITCH__BUILDER_HPP_ +#define UNITREE_GO__MSG__DETAIL__UWB_SWITCH__BUILDER_HPP_ + +#include "unitree_go/msg/detail/uwb_switch__struct.hpp" +#include +#include +#include + + +namespace unitree_go +{ + +namespace msg +{ + +namespace builder +{ + +class Init_UwbSwitch_enabled +{ +public: + Init_UwbSwitch_enabled() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + ::unitree_go::msg::UwbSwitch enabled(::unitree_go::msg::UwbSwitch::_enabled_type arg) + { + msg_.enabled = std::move(arg); + return std::move(msg_); + } + +private: + ::unitree_go::msg::UwbSwitch msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::unitree_go::msg::UwbSwitch>() +{ + return unitree_go::msg::builder::Init_UwbSwitch_enabled(); +} + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__UWB_SWITCH__BUILDER_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__functions.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__functions.c new file mode 100644 index 0000000..de538ba --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__functions.c @@ -0,0 +1,231 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from unitree_go:msg/UwbSwitch.idl +// generated code does not contain a copyright notice +#include "unitree_go/msg/detail/uwb_switch__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +unitree_go__msg__UwbSwitch__init(unitree_go__msg__UwbSwitch * msg) +{ + if (!msg) { + return false; + } + // enabled + return true; +} + +void +unitree_go__msg__UwbSwitch__fini(unitree_go__msg__UwbSwitch * msg) +{ + if (!msg) { + return; + } + // enabled +} + +bool +unitree_go__msg__UwbSwitch__are_equal(const unitree_go__msg__UwbSwitch * lhs, const unitree_go__msg__UwbSwitch * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // enabled + if (lhs->enabled != rhs->enabled) { + return false; + } + return true; +} + +bool +unitree_go__msg__UwbSwitch__copy( + const unitree_go__msg__UwbSwitch * input, + unitree_go__msg__UwbSwitch * output) +{ + if (!input || !output) { + return false; + } + // enabled + output->enabled = input->enabled; + return true; +} + +unitree_go__msg__UwbSwitch * +unitree_go__msg__UwbSwitch__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__UwbSwitch * msg = (unitree_go__msg__UwbSwitch *)allocator.allocate(sizeof(unitree_go__msg__UwbSwitch), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(unitree_go__msg__UwbSwitch)); + bool success = unitree_go__msg__UwbSwitch__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +unitree_go__msg__UwbSwitch__destroy(unitree_go__msg__UwbSwitch * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + unitree_go__msg__UwbSwitch__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +unitree_go__msg__UwbSwitch__Sequence__init(unitree_go__msg__UwbSwitch__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__UwbSwitch * data = NULL; + + if (size) { + data = (unitree_go__msg__UwbSwitch *)allocator.zero_allocate(size, sizeof(unitree_go__msg__UwbSwitch), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = unitree_go__msg__UwbSwitch__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + unitree_go__msg__UwbSwitch__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +unitree_go__msg__UwbSwitch__Sequence__fini(unitree_go__msg__UwbSwitch__Sequence * array) +{ + if (!array) { + return; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + + if (array->data) { + // ensure that data and capacity values are consistent + assert(array->capacity > 0); + // finalize all array elements + for (size_t i = 0; i < array->capacity; ++i) { + unitree_go__msg__UwbSwitch__fini(&array->data[i]); + } + allocator.deallocate(array->data, allocator.state); + array->data = NULL; + array->size = 0; + array->capacity = 0; + } else { + // ensure that data, size, and capacity values are consistent + assert(0 == array->size); + assert(0 == array->capacity); + } +} + +unitree_go__msg__UwbSwitch__Sequence * +unitree_go__msg__UwbSwitch__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__UwbSwitch__Sequence * array = (unitree_go__msg__UwbSwitch__Sequence *)allocator.allocate(sizeof(unitree_go__msg__UwbSwitch__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = unitree_go__msg__UwbSwitch__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +unitree_go__msg__UwbSwitch__Sequence__destroy(unitree_go__msg__UwbSwitch__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + unitree_go__msg__UwbSwitch__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +unitree_go__msg__UwbSwitch__Sequence__are_equal(const unitree_go__msg__UwbSwitch__Sequence * lhs, const unitree_go__msg__UwbSwitch__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!unitree_go__msg__UwbSwitch__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +unitree_go__msg__UwbSwitch__Sequence__copy( + const unitree_go__msg__UwbSwitch__Sequence * input, + unitree_go__msg__UwbSwitch__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(unitree_go__msg__UwbSwitch); + unitree_go__msg__UwbSwitch * data = + (unitree_go__msg__UwbSwitch *)realloc(output->data, allocation_size); + if (!data) { + return false; + } + for (size_t i = output->capacity; i < input->size; ++i) { + if (!unitree_go__msg__UwbSwitch__init(&data[i])) { + /* free currently allocated and return false */ + for (; i-- > output->capacity; ) { + unitree_go__msg__UwbSwitch__fini(&data[i]); + } + free(data); + return false; + } + } + output->data = data; + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!unitree_go__msg__UwbSwitch__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__functions.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__functions.h new file mode 100644 index 0000000..03b8a4f --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from unitree_go:msg/UwbSwitch.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__UWB_SWITCH__FUNCTIONS_H_ +#define UNITREE_GO__MSG__DETAIL__UWB_SWITCH__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#include "unitree_go/msg/detail/uwb_switch__struct.h" + +/// Initialize msg/UwbSwitch message. +/** + * If the init function is called twice for the same message without + * calling fini inbetween previously allocated memory will be leaked. + * \param[in,out] msg The previously allocated message pointer. + * Fields without a default value will not be initialized by this function. + * You might want to call memset(msg, 0, sizeof( + * unitree_go__msg__UwbSwitch + * )) before or use + * unitree_go__msg__UwbSwitch__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__UwbSwitch__init(unitree_go__msg__UwbSwitch * msg); + +/// Finalize msg/UwbSwitch message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__UwbSwitch__fini(unitree_go__msg__UwbSwitch * msg); + +/// Create msg/UwbSwitch message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * unitree_go__msg__UwbSwitch__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__UwbSwitch * +unitree_go__msg__UwbSwitch__create(); + +/// Destroy msg/UwbSwitch message. +/** + * It calls + * unitree_go__msg__UwbSwitch__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__UwbSwitch__destroy(unitree_go__msg__UwbSwitch * msg); + +/// Check for msg/UwbSwitch message equality. +/** + * \param[in] lhs The message on the left hand size of the equality operator. + * \param[in] rhs The message on the right hand size of the equality operator. + * \return true if messages are equal, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__UwbSwitch__are_equal(const unitree_go__msg__UwbSwitch * lhs, const unitree_go__msg__UwbSwitch * rhs); + +/// Copy a msg/UwbSwitch message. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source message pointer. + * \param[out] output The target message pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer is null + * or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__UwbSwitch__copy( + const unitree_go__msg__UwbSwitch * input, + unitree_go__msg__UwbSwitch * output); + +/// Initialize array of msg/UwbSwitch messages. +/** + * It allocates the memory for the number of elements and calls + * unitree_go__msg__UwbSwitch__init() + * for each element of the array. + * \param[in,out] array The allocated array pointer. + * \param[in] size The size / capacity of the array. + * \return true if initialization was successful, otherwise false + * If the array pointer is valid and the size is zero it is guaranteed + # to return true. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__UwbSwitch__Sequence__init(unitree_go__msg__UwbSwitch__Sequence * array, size_t size); + +/// Finalize array of msg/UwbSwitch messages. +/** + * It calls + * unitree_go__msg__UwbSwitch__fini() + * for each element of the array and frees the memory for the number of + * elements. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__UwbSwitch__Sequence__fini(unitree_go__msg__UwbSwitch__Sequence * array); + +/// Create array of msg/UwbSwitch messages. +/** + * It allocates the memory for the array and calls + * unitree_go__msg__UwbSwitch__Sequence__init(). + * \param[in] size The size / capacity of the array. + * \return The pointer to the initialized array if successful, otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__UwbSwitch__Sequence * +unitree_go__msg__UwbSwitch__Sequence__create(size_t size); + +/// Destroy array of msg/UwbSwitch messages. +/** + * It calls + * unitree_go__msg__UwbSwitch__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__UwbSwitch__Sequence__destroy(unitree_go__msg__UwbSwitch__Sequence * array); + +/// Check for msg/UwbSwitch message array equality. +/** + * \param[in] lhs The message array on the left hand size of the equality operator. + * \param[in] rhs The message array on the right hand size of the equality operator. + * \return true if message arrays are equal in size and content, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__UwbSwitch__Sequence__are_equal(const unitree_go__msg__UwbSwitch__Sequence * lhs, const unitree_go__msg__UwbSwitch__Sequence * rhs); + +/// Copy an array of msg/UwbSwitch messages. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source array pointer. + * \param[out] output The target array pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer + * is null or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__UwbSwitch__Sequence__copy( + const unitree_go__msg__UwbSwitch__Sequence * input, + unitree_go__msg__UwbSwitch__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__UWB_SWITCH__FUNCTIONS_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__rosidl_typesupport_fastrtps_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 0000000..dd73301 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,36 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from unitree_go:msg/UwbSwitch.idl +// generated code does not contain a copyright notice +#ifndef UNITREE_GO__MSG__DETAIL__UWB_SWITCH__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define UNITREE_GO__MSG__DETAIL__UWB_SWITCH__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t get_serialized_size_unitree_go__msg__UwbSwitch( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t max_serialized_size_unitree_go__msg__UwbSwitch( + bool & full_bounded, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, unitree_go, msg, UwbSwitch)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__UWB_SWITCH__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__rosidl_typesupport_fastrtps_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 0000000..e361630 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,79 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from unitree_go:msg/UwbSwitch.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__UWB_SWITCH__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__UWB_SWITCH__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "unitree_go/msg/detail/uwb_switch__struct.hpp" + +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-parameter" +# ifdef __clang__ +# pragma clang diagnostic ignored "-Wdeprecated-register" +# pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +# endif +#endif +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif + +#include "fastcdr/Cdr.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_serialize( + const unitree_go::msg::UwbSwitch & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + unitree_go::msg::UwbSwitch & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +get_serialized_size( + const unitree_go::msg::UwbSwitch & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +max_serialized_size_UwbSwitch( + bool & full_bounded, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace unitree_go + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, unitree_go, msg, UwbSwitch)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__UWB_SWITCH__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__rosidl_typesupport_introspection_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__rosidl_typesupport_introspection_c.h new file mode 100644 index 0000000..dfd5ad9 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from unitree_go:msg/UwbSwitch.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__UWB_SWITCH__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define UNITREE_GO__MSG__DETAIL__UWB_SWITCH__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, UwbSwitch)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__UWB_SWITCH__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__rosidl_typesupport_introspection_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 0000000..3a61be8 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from unitree_go:msg/UwbSwitch.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__UWB_SWITCH__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__UWB_SWITCH__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +// TODO(dirk-thomas) these visibility macros should be message package specific +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, UwbSwitch)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__UWB_SWITCH__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__struct.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__struct.h new file mode 100644 index 0000000..5ef47e3 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__struct.h @@ -0,0 +1,40 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from unitree_go:msg/UwbSwitch.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__UWB_SWITCH__STRUCT_H_ +#define UNITREE_GO__MSG__DETAIL__UWB_SWITCH__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Struct defined in msg/UwbSwitch in the package unitree_go. +typedef struct unitree_go__msg__UwbSwitch +{ + uint8_t enabled; +} unitree_go__msg__UwbSwitch; + +// Struct for a sequence of unitree_go__msg__UwbSwitch. +typedef struct unitree_go__msg__UwbSwitch__Sequence +{ + unitree_go__msg__UwbSwitch * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} unitree_go__msg__UwbSwitch__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__UWB_SWITCH__STRUCT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__struct.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__struct.hpp new file mode 100644 index 0000000..53687e1 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__struct.hpp @@ -0,0 +1,130 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from unitree_go:msg/UwbSwitch.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__UWB_SWITCH__STRUCT_HPP_ +#define UNITREE_GO__MSG__DETAIL__UWB_SWITCH__STRUCT_HPP_ + +#include +#include +#include +#include +#include +#include +#include + + +#ifndef _WIN32 +# define DEPRECATED__unitree_go__msg__UwbSwitch __attribute__((deprecated)) +#else +# define DEPRECATED__unitree_go__msg__UwbSwitch __declspec(deprecated) +#endif + +namespace unitree_go +{ + +namespace msg +{ + +// message struct +template +struct UwbSwitch_ +{ + using Type = UwbSwitch_; + + explicit UwbSwitch_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->enabled = 0; + } + } + + explicit UwbSwitch_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + (void)_alloc; + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->enabled = 0; + } + } + + // field types and members + using _enabled_type = + uint8_t; + _enabled_type enabled; + + // setters for named parameter idiom + Type & set__enabled( + const uint8_t & _arg) + { + this->enabled = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + unitree_go::msg::UwbSwitch_ *; + using ConstRawPtr = + const unitree_go::msg::UwbSwitch_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr const>; + + // pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead + // NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly + typedef DEPRECATED__unitree_go__msg__UwbSwitch + std::shared_ptr> + Ptr; + typedef DEPRECATED__unitree_go__msg__UwbSwitch + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const UwbSwitch_ & other) const + { + if (this->enabled != other.enabled) { + return false; + } + return true; + } + bool operator!=(const UwbSwitch_ & other) const + { + return !this->operator==(other); + } +}; // struct UwbSwitch_ + +// alias to use template instance with default allocator +using UwbSwitch = + unitree_go::msg::UwbSwitch_>; + +// constant definitions + +} // namespace msg + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__UWB_SWITCH__STRUCT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__traits.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__traits.hpp new file mode 100644 index 0000000..c7a7d65 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__traits.hpp @@ -0,0 +1,42 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from unitree_go:msg/UwbSwitch.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__UWB_SWITCH__TRAITS_HPP_ +#define UNITREE_GO__MSG__DETAIL__UWB_SWITCH__TRAITS_HPP_ + +#include "unitree_go/msg/detail/uwb_switch__struct.hpp" +#include +#include +#include + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "unitree_go::msg::UwbSwitch"; +} + +template<> +inline const char * name() +{ + return "unitree_go/msg/UwbSwitch"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UNITREE_GO__MSG__DETAIL__UWB_SWITCH__TRAITS_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__type_support.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__type_support.c new file mode 100644 index 0000000..19a4eb9 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__type_support.c @@ -0,0 +1,81 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from unitree_go:msg/UwbSwitch.idl +// generated code does not contain a copyright notice + +#include +#include "unitree_go/msg/detail/uwb_switch__rosidl_typesupport_introspection_c.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" +#include "rosidl_typesupport_introspection_c/field_types.h" +#include "rosidl_typesupport_introspection_c/identifier.h" +#include "rosidl_typesupport_introspection_c/message_introspection.h" +#include "unitree_go/msg/detail/uwb_switch__functions.h" +#include "unitree_go/msg/detail/uwb_switch__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void UwbSwitch__rosidl_typesupport_introspection_c__UwbSwitch_init_function( + void * message_memory, enum rosidl_runtime_c__message_initialization _init) +{ + // TODO(karsten1987): initializers are not yet implemented for typesupport c + // see https://github.com/ros2/ros2/issues/397 + (void) _init; + unitree_go__msg__UwbSwitch__init(message_memory); +} + +void UwbSwitch__rosidl_typesupport_introspection_c__UwbSwitch_fini_function(void * message_memory) +{ + unitree_go__msg__UwbSwitch__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember UwbSwitch__rosidl_typesupport_introspection_c__UwbSwitch_message_member_array[1] = { + { + "enabled", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT8, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__UwbSwitch, enabled), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers UwbSwitch__rosidl_typesupport_introspection_c__UwbSwitch_message_members = { + "unitree_go__msg", // message namespace + "UwbSwitch", // message name + 1, // number of fields + sizeof(unitree_go__msg__UwbSwitch), + UwbSwitch__rosidl_typesupport_introspection_c__UwbSwitch_message_member_array, // message members + UwbSwitch__rosidl_typesupport_introspection_c__UwbSwitch_init_function, // function to initialize message memory (memory has to be allocated) + UwbSwitch__rosidl_typesupport_introspection_c__UwbSwitch_fini_function // function to terminate message instance (will not free memory) +}; + +// this is not const since it must be initialized on first access +// since C does not allow non-integral compile-time constants +static rosidl_message_type_support_t UwbSwitch__rosidl_typesupport_introspection_c__UwbSwitch_message_type_support_handle = { + 0, + &UwbSwitch__rosidl_typesupport_introspection_c__UwbSwitch_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, UwbSwitch)() { + if (!UwbSwitch__rosidl_typesupport_introspection_c__UwbSwitch_message_type_support_handle.typesupport_identifier) { + UwbSwitch__rosidl_typesupport_introspection_c__UwbSwitch_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &UwbSwitch__rosidl_typesupport_introspection_c__UwbSwitch_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__type_support.cpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__type_support.cpp new file mode 100644 index 0000000..655a906 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__type_support.cpp @@ -0,0 +1,107 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from unitree_go:msg/UwbSwitch.idl +// generated code does not contain a copyright notice + +#include "array" +#include "cstddef" +#include "string" +#include "vector" +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_cpp/message_type_support.hpp" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/detail/uwb_switch__struct.hpp" +#include "rosidl_typesupport_introspection_cpp/field_types.hpp" +#include "rosidl_typesupport_introspection_cpp/identifier.hpp" +#include "rosidl_typesupport_introspection_cpp/message_introspection.hpp" +#include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void UwbSwitch_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) unitree_go::msg::UwbSwitch(_init); +} + +void UwbSwitch_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~UwbSwitch(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember UwbSwitch_message_member_array[1] = { + { + "enabled", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT8, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::UwbSwitch, enabled), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers UwbSwitch_message_members = { + "unitree_go::msg", // message namespace + "UwbSwitch", // message name + 1, // number of fields + sizeof(unitree_go::msg::UwbSwitch), + UwbSwitch_message_member_array, // message members + UwbSwitch_init_function, // function to initialize message memory (memory has to be allocated) + UwbSwitch_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t UwbSwitch_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &UwbSwitch_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace unitree_go + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::UwbSwitch_message_type_support_handle; +} + +} // namespace rosidl_typesupport_introspection_cpp + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, UwbSwitch)() { + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::UwbSwitch_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__type_support.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__type_support.h new file mode 100644 index 0000000..5e0c51d --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from unitree_go:msg/UwbSwitch.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__UWB_SWITCH__TYPE_SUPPORT_H_ +#define UNITREE_GO__MSG__DETAIL__UWB_SWITCH__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rosidl_runtime_c/message_type_support_struct.h" + +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + unitree_go, + msg, + UwbSwitch +)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__UWB_SWITCH__TYPE_SUPPORT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__type_support.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__type_support.hpp new file mode 100644 index 0000000..6a267cc --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/uwb_switch__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from unitree_go:msg/UwbSwitch.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__UWB_SWITCH__TYPE_SUPPORT_HPP_ +#define UNITREE_GO__MSG__DETAIL__UWB_SWITCH__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_cpp__visibility_control.hpp" + +#include "rosidl_typesupport_cpp/message_type_support.hpp" + +#ifdef __cplusplus +extern "C" +{ +#endif +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + unitree_go, + msg, + UwbSwitch +)(); +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__UWB_SWITCH__TYPE_SUPPORT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__builder.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__builder.hpp new file mode 100644 index 0000000..66ec9e5 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__builder.hpp @@ -0,0 +1,119 @@ +// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em +// with input from unitree_go:msg/WirelessController.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__WIRELESS_CONTROLLER__BUILDER_HPP_ +#define UNITREE_GO__MSG__DETAIL__WIRELESS_CONTROLLER__BUILDER_HPP_ + +#include "unitree_go/msg/detail/wireless_controller__struct.hpp" +#include +#include +#include + + +namespace unitree_go +{ + +namespace msg +{ + +namespace builder +{ + +class Init_WirelessController_keys +{ +public: + explicit Init_WirelessController_keys(::unitree_go::msg::WirelessController & msg) + : msg_(msg) + {} + ::unitree_go::msg::WirelessController keys(::unitree_go::msg::WirelessController::_keys_type arg) + { + msg_.keys = std::move(arg); + return std::move(msg_); + } + +private: + ::unitree_go::msg::WirelessController msg_; +}; + +class Init_WirelessController_ry +{ +public: + explicit Init_WirelessController_ry(::unitree_go::msg::WirelessController & msg) + : msg_(msg) + {} + Init_WirelessController_keys ry(::unitree_go::msg::WirelessController::_ry_type arg) + { + msg_.ry = std::move(arg); + return Init_WirelessController_keys(msg_); + } + +private: + ::unitree_go::msg::WirelessController msg_; +}; + +class Init_WirelessController_rx +{ +public: + explicit Init_WirelessController_rx(::unitree_go::msg::WirelessController & msg) + : msg_(msg) + {} + Init_WirelessController_ry rx(::unitree_go::msg::WirelessController::_rx_type arg) + { + msg_.rx = std::move(arg); + return Init_WirelessController_ry(msg_); + } + +private: + ::unitree_go::msg::WirelessController msg_; +}; + +class Init_WirelessController_ly +{ +public: + explicit Init_WirelessController_ly(::unitree_go::msg::WirelessController & msg) + : msg_(msg) + {} + Init_WirelessController_rx ly(::unitree_go::msg::WirelessController::_ly_type arg) + { + msg_.ly = std::move(arg); + return Init_WirelessController_rx(msg_); + } + +private: + ::unitree_go::msg::WirelessController msg_; +}; + +class Init_WirelessController_lx +{ +public: + Init_WirelessController_lx() + : msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP) + {} + Init_WirelessController_ly lx(::unitree_go::msg::WirelessController::_lx_type arg) + { + msg_.lx = std::move(arg); + return Init_WirelessController_ly(msg_); + } + +private: + ::unitree_go::msg::WirelessController msg_; +}; + +} // namespace builder + +} // namespace msg + +template +auto build(); + +template<> +inline +auto build<::unitree_go::msg::WirelessController>() +{ + return unitree_go::msg::builder::Init_WirelessController_lx(); +} + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__WIRELESS_CONTROLLER__BUILDER_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__functions.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__functions.c new file mode 100644 index 0000000..24d212f --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__functions.c @@ -0,0 +1,263 @@ +// generated from rosidl_generator_c/resource/idl__functions.c.em +// with input from unitree_go:msg/WirelessController.idl +// generated code does not contain a copyright notice +#include "unitree_go/msg/detail/wireless_controller__functions.h" + +#include +#include +#include +#include + +#include "rcutils/allocator.h" + + +bool +unitree_go__msg__WirelessController__init(unitree_go__msg__WirelessController * msg) +{ + if (!msg) { + return false; + } + // lx + // ly + // rx + // ry + // keys + return true; +} + +void +unitree_go__msg__WirelessController__fini(unitree_go__msg__WirelessController * msg) +{ + if (!msg) { + return; + } + // lx + // ly + // rx + // ry + // keys +} + +bool +unitree_go__msg__WirelessController__are_equal(const unitree_go__msg__WirelessController * lhs, const unitree_go__msg__WirelessController * rhs) +{ + if (!lhs || !rhs) { + return false; + } + // lx + if (lhs->lx != rhs->lx) { + return false; + } + // ly + if (lhs->ly != rhs->ly) { + return false; + } + // rx + if (lhs->rx != rhs->rx) { + return false; + } + // ry + if (lhs->ry != rhs->ry) { + return false; + } + // keys + if (lhs->keys != rhs->keys) { + return false; + } + return true; +} + +bool +unitree_go__msg__WirelessController__copy( + const unitree_go__msg__WirelessController * input, + unitree_go__msg__WirelessController * output) +{ + if (!input || !output) { + return false; + } + // lx + output->lx = input->lx; + // ly + output->ly = input->ly; + // rx + output->rx = input->rx; + // ry + output->ry = input->ry; + // keys + output->keys = input->keys; + return true; +} + +unitree_go__msg__WirelessController * +unitree_go__msg__WirelessController__create() +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__WirelessController * msg = (unitree_go__msg__WirelessController *)allocator.allocate(sizeof(unitree_go__msg__WirelessController), allocator.state); + if (!msg) { + return NULL; + } + memset(msg, 0, sizeof(unitree_go__msg__WirelessController)); + bool success = unitree_go__msg__WirelessController__init(msg); + if (!success) { + allocator.deallocate(msg, allocator.state); + return NULL; + } + return msg; +} + +void +unitree_go__msg__WirelessController__destroy(unitree_go__msg__WirelessController * msg) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (msg) { + unitree_go__msg__WirelessController__fini(msg); + } + allocator.deallocate(msg, allocator.state); +} + + +bool +unitree_go__msg__WirelessController__Sequence__init(unitree_go__msg__WirelessController__Sequence * array, size_t size) +{ + if (!array) { + return false; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__WirelessController * data = NULL; + + if (size) { + data = (unitree_go__msg__WirelessController *)allocator.zero_allocate(size, sizeof(unitree_go__msg__WirelessController), allocator.state); + if (!data) { + return false; + } + // initialize all array elements + size_t i; + for (i = 0; i < size; ++i) { + bool success = unitree_go__msg__WirelessController__init(&data[i]); + if (!success) { + break; + } + } + if (i < size) { + // if initialization failed finalize the already initialized array elements + for (; i > 0; --i) { + unitree_go__msg__WirelessController__fini(&data[i - 1]); + } + allocator.deallocate(data, allocator.state); + return false; + } + } + array->data = data; + array->size = size; + array->capacity = size; + return true; +} + +void +unitree_go__msg__WirelessController__Sequence__fini(unitree_go__msg__WirelessController__Sequence * array) +{ + if (!array) { + return; + } + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + + if (array->data) { + // ensure that data and capacity values are consistent + assert(array->capacity > 0); + // finalize all array elements + for (size_t i = 0; i < array->capacity; ++i) { + unitree_go__msg__WirelessController__fini(&array->data[i]); + } + allocator.deallocate(array->data, allocator.state); + array->data = NULL; + array->size = 0; + array->capacity = 0; + } else { + // ensure that data, size, and capacity values are consistent + assert(0 == array->size); + assert(0 == array->capacity); + } +} + +unitree_go__msg__WirelessController__Sequence * +unitree_go__msg__WirelessController__Sequence__create(size_t size) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + unitree_go__msg__WirelessController__Sequence * array = (unitree_go__msg__WirelessController__Sequence *)allocator.allocate(sizeof(unitree_go__msg__WirelessController__Sequence), allocator.state); + if (!array) { + return NULL; + } + bool success = unitree_go__msg__WirelessController__Sequence__init(array, size); + if (!success) { + allocator.deallocate(array, allocator.state); + return NULL; + } + return array; +} + +void +unitree_go__msg__WirelessController__Sequence__destroy(unitree_go__msg__WirelessController__Sequence * array) +{ + rcutils_allocator_t allocator = rcutils_get_default_allocator(); + if (array) { + unitree_go__msg__WirelessController__Sequence__fini(array); + } + allocator.deallocate(array, allocator.state); +} + +bool +unitree_go__msg__WirelessController__Sequence__are_equal(const unitree_go__msg__WirelessController__Sequence * lhs, const unitree_go__msg__WirelessController__Sequence * rhs) +{ + if (!lhs || !rhs) { + return false; + } + if (lhs->size != rhs->size) { + return false; + } + for (size_t i = 0; i < lhs->size; ++i) { + if (!unitree_go__msg__WirelessController__are_equal(&(lhs->data[i]), &(rhs->data[i]))) { + return false; + } + } + return true; +} + +bool +unitree_go__msg__WirelessController__Sequence__copy( + const unitree_go__msg__WirelessController__Sequence * input, + unitree_go__msg__WirelessController__Sequence * output) +{ + if (!input || !output) { + return false; + } + if (output->capacity < input->size) { + const size_t allocation_size = + input->size * sizeof(unitree_go__msg__WirelessController); + unitree_go__msg__WirelessController * data = + (unitree_go__msg__WirelessController *)realloc(output->data, allocation_size); + if (!data) { + return false; + } + for (size_t i = output->capacity; i < input->size; ++i) { + if (!unitree_go__msg__WirelessController__init(&data[i])) { + /* free currently allocated and return false */ + for (; i-- > output->capacity; ) { + unitree_go__msg__WirelessController__fini(&data[i]); + } + free(data); + return false; + } + } + output->data = data; + output->capacity = input->size; + } + output->size = input->size; + for (size_t i = 0; i < input->size; ++i) { + if (!unitree_go__msg__WirelessController__copy( + &(input->data[i]), &(output->data[i]))) + { + return false; + } + } + return true; +} diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__functions.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__functions.h new file mode 100644 index 0000000..0172ba8 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__functions.h @@ -0,0 +1,177 @@ +// generated from rosidl_generator_c/resource/idl__functions.h.em +// with input from unitree_go:msg/WirelessController.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__WIRELESS_CONTROLLER__FUNCTIONS_H_ +#define UNITREE_GO__MSG__DETAIL__WIRELESS_CONTROLLER__FUNCTIONS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#include "unitree_go/msg/detail/wireless_controller__struct.h" + +/// Initialize msg/WirelessController message. +/** + * If the init function is called twice for the same message without + * calling fini inbetween previously allocated memory will be leaked. + * \param[in,out] msg The previously allocated message pointer. + * Fields without a default value will not be initialized by this function. + * You might want to call memset(msg, 0, sizeof( + * unitree_go__msg__WirelessController + * )) before or use + * unitree_go__msg__WirelessController__create() + * to allocate and initialize the message. + * \return true if initialization was successful, otherwise false + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__WirelessController__init(unitree_go__msg__WirelessController * msg); + +/// Finalize msg/WirelessController message. +/** + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__WirelessController__fini(unitree_go__msg__WirelessController * msg); + +/// Create msg/WirelessController message. +/** + * It allocates the memory for the message, sets the memory to zero, and + * calls + * unitree_go__msg__WirelessController__init(). + * \return The pointer to the initialized message if successful, + * otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__WirelessController * +unitree_go__msg__WirelessController__create(); + +/// Destroy msg/WirelessController message. +/** + * It calls + * unitree_go__msg__WirelessController__fini() + * and frees the memory of the message. + * \param[in,out] msg The allocated message pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__WirelessController__destroy(unitree_go__msg__WirelessController * msg); + +/// Check for msg/WirelessController message equality. +/** + * \param[in] lhs The message on the left hand size of the equality operator. + * \param[in] rhs The message on the right hand size of the equality operator. + * \return true if messages are equal, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__WirelessController__are_equal(const unitree_go__msg__WirelessController * lhs, const unitree_go__msg__WirelessController * rhs); + +/// Copy a msg/WirelessController message. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source message pointer. + * \param[out] output The target message pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer is null + * or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__WirelessController__copy( + const unitree_go__msg__WirelessController * input, + unitree_go__msg__WirelessController * output); + +/// Initialize array of msg/WirelessController messages. +/** + * It allocates the memory for the number of elements and calls + * unitree_go__msg__WirelessController__init() + * for each element of the array. + * \param[in,out] array The allocated array pointer. + * \param[in] size The size / capacity of the array. + * \return true if initialization was successful, otherwise false + * If the array pointer is valid and the size is zero it is guaranteed + # to return true. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__WirelessController__Sequence__init(unitree_go__msg__WirelessController__Sequence * array, size_t size); + +/// Finalize array of msg/WirelessController messages. +/** + * It calls + * unitree_go__msg__WirelessController__fini() + * for each element of the array and frees the memory for the number of + * elements. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__WirelessController__Sequence__fini(unitree_go__msg__WirelessController__Sequence * array); + +/// Create array of msg/WirelessController messages. +/** + * It allocates the memory for the array and calls + * unitree_go__msg__WirelessController__Sequence__init(). + * \param[in] size The size / capacity of the array. + * \return The pointer to the initialized array if successful, otherwise NULL + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +unitree_go__msg__WirelessController__Sequence * +unitree_go__msg__WirelessController__Sequence__create(size_t size); + +/// Destroy array of msg/WirelessController messages. +/** + * It calls + * unitree_go__msg__WirelessController__Sequence__fini() + * on the array, + * and frees the memory of the array. + * \param[in,out] array The initialized array pointer. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +void +unitree_go__msg__WirelessController__Sequence__destroy(unitree_go__msg__WirelessController__Sequence * array); + +/// Check for msg/WirelessController message array equality. +/** + * \param[in] lhs The message array on the left hand size of the equality operator. + * \param[in] rhs The message array on the right hand size of the equality operator. + * \return true if message arrays are equal in size and content, otherwise false. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__WirelessController__Sequence__are_equal(const unitree_go__msg__WirelessController__Sequence * lhs, const unitree_go__msg__WirelessController__Sequence * rhs); + +/// Copy an array of msg/WirelessController messages. +/** + * This functions performs a deep copy, as opposed to the shallow copy that + * plain assignment yields. + * + * \param[in] input The source array pointer. + * \param[out] output The target array pointer, which must + * have been initialized before calling this function. + * \return true if successful, or false if either pointer + * is null or memory allocation fails. + */ +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +bool +unitree_go__msg__WirelessController__Sequence__copy( + const unitree_go__msg__WirelessController__Sequence * input, + unitree_go__msg__WirelessController__Sequence * output); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__WIRELESS_CONTROLLER__FUNCTIONS_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__rosidl_typesupport_fastrtps_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__rosidl_typesupport_fastrtps_c.h new file mode 100644 index 0000000..588e22f --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__rosidl_typesupport_fastrtps_c.h @@ -0,0 +1,36 @@ +// generated from rosidl_typesupport_fastrtps_c/resource/idl__rosidl_typesupport_fastrtps_c.h.em +// with input from unitree_go:msg/WirelessController.idl +// generated code does not contain a copyright notice +#ifndef UNITREE_GO__MSG__DETAIL__WIRELESS_CONTROLLER__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ +#define UNITREE_GO__MSG__DETAIL__WIRELESS_CONTROLLER__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ + + +#include +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t get_serialized_size_unitree_go__msg__WirelessController( + const void * untyped_ros_message, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +size_t max_serialized_size_unitree_go__msg__WirelessController( + bool & full_bounded, + size_t current_alignment); + +ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_c, unitree_go, msg, WirelessController)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__WIRELESS_CONTROLLER__ROSIDL_TYPESUPPORT_FASTRTPS_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__rosidl_typesupport_fastrtps_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__rosidl_typesupport_fastrtps_cpp.hpp new file mode 100644 index 0000000..408d255 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__rosidl_typesupport_fastrtps_cpp.hpp @@ -0,0 +1,79 @@ +// generated from rosidl_typesupport_fastrtps_cpp/resource/idl__rosidl_typesupport_fastrtps_cpp.hpp.em +// with input from unitree_go:msg/WirelessController.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__WIRELESS_CONTROLLER__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__WIRELESS_CONTROLLER__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h" +#include "unitree_go/msg/detail/wireless_controller__struct.hpp" + +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-parameter" +# ifdef __clang__ +# pragma clang diagnostic ignored "-Wdeprecated-register" +# pragma clang diagnostic ignored "-Wreturn-type-c-linkage" +# endif +#endif +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif + +#include "fastcdr/Cdr.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace typesupport_fastrtps_cpp +{ + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_serialize( + const unitree_go::msg::WirelessController & ros_message, + eprosima::fastcdr::Cdr & cdr); + +bool +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +cdr_deserialize( + eprosima::fastcdr::Cdr & cdr, + unitree_go::msg::WirelessController & ros_message); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +get_serialized_size( + const unitree_go::msg::WirelessController & ros_message, + size_t current_alignment); + +size_t +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +max_serialized_size_WirelessController( + bool & full_bounded, + size_t current_alignment); + +} // namespace typesupport_fastrtps_cpp + +} // namespace msg + +} // namespace unitree_go + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_fastrtps_cpp, unitree_go, msg, WirelessController)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__WIRELESS_CONTROLLER__ROSIDL_TYPESUPPORT_FASTRTPS_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__rosidl_typesupport_introspection_c.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__rosidl_typesupport_introspection_c.h new file mode 100644 index 0000000..e8a8623 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__rosidl_typesupport_introspection_c.h @@ -0,0 +1,26 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__rosidl_typesupport_introspection_c.h.em +// with input from unitree_go:msg/WirelessController.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__WIRELESS_CONTROLLER__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ +#define UNITREE_GO__MSG__DETAIL__WIRELESS_CONTROLLER__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, WirelessController)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__WIRELESS_CONTROLLER__ROSIDL_TYPESUPPORT_INTROSPECTION_C_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__rosidl_typesupport_introspection_cpp.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__rosidl_typesupport_introspection_cpp.hpp new file mode 100644 index 0000000..cbaa473 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__rosidl_typesupport_introspection_cpp.hpp @@ -0,0 +1,27 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__rosidl_typesupport_introspection_cpp.h.em +// with input from unitree_go:msg/WirelessController.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__WIRELESS_CONTROLLER__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ +#define UNITREE_GO__MSG__DETAIL__WIRELESS_CONTROLLER__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ + + +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_interface/macros.h" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +// TODO(dirk-thomas) these visibility macros should be message package specific +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, WirelessController)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__WIRELESS_CONTROLLER__ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__struct.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__struct.h new file mode 100644 index 0000000..fe23990 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__struct.h @@ -0,0 +1,44 @@ +// generated from rosidl_generator_c/resource/idl__struct.h.em +// with input from unitree_go:msg/WirelessController.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__WIRELESS_CONTROLLER__STRUCT_H_ +#define UNITREE_GO__MSG__DETAIL__WIRELESS_CONTROLLER__STRUCT_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include + + +// Constants defined in the message + +// Struct defined in msg/WirelessController in the package unitree_go. +typedef struct unitree_go__msg__WirelessController +{ + float lx; + float ly; + float rx; + float ry; + uint16_t keys; +} unitree_go__msg__WirelessController; + +// Struct for a sequence of unitree_go__msg__WirelessController. +typedef struct unitree_go__msg__WirelessController__Sequence +{ + unitree_go__msg__WirelessController * data; + /// The number of valid items in data + size_t size; + /// The number of allocated items in data + size_t capacity; +} unitree_go__msg__WirelessController__Sequence; + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__WIRELESS_CONTROLLER__STRUCT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__struct.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__struct.hpp new file mode 100644 index 0000000..a77cab5 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__struct.hpp @@ -0,0 +1,186 @@ +// generated from rosidl_generator_cpp/resource/idl__struct.hpp.em +// with input from unitree_go:msg/WirelessController.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__WIRELESS_CONTROLLER__STRUCT_HPP_ +#define UNITREE_GO__MSG__DETAIL__WIRELESS_CONTROLLER__STRUCT_HPP_ + +#include +#include +#include +#include +#include +#include +#include + + +#ifndef _WIN32 +# define DEPRECATED__unitree_go__msg__WirelessController __attribute__((deprecated)) +#else +# define DEPRECATED__unitree_go__msg__WirelessController __declspec(deprecated) +#endif + +namespace unitree_go +{ + +namespace msg +{ + +// message struct +template +struct WirelessController_ +{ + using Type = WirelessController_; + + explicit WirelessController_(rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->lx = 0.0f; + this->ly = 0.0f; + this->rx = 0.0f; + this->ry = 0.0f; + this->keys = 0; + } + } + + explicit WirelessController_(const ContainerAllocator & _alloc, rosidl_runtime_cpp::MessageInitialization _init = rosidl_runtime_cpp::MessageInitialization::ALL) + { + (void)_alloc; + if (rosidl_runtime_cpp::MessageInitialization::ALL == _init || + rosidl_runtime_cpp::MessageInitialization::ZERO == _init) + { + this->lx = 0.0f; + this->ly = 0.0f; + this->rx = 0.0f; + this->ry = 0.0f; + this->keys = 0; + } + } + + // field types and members + using _lx_type = + float; + _lx_type lx; + using _ly_type = + float; + _ly_type ly; + using _rx_type = + float; + _rx_type rx; + using _ry_type = + float; + _ry_type ry; + using _keys_type = + uint16_t; + _keys_type keys; + + // setters for named parameter idiom + Type & set__lx( + const float & _arg) + { + this->lx = _arg; + return *this; + } + Type & set__ly( + const float & _arg) + { + this->ly = _arg; + return *this; + } + Type & set__rx( + const float & _arg) + { + this->rx = _arg; + return *this; + } + Type & set__ry( + const float & _arg) + { + this->ry = _arg; + return *this; + } + Type & set__keys( + const uint16_t & _arg) + { + this->keys = _arg; + return *this; + } + + // constant declarations + + // pointer types + using RawPtr = + unitree_go::msg::WirelessController_ *; + using ConstRawPtr = + const unitree_go::msg::WirelessController_ *; + using SharedPtr = + std::shared_ptr>; + using ConstSharedPtr = + std::shared_ptr const>; + + template>> + using UniquePtrWithDeleter = + std::unique_ptr, Deleter>; + + using UniquePtr = UniquePtrWithDeleter<>; + + template>> + using ConstUniquePtrWithDeleter = + std::unique_ptr const, Deleter>; + using ConstUniquePtr = ConstUniquePtrWithDeleter<>; + + using WeakPtr = + std::weak_ptr>; + using ConstWeakPtr = + std::weak_ptr const>; + + // pointer types similar to ROS 1, use SharedPtr / ConstSharedPtr instead + // NOTE: Can't use 'using' here because GNU C++ can't parse attributes properly + typedef DEPRECATED__unitree_go__msg__WirelessController + std::shared_ptr> + Ptr; + typedef DEPRECATED__unitree_go__msg__WirelessController + std::shared_ptr const> + ConstPtr; + + // comparison operators + bool operator==(const WirelessController_ & other) const + { + if (this->lx != other.lx) { + return false; + } + if (this->ly != other.ly) { + return false; + } + if (this->rx != other.rx) { + return false; + } + if (this->ry != other.ry) { + return false; + } + if (this->keys != other.keys) { + return false; + } + return true; + } + bool operator!=(const WirelessController_ & other) const + { + return !this->operator==(other); + } +}; // struct WirelessController_ + +// alias to use template instance with default allocator +using WirelessController = + unitree_go::msg::WirelessController_>; + +// constant definitions + +} // namespace msg + +} // namespace unitree_go + +#endif // UNITREE_GO__MSG__DETAIL__WIRELESS_CONTROLLER__STRUCT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__traits.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__traits.hpp new file mode 100644 index 0000000..b1ecefe --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__traits.hpp @@ -0,0 +1,42 @@ +// generated from rosidl_generator_cpp/resource/idl__traits.hpp.em +// with input from unitree_go:msg/WirelessController.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__WIRELESS_CONTROLLER__TRAITS_HPP_ +#define UNITREE_GO__MSG__DETAIL__WIRELESS_CONTROLLER__TRAITS_HPP_ + +#include "unitree_go/msg/detail/wireless_controller__struct.hpp" +#include +#include +#include + +namespace rosidl_generator_traits +{ + +template<> +inline const char * data_type() +{ + return "unitree_go::msg::WirelessController"; +} + +template<> +inline const char * name() +{ + return "unitree_go/msg/WirelessController"; +} + +template<> +struct has_fixed_size + : std::integral_constant {}; + +template<> +struct has_bounded_size + : std::integral_constant {}; + +template<> +struct is_message + : std::true_type {}; + +} // namespace rosidl_generator_traits + +#endif // UNITREE_GO__MSG__DETAIL__WIRELESS_CONTROLLER__TRAITS_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__type_support.c b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__type_support.c new file mode 100644 index 0000000..20f8522 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__type_support.c @@ -0,0 +1,141 @@ +// generated from rosidl_typesupport_introspection_c/resource/idl__type_support.c.em +// with input from unitree_go:msg/WirelessController.idl +// generated code does not contain a copyright notice + +#include +#include "unitree_go/msg/detail/wireless_controller__rosidl_typesupport_introspection_c.h" +#include "unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h" +#include "rosidl_typesupport_introspection_c/field_types.h" +#include "rosidl_typesupport_introspection_c/identifier.h" +#include "rosidl_typesupport_introspection_c/message_introspection.h" +#include "unitree_go/msg/detail/wireless_controller__functions.h" +#include "unitree_go/msg/detail/wireless_controller__struct.h" + + +#ifdef __cplusplus +extern "C" +{ +#endif + +void WirelessController__rosidl_typesupport_introspection_c__WirelessController_init_function( + void * message_memory, enum rosidl_runtime_c__message_initialization _init) +{ + // TODO(karsten1987): initializers are not yet implemented for typesupport c + // see https://github.com/ros2/ros2/issues/397 + (void) _init; + unitree_go__msg__WirelessController__init(message_memory); +} + +void WirelessController__rosidl_typesupport_introspection_c__WirelessController_fini_function(void * message_memory) +{ + unitree_go__msg__WirelessController__fini(message_memory); +} + +static rosidl_typesupport_introspection_c__MessageMember WirelessController__rosidl_typesupport_introspection_c__WirelessController_message_member_array[5] = { + { + "lx", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__WirelessController, lx), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "ly", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__WirelessController, ly), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "rx", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__WirelessController, rx), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "ry", // name + rosidl_typesupport_introspection_c__ROS_TYPE_FLOAT, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__WirelessController, ry), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + }, + { + "keys", // name + rosidl_typesupport_introspection_c__ROS_TYPE_UINT16, // type + 0, // upper bound of string + NULL, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go__msg__WirelessController, keys), // bytes offset in struct + NULL, // default value + NULL, // size() function pointer + NULL, // get_const(index) function pointer + NULL, // get(index) function pointer + NULL // resize(index) function pointer + } +}; + +static const rosidl_typesupport_introspection_c__MessageMembers WirelessController__rosidl_typesupport_introspection_c__WirelessController_message_members = { + "unitree_go__msg", // message namespace + "WirelessController", // message name + 5, // number of fields + sizeof(unitree_go__msg__WirelessController), + WirelessController__rosidl_typesupport_introspection_c__WirelessController_message_member_array, // message members + WirelessController__rosidl_typesupport_introspection_c__WirelessController_init_function, // function to initialize message memory (memory has to be allocated) + WirelessController__rosidl_typesupport_introspection_c__WirelessController_fini_function // function to terminate message instance (will not free memory) +}; + +// this is not const since it must be initialized on first access +// since C does not allow non-integral compile-time constants +static rosidl_message_type_support_t WirelessController__rosidl_typesupport_introspection_c__WirelessController_message_type_support_handle = { + 0, + &WirelessController__rosidl_typesupport_introspection_c__WirelessController_message_members, + get_message_typesupport_handle_function, +}; + +ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_c, unitree_go, msg, WirelessController)() { + if (!WirelessController__rosidl_typesupport_introspection_c__WirelessController_message_type_support_handle.typesupport_identifier) { + WirelessController__rosidl_typesupport_introspection_c__WirelessController_message_type_support_handle.typesupport_identifier = + rosidl_typesupport_introspection_c__identifier; + } + return &WirelessController__rosidl_typesupport_introspection_c__WirelessController_message_type_support_handle; +} +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__type_support.cpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__type_support.cpp new file mode 100644 index 0000000..b12627f --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__type_support.cpp @@ -0,0 +1,167 @@ +// generated from rosidl_typesupport_introspection_cpp/resource/idl__type_support.cpp.em +// with input from unitree_go:msg/WirelessController.idl +// generated code does not contain a copyright notice + +#include "array" +#include "cstddef" +#include "string" +#include "vector" +#include "rosidl_runtime_c/message_type_support_struct.h" +#include "rosidl_typesupport_cpp/message_type_support.hpp" +#include "rosidl_typesupport_interface/macros.h" +#include "unitree_go/msg/detail/wireless_controller__struct.hpp" +#include "rosidl_typesupport_introspection_cpp/field_types.hpp" +#include "rosidl_typesupport_introspection_cpp/identifier.hpp" +#include "rosidl_typesupport_introspection_cpp/message_introspection.hpp" +#include "rosidl_typesupport_introspection_cpp/message_type_support_decl.hpp" +#include "rosidl_typesupport_introspection_cpp/visibility_control.h" + +namespace unitree_go +{ + +namespace msg +{ + +namespace rosidl_typesupport_introspection_cpp +{ + +void WirelessController_init_function( + void * message_memory, rosidl_runtime_cpp::MessageInitialization _init) +{ + new (message_memory) unitree_go::msg::WirelessController(_init); +} + +void WirelessController_fini_function(void * message_memory) +{ + auto typed_message = static_cast(message_memory); + typed_message->~WirelessController(); +} + +static const ::rosidl_typesupport_introspection_cpp::MessageMember WirelessController_message_member_array[5] = { + { + "lx", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::WirelessController, lx), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "ly", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::WirelessController, ly), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "rx", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::WirelessController, rx), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "ry", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_FLOAT, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::WirelessController, ry), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + }, + { + "keys", // name + ::rosidl_typesupport_introspection_cpp::ROS_TYPE_UINT16, // type + 0, // upper bound of string + nullptr, // members of sub message + false, // is array + 0, // array size + false, // is upper bound + offsetof(unitree_go::msg::WirelessController, keys), // bytes offset in struct + nullptr, // default value + nullptr, // size() function pointer + nullptr, // get_const(index) function pointer + nullptr, // get(index) function pointer + nullptr // resize(index) function pointer + } +}; + +static const ::rosidl_typesupport_introspection_cpp::MessageMembers WirelessController_message_members = { + "unitree_go::msg", // message namespace + "WirelessController", // message name + 5, // number of fields + sizeof(unitree_go::msg::WirelessController), + WirelessController_message_member_array, // message members + WirelessController_init_function, // function to initialize message memory (memory has to be allocated) + WirelessController_fini_function // function to terminate message instance (will not free memory) +}; + +static const rosidl_message_type_support_t WirelessController_message_type_support_handle = { + ::rosidl_typesupport_introspection_cpp::typesupport_identifier, + &WirelessController_message_members, + get_message_typesupport_handle_function, +}; + +} // namespace rosidl_typesupport_introspection_cpp + +} // namespace msg + +} // namespace unitree_go + + +namespace rosidl_typesupport_introspection_cpp +{ + +template<> +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +get_message_type_support_handle() +{ + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::WirelessController_message_type_support_handle; +} + +} // namespace rosidl_typesupport_introspection_cpp + +#ifdef __cplusplus +extern "C" +{ +#endif + +ROSIDL_TYPESUPPORT_INTROSPECTION_CPP_PUBLIC +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_introspection_cpp, unitree_go, msg, WirelessController)() { + return &::unitree_go::msg::rosidl_typesupport_introspection_cpp::WirelessController_message_type_support_handle; +} + +#ifdef __cplusplus +} +#endif diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__type_support.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__type_support.h new file mode 100644 index 0000000..e40fb74 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__type_support.h @@ -0,0 +1,33 @@ +// generated from rosidl_generator_c/resource/idl__type_support.h.em +// with input from unitree_go:msg/WirelessController.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__WIRELESS_CONTROLLER__TYPE_SUPPORT_H_ +#define UNITREE_GO__MSG__DETAIL__WIRELESS_CONTROLLER__TYPE_SUPPORT_H_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_c__visibility_control.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "rosidl_runtime_c/message_type_support_struct.h" + +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_C_PUBLIC_unitree_go +const rosidl_message_type_support_t * +ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_c, + unitree_go, + msg, + WirelessController +)(); + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__WIRELESS_CONTROLLER__TYPE_SUPPORT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__type_support.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__type_support.hpp new file mode 100644 index 0000000..7fee35e --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/detail/wireless_controller__type_support.hpp @@ -0,0 +1,31 @@ +// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em +// with input from unitree_go:msg/WirelessController.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__DETAIL__WIRELESS_CONTROLLER__TYPE_SUPPORT_HPP_ +#define UNITREE_GO__MSG__DETAIL__WIRELESS_CONTROLLER__TYPE_SUPPORT_HPP_ + +#include "rosidl_typesupport_interface/macros.h" + +#include "unitree_go/msg/rosidl_generator_cpp__visibility_control.hpp" + +#include "rosidl_typesupport_cpp/message_type_support.hpp" + +#ifdef __cplusplus +extern "C" +{ +#endif +// Forward declare the get type support functions for this type. +ROSIDL_GENERATOR_CPP_PUBLIC_unitree_go +const rosidl_message_type_support_t * + ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME( + rosidl_typesupport_cpp, + unitree_go, + msg, + WirelessController +)(); +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__DETAIL__WIRELESS_CONTROLLER__TYPE_SUPPORT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/error.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/error.h new file mode 100644 index 0000000..d34d457 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/error.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from unitree_go:msg/Error.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__ERROR_H_ +#define UNITREE_GO__MSG__ERROR_H_ + +#include "unitree_go/msg/detail/error__struct.h" +#include "unitree_go/msg/detail/error__functions.h" +#include "unitree_go/msg/detail/error__type_support.h" + +#endif // UNITREE_GO__MSG__ERROR_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/error.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/error.hpp new file mode 100644 index 0000000..69d03b2 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/error.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__ERROR_HPP_ +#define UNITREE_GO__MSG__ERROR_HPP_ + +#include "unitree_go/msg/detail/error__struct.hpp" +#include "unitree_go/msg/detail/error__builder.hpp" +#include "unitree_go/msg/detail/error__traits.hpp" +#include "unitree_go/msg/detail/error__type_support.hpp" + +#endif // UNITREE_GO__MSG__ERROR_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/go2_front_video_data.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/go2_front_video_data.h new file mode 100644 index 0000000..8030eaa --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/go2_front_video_data.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from unitree_go:msg/Go2FrontVideoData.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__GO2_FRONT_VIDEO_DATA_H_ +#define UNITREE_GO__MSG__GO2_FRONT_VIDEO_DATA_H_ + +#include "unitree_go/msg/detail/go2_front_video_data__struct.h" +#include "unitree_go/msg/detail/go2_front_video_data__functions.h" +#include "unitree_go/msg/detail/go2_front_video_data__type_support.h" + +#endif // UNITREE_GO__MSG__GO2_FRONT_VIDEO_DATA_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/go2_front_video_data.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/go2_front_video_data.hpp new file mode 100644 index 0000000..2818e32 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/go2_front_video_data.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__GO2_FRONT_VIDEO_DATA_HPP_ +#define UNITREE_GO__MSG__GO2_FRONT_VIDEO_DATA_HPP_ + +#include "unitree_go/msg/detail/go2_front_video_data__struct.hpp" +#include "unitree_go/msg/detail/go2_front_video_data__builder.hpp" +#include "unitree_go/msg/detail/go2_front_video_data__traits.hpp" +#include "unitree_go/msg/detail/go2_front_video_data__type_support.hpp" + +#endif // UNITREE_GO__MSG__GO2_FRONT_VIDEO_DATA_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/height_map.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/height_map.h new file mode 100644 index 0000000..1d43b49 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/height_map.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from unitree_go:msg/HeightMap.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__HEIGHT_MAP_H_ +#define UNITREE_GO__MSG__HEIGHT_MAP_H_ + +#include "unitree_go/msg/detail/height_map__struct.h" +#include "unitree_go/msg/detail/height_map__functions.h" +#include "unitree_go/msg/detail/height_map__type_support.h" + +#endif // UNITREE_GO__MSG__HEIGHT_MAP_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/height_map.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/height_map.hpp new file mode 100644 index 0000000..5e89a32 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/height_map.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__HEIGHT_MAP_HPP_ +#define UNITREE_GO__MSG__HEIGHT_MAP_HPP_ + +#include "unitree_go/msg/detail/height_map__struct.hpp" +#include "unitree_go/msg/detail/height_map__builder.hpp" +#include "unitree_go/msg/detail/height_map__traits.hpp" +#include "unitree_go/msg/detail/height_map__type_support.hpp" + +#endif // UNITREE_GO__MSG__HEIGHT_MAP_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/imu_state.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/imu_state.h new file mode 100644 index 0000000..811c6bc --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/imu_state.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from unitree_go:msg/IMUState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__IMU_STATE_H_ +#define UNITREE_GO__MSG__IMU_STATE_H_ + +#include "unitree_go/msg/detail/imu_state__struct.h" +#include "unitree_go/msg/detail/imu_state__functions.h" +#include "unitree_go/msg/detail/imu_state__type_support.h" + +#endif // UNITREE_GO__MSG__IMU_STATE_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/imu_state.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/imu_state.hpp new file mode 100644 index 0000000..d3ecf23 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/imu_state.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__IMU_STATE_HPP_ +#define UNITREE_GO__MSG__IMU_STATE_HPP_ + +#include "unitree_go/msg/detail/imu_state__struct.hpp" +#include "unitree_go/msg/detail/imu_state__builder.hpp" +#include "unitree_go/msg/detail/imu_state__traits.hpp" +#include "unitree_go/msg/detail/imu_state__type_support.hpp" + +#endif // UNITREE_GO__MSG__IMU_STATE_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/interface_config.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/interface_config.h new file mode 100644 index 0000000..f32bb9e --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/interface_config.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from unitree_go:msg/InterfaceConfig.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__INTERFACE_CONFIG_H_ +#define UNITREE_GO__MSG__INTERFACE_CONFIG_H_ + +#include "unitree_go/msg/detail/interface_config__struct.h" +#include "unitree_go/msg/detail/interface_config__functions.h" +#include "unitree_go/msg/detail/interface_config__type_support.h" + +#endif // UNITREE_GO__MSG__INTERFACE_CONFIG_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/interface_config.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/interface_config.hpp new file mode 100644 index 0000000..3da4e0a --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/interface_config.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__INTERFACE_CONFIG_HPP_ +#define UNITREE_GO__MSG__INTERFACE_CONFIG_HPP_ + +#include "unitree_go/msg/detail/interface_config__struct.hpp" +#include "unitree_go/msg/detail/interface_config__builder.hpp" +#include "unitree_go/msg/detail/interface_config__traits.hpp" +#include "unitree_go/msg/detail/interface_config__type_support.hpp" + +#endif // UNITREE_GO__MSG__INTERFACE_CONFIG_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/lidar_state.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/lidar_state.h new file mode 100644 index 0000000..40a1aa9 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/lidar_state.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from unitree_go:msg/LidarState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__LIDAR_STATE_H_ +#define UNITREE_GO__MSG__LIDAR_STATE_H_ + +#include "unitree_go/msg/detail/lidar_state__struct.h" +#include "unitree_go/msg/detail/lidar_state__functions.h" +#include "unitree_go/msg/detail/lidar_state__type_support.h" + +#endif // UNITREE_GO__MSG__LIDAR_STATE_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/lidar_state.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/lidar_state.hpp new file mode 100644 index 0000000..e0972ac --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/lidar_state.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__LIDAR_STATE_HPP_ +#define UNITREE_GO__MSG__LIDAR_STATE_HPP_ + +#include "unitree_go/msg/detail/lidar_state__struct.hpp" +#include "unitree_go/msg/detail/lidar_state__builder.hpp" +#include "unitree_go/msg/detail/lidar_state__traits.hpp" +#include "unitree_go/msg/detail/lidar_state__type_support.hpp" + +#endif // UNITREE_GO__MSG__LIDAR_STATE_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/low_cmd.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/low_cmd.h new file mode 100644 index 0000000..e341923 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/low_cmd.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from unitree_go:msg/LowCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__LOW_CMD_H_ +#define UNITREE_GO__MSG__LOW_CMD_H_ + +#include "unitree_go/msg/detail/low_cmd__struct.h" +#include "unitree_go/msg/detail/low_cmd__functions.h" +#include "unitree_go/msg/detail/low_cmd__type_support.h" + +#endif // UNITREE_GO__MSG__LOW_CMD_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/low_cmd.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/low_cmd.hpp new file mode 100644 index 0000000..72b89c0 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/low_cmd.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__LOW_CMD_HPP_ +#define UNITREE_GO__MSG__LOW_CMD_HPP_ + +#include "unitree_go/msg/detail/low_cmd__struct.hpp" +#include "unitree_go/msg/detail/low_cmd__builder.hpp" +#include "unitree_go/msg/detail/low_cmd__traits.hpp" +#include "unitree_go/msg/detail/low_cmd__type_support.hpp" + +#endif // UNITREE_GO__MSG__LOW_CMD_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/low_state.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/low_state.h new file mode 100644 index 0000000..37a0af7 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/low_state.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from unitree_go:msg/LowState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__LOW_STATE_H_ +#define UNITREE_GO__MSG__LOW_STATE_H_ + +#include "unitree_go/msg/detail/low_state__struct.h" +#include "unitree_go/msg/detail/low_state__functions.h" +#include "unitree_go/msg/detail/low_state__type_support.h" + +#endif // UNITREE_GO__MSG__LOW_STATE_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/low_state.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/low_state.hpp new file mode 100644 index 0000000..bca19a5 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/low_state.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__LOW_STATE_HPP_ +#define UNITREE_GO__MSG__LOW_STATE_HPP_ + +#include "unitree_go/msg/detail/low_state__struct.hpp" +#include "unitree_go/msg/detail/low_state__builder.hpp" +#include "unitree_go/msg/detail/low_state__traits.hpp" +#include "unitree_go/msg/detail/low_state__type_support.hpp" + +#endif // UNITREE_GO__MSG__LOW_STATE_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/motor_cmd.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/motor_cmd.h new file mode 100644 index 0000000..68b630f --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/motor_cmd.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from unitree_go:msg/MotorCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__MOTOR_CMD_H_ +#define UNITREE_GO__MSG__MOTOR_CMD_H_ + +#include "unitree_go/msg/detail/motor_cmd__struct.h" +#include "unitree_go/msg/detail/motor_cmd__functions.h" +#include "unitree_go/msg/detail/motor_cmd__type_support.h" + +#endif // UNITREE_GO__MSG__MOTOR_CMD_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/motor_cmd.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/motor_cmd.hpp new file mode 100644 index 0000000..6b572ee --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/motor_cmd.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__MOTOR_CMD_HPP_ +#define UNITREE_GO__MSG__MOTOR_CMD_HPP_ + +#include "unitree_go/msg/detail/motor_cmd__struct.hpp" +#include "unitree_go/msg/detail/motor_cmd__builder.hpp" +#include "unitree_go/msg/detail/motor_cmd__traits.hpp" +#include "unitree_go/msg/detail/motor_cmd__type_support.hpp" + +#endif // UNITREE_GO__MSG__MOTOR_CMD_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/motor_state.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/motor_state.h new file mode 100644 index 0000000..11a6aba --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/motor_state.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from unitree_go:msg/MotorState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__MOTOR_STATE_H_ +#define UNITREE_GO__MSG__MOTOR_STATE_H_ + +#include "unitree_go/msg/detail/motor_state__struct.h" +#include "unitree_go/msg/detail/motor_state__functions.h" +#include "unitree_go/msg/detail/motor_state__type_support.h" + +#endif // UNITREE_GO__MSG__MOTOR_STATE_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/motor_state.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/motor_state.hpp new file mode 100644 index 0000000..97aa176 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/motor_state.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__MOTOR_STATE_HPP_ +#define UNITREE_GO__MSG__MOTOR_STATE_HPP_ + +#include "unitree_go/msg/detail/motor_state__struct.hpp" +#include "unitree_go/msg/detail/motor_state__builder.hpp" +#include "unitree_go/msg/detail/motor_state__traits.hpp" +#include "unitree_go/msg/detail/motor_state__type_support.hpp" + +#endif // UNITREE_GO__MSG__MOTOR_STATE_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/path_point.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/path_point.h new file mode 100644 index 0000000..f96e7b1 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/path_point.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from unitree_go:msg/PathPoint.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__PATH_POINT_H_ +#define UNITREE_GO__MSG__PATH_POINT_H_ + +#include "unitree_go/msg/detail/path_point__struct.h" +#include "unitree_go/msg/detail/path_point__functions.h" +#include "unitree_go/msg/detail/path_point__type_support.h" + +#endif // UNITREE_GO__MSG__PATH_POINT_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/path_point.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/path_point.hpp new file mode 100644 index 0000000..621cdab --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/path_point.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__PATH_POINT_HPP_ +#define UNITREE_GO__MSG__PATH_POINT_HPP_ + +#include "unitree_go/msg/detail/path_point__struct.hpp" +#include "unitree_go/msg/detail/path_point__builder.hpp" +#include "unitree_go/msg/detail/path_point__traits.hpp" +#include "unitree_go/msg/detail/path_point__type_support.hpp" + +#endif // UNITREE_GO__MSG__PATH_POINT_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/req.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/req.h new file mode 100644 index 0000000..77124a4 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/req.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from unitree_go:msg/Req.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__REQ_H_ +#define UNITREE_GO__MSG__REQ_H_ + +#include "unitree_go/msg/detail/req__struct.h" +#include "unitree_go/msg/detail/req__functions.h" +#include "unitree_go/msg/detail/req__type_support.h" + +#endif // UNITREE_GO__MSG__REQ_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/req.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/req.hpp new file mode 100644 index 0000000..1409e67 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/req.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__REQ_HPP_ +#define UNITREE_GO__MSG__REQ_HPP_ + +#include "unitree_go/msg/detail/req__struct.hpp" +#include "unitree_go/msg/detail/req__builder.hpp" +#include "unitree_go/msg/detail/req__traits.hpp" +#include "unitree_go/msg/detail/req__type_support.hpp" + +#endif // UNITREE_GO__MSG__REQ_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/res.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/res.h new file mode 100644 index 0000000..21f7767 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/res.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from unitree_go:msg/Res.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__RES_H_ +#define UNITREE_GO__MSG__RES_H_ + +#include "unitree_go/msg/detail/res__struct.h" +#include "unitree_go/msg/detail/res__functions.h" +#include "unitree_go/msg/detail/res__type_support.h" + +#endif // UNITREE_GO__MSG__RES_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/res.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/res.hpp new file mode 100644 index 0000000..faa1ac4 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/res.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__RES_HPP_ +#define UNITREE_GO__MSG__RES_HPP_ + +#include "unitree_go/msg/detail/res__struct.hpp" +#include "unitree_go/msg/detail/res__builder.hpp" +#include "unitree_go/msg/detail/res__traits.hpp" +#include "unitree_go/msg/detail/res__type_support.hpp" + +#endif // UNITREE_GO__MSG__RES_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/rosidl_generator_c__visibility_control.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/rosidl_generator_c__visibility_control.h new file mode 100644 index 0000000..1416935 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/rosidl_generator_c__visibility_control.h @@ -0,0 +1,42 @@ +// generated from rosidl_generator_c/resource/rosidl_generator_c__visibility_control.h.in +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__ROSIDL_GENERATOR_C__VISIBILITY_CONTROL_H_ +#define UNITREE_GO__MSG__ROSIDL_GENERATOR_C__VISIBILITY_CONTROL_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +// This logic was borrowed (then namespaced) from the examples on the gcc wiki: +// https://gcc.gnu.org/wiki/Visibility + +#if defined _WIN32 || defined __CYGWIN__ + #ifdef __GNUC__ + #define ROSIDL_GENERATOR_C_EXPORT_unitree_go __attribute__ ((dllexport)) + #define ROSIDL_GENERATOR_C_IMPORT_unitree_go __attribute__ ((dllimport)) + #else + #define ROSIDL_GENERATOR_C_EXPORT_unitree_go __declspec(dllexport) + #define ROSIDL_GENERATOR_C_IMPORT_unitree_go __declspec(dllimport) + #endif + #ifdef ROSIDL_GENERATOR_C_BUILDING_DLL_unitree_go + #define ROSIDL_GENERATOR_C_PUBLIC_unitree_go ROSIDL_GENERATOR_C_EXPORT_unitree_go + #else + #define ROSIDL_GENERATOR_C_PUBLIC_unitree_go ROSIDL_GENERATOR_C_IMPORT_unitree_go + #endif +#else + #define ROSIDL_GENERATOR_C_EXPORT_unitree_go __attribute__ ((visibility("default"))) + #define ROSIDL_GENERATOR_C_IMPORT_unitree_go + #if __GNUC__ >= 4 + #define ROSIDL_GENERATOR_C_PUBLIC_unitree_go __attribute__ ((visibility("default"))) + #else + #define ROSIDL_GENERATOR_C_PUBLIC_unitree_go + #endif +#endif + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__ROSIDL_GENERATOR_C__VISIBILITY_CONTROL_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/rosidl_generator_cpp__visibility_control.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/rosidl_generator_cpp__visibility_control.hpp new file mode 100644 index 0000000..ef63cae --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/rosidl_generator_cpp__visibility_control.hpp @@ -0,0 +1,42 @@ +// generated from rosidl_generator_cpp/resource/rosidl_generator_cpp__visibility_control.hpp.in +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ +#define UNITREE_GO__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +// This logic was borrowed (then namespaced) from the examples on the gcc wiki: +// https://gcc.gnu.org/wiki/Visibility + +#if defined _WIN32 || defined __CYGWIN__ + #ifdef __GNUC__ + #define ROSIDL_GENERATOR_CPP_EXPORT_unitree_go __attribute__ ((dllexport)) + #define ROSIDL_GENERATOR_CPP_IMPORT_unitree_go __attribute__ ((dllimport)) + #else + #define ROSIDL_GENERATOR_CPP_EXPORT_unitree_go __declspec(dllexport) + #define ROSIDL_GENERATOR_CPP_IMPORT_unitree_go __declspec(dllimport) + #endif + #ifdef ROSIDL_GENERATOR_CPP_BUILDING_DLL_unitree_go + #define ROSIDL_GENERATOR_CPP_PUBLIC_unitree_go ROSIDL_GENERATOR_CPP_EXPORT_unitree_go + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_unitree_go ROSIDL_GENERATOR_CPP_IMPORT_unitree_go + #endif +#else + #define ROSIDL_GENERATOR_CPP_EXPORT_unitree_go __attribute__ ((visibility("default"))) + #define ROSIDL_GENERATOR_CPP_IMPORT_unitree_go + #if __GNUC__ >= 4 + #define ROSIDL_GENERATOR_CPP_PUBLIC_unitree_go __attribute__ ((visibility("default"))) + #else + #define ROSIDL_GENERATOR_CPP_PUBLIC_unitree_go + #endif +#endif + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__ROSIDL_GENERATOR_CPP__VISIBILITY_CONTROL_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/rosidl_typesupport_fastrtps_c__visibility_control.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/rosidl_typesupport_fastrtps_c__visibility_control.h new file mode 100644 index 0000000..dbbaa78 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/rosidl_typesupport_fastrtps_c__visibility_control.h @@ -0,0 +1,43 @@ +// generated from +// rosidl_typesupport_fastrtps_c/resource/rosidl_typesupport_fastrtps_c__visibility_control.h.in +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__ROSIDL_TYPESUPPORT_FASTRTPS_C__VISIBILITY_CONTROL_H_ +#define UNITREE_GO__MSG__ROSIDL_TYPESUPPORT_FASTRTPS_C__VISIBILITY_CONTROL_H_ + +#if __cplusplus +extern "C" +{ +#endif + +// This logic was borrowed (then namespaced) from the examples on the gcc wiki: +// https://gcc.gnu.org/wiki/Visibility + +#if defined _WIN32 || defined __CYGWIN__ + #ifdef __GNUC__ + #define ROSIDL_TYPESUPPORT_FASTRTPS_C_EXPORT_unitree_go __attribute__ ((dllexport)) + #define ROSIDL_TYPESUPPORT_FASTRTPS_C_IMPORT_unitree_go __attribute__ ((dllimport)) + #else + #define ROSIDL_TYPESUPPORT_FASTRTPS_C_EXPORT_unitree_go __declspec(dllexport) + #define ROSIDL_TYPESUPPORT_FASTRTPS_C_IMPORT_unitree_go __declspec(dllimport) + #endif + #ifdef ROSIDL_TYPESUPPORT_FASTRTPS_C_BUILDING_DLL_unitree_go + #define ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go ROSIDL_TYPESUPPORT_FASTRTPS_C_EXPORT_unitree_go + #else + #define ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go ROSIDL_TYPESUPPORT_FASTRTPS_C_IMPORT_unitree_go + #endif +#else + #define ROSIDL_TYPESUPPORT_FASTRTPS_C_EXPORT_unitree_go __attribute__ ((visibility("default"))) + #define ROSIDL_TYPESUPPORT_FASTRTPS_C_IMPORT_unitree_go + #if __GNUC__ >= 4 + #define ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go __attribute__ ((visibility("default"))) + #else + #define ROSIDL_TYPESUPPORT_FASTRTPS_C_PUBLIC_unitree_go + #endif +#endif + +#if __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__ROSIDL_TYPESUPPORT_FASTRTPS_C__VISIBILITY_CONTROL_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h new file mode 100644 index 0000000..9334613 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/rosidl_typesupport_fastrtps_cpp__visibility_control.h @@ -0,0 +1,43 @@ +// generated from +// rosidl_typesupport_fastrtps_cpp/resource/rosidl_typesupport_fastrtps_cpp__visibility_control.h.in +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__ROSIDL_TYPESUPPORT_FASTRTPS_CPP__VISIBILITY_CONTROL_H_ +#define UNITREE_GO__MSG__ROSIDL_TYPESUPPORT_FASTRTPS_CPP__VISIBILITY_CONTROL_H_ + +#if __cplusplus +extern "C" +{ +#endif + +// This logic was borrowed (then namespaced) from the examples on the gcc wiki: +// https://gcc.gnu.org/wiki/Visibility + +#if defined _WIN32 || defined __CYGWIN__ + #ifdef __GNUC__ + #define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_EXPORT_unitree_go __attribute__ ((dllexport)) + #define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_IMPORT_unitree_go __attribute__ ((dllimport)) + #else + #define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_EXPORT_unitree_go __declspec(dllexport) + #define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_IMPORT_unitree_go __declspec(dllimport) + #endif + #ifdef ROSIDL_TYPESUPPORT_FASTRTPS_CPP_BUILDING_DLL_unitree_go + #define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go ROSIDL_TYPESUPPORT_FASTRTPS_CPP_EXPORT_unitree_go + #else + #define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go ROSIDL_TYPESUPPORT_FASTRTPS_CPP_IMPORT_unitree_go + #endif +#else + #define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_EXPORT_unitree_go __attribute__ ((visibility("default"))) + #define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_IMPORT_unitree_go + #if __GNUC__ >= 4 + #define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go __attribute__ ((visibility("default"))) + #else + #define ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_unitree_go + #endif +#endif + +#if __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__ROSIDL_TYPESUPPORT_FASTRTPS_CPP__VISIBILITY_CONTROL_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h new file mode 100644 index 0000000..8191c90 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/rosidl_typesupport_introspection_c__visibility_control.h @@ -0,0 +1,43 @@ +// generated from +// rosidl_typesupport_introspection_c/resource/rosidl_typesupport_introspection_c__visibility_control.h.in +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__ROSIDL_TYPESUPPORT_INTROSPECTION_C__VISIBILITY_CONTROL_H_ +#define UNITREE_GO__MSG__ROSIDL_TYPESUPPORT_INTROSPECTION_C__VISIBILITY_CONTROL_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif + +// This logic was borrowed (then namespaced) from the examples on the gcc wiki: +// https://gcc.gnu.org/wiki/Visibility + +#if defined _WIN32 || defined __CYGWIN__ + #ifdef __GNUC__ + #define ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_go __attribute__ ((dllexport)) + #define ROSIDL_TYPESUPPORT_INTROSPECTION_C_IMPORT_unitree_go __attribute__ ((dllimport)) + #else + #define ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_go __declspec(dllexport) + #define ROSIDL_TYPESUPPORT_INTROSPECTION_C_IMPORT_unitree_go __declspec(dllimport) + #endif + #ifdef ROSIDL_TYPESUPPORT_INTROSPECTION_C_BUILDING_DLL_unitree_go + #define ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_go ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_go + #else + #define ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_go ROSIDL_TYPESUPPORT_INTROSPECTION_C_IMPORT_unitree_go + #endif +#else + #define ROSIDL_TYPESUPPORT_INTROSPECTION_C_EXPORT_unitree_go __attribute__ ((visibility("default"))) + #define ROSIDL_TYPESUPPORT_INTROSPECTION_C_IMPORT_unitree_go + #if __GNUC__ >= 4 + #define ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_go __attribute__ ((visibility("default"))) + #else + #define ROSIDL_TYPESUPPORT_INTROSPECTION_C_PUBLIC_unitree_go + #endif +#endif + +#ifdef __cplusplus +} +#endif + +#endif // UNITREE_GO__MSG__ROSIDL_TYPESUPPORT_INTROSPECTION_C__VISIBILITY_CONTROL_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/sport_mode_cmd.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/sport_mode_cmd.h new file mode 100644 index 0000000..77b5ab7 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/sport_mode_cmd.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from unitree_go:msg/SportModeCmd.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__SPORT_MODE_CMD_H_ +#define UNITREE_GO__MSG__SPORT_MODE_CMD_H_ + +#include "unitree_go/msg/detail/sport_mode_cmd__struct.h" +#include "unitree_go/msg/detail/sport_mode_cmd__functions.h" +#include "unitree_go/msg/detail/sport_mode_cmd__type_support.h" + +#endif // UNITREE_GO__MSG__SPORT_MODE_CMD_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/sport_mode_cmd.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/sport_mode_cmd.hpp new file mode 100644 index 0000000..08f5667 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/sport_mode_cmd.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__SPORT_MODE_CMD_HPP_ +#define UNITREE_GO__MSG__SPORT_MODE_CMD_HPP_ + +#include "unitree_go/msg/detail/sport_mode_cmd__struct.hpp" +#include "unitree_go/msg/detail/sport_mode_cmd__builder.hpp" +#include "unitree_go/msg/detail/sport_mode_cmd__traits.hpp" +#include "unitree_go/msg/detail/sport_mode_cmd__type_support.hpp" + +#endif // UNITREE_GO__MSG__SPORT_MODE_CMD_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/sport_mode_state.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/sport_mode_state.h new file mode 100644 index 0000000..f8c2660 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/sport_mode_state.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from unitree_go:msg/SportModeState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__SPORT_MODE_STATE_H_ +#define UNITREE_GO__MSG__SPORT_MODE_STATE_H_ + +#include "unitree_go/msg/detail/sport_mode_state__struct.h" +#include "unitree_go/msg/detail/sport_mode_state__functions.h" +#include "unitree_go/msg/detail/sport_mode_state__type_support.h" + +#endif // UNITREE_GO__MSG__SPORT_MODE_STATE_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/sport_mode_state.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/sport_mode_state.hpp new file mode 100644 index 0000000..d61ced0 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/sport_mode_state.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__SPORT_MODE_STATE_HPP_ +#define UNITREE_GO__MSG__SPORT_MODE_STATE_HPP_ + +#include "unitree_go/msg/detail/sport_mode_state__struct.hpp" +#include "unitree_go/msg/detail/sport_mode_state__builder.hpp" +#include "unitree_go/msg/detail/sport_mode_state__traits.hpp" +#include "unitree_go/msg/detail/sport_mode_state__type_support.hpp" + +#endif // UNITREE_GO__MSG__SPORT_MODE_STATE_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/time_spec.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/time_spec.h new file mode 100644 index 0000000..2c05811 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/time_spec.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from unitree_go:msg/TimeSpec.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__TIME_SPEC_H_ +#define UNITREE_GO__MSG__TIME_SPEC_H_ + +#include "unitree_go/msg/detail/time_spec__struct.h" +#include "unitree_go/msg/detail/time_spec__functions.h" +#include "unitree_go/msg/detail/time_spec__type_support.h" + +#endif // UNITREE_GO__MSG__TIME_SPEC_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/time_spec.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/time_spec.hpp new file mode 100644 index 0000000..42f8731 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/time_spec.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__TIME_SPEC_HPP_ +#define UNITREE_GO__MSG__TIME_SPEC_HPP_ + +#include "unitree_go/msg/detail/time_spec__struct.hpp" +#include "unitree_go/msg/detail/time_spec__builder.hpp" +#include "unitree_go/msg/detail/time_spec__traits.hpp" +#include "unitree_go/msg/detail/time_spec__type_support.hpp" + +#endif // UNITREE_GO__MSG__TIME_SPEC_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/uwb_state.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/uwb_state.h new file mode 100644 index 0000000..743aaae --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/uwb_state.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from unitree_go:msg/UwbState.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__UWB_STATE_H_ +#define UNITREE_GO__MSG__UWB_STATE_H_ + +#include "unitree_go/msg/detail/uwb_state__struct.h" +#include "unitree_go/msg/detail/uwb_state__functions.h" +#include "unitree_go/msg/detail/uwb_state__type_support.h" + +#endif // UNITREE_GO__MSG__UWB_STATE_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/uwb_state.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/uwb_state.hpp new file mode 100644 index 0000000..6bbacba --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/uwb_state.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__UWB_STATE_HPP_ +#define UNITREE_GO__MSG__UWB_STATE_HPP_ + +#include "unitree_go/msg/detail/uwb_state__struct.hpp" +#include "unitree_go/msg/detail/uwb_state__builder.hpp" +#include "unitree_go/msg/detail/uwb_state__traits.hpp" +#include "unitree_go/msg/detail/uwb_state__type_support.hpp" + +#endif // UNITREE_GO__MSG__UWB_STATE_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/uwb_switch.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/uwb_switch.h new file mode 100644 index 0000000..d80e55e --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/uwb_switch.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from unitree_go:msg/UwbSwitch.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__UWB_SWITCH_H_ +#define UNITREE_GO__MSG__UWB_SWITCH_H_ + +#include "unitree_go/msg/detail/uwb_switch__struct.h" +#include "unitree_go/msg/detail/uwb_switch__functions.h" +#include "unitree_go/msg/detail/uwb_switch__type_support.h" + +#endif // UNITREE_GO__MSG__UWB_SWITCH_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/uwb_switch.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/uwb_switch.hpp new file mode 100644 index 0000000..9845594 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/uwb_switch.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__UWB_SWITCH_HPP_ +#define UNITREE_GO__MSG__UWB_SWITCH_HPP_ + +#include "unitree_go/msg/detail/uwb_switch__struct.hpp" +#include "unitree_go/msg/detail/uwb_switch__builder.hpp" +#include "unitree_go/msg/detail/uwb_switch__traits.hpp" +#include "unitree_go/msg/detail/uwb_switch__type_support.hpp" + +#endif // UNITREE_GO__MSG__UWB_SWITCH_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/wireless_controller.h b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/wireless_controller.h new file mode 100644 index 0000000..67783ce --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/wireless_controller.h @@ -0,0 +1,12 @@ +// generated from rosidl_generator_c/resource/idl.h.em +// with input from unitree_go:msg/WirelessController.idl +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__WIRELESS_CONTROLLER_H_ +#define UNITREE_GO__MSG__WIRELESS_CONTROLLER_H_ + +#include "unitree_go/msg/detail/wireless_controller__struct.h" +#include "unitree_go/msg/detail/wireless_controller__functions.h" +#include "unitree_go/msg/detail/wireless_controller__type_support.h" + +#endif // UNITREE_GO__MSG__WIRELESS_CONTROLLER_H_ diff --git a/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/wireless_controller.hpp b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/wireless_controller.hpp new file mode 100644 index 0000000..17aa9c0 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/include/unitree_go/msg/wireless_controller.hpp @@ -0,0 +1,12 @@ +// generated from rosidl_generator_cpp/resource/idl.hpp.em +// generated code does not contain a copyright notice + +#ifndef UNITREE_GO__MSG__WIRELESS_CONTROLLER_HPP_ +#define UNITREE_GO__MSG__WIRELESS_CONTROLLER_HPP_ + +#include "unitree_go/msg/detail/wireless_controller__struct.hpp" +#include "unitree_go/msg/detail/wireless_controller__builder.hpp" +#include "unitree_go/msg/detail/wireless_controller__traits.hpp" +#include "unitree_go/msg/detail/wireless_controller__type_support.hpp" + +#endif // UNITREE_GO__MSG__WIRELESS_CONTROLLER_HPP_ diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/__init__.py b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/__init__.py b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/__init__.py new file mode 100644 index 0000000..5c00080 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/__init__.py @@ -0,0 +1,22 @@ +from unitree_go.msg._audio_data import AudioData # noqa: F401 +from unitree_go.msg._bms_cmd import BmsCmd # noqa: F401 +from unitree_go.msg._bms_state import BmsState # noqa: F401 +from unitree_go.msg._error import Error # noqa: F401 +from unitree_go.msg._go2_front_video_data import Go2FrontVideoData # noqa: F401 +from unitree_go.msg._height_map import HeightMap # noqa: F401 +from unitree_go.msg._imu_state import IMUState # noqa: F401 +from unitree_go.msg._interface_config import InterfaceConfig # noqa: F401 +from unitree_go.msg._lidar_state import LidarState # noqa: F401 +from unitree_go.msg._low_cmd import LowCmd # noqa: F401 +from unitree_go.msg._low_state import LowState # noqa: F401 +from unitree_go.msg._motor_cmd import MotorCmd # noqa: F401 +from unitree_go.msg._motor_state import MotorState # noqa: F401 +from unitree_go.msg._path_point import PathPoint # noqa: F401 +from unitree_go.msg._req import Req # noqa: F401 +from unitree_go.msg._res import Res # noqa: F401 +from unitree_go.msg._sport_mode_cmd import SportModeCmd # noqa: F401 +from unitree_go.msg._sport_mode_state import SportModeState # noqa: F401 +from unitree_go.msg._time_spec import TimeSpec # noqa: F401 +from unitree_go.msg._uwb_state import UwbState # noqa: F401 +from unitree_go.msg._uwb_switch import UwbSwitch # noqa: F401 +from unitree_go.msg._wireless_controller import WirelessController # noqa: F401 diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_audio_data.py b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_audio_data.py new file mode 100644 index 0000000..9c9cf86 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_audio_data.py @@ -0,0 +1,161 @@ +# generated from rosidl_generator_py/resource/_idl.py.em +# with input from unitree_go:msg/AudioData.idl +# generated code does not contain a copyright notice + + +# Import statements for member types + +# Member 'data' +import array # noqa: E402, I100 + +import rosidl_parser.definition # noqa: E402, I100 + + +class Metaclass_AudioData(type): + """Metaclass of message 'AudioData'.""" + + _CREATE_ROS_MESSAGE = None + _CONVERT_FROM_PY = None + _CONVERT_TO_PY = None + _DESTROY_ROS_MESSAGE = None + _TYPE_SUPPORT = None + + __constants = { + } + + @classmethod + def __import_type_support__(cls): + try: + from rosidl_generator_py import import_type_support + module = import_type_support('unitree_go') + except ImportError: + import logging + import traceback + logger = logging.getLogger( + 'unitree_go.msg.AudioData') + logger.debug( + 'Failed to import needed modules for type support:\n' + + traceback.format_exc()) + else: + cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__msg__audio_data + cls._CONVERT_FROM_PY = module.convert_from_py_msg__msg__audio_data + cls._CONVERT_TO_PY = module.convert_to_py_msg__msg__audio_data + cls._TYPE_SUPPORT = module.type_support_msg__msg__audio_data + cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__msg__audio_data + + @classmethod + def __prepare__(cls, name, bases, **kwargs): + # list constant names here so that they appear in the help text of + # the message class under "Data and other attributes defined here:" + # as well as populate each message instance + return { + } + + +class AudioData(metaclass=Metaclass_AudioData): + """Message class 'AudioData'.""" + + __slots__ = [ + '_time_frame', + '_data', + ] + + _fields_and_field_types = { + 'time_frame': 'uint64', + 'data': 'sequence', + } + + SLOT_TYPES = ( + rosidl_parser.definition.BasicType('uint64'), # noqa: E501 + rosidl_parser.definition.UnboundedSequence(rosidl_parser.definition.BasicType('uint8')), # noqa: E501 + ) + + def __init__(self, **kwargs): + assert all('_' + key in self.__slots__ for key in kwargs.keys()), \ + 'Invalid arguments passed to constructor: %s' % \ + ', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__)) + self.time_frame = kwargs.get('time_frame', int()) + self.data = array.array('B', kwargs.get('data', [])) + + def __repr__(self): + typename = self.__class__.__module__.split('.') + typename.pop() + typename.append(self.__class__.__name__) + args = [] + for s, t in zip(self.__slots__, self.SLOT_TYPES): + field = getattr(self, s) + fieldstr = repr(field) + # We use Python array type for fields that can be directly stored + # in them, and "normal" sequences for everything else. If it is + # a type that we store in an array, strip off the 'array' portion. + if ( + isinstance(t, rosidl_parser.definition.AbstractSequence) and + isinstance(t.value_type, rosidl_parser.definition.BasicType) and + t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64'] + ): + if len(field) == 0: + fieldstr = '[]' + else: + assert fieldstr.startswith('array(') + prefix = "array('X', " + suffix = ')' + fieldstr = fieldstr[len(prefix):-len(suffix)] + args.append(s[1:] + '=' + fieldstr) + return '%s(%s)' % ('.'.join(typename), ', '.join(args)) + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + if self.time_frame != other.time_frame: + return False + if self.data != other.data: + return False + return True + + @classmethod + def get_fields_and_field_types(cls): + from copy import copy + return copy(cls._fields_and_field_types) + + @property + def time_frame(self): + """Message field 'time_frame'.""" + return self._time_frame + + @time_frame.setter + def time_frame(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'time_frame' field must be of type 'int'" + assert value >= 0 and value < 18446744073709551616, \ + "The 'time_frame' field must be an unsigned integer in [0, 18446744073709551615]" + self._time_frame = value + + @property + def data(self): + """Message field 'data'.""" + return self._data + + @data.setter + def data(self, value): + if isinstance(value, array.array): + assert value.typecode == 'B', \ + "The 'data' array.array() must have the type code of 'B'" + self._data = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + all(isinstance(v, int) for v in value) and + all(val >= 0 and val < 256 for val in value)), \ + "The 'data' field must be a set or sequence and each value of type 'int' and each unsigned integer in [0, 255]" + self._data = array.array('B', value) diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_audio_data_s.c b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_audio_data_s.c new file mode 100644 index 0000000..e85e1b1 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_audio_data_s.c @@ -0,0 +1,221 @@ +// generated from rosidl_generator_py/resource/_idl_support.c.em +// with input from unitree_go:msg/AudioData.idl +// generated code does not contain a copyright notice +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#include +#include +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-function" +#endif +#include "numpy/ndarrayobject.h" +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/detail/audio_data__struct.h" +#include "unitree_go/msg/detail/audio_data__functions.h" + +#include "rosidl_runtime_c/primitives_sequence.h" +#include "rosidl_runtime_c/primitives_sequence_functions.h" + + +ROSIDL_GENERATOR_C_EXPORT +bool unitree_go__msg__audio_data__convert_from_py(PyObject * _pymsg, void * _ros_message) +{ + // check that the passed message is of the expected Python class + { + char full_classname_dest[37]; + { + char * class_name = NULL; + char * module_name = NULL; + { + PyObject * class_attr = PyObject_GetAttrString(_pymsg, "__class__"); + if (class_attr) { + PyObject * name_attr = PyObject_GetAttrString(class_attr, "__name__"); + if (name_attr) { + class_name = (char *)PyUnicode_1BYTE_DATA(name_attr); + Py_DECREF(name_attr); + } + PyObject * module_attr = PyObject_GetAttrString(class_attr, "__module__"); + if (module_attr) { + module_name = (char *)PyUnicode_1BYTE_DATA(module_attr); + Py_DECREF(module_attr); + } + Py_DECREF(class_attr); + } + } + if (!class_name || !module_name) { + return false; + } + snprintf(full_classname_dest, sizeof(full_classname_dest), "%s.%s", module_name, class_name); + } + assert(strncmp("unitree_go.msg._audio_data.AudioData", full_classname_dest, 36) == 0); + } + unitree_go__msg__AudioData * ros_message = _ros_message; + { // time_frame + PyObject * field = PyObject_GetAttrString(_pymsg, "time_frame"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->time_frame = PyLong_AsUnsignedLongLong(field); + Py_DECREF(field); + } + { // data + PyObject * field = PyObject_GetAttrString(_pymsg, "data"); + if (!field) { + return false; + } + if (PyObject_CheckBuffer(field)) { + // Optimization for converting arrays of primitives + Py_buffer view; + int rc = PyObject_GetBuffer(field, &view, PyBUF_SIMPLE); + if (rc < 0) { + Py_DECREF(field); + return false; + } + Py_ssize_t size = view.len / sizeof(uint8_t); + if (!rosidl_runtime_c__uint8__Sequence__init(&(ros_message->data), size)) { + PyErr_SetString(PyExc_RuntimeError, "unable to create uint8__Sequence ros_message"); + PyBuffer_Release(&view); + Py_DECREF(field); + return false; + } + uint8_t * dest = ros_message->data.data; + rc = PyBuffer_ToContiguous(dest, &view, view.len, 'C'); + if (rc < 0) { + PyBuffer_Release(&view); + Py_DECREF(field); + return false; + } + PyBuffer_Release(&view); + } else { + PyObject * seq_field = PySequence_Fast(field, "expected a sequence in 'data'"); + if (!seq_field) { + Py_DECREF(field); + return false; + } + Py_ssize_t size = PySequence_Size(field); + if (-1 == size) { + Py_DECREF(seq_field); + Py_DECREF(field); + return false; + } + if (!rosidl_runtime_c__uint8__Sequence__init(&(ros_message->data), size)) { + PyErr_SetString(PyExc_RuntimeError, "unable to create uint8__Sequence ros_message"); + Py_DECREF(seq_field); + Py_DECREF(field); + return false; + } + uint8_t * dest = ros_message->data.data; + for (Py_ssize_t i = 0; i < size; ++i) { + PyObject * item = PySequence_Fast_GET_ITEM(seq_field, i); + if (!item) { + Py_DECREF(seq_field); + Py_DECREF(field); + return false; + } + assert(PyLong_Check(item)); + uint8_t tmp = (uint8_t)PyLong_AsUnsignedLong(item); + + memcpy(&dest[i], &tmp, sizeof(uint8_t)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + + return true; +} + +ROSIDL_GENERATOR_C_EXPORT +PyObject * unitree_go__msg__audio_data__convert_to_py(void * raw_ros_message) +{ + /* NOTE(esteve): Call constructor of AudioData */ + PyObject * _pymessage = NULL; + { + PyObject * pymessage_module = PyImport_ImportModule("unitree_go.msg._audio_data"); + assert(pymessage_module); + PyObject * pymessage_class = PyObject_GetAttrString(pymessage_module, "AudioData"); + assert(pymessage_class); + Py_DECREF(pymessage_module); + _pymessage = PyObject_CallObject(pymessage_class, NULL); + Py_DECREF(pymessage_class); + if (!_pymessage) { + return NULL; + } + } + unitree_go__msg__AudioData * ros_message = (unitree_go__msg__AudioData *)raw_ros_message; + { // time_frame + PyObject * field = NULL; + field = PyLong_FromUnsignedLongLong(ros_message->time_frame); + { + int rc = PyObject_SetAttrString(_pymessage, "time_frame", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // data + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "data"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "array.array") == 0); + // ensure that itemsize matches the sizeof of the ROS message field + PyObject * itemsize_attr = PyObject_GetAttrString(field, "itemsize"); + assert(itemsize_attr != NULL); + size_t itemsize = PyLong_AsSize_t(itemsize_attr); + Py_DECREF(itemsize_attr); + if (itemsize != sizeof(uint8_t)) { + PyErr_SetString(PyExc_RuntimeError, "itemsize doesn't match expectation"); + Py_DECREF(field); + return NULL; + } + // clear the array, poor approach to remove potential default values + Py_ssize_t length = PyObject_Length(field); + if (-1 == length) { + Py_DECREF(field); + return NULL; + } + if (length > 0) { + PyObject * pop = PyObject_GetAttrString(field, "pop"); + assert(pop != NULL); + for (Py_ssize_t i = 0; i < length; ++i) { + PyObject * ret = PyObject_CallFunctionObjArgs(pop, NULL); + if (!ret) { + Py_DECREF(pop); + Py_DECREF(field); + return NULL; + } + Py_DECREF(ret); + } + Py_DECREF(pop); + } + if (ros_message->data.size > 0) { + // populating the array.array using the frombytes method + PyObject * frombytes = PyObject_GetAttrString(field, "frombytes"); + assert(frombytes != NULL); + uint8_t * src = &(ros_message->data.data[0]); + PyObject * data = PyBytes_FromStringAndSize((const char *)src, ros_message->data.size * sizeof(uint8_t)); + assert(data != NULL); + PyObject * ret = PyObject_CallFunctionObjArgs(frombytes, data, NULL); + Py_DECREF(data); + Py_DECREF(frombytes); + if (!ret) { + Py_DECREF(field); + return NULL; + } + Py_DECREF(ret); + } + Py_DECREF(field); + } + + // ownership of _pymessage is transferred to the caller + return _pymessage; +} diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_bms_cmd.py b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_bms_cmd.py new file mode 100644 index 0000000..6034fde --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_bms_cmd.py @@ -0,0 +1,168 @@ +# generated from rosidl_generator_py/resource/_idl.py.em +# with input from unitree_go:msg/BmsCmd.idl +# generated code does not contain a copyright notice + + +# Import statements for member types + +# Member 'reserve' +import numpy # noqa: E402, I100 + +import rosidl_parser.definition # noqa: E402, I100 + + +class Metaclass_BmsCmd(type): + """Metaclass of message 'BmsCmd'.""" + + _CREATE_ROS_MESSAGE = None + _CONVERT_FROM_PY = None + _CONVERT_TO_PY = None + _DESTROY_ROS_MESSAGE = None + _TYPE_SUPPORT = None + + __constants = { + } + + @classmethod + def __import_type_support__(cls): + try: + from rosidl_generator_py import import_type_support + module = import_type_support('unitree_go') + except ImportError: + import logging + import traceback + logger = logging.getLogger( + 'unitree_go.msg.BmsCmd') + logger.debug( + 'Failed to import needed modules for type support:\n' + + traceback.format_exc()) + else: + cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__msg__bms_cmd + cls._CONVERT_FROM_PY = module.convert_from_py_msg__msg__bms_cmd + cls._CONVERT_TO_PY = module.convert_to_py_msg__msg__bms_cmd + cls._TYPE_SUPPORT = module.type_support_msg__msg__bms_cmd + cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__msg__bms_cmd + + @classmethod + def __prepare__(cls, name, bases, **kwargs): + # list constant names here so that they appear in the help text of + # the message class under "Data and other attributes defined here:" + # as well as populate each message instance + return { + } + + +class BmsCmd(metaclass=Metaclass_BmsCmd): + """Message class 'BmsCmd'.""" + + __slots__ = [ + '_off', + '_reserve', + ] + + _fields_and_field_types = { + 'off': 'uint8', + 'reserve': 'uint8[3]', + } + + SLOT_TYPES = ( + rosidl_parser.definition.BasicType('uint8'), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('uint8'), 3), # noqa: E501 + ) + + def __init__(self, **kwargs): + assert all('_' + key in self.__slots__ for key in kwargs.keys()), \ + 'Invalid arguments passed to constructor: %s' % \ + ', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__)) + self.off = kwargs.get('off', int()) + if 'reserve' not in kwargs: + self.reserve = numpy.zeros(3, dtype=numpy.uint8) + else: + self.reserve = numpy.array(kwargs.get('reserve'), dtype=numpy.uint8) + assert self.reserve.shape == (3, ) + + def __repr__(self): + typename = self.__class__.__module__.split('.') + typename.pop() + typename.append(self.__class__.__name__) + args = [] + for s, t in zip(self.__slots__, self.SLOT_TYPES): + field = getattr(self, s) + fieldstr = repr(field) + # We use Python array type for fields that can be directly stored + # in them, and "normal" sequences for everything else. If it is + # a type that we store in an array, strip off the 'array' portion. + if ( + isinstance(t, rosidl_parser.definition.AbstractSequence) and + isinstance(t.value_type, rosidl_parser.definition.BasicType) and + t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64'] + ): + if len(field) == 0: + fieldstr = '[]' + else: + assert fieldstr.startswith('array(') + prefix = "array('X', " + suffix = ')' + fieldstr = fieldstr[len(prefix):-len(suffix)] + args.append(s[1:] + '=' + fieldstr) + return '%s(%s)' % ('.'.join(typename), ', '.join(args)) + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + if self.off != other.off: + return False + if all(self.reserve != other.reserve): + return False + return True + + @classmethod + def get_fields_and_field_types(cls): + from copy import copy + return copy(cls._fields_and_field_types) + + @property + def off(self): + """Message field 'off'.""" + return self._off + + @off.setter + def off(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'off' field must be of type 'int'" + assert value >= 0 and value < 256, \ + "The 'off' field must be an unsigned integer in [0, 255]" + self._off = value + + @property + def reserve(self): + """Message field 'reserve'.""" + return self._reserve + + @reserve.setter + def reserve(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.uint8, \ + "The 'reserve' numpy.ndarray() must have the dtype of 'numpy.uint8'" + assert value.size == 3, \ + "The 'reserve' numpy.ndarray() must have a size of 3" + self._reserve = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 3 and + all(isinstance(v, int) for v in value) and + all(val >= 0 and val < 256 for val in value)), \ + "The 'reserve' field must be a set or sequence with length 3 and each value of type 'int' and each unsigned integer in [0, 255]" + self._reserve = numpy.array(value, dtype=numpy.uint8) diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_bms_cmd_s.c b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_bms_cmd_s.c new file mode 100644 index 0000000..6c1efbd --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_bms_cmd_s.c @@ -0,0 +1,143 @@ +// generated from rosidl_generator_py/resource/_idl_support.c.em +// with input from unitree_go:msg/BmsCmd.idl +// generated code does not contain a copyright notice +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#include +#include +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-function" +#endif +#include "numpy/ndarrayobject.h" +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/detail/bms_cmd__struct.h" +#include "unitree_go/msg/detail/bms_cmd__functions.h" + +#include "rosidl_runtime_c/primitives_sequence.h" +#include "rosidl_runtime_c/primitives_sequence_functions.h" + + +ROSIDL_GENERATOR_C_EXPORT +bool unitree_go__msg__bms_cmd__convert_from_py(PyObject * _pymsg, void * _ros_message) +{ + // check that the passed message is of the expected Python class + { + char full_classname_dest[31]; + { + char * class_name = NULL; + char * module_name = NULL; + { + PyObject * class_attr = PyObject_GetAttrString(_pymsg, "__class__"); + if (class_attr) { + PyObject * name_attr = PyObject_GetAttrString(class_attr, "__name__"); + if (name_attr) { + class_name = (char *)PyUnicode_1BYTE_DATA(name_attr); + Py_DECREF(name_attr); + } + PyObject * module_attr = PyObject_GetAttrString(class_attr, "__module__"); + if (module_attr) { + module_name = (char *)PyUnicode_1BYTE_DATA(module_attr); + Py_DECREF(module_attr); + } + Py_DECREF(class_attr); + } + } + if (!class_name || !module_name) { + return false; + } + snprintf(full_classname_dest, sizeof(full_classname_dest), "%s.%s", module_name, class_name); + } + assert(strncmp("unitree_go.msg._bms_cmd.BmsCmd", full_classname_dest, 30) == 0); + } + unitree_go__msg__BmsCmd * ros_message = _ros_message; + { // off + PyObject * field = PyObject_GetAttrString(_pymsg, "off"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->off = (uint8_t)PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // reserve + PyObject * field = PyObject_GetAttrString(_pymsg, "reserve"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_UINT8); + Py_ssize_t size = 3; + uint8_t * dest = ros_message->reserve; + for (Py_ssize_t i = 0; i < size; ++i) { + uint8_t tmp = *(npy_uint8 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(uint8_t)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + + return true; +} + +ROSIDL_GENERATOR_C_EXPORT +PyObject * unitree_go__msg__bms_cmd__convert_to_py(void * raw_ros_message) +{ + /* NOTE(esteve): Call constructor of BmsCmd */ + PyObject * _pymessage = NULL; + { + PyObject * pymessage_module = PyImport_ImportModule("unitree_go.msg._bms_cmd"); + assert(pymessage_module); + PyObject * pymessage_class = PyObject_GetAttrString(pymessage_module, "BmsCmd"); + assert(pymessage_class); + Py_DECREF(pymessage_module); + _pymessage = PyObject_CallObject(pymessage_class, NULL); + Py_DECREF(pymessage_class); + if (!_pymessage) { + return NULL; + } + } + unitree_go__msg__BmsCmd * ros_message = (unitree_go__msg__BmsCmd *)raw_ros_message; + { // off + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->off); + { + int rc = PyObject_SetAttrString(_pymessage, "off", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // reserve + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "reserve"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_UINT8); + assert(sizeof(npy_uint8) == sizeof(uint8_t)); + npy_uint8 * dst = (npy_uint8 *)PyArray_GETPTR1(seq_field, 0); + uint8_t * src = &(ros_message->reserve[0]); + memcpy(dst, src, 3 * sizeof(uint8_t)); + Py_DECREF(field); + } + + // ownership of _pymessage is transferred to the caller + return _pymessage; +} diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_bms_state.py b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_bms_state.py new file mode 100644 index 0000000..e727d62 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_bms_state.py @@ -0,0 +1,357 @@ +# generated from rosidl_generator_py/resource/_idl.py.em +# with input from unitree_go:msg/BmsState.idl +# generated code does not contain a copyright notice + + +# Import statements for member types + +# Member 'bq_ntc' +# Member 'mcu_ntc' +# Member 'cell_vol' +import numpy # noqa: E402, I100 + +import rosidl_parser.definition # noqa: E402, I100 + + +class Metaclass_BmsState(type): + """Metaclass of message 'BmsState'.""" + + _CREATE_ROS_MESSAGE = None + _CONVERT_FROM_PY = None + _CONVERT_TO_PY = None + _DESTROY_ROS_MESSAGE = None + _TYPE_SUPPORT = None + + __constants = { + } + + @classmethod + def __import_type_support__(cls): + try: + from rosidl_generator_py import import_type_support + module = import_type_support('unitree_go') + except ImportError: + import logging + import traceback + logger = logging.getLogger( + 'unitree_go.msg.BmsState') + logger.debug( + 'Failed to import needed modules for type support:\n' + + traceback.format_exc()) + else: + cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__msg__bms_state + cls._CONVERT_FROM_PY = module.convert_from_py_msg__msg__bms_state + cls._CONVERT_TO_PY = module.convert_to_py_msg__msg__bms_state + cls._TYPE_SUPPORT = module.type_support_msg__msg__bms_state + cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__msg__bms_state + + @classmethod + def __prepare__(cls, name, bases, **kwargs): + # list constant names here so that they appear in the help text of + # the message class under "Data and other attributes defined here:" + # as well as populate each message instance + return { + } + + +class BmsState(metaclass=Metaclass_BmsState): + """Message class 'BmsState'.""" + + __slots__ = [ + '_version_high', + '_version_low', + '_status', + '_soc', + '_current', + '_cycle', + '_bq_ntc', + '_mcu_ntc', + '_cell_vol', + ] + + _fields_and_field_types = { + 'version_high': 'uint8', + 'version_low': 'uint8', + 'status': 'uint8', + 'soc': 'uint8', + 'current': 'int32', + 'cycle': 'uint16', + 'bq_ntc': 'int8[2]', + 'mcu_ntc': 'int8[2]', + 'cell_vol': 'uint16[15]', + } + + SLOT_TYPES = ( + rosidl_parser.definition.BasicType('uint8'), # noqa: E501 + rosidl_parser.definition.BasicType('uint8'), # noqa: E501 + rosidl_parser.definition.BasicType('uint8'), # noqa: E501 + rosidl_parser.definition.BasicType('uint8'), # noqa: E501 + rosidl_parser.definition.BasicType('int32'), # noqa: E501 + rosidl_parser.definition.BasicType('uint16'), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('int8'), 2), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('int8'), 2), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('uint16'), 15), # noqa: E501 + ) + + def __init__(self, **kwargs): + assert all('_' + key in self.__slots__ for key in kwargs.keys()), \ + 'Invalid arguments passed to constructor: %s' % \ + ', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__)) + self.version_high = kwargs.get('version_high', int()) + self.version_low = kwargs.get('version_low', int()) + self.status = kwargs.get('status', int()) + self.soc = kwargs.get('soc', int()) + self.current = kwargs.get('current', int()) + self.cycle = kwargs.get('cycle', int()) + if 'bq_ntc' not in kwargs: + self.bq_ntc = numpy.zeros(2, dtype=numpy.int8) + else: + self.bq_ntc = numpy.array(kwargs.get('bq_ntc'), dtype=numpy.int8) + assert self.bq_ntc.shape == (2, ) + if 'mcu_ntc' not in kwargs: + self.mcu_ntc = numpy.zeros(2, dtype=numpy.int8) + else: + self.mcu_ntc = numpy.array(kwargs.get('mcu_ntc'), dtype=numpy.int8) + assert self.mcu_ntc.shape == (2, ) + if 'cell_vol' not in kwargs: + self.cell_vol = numpy.zeros(15, dtype=numpy.uint16) + else: + self.cell_vol = numpy.array(kwargs.get('cell_vol'), dtype=numpy.uint16) + assert self.cell_vol.shape == (15, ) + + def __repr__(self): + typename = self.__class__.__module__.split('.') + typename.pop() + typename.append(self.__class__.__name__) + args = [] + for s, t in zip(self.__slots__, self.SLOT_TYPES): + field = getattr(self, s) + fieldstr = repr(field) + # We use Python array type for fields that can be directly stored + # in them, and "normal" sequences for everything else. If it is + # a type that we store in an array, strip off the 'array' portion. + if ( + isinstance(t, rosidl_parser.definition.AbstractSequence) and + isinstance(t.value_type, rosidl_parser.definition.BasicType) and + t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64'] + ): + if len(field) == 0: + fieldstr = '[]' + else: + assert fieldstr.startswith('array(') + prefix = "array('X', " + suffix = ')' + fieldstr = fieldstr[len(prefix):-len(suffix)] + args.append(s[1:] + '=' + fieldstr) + return '%s(%s)' % ('.'.join(typename), ', '.join(args)) + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + if self.version_high != other.version_high: + return False + if self.version_low != other.version_low: + return False + if self.status != other.status: + return False + if self.soc != other.soc: + return False + if self.current != other.current: + return False + if self.cycle != other.cycle: + return False + if all(self.bq_ntc != other.bq_ntc): + return False + if all(self.mcu_ntc != other.mcu_ntc): + return False + if all(self.cell_vol != other.cell_vol): + return False + return True + + @classmethod + def get_fields_and_field_types(cls): + from copy import copy + return copy(cls._fields_and_field_types) + + @property + def version_high(self): + """Message field 'version_high'.""" + return self._version_high + + @version_high.setter + def version_high(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'version_high' field must be of type 'int'" + assert value >= 0 and value < 256, \ + "The 'version_high' field must be an unsigned integer in [0, 255]" + self._version_high = value + + @property + def version_low(self): + """Message field 'version_low'.""" + return self._version_low + + @version_low.setter + def version_low(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'version_low' field must be of type 'int'" + assert value >= 0 and value < 256, \ + "The 'version_low' field must be an unsigned integer in [0, 255]" + self._version_low = value + + @property + def status(self): + """Message field 'status'.""" + return self._status + + @status.setter + def status(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'status' field must be of type 'int'" + assert value >= 0 and value < 256, \ + "The 'status' field must be an unsigned integer in [0, 255]" + self._status = value + + @property + def soc(self): + """Message field 'soc'.""" + return self._soc + + @soc.setter + def soc(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'soc' field must be of type 'int'" + assert value >= 0 and value < 256, \ + "The 'soc' field must be an unsigned integer in [0, 255]" + self._soc = value + + @property + def current(self): + """Message field 'current'.""" + return self._current + + @current.setter + def current(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'current' field must be of type 'int'" + assert value >= -2147483648 and value < 2147483648, \ + "The 'current' field must be an integer in [-2147483648, 2147483647]" + self._current = value + + @property + def cycle(self): + """Message field 'cycle'.""" + return self._cycle + + @cycle.setter + def cycle(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'cycle' field must be of type 'int'" + assert value >= 0 and value < 65536, \ + "The 'cycle' field must be an unsigned integer in [0, 65535]" + self._cycle = value + + @property + def bq_ntc(self): + """Message field 'bq_ntc'.""" + return self._bq_ntc + + @bq_ntc.setter + def bq_ntc(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.int8, \ + "The 'bq_ntc' numpy.ndarray() must have the dtype of 'numpy.int8'" + assert value.size == 2, \ + "The 'bq_ntc' numpy.ndarray() must have a size of 2" + self._bq_ntc = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 2 and + all(isinstance(v, int) for v in value) and + all(val >= -128 and val < 128 for val in value)), \ + "The 'bq_ntc' field must be a set or sequence with length 2 and each value of type 'int' and each integer in [-128, 127]" + self._bq_ntc = numpy.array(value, dtype=numpy.int8) + + @property + def mcu_ntc(self): + """Message field 'mcu_ntc'.""" + return self._mcu_ntc + + @mcu_ntc.setter + def mcu_ntc(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.int8, \ + "The 'mcu_ntc' numpy.ndarray() must have the dtype of 'numpy.int8'" + assert value.size == 2, \ + "The 'mcu_ntc' numpy.ndarray() must have a size of 2" + self._mcu_ntc = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 2 and + all(isinstance(v, int) for v in value) and + all(val >= -128 and val < 128 for val in value)), \ + "The 'mcu_ntc' field must be a set or sequence with length 2 and each value of type 'int' and each integer in [-128, 127]" + self._mcu_ntc = numpy.array(value, dtype=numpy.int8) + + @property + def cell_vol(self): + """Message field 'cell_vol'.""" + return self._cell_vol + + @cell_vol.setter + def cell_vol(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.uint16, \ + "The 'cell_vol' numpy.ndarray() must have the dtype of 'numpy.uint16'" + assert value.size == 15, \ + "The 'cell_vol' numpy.ndarray() must have a size of 15" + self._cell_vol = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 15 and + all(isinstance(v, int) for v in value) and + all(val >= 0 and val < 65536 for val in value)), \ + "The 'cell_vol' field must be a set or sequence with length 15 and each value of type 'int' and each unsigned integer in [0, 65535]" + self._cell_vol = numpy.array(value, dtype=numpy.uint16) diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_bms_state_s.c b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_bms_state_s.c new file mode 100644 index 0000000..6e26973 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_bms_state_s.c @@ -0,0 +1,327 @@ +// generated from rosidl_generator_py/resource/_idl_support.c.em +// with input from unitree_go:msg/BmsState.idl +// generated code does not contain a copyright notice +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#include +#include +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-function" +#endif +#include "numpy/ndarrayobject.h" +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/detail/bms_state__struct.h" +#include "unitree_go/msg/detail/bms_state__functions.h" + +#include "rosidl_runtime_c/primitives_sequence.h" +#include "rosidl_runtime_c/primitives_sequence_functions.h" + + +ROSIDL_GENERATOR_C_EXPORT +bool unitree_go__msg__bms_state__convert_from_py(PyObject * _pymsg, void * _ros_message) +{ + // check that the passed message is of the expected Python class + { + char full_classname_dest[35]; + { + char * class_name = NULL; + char * module_name = NULL; + { + PyObject * class_attr = PyObject_GetAttrString(_pymsg, "__class__"); + if (class_attr) { + PyObject * name_attr = PyObject_GetAttrString(class_attr, "__name__"); + if (name_attr) { + class_name = (char *)PyUnicode_1BYTE_DATA(name_attr); + Py_DECREF(name_attr); + } + PyObject * module_attr = PyObject_GetAttrString(class_attr, "__module__"); + if (module_attr) { + module_name = (char *)PyUnicode_1BYTE_DATA(module_attr); + Py_DECREF(module_attr); + } + Py_DECREF(class_attr); + } + } + if (!class_name || !module_name) { + return false; + } + snprintf(full_classname_dest, sizeof(full_classname_dest), "%s.%s", module_name, class_name); + } + assert(strncmp("unitree_go.msg._bms_state.BmsState", full_classname_dest, 34) == 0); + } + unitree_go__msg__BmsState * ros_message = _ros_message; + { // version_high + PyObject * field = PyObject_GetAttrString(_pymsg, "version_high"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->version_high = (uint8_t)PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // version_low + PyObject * field = PyObject_GetAttrString(_pymsg, "version_low"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->version_low = (uint8_t)PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // status + PyObject * field = PyObject_GetAttrString(_pymsg, "status"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->status = (uint8_t)PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // soc + PyObject * field = PyObject_GetAttrString(_pymsg, "soc"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->soc = (uint8_t)PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // current + PyObject * field = PyObject_GetAttrString(_pymsg, "current"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->current = (int32_t)PyLong_AsLong(field); + Py_DECREF(field); + } + { // cycle + PyObject * field = PyObject_GetAttrString(_pymsg, "cycle"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->cycle = (uint16_t)PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // bq_ntc + PyObject * field = PyObject_GetAttrString(_pymsg, "bq_ntc"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_INT8); + Py_ssize_t size = 2; + int8_t * dest = ros_message->bq_ntc; + for (Py_ssize_t i = 0; i < size; ++i) { + int8_t tmp = *(npy_int8 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(int8_t)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + { // mcu_ntc + PyObject * field = PyObject_GetAttrString(_pymsg, "mcu_ntc"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_INT8); + Py_ssize_t size = 2; + int8_t * dest = ros_message->mcu_ntc; + for (Py_ssize_t i = 0; i < size; ++i) { + int8_t tmp = *(npy_int8 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(int8_t)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + { // cell_vol + PyObject * field = PyObject_GetAttrString(_pymsg, "cell_vol"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_UINT16); + Py_ssize_t size = 15; + uint16_t * dest = ros_message->cell_vol; + for (Py_ssize_t i = 0; i < size; ++i) { + uint16_t tmp = *(npy_uint16 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(uint16_t)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + + return true; +} + +ROSIDL_GENERATOR_C_EXPORT +PyObject * unitree_go__msg__bms_state__convert_to_py(void * raw_ros_message) +{ + /* NOTE(esteve): Call constructor of BmsState */ + PyObject * _pymessage = NULL; + { + PyObject * pymessage_module = PyImport_ImportModule("unitree_go.msg._bms_state"); + assert(pymessage_module); + PyObject * pymessage_class = PyObject_GetAttrString(pymessage_module, "BmsState"); + assert(pymessage_class); + Py_DECREF(pymessage_module); + _pymessage = PyObject_CallObject(pymessage_class, NULL); + Py_DECREF(pymessage_class); + if (!_pymessage) { + return NULL; + } + } + unitree_go__msg__BmsState * ros_message = (unitree_go__msg__BmsState *)raw_ros_message; + { // version_high + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->version_high); + { + int rc = PyObject_SetAttrString(_pymessage, "version_high", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // version_low + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->version_low); + { + int rc = PyObject_SetAttrString(_pymessage, "version_low", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // status + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->status); + { + int rc = PyObject_SetAttrString(_pymessage, "status", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // soc + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->soc); + { + int rc = PyObject_SetAttrString(_pymessage, "soc", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // current + PyObject * field = NULL; + field = PyLong_FromLong(ros_message->current); + { + int rc = PyObject_SetAttrString(_pymessage, "current", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // cycle + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->cycle); + { + int rc = PyObject_SetAttrString(_pymessage, "cycle", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // bq_ntc + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "bq_ntc"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_INT8); + assert(sizeof(npy_int8) == sizeof(int8_t)); + npy_int8 * dst = (npy_int8 *)PyArray_GETPTR1(seq_field, 0); + int8_t * src = &(ros_message->bq_ntc[0]); + memcpy(dst, src, 2 * sizeof(int8_t)); + Py_DECREF(field); + } + { // mcu_ntc + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "mcu_ntc"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_INT8); + assert(sizeof(npy_int8) == sizeof(int8_t)); + npy_int8 * dst = (npy_int8 *)PyArray_GETPTR1(seq_field, 0); + int8_t * src = &(ros_message->mcu_ntc[0]); + memcpy(dst, src, 2 * sizeof(int8_t)); + Py_DECREF(field); + } + { // cell_vol + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "cell_vol"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_UINT16); + assert(sizeof(npy_uint16) == sizeof(uint16_t)); + npy_uint16 * dst = (npy_uint16 *)PyArray_GETPTR1(seq_field, 0); + uint16_t * src = &(ros_message->cell_vol[0]); + memcpy(dst, src, 15 * sizeof(uint16_t)); + Py_DECREF(field); + } + + // ownership of _pymessage is transferred to the caller + return _pymessage; +} diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_error.py b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_error.py new file mode 100644 index 0000000..142341a --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_error.py @@ -0,0 +1,145 @@ +# generated from rosidl_generator_py/resource/_idl.py.em +# with input from unitree_go:msg/Error.idl +# generated code does not contain a copyright notice + + +# Import statements for member types + +import rosidl_parser.definition # noqa: E402, I100 + + +class Metaclass_Error(type): + """Metaclass of message 'Error'.""" + + _CREATE_ROS_MESSAGE = None + _CONVERT_FROM_PY = None + _CONVERT_TO_PY = None + _DESTROY_ROS_MESSAGE = None + _TYPE_SUPPORT = None + + __constants = { + } + + @classmethod + def __import_type_support__(cls): + try: + from rosidl_generator_py import import_type_support + module = import_type_support('unitree_go') + except ImportError: + import logging + import traceback + logger = logging.getLogger( + 'unitree_go.msg.Error') + logger.debug( + 'Failed to import needed modules for type support:\n' + + traceback.format_exc()) + else: + cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__msg__error + cls._CONVERT_FROM_PY = module.convert_from_py_msg__msg__error + cls._CONVERT_TO_PY = module.convert_to_py_msg__msg__error + cls._TYPE_SUPPORT = module.type_support_msg__msg__error + cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__msg__error + + @classmethod + def __prepare__(cls, name, bases, **kwargs): + # list constant names here so that they appear in the help text of + # the message class under "Data and other attributes defined here:" + # as well as populate each message instance + return { + } + + +class Error(metaclass=Metaclass_Error): + """Message class 'Error'.""" + + __slots__ = [ + '_source', + '_state', + ] + + _fields_and_field_types = { + 'source': 'uint32', + 'state': 'uint32', + } + + SLOT_TYPES = ( + rosidl_parser.definition.BasicType('uint32'), # noqa: E501 + rosidl_parser.definition.BasicType('uint32'), # noqa: E501 + ) + + def __init__(self, **kwargs): + assert all('_' + key in self.__slots__ for key in kwargs.keys()), \ + 'Invalid arguments passed to constructor: %s' % \ + ', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__)) + self.source = kwargs.get('source', int()) + self.state = kwargs.get('state', int()) + + def __repr__(self): + typename = self.__class__.__module__.split('.') + typename.pop() + typename.append(self.__class__.__name__) + args = [] + for s, t in zip(self.__slots__, self.SLOT_TYPES): + field = getattr(self, s) + fieldstr = repr(field) + # We use Python array type for fields that can be directly stored + # in them, and "normal" sequences for everything else. If it is + # a type that we store in an array, strip off the 'array' portion. + if ( + isinstance(t, rosidl_parser.definition.AbstractSequence) and + isinstance(t.value_type, rosidl_parser.definition.BasicType) and + t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64'] + ): + if len(field) == 0: + fieldstr = '[]' + else: + assert fieldstr.startswith('array(') + prefix = "array('X', " + suffix = ')' + fieldstr = fieldstr[len(prefix):-len(suffix)] + args.append(s[1:] + '=' + fieldstr) + return '%s(%s)' % ('.'.join(typename), ', '.join(args)) + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + if self.source != other.source: + return False + if self.state != other.state: + return False + return True + + @classmethod + def get_fields_and_field_types(cls): + from copy import copy + return copy(cls._fields_and_field_types) + + @property + def source(self): + """Message field 'source'.""" + return self._source + + @source.setter + def source(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'source' field must be of type 'int'" + assert value >= 0 and value < 4294967296, \ + "The 'source' field must be an unsigned integer in [0, 4294967295]" + self._source = value + + @property + def state(self): + """Message field 'state'.""" + return self._state + + @state.setter + def state(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'state' field must be of type 'int'" + assert value >= 0 and value < 4294967296, \ + "The 'state' field must be an unsigned integer in [0, 4294967295]" + self._state = value diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_error_s.c b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_error_s.c new file mode 100644 index 0000000..4cafeba --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_error_s.c @@ -0,0 +1,118 @@ +// generated from rosidl_generator_py/resource/_idl_support.c.em +// with input from unitree_go:msg/Error.idl +// generated code does not contain a copyright notice +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#include +#include +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-function" +#endif +#include "numpy/ndarrayobject.h" +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/detail/error__struct.h" +#include "unitree_go/msg/detail/error__functions.h" + + +ROSIDL_GENERATOR_C_EXPORT +bool unitree_go__msg__error__convert_from_py(PyObject * _pymsg, void * _ros_message) +{ + // check that the passed message is of the expected Python class + { + char full_classname_dest[28]; + { + char * class_name = NULL; + char * module_name = NULL; + { + PyObject * class_attr = PyObject_GetAttrString(_pymsg, "__class__"); + if (class_attr) { + PyObject * name_attr = PyObject_GetAttrString(class_attr, "__name__"); + if (name_attr) { + class_name = (char *)PyUnicode_1BYTE_DATA(name_attr); + Py_DECREF(name_attr); + } + PyObject * module_attr = PyObject_GetAttrString(class_attr, "__module__"); + if (module_attr) { + module_name = (char *)PyUnicode_1BYTE_DATA(module_attr); + Py_DECREF(module_attr); + } + Py_DECREF(class_attr); + } + } + if (!class_name || !module_name) { + return false; + } + snprintf(full_classname_dest, sizeof(full_classname_dest), "%s.%s", module_name, class_name); + } + assert(strncmp("unitree_go.msg._error.Error", full_classname_dest, 27) == 0); + } + unitree_go__msg__Error * ros_message = _ros_message; + { // source + PyObject * field = PyObject_GetAttrString(_pymsg, "source"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->source = PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // state + PyObject * field = PyObject_GetAttrString(_pymsg, "state"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->state = PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + + return true; +} + +ROSIDL_GENERATOR_C_EXPORT +PyObject * unitree_go__msg__error__convert_to_py(void * raw_ros_message) +{ + /* NOTE(esteve): Call constructor of Error */ + PyObject * _pymessage = NULL; + { + PyObject * pymessage_module = PyImport_ImportModule("unitree_go.msg._error"); + assert(pymessage_module); + PyObject * pymessage_class = PyObject_GetAttrString(pymessage_module, "Error"); + assert(pymessage_class); + Py_DECREF(pymessage_module); + _pymessage = PyObject_CallObject(pymessage_class, NULL); + Py_DECREF(pymessage_class); + if (!_pymessage) { + return NULL; + } + } + unitree_go__msg__Error * ros_message = (unitree_go__msg__Error *)raw_ros_message; + { // source + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->source); + { + int rc = PyObject_SetAttrString(_pymessage, "source", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // state + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->state); + { + int rc = PyObject_SetAttrString(_pymessage, "state", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + + // ownership of _pymessage is transferred to the caller + return _pymessage; +} diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_go2_front_video_data.py b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_go2_front_video_data.py new file mode 100644 index 0000000..81c366c --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_go2_front_video_data.py @@ -0,0 +1,231 @@ +# generated from rosidl_generator_py/resource/_idl.py.em +# with input from unitree_go:msg/Go2FrontVideoData.idl +# generated code does not contain a copyright notice + + +# Import statements for member types + +# Member 'video720p' +# Member 'video360p' +# Member 'video180p' +import array # noqa: E402, I100 + +import rosidl_parser.definition # noqa: E402, I100 + + +class Metaclass_Go2FrontVideoData(type): + """Metaclass of message 'Go2FrontVideoData'.""" + + _CREATE_ROS_MESSAGE = None + _CONVERT_FROM_PY = None + _CONVERT_TO_PY = None + _DESTROY_ROS_MESSAGE = None + _TYPE_SUPPORT = None + + __constants = { + } + + @classmethod + def __import_type_support__(cls): + try: + from rosidl_generator_py import import_type_support + module = import_type_support('unitree_go') + except ImportError: + import logging + import traceback + logger = logging.getLogger( + 'unitree_go.msg.Go2FrontVideoData') + logger.debug( + 'Failed to import needed modules for type support:\n' + + traceback.format_exc()) + else: + cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__msg__go2_front_video_data + cls._CONVERT_FROM_PY = module.convert_from_py_msg__msg__go2_front_video_data + cls._CONVERT_TO_PY = module.convert_to_py_msg__msg__go2_front_video_data + cls._TYPE_SUPPORT = module.type_support_msg__msg__go2_front_video_data + cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__msg__go2_front_video_data + + @classmethod + def __prepare__(cls, name, bases, **kwargs): + # list constant names here so that they appear in the help text of + # the message class under "Data and other attributes defined here:" + # as well as populate each message instance + return { + } + + +class Go2FrontVideoData(metaclass=Metaclass_Go2FrontVideoData): + """Message class 'Go2FrontVideoData'.""" + + __slots__ = [ + '_time_frame', + '_video720p', + '_video360p', + '_video180p', + ] + + _fields_and_field_types = { + 'time_frame': 'uint64', + 'video720p': 'sequence', + 'video360p': 'sequence', + 'video180p': 'sequence', + } + + SLOT_TYPES = ( + rosidl_parser.definition.BasicType('uint64'), # noqa: E501 + rosidl_parser.definition.UnboundedSequence(rosidl_parser.definition.BasicType('uint8')), # noqa: E501 + rosidl_parser.definition.UnboundedSequence(rosidl_parser.definition.BasicType('uint8')), # noqa: E501 + rosidl_parser.definition.UnboundedSequence(rosidl_parser.definition.BasicType('uint8')), # noqa: E501 + ) + + def __init__(self, **kwargs): + assert all('_' + key in self.__slots__ for key in kwargs.keys()), \ + 'Invalid arguments passed to constructor: %s' % \ + ', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__)) + self.time_frame = kwargs.get('time_frame', int()) + self.video720p = array.array('B', kwargs.get('video720p', [])) + self.video360p = array.array('B', kwargs.get('video360p', [])) + self.video180p = array.array('B', kwargs.get('video180p', [])) + + def __repr__(self): + typename = self.__class__.__module__.split('.') + typename.pop() + typename.append(self.__class__.__name__) + args = [] + for s, t in zip(self.__slots__, self.SLOT_TYPES): + field = getattr(self, s) + fieldstr = repr(field) + # We use Python array type for fields that can be directly stored + # in them, and "normal" sequences for everything else. If it is + # a type that we store in an array, strip off the 'array' portion. + if ( + isinstance(t, rosidl_parser.definition.AbstractSequence) and + isinstance(t.value_type, rosidl_parser.definition.BasicType) and + t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64'] + ): + if len(field) == 0: + fieldstr = '[]' + else: + assert fieldstr.startswith('array(') + prefix = "array('X', " + suffix = ')' + fieldstr = fieldstr[len(prefix):-len(suffix)] + args.append(s[1:] + '=' + fieldstr) + return '%s(%s)' % ('.'.join(typename), ', '.join(args)) + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + if self.time_frame != other.time_frame: + return False + if self.video720p != other.video720p: + return False + if self.video360p != other.video360p: + return False + if self.video180p != other.video180p: + return False + return True + + @classmethod + def get_fields_and_field_types(cls): + from copy import copy + return copy(cls._fields_and_field_types) + + @property + def time_frame(self): + """Message field 'time_frame'.""" + return self._time_frame + + @time_frame.setter + def time_frame(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'time_frame' field must be of type 'int'" + assert value >= 0 and value < 18446744073709551616, \ + "The 'time_frame' field must be an unsigned integer in [0, 18446744073709551615]" + self._time_frame = value + + @property + def video720p(self): + """Message field 'video720p'.""" + return self._video720p + + @video720p.setter + def video720p(self, value): + if isinstance(value, array.array): + assert value.typecode == 'B', \ + "The 'video720p' array.array() must have the type code of 'B'" + self._video720p = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + all(isinstance(v, int) for v in value) and + all(val >= 0 and val < 256 for val in value)), \ + "The 'video720p' field must be a set or sequence and each value of type 'int' and each unsigned integer in [0, 255]" + self._video720p = array.array('B', value) + + @property + def video360p(self): + """Message field 'video360p'.""" + return self._video360p + + @video360p.setter + def video360p(self, value): + if isinstance(value, array.array): + assert value.typecode == 'B', \ + "The 'video360p' array.array() must have the type code of 'B'" + self._video360p = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + all(isinstance(v, int) for v in value) and + all(val >= 0 and val < 256 for val in value)), \ + "The 'video360p' field must be a set or sequence and each value of type 'int' and each unsigned integer in [0, 255]" + self._video360p = array.array('B', value) + + @property + def video180p(self): + """Message field 'video180p'.""" + return self._video180p + + @video180p.setter + def video180p(self, value): + if isinstance(value, array.array): + assert value.typecode == 'B', \ + "The 'video180p' array.array() must have the type code of 'B'" + self._video180p = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + all(isinstance(v, int) for v in value) and + all(val >= 0 and val < 256 for val in value)), \ + "The 'video180p' field must be a set or sequence and each value of type 'int' and each unsigned integer in [0, 255]" + self._video180p = array.array('B', value) diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_go2_front_video_data_s.c b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_go2_front_video_data_s.c new file mode 100644 index 0000000..2492f40 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_go2_front_video_data_s.c @@ -0,0 +1,461 @@ +// generated from rosidl_generator_py/resource/_idl_support.c.em +// with input from unitree_go:msg/Go2FrontVideoData.idl +// generated code does not contain a copyright notice +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#include +#include +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-function" +#endif +#include "numpy/ndarrayobject.h" +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/detail/go2_front_video_data__struct.h" +#include "unitree_go/msg/detail/go2_front_video_data__functions.h" + +#include "rosidl_runtime_c/primitives_sequence.h" +#include "rosidl_runtime_c/primitives_sequence_functions.h" + + +ROSIDL_GENERATOR_C_EXPORT +bool unitree_go__msg__go2_front_video_data__convert_from_py(PyObject * _pymsg, void * _ros_message) +{ + // check that the passed message is of the expected Python class + { + char full_classname_dest[55]; + { + char * class_name = NULL; + char * module_name = NULL; + { + PyObject * class_attr = PyObject_GetAttrString(_pymsg, "__class__"); + if (class_attr) { + PyObject * name_attr = PyObject_GetAttrString(class_attr, "__name__"); + if (name_attr) { + class_name = (char *)PyUnicode_1BYTE_DATA(name_attr); + Py_DECREF(name_attr); + } + PyObject * module_attr = PyObject_GetAttrString(class_attr, "__module__"); + if (module_attr) { + module_name = (char *)PyUnicode_1BYTE_DATA(module_attr); + Py_DECREF(module_attr); + } + Py_DECREF(class_attr); + } + } + if (!class_name || !module_name) { + return false; + } + snprintf(full_classname_dest, sizeof(full_classname_dest), "%s.%s", module_name, class_name); + } + assert(strncmp("unitree_go.msg._go2_front_video_data.Go2FrontVideoData", full_classname_dest, 54) == 0); + } + unitree_go__msg__Go2FrontVideoData * ros_message = _ros_message; + { // time_frame + PyObject * field = PyObject_GetAttrString(_pymsg, "time_frame"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->time_frame = PyLong_AsUnsignedLongLong(field); + Py_DECREF(field); + } + { // video720p + PyObject * field = PyObject_GetAttrString(_pymsg, "video720p"); + if (!field) { + return false; + } + if (PyObject_CheckBuffer(field)) { + // Optimization for converting arrays of primitives + Py_buffer view; + int rc = PyObject_GetBuffer(field, &view, PyBUF_SIMPLE); + if (rc < 0) { + Py_DECREF(field); + return false; + } + Py_ssize_t size = view.len / sizeof(uint8_t); + if (!rosidl_runtime_c__uint8__Sequence__init(&(ros_message->video720p), size)) { + PyErr_SetString(PyExc_RuntimeError, "unable to create uint8__Sequence ros_message"); + PyBuffer_Release(&view); + Py_DECREF(field); + return false; + } + uint8_t * dest = ros_message->video720p.data; + rc = PyBuffer_ToContiguous(dest, &view, view.len, 'C'); + if (rc < 0) { + PyBuffer_Release(&view); + Py_DECREF(field); + return false; + } + PyBuffer_Release(&view); + } else { + PyObject * seq_field = PySequence_Fast(field, "expected a sequence in 'video720p'"); + if (!seq_field) { + Py_DECREF(field); + return false; + } + Py_ssize_t size = PySequence_Size(field); + if (-1 == size) { + Py_DECREF(seq_field); + Py_DECREF(field); + return false; + } + if (!rosidl_runtime_c__uint8__Sequence__init(&(ros_message->video720p), size)) { + PyErr_SetString(PyExc_RuntimeError, "unable to create uint8__Sequence ros_message"); + Py_DECREF(seq_field); + Py_DECREF(field); + return false; + } + uint8_t * dest = ros_message->video720p.data; + for (Py_ssize_t i = 0; i < size; ++i) { + PyObject * item = PySequence_Fast_GET_ITEM(seq_field, i); + if (!item) { + Py_DECREF(seq_field); + Py_DECREF(field); + return false; + } + assert(PyLong_Check(item)); + uint8_t tmp = (uint8_t)PyLong_AsUnsignedLong(item); + + memcpy(&dest[i], &tmp, sizeof(uint8_t)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + { // video360p + PyObject * field = PyObject_GetAttrString(_pymsg, "video360p"); + if (!field) { + return false; + } + if (PyObject_CheckBuffer(field)) { + // Optimization for converting arrays of primitives + Py_buffer view; + int rc = PyObject_GetBuffer(field, &view, PyBUF_SIMPLE); + if (rc < 0) { + Py_DECREF(field); + return false; + } + Py_ssize_t size = view.len / sizeof(uint8_t); + if (!rosidl_runtime_c__uint8__Sequence__init(&(ros_message->video360p), size)) { + PyErr_SetString(PyExc_RuntimeError, "unable to create uint8__Sequence ros_message"); + PyBuffer_Release(&view); + Py_DECREF(field); + return false; + } + uint8_t * dest = ros_message->video360p.data; + rc = PyBuffer_ToContiguous(dest, &view, view.len, 'C'); + if (rc < 0) { + PyBuffer_Release(&view); + Py_DECREF(field); + return false; + } + PyBuffer_Release(&view); + } else { + PyObject * seq_field = PySequence_Fast(field, "expected a sequence in 'video360p'"); + if (!seq_field) { + Py_DECREF(field); + return false; + } + Py_ssize_t size = PySequence_Size(field); + if (-1 == size) { + Py_DECREF(seq_field); + Py_DECREF(field); + return false; + } + if (!rosidl_runtime_c__uint8__Sequence__init(&(ros_message->video360p), size)) { + PyErr_SetString(PyExc_RuntimeError, "unable to create uint8__Sequence ros_message"); + Py_DECREF(seq_field); + Py_DECREF(field); + return false; + } + uint8_t * dest = ros_message->video360p.data; + for (Py_ssize_t i = 0; i < size; ++i) { + PyObject * item = PySequence_Fast_GET_ITEM(seq_field, i); + if (!item) { + Py_DECREF(seq_field); + Py_DECREF(field); + return false; + } + assert(PyLong_Check(item)); + uint8_t tmp = (uint8_t)PyLong_AsUnsignedLong(item); + + memcpy(&dest[i], &tmp, sizeof(uint8_t)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + { // video180p + PyObject * field = PyObject_GetAttrString(_pymsg, "video180p"); + if (!field) { + return false; + } + if (PyObject_CheckBuffer(field)) { + // Optimization for converting arrays of primitives + Py_buffer view; + int rc = PyObject_GetBuffer(field, &view, PyBUF_SIMPLE); + if (rc < 0) { + Py_DECREF(field); + return false; + } + Py_ssize_t size = view.len / sizeof(uint8_t); + if (!rosidl_runtime_c__uint8__Sequence__init(&(ros_message->video180p), size)) { + PyErr_SetString(PyExc_RuntimeError, "unable to create uint8__Sequence ros_message"); + PyBuffer_Release(&view); + Py_DECREF(field); + return false; + } + uint8_t * dest = ros_message->video180p.data; + rc = PyBuffer_ToContiguous(dest, &view, view.len, 'C'); + if (rc < 0) { + PyBuffer_Release(&view); + Py_DECREF(field); + return false; + } + PyBuffer_Release(&view); + } else { + PyObject * seq_field = PySequence_Fast(field, "expected a sequence in 'video180p'"); + if (!seq_field) { + Py_DECREF(field); + return false; + } + Py_ssize_t size = PySequence_Size(field); + if (-1 == size) { + Py_DECREF(seq_field); + Py_DECREF(field); + return false; + } + if (!rosidl_runtime_c__uint8__Sequence__init(&(ros_message->video180p), size)) { + PyErr_SetString(PyExc_RuntimeError, "unable to create uint8__Sequence ros_message"); + Py_DECREF(seq_field); + Py_DECREF(field); + return false; + } + uint8_t * dest = ros_message->video180p.data; + for (Py_ssize_t i = 0; i < size; ++i) { + PyObject * item = PySequence_Fast_GET_ITEM(seq_field, i); + if (!item) { + Py_DECREF(seq_field); + Py_DECREF(field); + return false; + } + assert(PyLong_Check(item)); + uint8_t tmp = (uint8_t)PyLong_AsUnsignedLong(item); + + memcpy(&dest[i], &tmp, sizeof(uint8_t)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + + return true; +} + +ROSIDL_GENERATOR_C_EXPORT +PyObject * unitree_go__msg__go2_front_video_data__convert_to_py(void * raw_ros_message) +{ + /* NOTE(esteve): Call constructor of Go2FrontVideoData */ + PyObject * _pymessage = NULL; + { + PyObject * pymessage_module = PyImport_ImportModule("unitree_go.msg._go2_front_video_data"); + assert(pymessage_module); + PyObject * pymessage_class = PyObject_GetAttrString(pymessage_module, "Go2FrontVideoData"); + assert(pymessage_class); + Py_DECREF(pymessage_module); + _pymessage = PyObject_CallObject(pymessage_class, NULL); + Py_DECREF(pymessage_class); + if (!_pymessage) { + return NULL; + } + } + unitree_go__msg__Go2FrontVideoData * ros_message = (unitree_go__msg__Go2FrontVideoData *)raw_ros_message; + { // time_frame + PyObject * field = NULL; + field = PyLong_FromUnsignedLongLong(ros_message->time_frame); + { + int rc = PyObject_SetAttrString(_pymessage, "time_frame", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // video720p + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "video720p"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "array.array") == 0); + // ensure that itemsize matches the sizeof of the ROS message field + PyObject * itemsize_attr = PyObject_GetAttrString(field, "itemsize"); + assert(itemsize_attr != NULL); + size_t itemsize = PyLong_AsSize_t(itemsize_attr); + Py_DECREF(itemsize_attr); + if (itemsize != sizeof(uint8_t)) { + PyErr_SetString(PyExc_RuntimeError, "itemsize doesn't match expectation"); + Py_DECREF(field); + return NULL; + } + // clear the array, poor approach to remove potential default values + Py_ssize_t length = PyObject_Length(field); + if (-1 == length) { + Py_DECREF(field); + return NULL; + } + if (length > 0) { + PyObject * pop = PyObject_GetAttrString(field, "pop"); + assert(pop != NULL); + for (Py_ssize_t i = 0; i < length; ++i) { + PyObject * ret = PyObject_CallFunctionObjArgs(pop, NULL); + if (!ret) { + Py_DECREF(pop); + Py_DECREF(field); + return NULL; + } + Py_DECREF(ret); + } + Py_DECREF(pop); + } + if (ros_message->video720p.size > 0) { + // populating the array.array using the frombytes method + PyObject * frombytes = PyObject_GetAttrString(field, "frombytes"); + assert(frombytes != NULL); + uint8_t * src = &(ros_message->video720p.data[0]); + PyObject * data = PyBytes_FromStringAndSize((const char *)src, ros_message->video720p.size * sizeof(uint8_t)); + assert(data != NULL); + PyObject * ret = PyObject_CallFunctionObjArgs(frombytes, data, NULL); + Py_DECREF(data); + Py_DECREF(frombytes); + if (!ret) { + Py_DECREF(field); + return NULL; + } + Py_DECREF(ret); + } + Py_DECREF(field); + } + { // video360p + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "video360p"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "array.array") == 0); + // ensure that itemsize matches the sizeof of the ROS message field + PyObject * itemsize_attr = PyObject_GetAttrString(field, "itemsize"); + assert(itemsize_attr != NULL); + size_t itemsize = PyLong_AsSize_t(itemsize_attr); + Py_DECREF(itemsize_attr); + if (itemsize != sizeof(uint8_t)) { + PyErr_SetString(PyExc_RuntimeError, "itemsize doesn't match expectation"); + Py_DECREF(field); + return NULL; + } + // clear the array, poor approach to remove potential default values + Py_ssize_t length = PyObject_Length(field); + if (-1 == length) { + Py_DECREF(field); + return NULL; + } + if (length > 0) { + PyObject * pop = PyObject_GetAttrString(field, "pop"); + assert(pop != NULL); + for (Py_ssize_t i = 0; i < length; ++i) { + PyObject * ret = PyObject_CallFunctionObjArgs(pop, NULL); + if (!ret) { + Py_DECREF(pop); + Py_DECREF(field); + return NULL; + } + Py_DECREF(ret); + } + Py_DECREF(pop); + } + if (ros_message->video360p.size > 0) { + // populating the array.array using the frombytes method + PyObject * frombytes = PyObject_GetAttrString(field, "frombytes"); + assert(frombytes != NULL); + uint8_t * src = &(ros_message->video360p.data[0]); + PyObject * data = PyBytes_FromStringAndSize((const char *)src, ros_message->video360p.size * sizeof(uint8_t)); + assert(data != NULL); + PyObject * ret = PyObject_CallFunctionObjArgs(frombytes, data, NULL); + Py_DECREF(data); + Py_DECREF(frombytes); + if (!ret) { + Py_DECREF(field); + return NULL; + } + Py_DECREF(ret); + } + Py_DECREF(field); + } + { // video180p + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "video180p"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "array.array") == 0); + // ensure that itemsize matches the sizeof of the ROS message field + PyObject * itemsize_attr = PyObject_GetAttrString(field, "itemsize"); + assert(itemsize_attr != NULL); + size_t itemsize = PyLong_AsSize_t(itemsize_attr); + Py_DECREF(itemsize_attr); + if (itemsize != sizeof(uint8_t)) { + PyErr_SetString(PyExc_RuntimeError, "itemsize doesn't match expectation"); + Py_DECREF(field); + return NULL; + } + // clear the array, poor approach to remove potential default values + Py_ssize_t length = PyObject_Length(field); + if (-1 == length) { + Py_DECREF(field); + return NULL; + } + if (length > 0) { + PyObject * pop = PyObject_GetAttrString(field, "pop"); + assert(pop != NULL); + for (Py_ssize_t i = 0; i < length; ++i) { + PyObject * ret = PyObject_CallFunctionObjArgs(pop, NULL); + if (!ret) { + Py_DECREF(pop); + Py_DECREF(field); + return NULL; + } + Py_DECREF(ret); + } + Py_DECREF(pop); + } + if (ros_message->video180p.size > 0) { + // populating the array.array using the frombytes method + PyObject * frombytes = PyObject_GetAttrString(field, "frombytes"); + assert(frombytes != NULL); + uint8_t * src = &(ros_message->video180p.data[0]); + PyObject * data = PyBytes_FromStringAndSize((const char *)src, ros_message->video180p.size * sizeof(uint8_t)); + assert(data != NULL); + PyObject * ret = PyObject_CallFunctionObjArgs(frombytes, data, NULL); + Py_DECREF(data); + Py_DECREF(frombytes); + if (!ret) { + Py_DECREF(field); + return NULL; + } + Py_DECREF(ret); + } + Py_DECREF(field); + } + + // ownership of _pymessage is transferred to the caller + return _pymessage; +} diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_height_map.py b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_height_map.py new file mode 100644 index 0000000..935feda --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_height_map.py @@ -0,0 +1,283 @@ +# generated from rosidl_generator_py/resource/_idl.py.em +# with input from unitree_go:msg/HeightMap.idl +# generated code does not contain a copyright notice + + +# Import statements for member types + +# Member 'data' +import array # noqa: E402, I100 + +# Member 'origin' +import numpy # noqa: E402, I100 + +import rosidl_parser.definition # noqa: E402, I100 + + +class Metaclass_HeightMap(type): + """Metaclass of message 'HeightMap'.""" + + _CREATE_ROS_MESSAGE = None + _CONVERT_FROM_PY = None + _CONVERT_TO_PY = None + _DESTROY_ROS_MESSAGE = None + _TYPE_SUPPORT = None + + __constants = { + } + + @classmethod + def __import_type_support__(cls): + try: + from rosidl_generator_py import import_type_support + module = import_type_support('unitree_go') + except ImportError: + import logging + import traceback + logger = logging.getLogger( + 'unitree_go.msg.HeightMap') + logger.debug( + 'Failed to import needed modules for type support:\n' + + traceback.format_exc()) + else: + cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__msg__height_map + cls._CONVERT_FROM_PY = module.convert_from_py_msg__msg__height_map + cls._CONVERT_TO_PY = module.convert_to_py_msg__msg__height_map + cls._TYPE_SUPPORT = module.type_support_msg__msg__height_map + cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__msg__height_map + + @classmethod + def __prepare__(cls, name, bases, **kwargs): + # list constant names here so that they appear in the help text of + # the message class under "Data and other attributes defined here:" + # as well as populate each message instance + return { + } + + +class HeightMap(metaclass=Metaclass_HeightMap): + """Message class 'HeightMap'.""" + + __slots__ = [ + '_stamp', + '_frame_id', + '_resolution', + '_width', + '_height', + '_origin', + '_data', + ] + + _fields_and_field_types = { + 'stamp': 'double', + 'frame_id': 'string', + 'resolution': 'float', + 'width': 'uint32', + 'height': 'uint32', + 'origin': 'float[2]', + 'data': 'sequence', + } + + SLOT_TYPES = ( + rosidl_parser.definition.BasicType('double'), # noqa: E501 + rosidl_parser.definition.UnboundedString(), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('uint32'), # noqa: E501 + rosidl_parser.definition.BasicType('uint32'), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('float'), 2), # noqa: E501 + rosidl_parser.definition.UnboundedSequence(rosidl_parser.definition.BasicType('float')), # noqa: E501 + ) + + def __init__(self, **kwargs): + assert all('_' + key in self.__slots__ for key in kwargs.keys()), \ + 'Invalid arguments passed to constructor: %s' % \ + ', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__)) + self.stamp = kwargs.get('stamp', float()) + self.frame_id = kwargs.get('frame_id', str()) + self.resolution = kwargs.get('resolution', float()) + self.width = kwargs.get('width', int()) + self.height = kwargs.get('height', int()) + if 'origin' not in kwargs: + self.origin = numpy.zeros(2, dtype=numpy.float32) + else: + self.origin = numpy.array(kwargs.get('origin'), dtype=numpy.float32) + assert self.origin.shape == (2, ) + self.data = array.array('f', kwargs.get('data', [])) + + def __repr__(self): + typename = self.__class__.__module__.split('.') + typename.pop() + typename.append(self.__class__.__name__) + args = [] + for s, t in zip(self.__slots__, self.SLOT_TYPES): + field = getattr(self, s) + fieldstr = repr(field) + # We use Python array type for fields that can be directly stored + # in them, and "normal" sequences for everything else. If it is + # a type that we store in an array, strip off the 'array' portion. + if ( + isinstance(t, rosidl_parser.definition.AbstractSequence) and + isinstance(t.value_type, rosidl_parser.definition.BasicType) and + t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64'] + ): + if len(field) == 0: + fieldstr = '[]' + else: + assert fieldstr.startswith('array(') + prefix = "array('X', " + suffix = ')' + fieldstr = fieldstr[len(prefix):-len(suffix)] + args.append(s[1:] + '=' + fieldstr) + return '%s(%s)' % ('.'.join(typename), ', '.join(args)) + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + if self.stamp != other.stamp: + return False + if self.frame_id != other.frame_id: + return False + if self.resolution != other.resolution: + return False + if self.width != other.width: + return False + if self.height != other.height: + return False + if all(self.origin != other.origin): + return False + if self.data != other.data: + return False + return True + + @classmethod + def get_fields_and_field_types(cls): + from copy import copy + return copy(cls._fields_and_field_types) + + @property + def stamp(self): + """Message field 'stamp'.""" + return self._stamp + + @stamp.setter + def stamp(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'stamp' field must be of type 'float'" + self._stamp = value + + @property + def frame_id(self): + """Message field 'frame_id'.""" + return self._frame_id + + @frame_id.setter + def frame_id(self, value): + if __debug__: + assert \ + isinstance(value, str), \ + "The 'frame_id' field must be of type 'str'" + self._frame_id = value + + @property + def resolution(self): + """Message field 'resolution'.""" + return self._resolution + + @resolution.setter + def resolution(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'resolution' field must be of type 'float'" + self._resolution = value + + @property + def width(self): + """Message field 'width'.""" + return self._width + + @width.setter + def width(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'width' field must be of type 'int'" + assert value >= 0 and value < 4294967296, \ + "The 'width' field must be an unsigned integer in [0, 4294967295]" + self._width = value + + @property + def height(self): + """Message field 'height'.""" + return self._height + + @height.setter + def height(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'height' field must be of type 'int'" + assert value >= 0 and value < 4294967296, \ + "The 'height' field must be an unsigned integer in [0, 4294967295]" + self._height = value + + @property + def origin(self): + """Message field 'origin'.""" + return self._origin + + @origin.setter + def origin(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.float32, \ + "The 'origin' numpy.ndarray() must have the dtype of 'numpy.float32'" + assert value.size == 2, \ + "The 'origin' numpy.ndarray() must have a size of 2" + self._origin = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 2 and + all(isinstance(v, float) for v in value) and + True), \ + "The 'origin' field must be a set or sequence with length 2 and each value of type 'float'" + self._origin = numpy.array(value, dtype=numpy.float32) + + @property + def data(self): + """Message field 'data'.""" + return self._data + + @data.setter + def data(self, value): + if isinstance(value, array.array): + assert value.typecode == 'f', \ + "The 'data' array.array() must have the type code of 'f'" + self._data = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + all(isinstance(v, float) for v in value) and + True), \ + "The 'data' field must be a set or sequence and each value of type 'float'" + self._data = array.array('f', value) diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_height_map_s.c b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_height_map_s.c new file mode 100644 index 0000000..c8b312c --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_height_map_s.c @@ -0,0 +1,357 @@ +// generated from rosidl_generator_py/resource/_idl_support.c.em +// with input from unitree_go:msg/HeightMap.idl +// generated code does not contain a copyright notice +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#include +#include +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-function" +#endif +#include "numpy/ndarrayobject.h" +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/detail/height_map__struct.h" +#include "unitree_go/msg/detail/height_map__functions.h" + +#include "rosidl_runtime_c/string.h" +#include "rosidl_runtime_c/string_functions.h" + +#include "rosidl_runtime_c/primitives_sequence.h" +#include "rosidl_runtime_c/primitives_sequence_functions.h" + + +ROSIDL_GENERATOR_C_EXPORT +bool unitree_go__msg__height_map__convert_from_py(PyObject * _pymsg, void * _ros_message) +{ + // check that the passed message is of the expected Python class + { + char full_classname_dest[37]; + { + char * class_name = NULL; + char * module_name = NULL; + { + PyObject * class_attr = PyObject_GetAttrString(_pymsg, "__class__"); + if (class_attr) { + PyObject * name_attr = PyObject_GetAttrString(class_attr, "__name__"); + if (name_attr) { + class_name = (char *)PyUnicode_1BYTE_DATA(name_attr); + Py_DECREF(name_attr); + } + PyObject * module_attr = PyObject_GetAttrString(class_attr, "__module__"); + if (module_attr) { + module_name = (char *)PyUnicode_1BYTE_DATA(module_attr); + Py_DECREF(module_attr); + } + Py_DECREF(class_attr); + } + } + if (!class_name || !module_name) { + return false; + } + snprintf(full_classname_dest, sizeof(full_classname_dest), "%s.%s", module_name, class_name); + } + assert(strncmp("unitree_go.msg._height_map.HeightMap", full_classname_dest, 36) == 0); + } + unitree_go__msg__HeightMap * ros_message = _ros_message; + { // stamp + PyObject * field = PyObject_GetAttrString(_pymsg, "stamp"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->stamp = PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // frame_id + PyObject * field = PyObject_GetAttrString(_pymsg, "frame_id"); + if (!field) { + return false; + } + assert(PyUnicode_Check(field)); + PyObject * encoded_field = PyUnicode_AsUTF8String(field); + if (!encoded_field) { + Py_DECREF(field); + return false; + } + rosidl_runtime_c__String__assign(&ros_message->frame_id, PyBytes_AS_STRING(encoded_field)); + Py_DECREF(encoded_field); + Py_DECREF(field); + } + { // resolution + PyObject * field = PyObject_GetAttrString(_pymsg, "resolution"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->resolution = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // width + PyObject * field = PyObject_GetAttrString(_pymsg, "width"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->width = PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // height + PyObject * field = PyObject_GetAttrString(_pymsg, "height"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->height = PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // origin + PyObject * field = PyObject_GetAttrString(_pymsg, "origin"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_FLOAT32); + Py_ssize_t size = 2; + float * dest = ros_message->origin; + for (Py_ssize_t i = 0; i < size; ++i) { + float tmp = *(npy_float32 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(float)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + { // data + PyObject * field = PyObject_GetAttrString(_pymsg, "data"); + if (!field) { + return false; + } + if (PyObject_CheckBuffer(field)) { + // Optimization for converting arrays of primitives + Py_buffer view; + int rc = PyObject_GetBuffer(field, &view, PyBUF_SIMPLE); + if (rc < 0) { + Py_DECREF(field); + return false; + } + Py_ssize_t size = view.len / sizeof(float); + if (!rosidl_runtime_c__float__Sequence__init(&(ros_message->data), size)) { + PyErr_SetString(PyExc_RuntimeError, "unable to create float__Sequence ros_message"); + PyBuffer_Release(&view); + Py_DECREF(field); + return false; + } + float * dest = ros_message->data.data; + rc = PyBuffer_ToContiguous(dest, &view, view.len, 'C'); + if (rc < 0) { + PyBuffer_Release(&view); + Py_DECREF(field); + return false; + } + PyBuffer_Release(&view); + } else { + PyObject * seq_field = PySequence_Fast(field, "expected a sequence in 'data'"); + if (!seq_field) { + Py_DECREF(field); + return false; + } + Py_ssize_t size = PySequence_Size(field); + if (-1 == size) { + Py_DECREF(seq_field); + Py_DECREF(field); + return false; + } + if (!rosidl_runtime_c__float__Sequence__init(&(ros_message->data), size)) { + PyErr_SetString(PyExc_RuntimeError, "unable to create float__Sequence ros_message"); + Py_DECREF(seq_field); + Py_DECREF(field); + return false; + } + float * dest = ros_message->data.data; + for (Py_ssize_t i = 0; i < size; ++i) { + PyObject * item = PySequence_Fast_GET_ITEM(seq_field, i); + if (!item) { + Py_DECREF(seq_field); + Py_DECREF(field); + return false; + } + assert(PyFloat_Check(item)); + float tmp = (float)PyFloat_AS_DOUBLE(item); + memcpy(&dest[i], &tmp, sizeof(float)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + + return true; +} + +ROSIDL_GENERATOR_C_EXPORT +PyObject * unitree_go__msg__height_map__convert_to_py(void * raw_ros_message) +{ + /* NOTE(esteve): Call constructor of HeightMap */ + PyObject * _pymessage = NULL; + { + PyObject * pymessage_module = PyImport_ImportModule("unitree_go.msg._height_map"); + assert(pymessage_module); + PyObject * pymessage_class = PyObject_GetAttrString(pymessage_module, "HeightMap"); + assert(pymessage_class); + Py_DECREF(pymessage_module); + _pymessage = PyObject_CallObject(pymessage_class, NULL); + Py_DECREF(pymessage_class); + if (!_pymessage) { + return NULL; + } + } + unitree_go__msg__HeightMap * ros_message = (unitree_go__msg__HeightMap *)raw_ros_message; + { // stamp + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->stamp); + { + int rc = PyObject_SetAttrString(_pymessage, "stamp", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // frame_id + PyObject * field = NULL; + field = PyUnicode_DecodeUTF8( + ros_message->frame_id.data, + strlen(ros_message->frame_id.data), + "replace"); + if (!field) { + return NULL; + } + { + int rc = PyObject_SetAttrString(_pymessage, "frame_id", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // resolution + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->resolution); + { + int rc = PyObject_SetAttrString(_pymessage, "resolution", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // width + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->width); + { + int rc = PyObject_SetAttrString(_pymessage, "width", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // height + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->height); + { + int rc = PyObject_SetAttrString(_pymessage, "height", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // origin + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "origin"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_FLOAT32); + assert(sizeof(npy_float32) == sizeof(float)); + npy_float32 * dst = (npy_float32 *)PyArray_GETPTR1(seq_field, 0); + float * src = &(ros_message->origin[0]); + memcpy(dst, src, 2 * sizeof(float)); + Py_DECREF(field); + } + { // data + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "data"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "array.array") == 0); + // ensure that itemsize matches the sizeof of the ROS message field + PyObject * itemsize_attr = PyObject_GetAttrString(field, "itemsize"); + assert(itemsize_attr != NULL); + size_t itemsize = PyLong_AsSize_t(itemsize_attr); + Py_DECREF(itemsize_attr); + if (itemsize != sizeof(float)) { + PyErr_SetString(PyExc_RuntimeError, "itemsize doesn't match expectation"); + Py_DECREF(field); + return NULL; + } + // clear the array, poor approach to remove potential default values + Py_ssize_t length = PyObject_Length(field); + if (-1 == length) { + Py_DECREF(field); + return NULL; + } + if (length > 0) { + PyObject * pop = PyObject_GetAttrString(field, "pop"); + assert(pop != NULL); + for (Py_ssize_t i = 0; i < length; ++i) { + PyObject * ret = PyObject_CallFunctionObjArgs(pop, NULL); + if (!ret) { + Py_DECREF(pop); + Py_DECREF(field); + return NULL; + } + Py_DECREF(ret); + } + Py_DECREF(pop); + } + if (ros_message->data.size > 0) { + // populating the array.array using the frombytes method + PyObject * frombytes = PyObject_GetAttrString(field, "frombytes"); + assert(frombytes != NULL); + float * src = &(ros_message->data.data[0]); + PyObject * data = PyBytes_FromStringAndSize((const char *)src, ros_message->data.size * sizeof(float)); + assert(data != NULL); + PyObject * ret = PyObject_CallFunctionObjArgs(frombytes, data, NULL); + Py_DECREF(data); + Py_DECREF(frombytes); + if (!ret) { + Py_DECREF(field); + return NULL; + } + Py_DECREF(ret); + } + Py_DECREF(field); + } + + // ownership of _pymessage is transferred to the caller + return _pymessage; +} diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_imu_state.py b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_imu_state.py new file mode 100644 index 0000000..78f6d31 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_imu_state.py @@ -0,0 +1,294 @@ +# generated from rosidl_generator_py/resource/_idl.py.em +# with input from unitree_go:msg/IMUState.idl +# generated code does not contain a copyright notice + + +# Import statements for member types + +# Member 'quaternion' +# Member 'gyroscope' +# Member 'accelerometer' +# Member 'rpy' +import numpy # noqa: E402, I100 + +import rosidl_parser.definition # noqa: E402, I100 + + +class Metaclass_IMUState(type): + """Metaclass of message 'IMUState'.""" + + _CREATE_ROS_MESSAGE = None + _CONVERT_FROM_PY = None + _CONVERT_TO_PY = None + _DESTROY_ROS_MESSAGE = None + _TYPE_SUPPORT = None + + __constants = { + } + + @classmethod + def __import_type_support__(cls): + try: + from rosidl_generator_py import import_type_support + module = import_type_support('unitree_go') + except ImportError: + import logging + import traceback + logger = logging.getLogger( + 'unitree_go.msg.IMUState') + logger.debug( + 'Failed to import needed modules for type support:\n' + + traceback.format_exc()) + else: + cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__msg__imu_state + cls._CONVERT_FROM_PY = module.convert_from_py_msg__msg__imu_state + cls._CONVERT_TO_PY = module.convert_to_py_msg__msg__imu_state + cls._TYPE_SUPPORT = module.type_support_msg__msg__imu_state + cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__msg__imu_state + + @classmethod + def __prepare__(cls, name, bases, **kwargs): + # list constant names here so that they appear in the help text of + # the message class under "Data and other attributes defined here:" + # as well as populate each message instance + return { + } + + +class IMUState(metaclass=Metaclass_IMUState): + """Message class 'IMUState'.""" + + __slots__ = [ + '_quaternion', + '_gyroscope', + '_accelerometer', + '_rpy', + '_temperature', + ] + + _fields_and_field_types = { + 'quaternion': 'float[4]', + 'gyroscope': 'float[3]', + 'accelerometer': 'float[3]', + 'rpy': 'float[3]', + 'temperature': 'int8', + } + + SLOT_TYPES = ( + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('float'), 4), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('float'), 3), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('float'), 3), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('float'), 3), # noqa: E501 + rosidl_parser.definition.BasicType('int8'), # noqa: E501 + ) + + def __init__(self, **kwargs): + assert all('_' + key in self.__slots__ for key in kwargs.keys()), \ + 'Invalid arguments passed to constructor: %s' % \ + ', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__)) + if 'quaternion' not in kwargs: + self.quaternion = numpy.zeros(4, dtype=numpy.float32) + else: + self.quaternion = numpy.array(kwargs.get('quaternion'), dtype=numpy.float32) + assert self.quaternion.shape == (4, ) + if 'gyroscope' not in kwargs: + self.gyroscope = numpy.zeros(3, dtype=numpy.float32) + else: + self.gyroscope = numpy.array(kwargs.get('gyroscope'), dtype=numpy.float32) + assert self.gyroscope.shape == (3, ) + if 'accelerometer' not in kwargs: + self.accelerometer = numpy.zeros(3, dtype=numpy.float32) + else: + self.accelerometer = numpy.array(kwargs.get('accelerometer'), dtype=numpy.float32) + assert self.accelerometer.shape == (3, ) + if 'rpy' not in kwargs: + self.rpy = numpy.zeros(3, dtype=numpy.float32) + else: + self.rpy = numpy.array(kwargs.get('rpy'), dtype=numpy.float32) + assert self.rpy.shape == (3, ) + self.temperature = kwargs.get('temperature', int()) + + def __repr__(self): + typename = self.__class__.__module__.split('.') + typename.pop() + typename.append(self.__class__.__name__) + args = [] + for s, t in zip(self.__slots__, self.SLOT_TYPES): + field = getattr(self, s) + fieldstr = repr(field) + # We use Python array type for fields that can be directly stored + # in them, and "normal" sequences for everything else. If it is + # a type that we store in an array, strip off the 'array' portion. + if ( + isinstance(t, rosidl_parser.definition.AbstractSequence) and + isinstance(t.value_type, rosidl_parser.definition.BasicType) and + t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64'] + ): + if len(field) == 0: + fieldstr = '[]' + else: + assert fieldstr.startswith('array(') + prefix = "array('X', " + suffix = ')' + fieldstr = fieldstr[len(prefix):-len(suffix)] + args.append(s[1:] + '=' + fieldstr) + return '%s(%s)' % ('.'.join(typename), ', '.join(args)) + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + if all(self.quaternion != other.quaternion): + return False + if all(self.gyroscope != other.gyroscope): + return False + if all(self.accelerometer != other.accelerometer): + return False + if all(self.rpy != other.rpy): + return False + if self.temperature != other.temperature: + return False + return True + + @classmethod + def get_fields_and_field_types(cls): + from copy import copy + return copy(cls._fields_and_field_types) + + @property + def quaternion(self): + """Message field 'quaternion'.""" + return self._quaternion + + @quaternion.setter + def quaternion(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.float32, \ + "The 'quaternion' numpy.ndarray() must have the dtype of 'numpy.float32'" + assert value.size == 4, \ + "The 'quaternion' numpy.ndarray() must have a size of 4" + self._quaternion = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 4 and + all(isinstance(v, float) for v in value) and + True), \ + "The 'quaternion' field must be a set or sequence with length 4 and each value of type 'float'" + self._quaternion = numpy.array(value, dtype=numpy.float32) + + @property + def gyroscope(self): + """Message field 'gyroscope'.""" + return self._gyroscope + + @gyroscope.setter + def gyroscope(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.float32, \ + "The 'gyroscope' numpy.ndarray() must have the dtype of 'numpy.float32'" + assert value.size == 3, \ + "The 'gyroscope' numpy.ndarray() must have a size of 3" + self._gyroscope = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 3 and + all(isinstance(v, float) for v in value) and + True), \ + "The 'gyroscope' field must be a set or sequence with length 3 and each value of type 'float'" + self._gyroscope = numpy.array(value, dtype=numpy.float32) + + @property + def accelerometer(self): + """Message field 'accelerometer'.""" + return self._accelerometer + + @accelerometer.setter + def accelerometer(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.float32, \ + "The 'accelerometer' numpy.ndarray() must have the dtype of 'numpy.float32'" + assert value.size == 3, \ + "The 'accelerometer' numpy.ndarray() must have a size of 3" + self._accelerometer = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 3 and + all(isinstance(v, float) for v in value) and + True), \ + "The 'accelerometer' field must be a set or sequence with length 3 and each value of type 'float'" + self._accelerometer = numpy.array(value, dtype=numpy.float32) + + @property + def rpy(self): + """Message field 'rpy'.""" + return self._rpy + + @rpy.setter + def rpy(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.float32, \ + "The 'rpy' numpy.ndarray() must have the dtype of 'numpy.float32'" + assert value.size == 3, \ + "The 'rpy' numpy.ndarray() must have a size of 3" + self._rpy = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 3 and + all(isinstance(v, float) for v in value) and + True), \ + "The 'rpy' field must be a set or sequence with length 3 and each value of type 'float'" + self._rpy = numpy.array(value, dtype=numpy.float32) + + @property + def temperature(self): + """Message field 'temperature'.""" + return self._temperature + + @temperature.setter + def temperature(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'temperature' field must be of type 'int'" + assert value >= -128 and value < 128, \ + "The 'temperature' field must be an integer in [-128, 127]" + self._temperature = value diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_imu_state_s.c b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_imu_state_s.c new file mode 100644 index 0000000..55cdeb7 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_imu_state_s.c @@ -0,0 +1,269 @@ +// generated from rosidl_generator_py/resource/_idl_support.c.em +// with input from unitree_go:msg/IMUState.idl +// generated code does not contain a copyright notice +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#include +#include +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-function" +#endif +#include "numpy/ndarrayobject.h" +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/detail/imu_state__struct.h" +#include "unitree_go/msg/detail/imu_state__functions.h" + +#include "rosidl_runtime_c/primitives_sequence.h" +#include "rosidl_runtime_c/primitives_sequence_functions.h" + + +ROSIDL_GENERATOR_C_EXPORT +bool unitree_go__msg__imu_state__convert_from_py(PyObject * _pymsg, void * _ros_message) +{ + // check that the passed message is of the expected Python class + { + char full_classname_dest[35]; + { + char * class_name = NULL; + char * module_name = NULL; + { + PyObject * class_attr = PyObject_GetAttrString(_pymsg, "__class__"); + if (class_attr) { + PyObject * name_attr = PyObject_GetAttrString(class_attr, "__name__"); + if (name_attr) { + class_name = (char *)PyUnicode_1BYTE_DATA(name_attr); + Py_DECREF(name_attr); + } + PyObject * module_attr = PyObject_GetAttrString(class_attr, "__module__"); + if (module_attr) { + module_name = (char *)PyUnicode_1BYTE_DATA(module_attr); + Py_DECREF(module_attr); + } + Py_DECREF(class_attr); + } + } + if (!class_name || !module_name) { + return false; + } + snprintf(full_classname_dest, sizeof(full_classname_dest), "%s.%s", module_name, class_name); + } + assert(strncmp("unitree_go.msg._imu_state.IMUState", full_classname_dest, 34) == 0); + } + unitree_go__msg__IMUState * ros_message = _ros_message; + { // quaternion + PyObject * field = PyObject_GetAttrString(_pymsg, "quaternion"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_FLOAT32); + Py_ssize_t size = 4; + float * dest = ros_message->quaternion; + for (Py_ssize_t i = 0; i < size; ++i) { + float tmp = *(npy_float32 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(float)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + { // gyroscope + PyObject * field = PyObject_GetAttrString(_pymsg, "gyroscope"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_FLOAT32); + Py_ssize_t size = 3; + float * dest = ros_message->gyroscope; + for (Py_ssize_t i = 0; i < size; ++i) { + float tmp = *(npy_float32 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(float)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + { // accelerometer + PyObject * field = PyObject_GetAttrString(_pymsg, "accelerometer"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_FLOAT32); + Py_ssize_t size = 3; + float * dest = ros_message->accelerometer; + for (Py_ssize_t i = 0; i < size; ++i) { + float tmp = *(npy_float32 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(float)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + { // rpy + PyObject * field = PyObject_GetAttrString(_pymsg, "rpy"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_FLOAT32); + Py_ssize_t size = 3; + float * dest = ros_message->rpy; + for (Py_ssize_t i = 0; i < size; ++i) { + float tmp = *(npy_float32 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(float)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + { // temperature + PyObject * field = PyObject_GetAttrString(_pymsg, "temperature"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->temperature = (int8_t)PyLong_AsLong(field); + Py_DECREF(field); + } + + return true; +} + +ROSIDL_GENERATOR_C_EXPORT +PyObject * unitree_go__msg__imu_state__convert_to_py(void * raw_ros_message) +{ + /* NOTE(esteve): Call constructor of IMUState */ + PyObject * _pymessage = NULL; + { + PyObject * pymessage_module = PyImport_ImportModule("unitree_go.msg._imu_state"); + assert(pymessage_module); + PyObject * pymessage_class = PyObject_GetAttrString(pymessage_module, "IMUState"); + assert(pymessage_class); + Py_DECREF(pymessage_module); + _pymessage = PyObject_CallObject(pymessage_class, NULL); + Py_DECREF(pymessage_class); + if (!_pymessage) { + return NULL; + } + } + unitree_go__msg__IMUState * ros_message = (unitree_go__msg__IMUState *)raw_ros_message; + { // quaternion + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "quaternion"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_FLOAT32); + assert(sizeof(npy_float32) == sizeof(float)); + npy_float32 * dst = (npy_float32 *)PyArray_GETPTR1(seq_field, 0); + float * src = &(ros_message->quaternion[0]); + memcpy(dst, src, 4 * sizeof(float)); + Py_DECREF(field); + } + { // gyroscope + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "gyroscope"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_FLOAT32); + assert(sizeof(npy_float32) == sizeof(float)); + npy_float32 * dst = (npy_float32 *)PyArray_GETPTR1(seq_field, 0); + float * src = &(ros_message->gyroscope[0]); + memcpy(dst, src, 3 * sizeof(float)); + Py_DECREF(field); + } + { // accelerometer + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "accelerometer"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_FLOAT32); + assert(sizeof(npy_float32) == sizeof(float)); + npy_float32 * dst = (npy_float32 *)PyArray_GETPTR1(seq_field, 0); + float * src = &(ros_message->accelerometer[0]); + memcpy(dst, src, 3 * sizeof(float)); + Py_DECREF(field); + } + { // rpy + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "rpy"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_FLOAT32); + assert(sizeof(npy_float32) == sizeof(float)); + npy_float32 * dst = (npy_float32 *)PyArray_GETPTR1(seq_field, 0); + float * src = &(ros_message->rpy[0]); + memcpy(dst, src, 3 * sizeof(float)); + Py_DECREF(field); + } + { // temperature + PyObject * field = NULL; + field = PyLong_FromLong(ros_message->temperature); + { + int rc = PyObject_SetAttrString(_pymessage, "temperature", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + + // ownership of _pymessage is transferred to the caller + return _pymessage; +} diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_interface_config.py b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_interface_config.py new file mode 100644 index 0000000..cee6940 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_interface_config.py @@ -0,0 +1,189 @@ +# generated from rosidl_generator_py/resource/_idl.py.em +# with input from unitree_go:msg/InterfaceConfig.idl +# generated code does not contain a copyright notice + + +# Import statements for member types + +# Member 'reserve' +import numpy # noqa: E402, I100 + +import rosidl_parser.definition # noqa: E402, I100 + + +class Metaclass_InterfaceConfig(type): + """Metaclass of message 'InterfaceConfig'.""" + + _CREATE_ROS_MESSAGE = None + _CONVERT_FROM_PY = None + _CONVERT_TO_PY = None + _DESTROY_ROS_MESSAGE = None + _TYPE_SUPPORT = None + + __constants = { + } + + @classmethod + def __import_type_support__(cls): + try: + from rosidl_generator_py import import_type_support + module = import_type_support('unitree_go') + except ImportError: + import logging + import traceback + logger = logging.getLogger( + 'unitree_go.msg.InterfaceConfig') + logger.debug( + 'Failed to import needed modules for type support:\n' + + traceback.format_exc()) + else: + cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__msg__interface_config + cls._CONVERT_FROM_PY = module.convert_from_py_msg__msg__interface_config + cls._CONVERT_TO_PY = module.convert_to_py_msg__msg__interface_config + cls._TYPE_SUPPORT = module.type_support_msg__msg__interface_config + cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__msg__interface_config + + @classmethod + def __prepare__(cls, name, bases, **kwargs): + # list constant names here so that they appear in the help text of + # the message class under "Data and other attributes defined here:" + # as well as populate each message instance + return { + } + + +class InterfaceConfig(metaclass=Metaclass_InterfaceConfig): + """Message class 'InterfaceConfig'.""" + + __slots__ = [ + '_mode', + '_value', + '_reserve', + ] + + _fields_and_field_types = { + 'mode': 'uint8', + 'value': 'uint8', + 'reserve': 'uint8[2]', + } + + SLOT_TYPES = ( + rosidl_parser.definition.BasicType('uint8'), # noqa: E501 + rosidl_parser.definition.BasicType('uint8'), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('uint8'), 2), # noqa: E501 + ) + + def __init__(self, **kwargs): + assert all('_' + key in self.__slots__ for key in kwargs.keys()), \ + 'Invalid arguments passed to constructor: %s' % \ + ', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__)) + self.mode = kwargs.get('mode', int()) + self.value = kwargs.get('value', int()) + if 'reserve' not in kwargs: + self.reserve = numpy.zeros(2, dtype=numpy.uint8) + else: + self.reserve = numpy.array(kwargs.get('reserve'), dtype=numpy.uint8) + assert self.reserve.shape == (2, ) + + def __repr__(self): + typename = self.__class__.__module__.split('.') + typename.pop() + typename.append(self.__class__.__name__) + args = [] + for s, t in zip(self.__slots__, self.SLOT_TYPES): + field = getattr(self, s) + fieldstr = repr(field) + # We use Python array type for fields that can be directly stored + # in them, and "normal" sequences for everything else. If it is + # a type that we store in an array, strip off the 'array' portion. + if ( + isinstance(t, rosidl_parser.definition.AbstractSequence) and + isinstance(t.value_type, rosidl_parser.definition.BasicType) and + t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64'] + ): + if len(field) == 0: + fieldstr = '[]' + else: + assert fieldstr.startswith('array(') + prefix = "array('X', " + suffix = ')' + fieldstr = fieldstr[len(prefix):-len(suffix)] + args.append(s[1:] + '=' + fieldstr) + return '%s(%s)' % ('.'.join(typename), ', '.join(args)) + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + if self.mode != other.mode: + return False + if self.value != other.value: + return False + if all(self.reserve != other.reserve): + return False + return True + + @classmethod + def get_fields_and_field_types(cls): + from copy import copy + return copy(cls._fields_and_field_types) + + @property + def mode(self): + """Message field 'mode'.""" + return self._mode + + @mode.setter + def mode(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'mode' field must be of type 'int'" + assert value >= 0 and value < 256, \ + "The 'mode' field must be an unsigned integer in [0, 255]" + self._mode = value + + @property + def value(self): + """Message field 'value'.""" + return self._value + + @value.setter + def value(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'value' field must be of type 'int'" + assert value >= 0 and value < 256, \ + "The 'value' field must be an unsigned integer in [0, 255]" + self._value = value + + @property + def reserve(self): + """Message field 'reserve'.""" + return self._reserve + + @reserve.setter + def reserve(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.uint8, \ + "The 'reserve' numpy.ndarray() must have the dtype of 'numpy.uint8'" + assert value.size == 2, \ + "The 'reserve' numpy.ndarray() must have a size of 2" + self._reserve = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 2 and + all(isinstance(v, int) for v in value) and + all(val >= 0 and val < 256 for val in value)), \ + "The 'reserve' field must be a set or sequence with length 2 and each value of type 'int' and each unsigned integer in [0, 255]" + self._reserve = numpy.array(value, dtype=numpy.uint8) diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_interface_config_s.c b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_interface_config_s.c new file mode 100644 index 0000000..024a5c5 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_interface_config_s.c @@ -0,0 +1,163 @@ +// generated from rosidl_generator_py/resource/_idl_support.c.em +// with input from unitree_go:msg/InterfaceConfig.idl +// generated code does not contain a copyright notice +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#include +#include +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-function" +#endif +#include "numpy/ndarrayobject.h" +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/detail/interface_config__struct.h" +#include "unitree_go/msg/detail/interface_config__functions.h" + +#include "rosidl_runtime_c/primitives_sequence.h" +#include "rosidl_runtime_c/primitives_sequence_functions.h" + + +ROSIDL_GENERATOR_C_EXPORT +bool unitree_go__msg__interface_config__convert_from_py(PyObject * _pymsg, void * _ros_message) +{ + // check that the passed message is of the expected Python class + { + char full_classname_dest[49]; + { + char * class_name = NULL; + char * module_name = NULL; + { + PyObject * class_attr = PyObject_GetAttrString(_pymsg, "__class__"); + if (class_attr) { + PyObject * name_attr = PyObject_GetAttrString(class_attr, "__name__"); + if (name_attr) { + class_name = (char *)PyUnicode_1BYTE_DATA(name_attr); + Py_DECREF(name_attr); + } + PyObject * module_attr = PyObject_GetAttrString(class_attr, "__module__"); + if (module_attr) { + module_name = (char *)PyUnicode_1BYTE_DATA(module_attr); + Py_DECREF(module_attr); + } + Py_DECREF(class_attr); + } + } + if (!class_name || !module_name) { + return false; + } + snprintf(full_classname_dest, sizeof(full_classname_dest), "%s.%s", module_name, class_name); + } + assert(strncmp("unitree_go.msg._interface_config.InterfaceConfig", full_classname_dest, 48) == 0); + } + unitree_go__msg__InterfaceConfig * ros_message = _ros_message; + { // mode + PyObject * field = PyObject_GetAttrString(_pymsg, "mode"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->mode = (uint8_t)PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // value + PyObject * field = PyObject_GetAttrString(_pymsg, "value"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->value = (uint8_t)PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // reserve + PyObject * field = PyObject_GetAttrString(_pymsg, "reserve"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_UINT8); + Py_ssize_t size = 2; + uint8_t * dest = ros_message->reserve; + for (Py_ssize_t i = 0; i < size; ++i) { + uint8_t tmp = *(npy_uint8 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(uint8_t)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + + return true; +} + +ROSIDL_GENERATOR_C_EXPORT +PyObject * unitree_go__msg__interface_config__convert_to_py(void * raw_ros_message) +{ + /* NOTE(esteve): Call constructor of InterfaceConfig */ + PyObject * _pymessage = NULL; + { + PyObject * pymessage_module = PyImport_ImportModule("unitree_go.msg._interface_config"); + assert(pymessage_module); + PyObject * pymessage_class = PyObject_GetAttrString(pymessage_module, "InterfaceConfig"); + assert(pymessage_class); + Py_DECREF(pymessage_module); + _pymessage = PyObject_CallObject(pymessage_class, NULL); + Py_DECREF(pymessage_class); + if (!_pymessage) { + return NULL; + } + } + unitree_go__msg__InterfaceConfig * ros_message = (unitree_go__msg__InterfaceConfig *)raw_ros_message; + { // mode + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->mode); + { + int rc = PyObject_SetAttrString(_pymessage, "mode", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // value + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->value); + { + int rc = PyObject_SetAttrString(_pymessage, "value", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // reserve + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "reserve"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_UINT8); + assert(sizeof(npy_uint8) == sizeof(uint8_t)); + npy_uint8 * dst = (npy_uint8 *)PyArray_GETPTR1(seq_field, 0); + uint8_t * src = &(ros_message->reserve[0]); + memcpy(dst, src, 2 * sizeof(uint8_t)); + Py_DECREF(field); + } + + // ownership of _pymessage is transferred to the caller + return _pymessage; +} diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_lidar_state.py b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_lidar_state.py new file mode 100644 index 0000000..6b6da0b --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_lidar_state.py @@ -0,0 +1,461 @@ +# generated from rosidl_generator_py/resource/_idl.py.em +# with input from unitree_go:msg/LidarState.idl +# generated code does not contain a copyright notice + + +# Import statements for member types + +# Member 'imu_rpy' +import numpy # noqa: E402, I100 + +import rosidl_parser.definition # noqa: E402, I100 + + +class Metaclass_LidarState(type): + """Metaclass of message 'LidarState'.""" + + _CREATE_ROS_MESSAGE = None + _CONVERT_FROM_PY = None + _CONVERT_TO_PY = None + _DESTROY_ROS_MESSAGE = None + _TYPE_SUPPORT = None + + __constants = { + } + + @classmethod + def __import_type_support__(cls): + try: + from rosidl_generator_py import import_type_support + module = import_type_support('unitree_go') + except ImportError: + import logging + import traceback + logger = logging.getLogger( + 'unitree_go.msg.LidarState') + logger.debug( + 'Failed to import needed modules for type support:\n' + + traceback.format_exc()) + else: + cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__msg__lidar_state + cls._CONVERT_FROM_PY = module.convert_from_py_msg__msg__lidar_state + cls._CONVERT_TO_PY = module.convert_to_py_msg__msg__lidar_state + cls._TYPE_SUPPORT = module.type_support_msg__msg__lidar_state + cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__msg__lidar_state + + @classmethod + def __prepare__(cls, name, bases, **kwargs): + # list constant names here so that they appear in the help text of + # the message class under "Data and other attributes defined here:" + # as well as populate each message instance + return { + } + + +class LidarState(metaclass=Metaclass_LidarState): + """Message class 'LidarState'.""" + + __slots__ = [ + '_stamp', + '_firmware_version', + '_software_version', + '_sdk_version', + '_sys_rotation_speed', + '_com_rotation_speed', + '_error_state', + '_cloud_frequency', + '_cloud_packet_loss_rate', + '_cloud_size', + '_cloud_scan_num', + '_imu_frequency', + '_imu_packet_loss_rate', + '_imu_rpy', + '_serial_recv_stamp', + '_serial_buffer_size', + '_serial_buffer_read', + ] + + _fields_and_field_types = { + 'stamp': 'double', + 'firmware_version': 'string', + 'software_version': 'string', + 'sdk_version': 'string', + 'sys_rotation_speed': 'float', + 'com_rotation_speed': 'float', + 'error_state': 'uint8', + 'cloud_frequency': 'float', + 'cloud_packet_loss_rate': 'float', + 'cloud_size': 'uint32', + 'cloud_scan_num': 'uint32', + 'imu_frequency': 'float', + 'imu_packet_loss_rate': 'float', + 'imu_rpy': 'float[3]', + 'serial_recv_stamp': 'double', + 'serial_buffer_size': 'uint32', + 'serial_buffer_read': 'uint32', + } + + SLOT_TYPES = ( + rosidl_parser.definition.BasicType('double'), # noqa: E501 + rosidl_parser.definition.UnboundedString(), # noqa: E501 + rosidl_parser.definition.UnboundedString(), # noqa: E501 + rosidl_parser.definition.UnboundedString(), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('uint8'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('uint32'), # noqa: E501 + rosidl_parser.definition.BasicType('uint32'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('float'), 3), # noqa: E501 + rosidl_parser.definition.BasicType('double'), # noqa: E501 + rosidl_parser.definition.BasicType('uint32'), # noqa: E501 + rosidl_parser.definition.BasicType('uint32'), # noqa: E501 + ) + + def __init__(self, **kwargs): + assert all('_' + key in self.__slots__ for key in kwargs.keys()), \ + 'Invalid arguments passed to constructor: %s' % \ + ', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__)) + self.stamp = kwargs.get('stamp', float()) + self.firmware_version = kwargs.get('firmware_version', str()) + self.software_version = kwargs.get('software_version', str()) + self.sdk_version = kwargs.get('sdk_version', str()) + self.sys_rotation_speed = kwargs.get('sys_rotation_speed', float()) + self.com_rotation_speed = kwargs.get('com_rotation_speed', float()) + self.error_state = kwargs.get('error_state', int()) + self.cloud_frequency = kwargs.get('cloud_frequency', float()) + self.cloud_packet_loss_rate = kwargs.get('cloud_packet_loss_rate', float()) + self.cloud_size = kwargs.get('cloud_size', int()) + self.cloud_scan_num = kwargs.get('cloud_scan_num', int()) + self.imu_frequency = kwargs.get('imu_frequency', float()) + self.imu_packet_loss_rate = kwargs.get('imu_packet_loss_rate', float()) + if 'imu_rpy' not in kwargs: + self.imu_rpy = numpy.zeros(3, dtype=numpy.float32) + else: + self.imu_rpy = numpy.array(kwargs.get('imu_rpy'), dtype=numpy.float32) + assert self.imu_rpy.shape == (3, ) + self.serial_recv_stamp = kwargs.get('serial_recv_stamp', float()) + self.serial_buffer_size = kwargs.get('serial_buffer_size', int()) + self.serial_buffer_read = kwargs.get('serial_buffer_read', int()) + + def __repr__(self): + typename = self.__class__.__module__.split('.') + typename.pop() + typename.append(self.__class__.__name__) + args = [] + for s, t in zip(self.__slots__, self.SLOT_TYPES): + field = getattr(self, s) + fieldstr = repr(field) + # We use Python array type for fields that can be directly stored + # in them, and "normal" sequences for everything else. If it is + # a type that we store in an array, strip off the 'array' portion. + if ( + isinstance(t, rosidl_parser.definition.AbstractSequence) and + isinstance(t.value_type, rosidl_parser.definition.BasicType) and + t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64'] + ): + if len(field) == 0: + fieldstr = '[]' + else: + assert fieldstr.startswith('array(') + prefix = "array('X', " + suffix = ')' + fieldstr = fieldstr[len(prefix):-len(suffix)] + args.append(s[1:] + '=' + fieldstr) + return '%s(%s)' % ('.'.join(typename), ', '.join(args)) + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + if self.stamp != other.stamp: + return False + if self.firmware_version != other.firmware_version: + return False + if self.software_version != other.software_version: + return False + if self.sdk_version != other.sdk_version: + return False + if self.sys_rotation_speed != other.sys_rotation_speed: + return False + if self.com_rotation_speed != other.com_rotation_speed: + return False + if self.error_state != other.error_state: + return False + if self.cloud_frequency != other.cloud_frequency: + return False + if self.cloud_packet_loss_rate != other.cloud_packet_loss_rate: + return False + if self.cloud_size != other.cloud_size: + return False + if self.cloud_scan_num != other.cloud_scan_num: + return False + if self.imu_frequency != other.imu_frequency: + return False + if self.imu_packet_loss_rate != other.imu_packet_loss_rate: + return False + if all(self.imu_rpy != other.imu_rpy): + return False + if self.serial_recv_stamp != other.serial_recv_stamp: + return False + if self.serial_buffer_size != other.serial_buffer_size: + return False + if self.serial_buffer_read != other.serial_buffer_read: + return False + return True + + @classmethod + def get_fields_and_field_types(cls): + from copy import copy + return copy(cls._fields_and_field_types) + + @property + def stamp(self): + """Message field 'stamp'.""" + return self._stamp + + @stamp.setter + def stamp(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'stamp' field must be of type 'float'" + self._stamp = value + + @property + def firmware_version(self): + """Message field 'firmware_version'.""" + return self._firmware_version + + @firmware_version.setter + def firmware_version(self, value): + if __debug__: + assert \ + isinstance(value, str), \ + "The 'firmware_version' field must be of type 'str'" + self._firmware_version = value + + @property + def software_version(self): + """Message field 'software_version'.""" + return self._software_version + + @software_version.setter + def software_version(self, value): + if __debug__: + assert \ + isinstance(value, str), \ + "The 'software_version' field must be of type 'str'" + self._software_version = value + + @property + def sdk_version(self): + """Message field 'sdk_version'.""" + return self._sdk_version + + @sdk_version.setter + def sdk_version(self, value): + if __debug__: + assert \ + isinstance(value, str), \ + "The 'sdk_version' field must be of type 'str'" + self._sdk_version = value + + @property + def sys_rotation_speed(self): + """Message field 'sys_rotation_speed'.""" + return self._sys_rotation_speed + + @sys_rotation_speed.setter + def sys_rotation_speed(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'sys_rotation_speed' field must be of type 'float'" + self._sys_rotation_speed = value + + @property + def com_rotation_speed(self): + """Message field 'com_rotation_speed'.""" + return self._com_rotation_speed + + @com_rotation_speed.setter + def com_rotation_speed(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'com_rotation_speed' field must be of type 'float'" + self._com_rotation_speed = value + + @property + def error_state(self): + """Message field 'error_state'.""" + return self._error_state + + @error_state.setter + def error_state(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'error_state' field must be of type 'int'" + assert value >= 0 and value < 256, \ + "The 'error_state' field must be an unsigned integer in [0, 255]" + self._error_state = value + + @property + def cloud_frequency(self): + """Message field 'cloud_frequency'.""" + return self._cloud_frequency + + @cloud_frequency.setter + def cloud_frequency(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'cloud_frequency' field must be of type 'float'" + self._cloud_frequency = value + + @property + def cloud_packet_loss_rate(self): + """Message field 'cloud_packet_loss_rate'.""" + return self._cloud_packet_loss_rate + + @cloud_packet_loss_rate.setter + def cloud_packet_loss_rate(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'cloud_packet_loss_rate' field must be of type 'float'" + self._cloud_packet_loss_rate = value + + @property + def cloud_size(self): + """Message field 'cloud_size'.""" + return self._cloud_size + + @cloud_size.setter + def cloud_size(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'cloud_size' field must be of type 'int'" + assert value >= 0 and value < 4294967296, \ + "The 'cloud_size' field must be an unsigned integer in [0, 4294967295]" + self._cloud_size = value + + @property + def cloud_scan_num(self): + """Message field 'cloud_scan_num'.""" + return self._cloud_scan_num + + @cloud_scan_num.setter + def cloud_scan_num(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'cloud_scan_num' field must be of type 'int'" + assert value >= 0 and value < 4294967296, \ + "The 'cloud_scan_num' field must be an unsigned integer in [0, 4294967295]" + self._cloud_scan_num = value + + @property + def imu_frequency(self): + """Message field 'imu_frequency'.""" + return self._imu_frequency + + @imu_frequency.setter + def imu_frequency(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'imu_frequency' field must be of type 'float'" + self._imu_frequency = value + + @property + def imu_packet_loss_rate(self): + """Message field 'imu_packet_loss_rate'.""" + return self._imu_packet_loss_rate + + @imu_packet_loss_rate.setter + def imu_packet_loss_rate(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'imu_packet_loss_rate' field must be of type 'float'" + self._imu_packet_loss_rate = value + + @property + def imu_rpy(self): + """Message field 'imu_rpy'.""" + return self._imu_rpy + + @imu_rpy.setter + def imu_rpy(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.float32, \ + "The 'imu_rpy' numpy.ndarray() must have the dtype of 'numpy.float32'" + assert value.size == 3, \ + "The 'imu_rpy' numpy.ndarray() must have a size of 3" + self._imu_rpy = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 3 and + all(isinstance(v, float) for v in value) and + True), \ + "The 'imu_rpy' field must be a set or sequence with length 3 and each value of type 'float'" + self._imu_rpy = numpy.array(value, dtype=numpy.float32) + + @property + def serial_recv_stamp(self): + """Message field 'serial_recv_stamp'.""" + return self._serial_recv_stamp + + @serial_recv_stamp.setter + def serial_recv_stamp(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'serial_recv_stamp' field must be of type 'float'" + self._serial_recv_stamp = value + + @property + def serial_buffer_size(self): + """Message field 'serial_buffer_size'.""" + return self._serial_buffer_size + + @serial_buffer_size.setter + def serial_buffer_size(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'serial_buffer_size' field must be of type 'int'" + assert value >= 0 and value < 4294967296, \ + "The 'serial_buffer_size' field must be an unsigned integer in [0, 4294967295]" + self._serial_buffer_size = value + + @property + def serial_buffer_read(self): + """Message field 'serial_buffer_read'.""" + return self._serial_buffer_read + + @serial_buffer_read.setter + def serial_buffer_read(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'serial_buffer_read' field must be of type 'int'" + assert value >= 0 and value < 4294967296, \ + "The 'serial_buffer_read' field must be an unsigned integer in [0, 4294967295]" + self._serial_buffer_read = value diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_lidar_state_s.c b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_lidar_state_s.c new file mode 100644 index 0000000..fe94967 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_lidar_state_s.c @@ -0,0 +1,482 @@ +// generated from rosidl_generator_py/resource/_idl_support.c.em +// with input from unitree_go:msg/LidarState.idl +// generated code does not contain a copyright notice +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#include +#include +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-function" +#endif +#include "numpy/ndarrayobject.h" +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/detail/lidar_state__struct.h" +#include "unitree_go/msg/detail/lidar_state__functions.h" + +#include "rosidl_runtime_c/string.h" +#include "rosidl_runtime_c/string_functions.h" + +#include "rosidl_runtime_c/primitives_sequence.h" +#include "rosidl_runtime_c/primitives_sequence_functions.h" + + +ROSIDL_GENERATOR_C_EXPORT +bool unitree_go__msg__lidar_state__convert_from_py(PyObject * _pymsg, void * _ros_message) +{ + // check that the passed message is of the expected Python class + { + char full_classname_dest[39]; + { + char * class_name = NULL; + char * module_name = NULL; + { + PyObject * class_attr = PyObject_GetAttrString(_pymsg, "__class__"); + if (class_attr) { + PyObject * name_attr = PyObject_GetAttrString(class_attr, "__name__"); + if (name_attr) { + class_name = (char *)PyUnicode_1BYTE_DATA(name_attr); + Py_DECREF(name_attr); + } + PyObject * module_attr = PyObject_GetAttrString(class_attr, "__module__"); + if (module_attr) { + module_name = (char *)PyUnicode_1BYTE_DATA(module_attr); + Py_DECREF(module_attr); + } + Py_DECREF(class_attr); + } + } + if (!class_name || !module_name) { + return false; + } + snprintf(full_classname_dest, sizeof(full_classname_dest), "%s.%s", module_name, class_name); + } + assert(strncmp("unitree_go.msg._lidar_state.LidarState", full_classname_dest, 38) == 0); + } + unitree_go__msg__LidarState * ros_message = _ros_message; + { // stamp + PyObject * field = PyObject_GetAttrString(_pymsg, "stamp"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->stamp = PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // firmware_version + PyObject * field = PyObject_GetAttrString(_pymsg, "firmware_version"); + if (!field) { + return false; + } + assert(PyUnicode_Check(field)); + PyObject * encoded_field = PyUnicode_AsUTF8String(field); + if (!encoded_field) { + Py_DECREF(field); + return false; + } + rosidl_runtime_c__String__assign(&ros_message->firmware_version, PyBytes_AS_STRING(encoded_field)); + Py_DECREF(encoded_field); + Py_DECREF(field); + } + { // software_version + PyObject * field = PyObject_GetAttrString(_pymsg, "software_version"); + if (!field) { + return false; + } + assert(PyUnicode_Check(field)); + PyObject * encoded_field = PyUnicode_AsUTF8String(field); + if (!encoded_field) { + Py_DECREF(field); + return false; + } + rosidl_runtime_c__String__assign(&ros_message->software_version, PyBytes_AS_STRING(encoded_field)); + Py_DECREF(encoded_field); + Py_DECREF(field); + } + { // sdk_version + PyObject * field = PyObject_GetAttrString(_pymsg, "sdk_version"); + if (!field) { + return false; + } + assert(PyUnicode_Check(field)); + PyObject * encoded_field = PyUnicode_AsUTF8String(field); + if (!encoded_field) { + Py_DECREF(field); + return false; + } + rosidl_runtime_c__String__assign(&ros_message->sdk_version, PyBytes_AS_STRING(encoded_field)); + Py_DECREF(encoded_field); + Py_DECREF(field); + } + { // sys_rotation_speed + PyObject * field = PyObject_GetAttrString(_pymsg, "sys_rotation_speed"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->sys_rotation_speed = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // com_rotation_speed + PyObject * field = PyObject_GetAttrString(_pymsg, "com_rotation_speed"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->com_rotation_speed = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // error_state + PyObject * field = PyObject_GetAttrString(_pymsg, "error_state"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->error_state = (uint8_t)PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // cloud_frequency + PyObject * field = PyObject_GetAttrString(_pymsg, "cloud_frequency"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->cloud_frequency = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // cloud_packet_loss_rate + PyObject * field = PyObject_GetAttrString(_pymsg, "cloud_packet_loss_rate"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->cloud_packet_loss_rate = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // cloud_size + PyObject * field = PyObject_GetAttrString(_pymsg, "cloud_size"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->cloud_size = PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // cloud_scan_num + PyObject * field = PyObject_GetAttrString(_pymsg, "cloud_scan_num"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->cloud_scan_num = PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // imu_frequency + PyObject * field = PyObject_GetAttrString(_pymsg, "imu_frequency"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->imu_frequency = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // imu_packet_loss_rate + PyObject * field = PyObject_GetAttrString(_pymsg, "imu_packet_loss_rate"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->imu_packet_loss_rate = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // imu_rpy + PyObject * field = PyObject_GetAttrString(_pymsg, "imu_rpy"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_FLOAT32); + Py_ssize_t size = 3; + float * dest = ros_message->imu_rpy; + for (Py_ssize_t i = 0; i < size; ++i) { + float tmp = *(npy_float32 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(float)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + { // serial_recv_stamp + PyObject * field = PyObject_GetAttrString(_pymsg, "serial_recv_stamp"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->serial_recv_stamp = PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // serial_buffer_size + PyObject * field = PyObject_GetAttrString(_pymsg, "serial_buffer_size"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->serial_buffer_size = PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // serial_buffer_read + PyObject * field = PyObject_GetAttrString(_pymsg, "serial_buffer_read"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->serial_buffer_read = PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + + return true; +} + +ROSIDL_GENERATOR_C_EXPORT +PyObject * unitree_go__msg__lidar_state__convert_to_py(void * raw_ros_message) +{ + /* NOTE(esteve): Call constructor of LidarState */ + PyObject * _pymessage = NULL; + { + PyObject * pymessage_module = PyImport_ImportModule("unitree_go.msg._lidar_state"); + assert(pymessage_module); + PyObject * pymessage_class = PyObject_GetAttrString(pymessage_module, "LidarState"); + assert(pymessage_class); + Py_DECREF(pymessage_module); + _pymessage = PyObject_CallObject(pymessage_class, NULL); + Py_DECREF(pymessage_class); + if (!_pymessage) { + return NULL; + } + } + unitree_go__msg__LidarState * ros_message = (unitree_go__msg__LidarState *)raw_ros_message; + { // stamp + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->stamp); + { + int rc = PyObject_SetAttrString(_pymessage, "stamp", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // firmware_version + PyObject * field = NULL; + field = PyUnicode_DecodeUTF8( + ros_message->firmware_version.data, + strlen(ros_message->firmware_version.data), + "replace"); + if (!field) { + return NULL; + } + { + int rc = PyObject_SetAttrString(_pymessage, "firmware_version", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // software_version + PyObject * field = NULL; + field = PyUnicode_DecodeUTF8( + ros_message->software_version.data, + strlen(ros_message->software_version.data), + "replace"); + if (!field) { + return NULL; + } + { + int rc = PyObject_SetAttrString(_pymessage, "software_version", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // sdk_version + PyObject * field = NULL; + field = PyUnicode_DecodeUTF8( + ros_message->sdk_version.data, + strlen(ros_message->sdk_version.data), + "replace"); + if (!field) { + return NULL; + } + { + int rc = PyObject_SetAttrString(_pymessage, "sdk_version", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // sys_rotation_speed + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->sys_rotation_speed); + { + int rc = PyObject_SetAttrString(_pymessage, "sys_rotation_speed", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // com_rotation_speed + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->com_rotation_speed); + { + int rc = PyObject_SetAttrString(_pymessage, "com_rotation_speed", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // error_state + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->error_state); + { + int rc = PyObject_SetAttrString(_pymessage, "error_state", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // cloud_frequency + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->cloud_frequency); + { + int rc = PyObject_SetAttrString(_pymessage, "cloud_frequency", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // cloud_packet_loss_rate + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->cloud_packet_loss_rate); + { + int rc = PyObject_SetAttrString(_pymessage, "cloud_packet_loss_rate", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // cloud_size + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->cloud_size); + { + int rc = PyObject_SetAttrString(_pymessage, "cloud_size", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // cloud_scan_num + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->cloud_scan_num); + { + int rc = PyObject_SetAttrString(_pymessage, "cloud_scan_num", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // imu_frequency + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->imu_frequency); + { + int rc = PyObject_SetAttrString(_pymessage, "imu_frequency", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // imu_packet_loss_rate + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->imu_packet_loss_rate); + { + int rc = PyObject_SetAttrString(_pymessage, "imu_packet_loss_rate", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // imu_rpy + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "imu_rpy"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_FLOAT32); + assert(sizeof(npy_float32) == sizeof(float)); + npy_float32 * dst = (npy_float32 *)PyArray_GETPTR1(seq_field, 0); + float * src = &(ros_message->imu_rpy[0]); + memcpy(dst, src, 3 * sizeof(float)); + Py_DECREF(field); + } + { // serial_recv_stamp + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->serial_recv_stamp); + { + int rc = PyObject_SetAttrString(_pymessage, "serial_recv_stamp", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // serial_buffer_size + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->serial_buffer_size); + { + int rc = PyObject_SetAttrString(_pymessage, "serial_buffer_size", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // serial_buffer_read + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->serial_buffer_read); + { + int rc = PyObject_SetAttrString(_pymessage, "serial_buffer_read", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + + // ownership of _pymessage is transferred to the caller + return _pymessage; +} diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_low_cmd.py b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_low_cmd.py new file mode 100644 index 0000000..566e4de --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_low_cmd.py @@ -0,0 +1,547 @@ +# generated from rosidl_generator_py/resource/_idl.py.em +# with input from unitree_go:msg/LowCmd.idl +# generated code does not contain a copyright notice + + +# Import statements for member types + +# Member 'head' +# Member 'sn' +# Member 'version' +# Member 'wireless_remote' +# Member 'led' +# Member 'fan' +import numpy # noqa: E402, I100 + +import rosidl_parser.definition # noqa: E402, I100 + + +class Metaclass_LowCmd(type): + """Metaclass of message 'LowCmd'.""" + + _CREATE_ROS_MESSAGE = None + _CONVERT_FROM_PY = None + _CONVERT_TO_PY = None + _DESTROY_ROS_MESSAGE = None + _TYPE_SUPPORT = None + + __constants = { + } + + @classmethod + def __import_type_support__(cls): + try: + from rosidl_generator_py import import_type_support + module = import_type_support('unitree_go') + except ImportError: + import logging + import traceback + logger = logging.getLogger( + 'unitree_go.msg.LowCmd') + logger.debug( + 'Failed to import needed modules for type support:\n' + + traceback.format_exc()) + else: + cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__msg__low_cmd + cls._CONVERT_FROM_PY = module.convert_from_py_msg__msg__low_cmd + cls._CONVERT_TO_PY = module.convert_to_py_msg__msg__low_cmd + cls._TYPE_SUPPORT = module.type_support_msg__msg__low_cmd + cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__msg__low_cmd + + from unitree_go.msg import BmsCmd + if BmsCmd.__class__._TYPE_SUPPORT is None: + BmsCmd.__class__.__import_type_support__() + + from unitree_go.msg import MotorCmd + if MotorCmd.__class__._TYPE_SUPPORT is None: + MotorCmd.__class__.__import_type_support__() + + @classmethod + def __prepare__(cls, name, bases, **kwargs): + # list constant names here so that they appear in the help text of + # the message class under "Data and other attributes defined here:" + # as well as populate each message instance + return { + } + + +class LowCmd(metaclass=Metaclass_LowCmd): + """Message class 'LowCmd'.""" + + __slots__ = [ + '_head', + '_level_flag', + '_frame_reserve', + '_sn', + '_version', + '_bandwidth', + '_motor_cmd', + '_bms_cmd', + '_wireless_remote', + '_led', + '_fan', + '_gpio', + '_reserve', + '_crc', + ] + + _fields_and_field_types = { + 'head': 'uint8[2]', + 'level_flag': 'uint8', + 'frame_reserve': 'uint8', + 'sn': 'uint32[2]', + 'version': 'uint32[2]', + 'bandwidth': 'uint16', + 'motor_cmd': 'unitree_go/MotorCmd[20]', + 'bms_cmd': 'unitree_go/BmsCmd', + 'wireless_remote': 'uint8[40]', + 'led': 'uint8[12]', + 'fan': 'uint8[2]', + 'gpio': 'uint8', + 'reserve': 'uint32', + 'crc': 'uint32', + } + + SLOT_TYPES = ( + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('uint8'), 2), # noqa: E501 + rosidl_parser.definition.BasicType('uint8'), # noqa: E501 + rosidl_parser.definition.BasicType('uint8'), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('uint32'), 2), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('uint32'), 2), # noqa: E501 + rosidl_parser.definition.BasicType('uint16'), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.NamespacedType(['unitree_go', 'msg'], 'MotorCmd'), 20), # noqa: E501 + rosidl_parser.definition.NamespacedType(['unitree_go', 'msg'], 'BmsCmd'), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('uint8'), 40), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('uint8'), 12), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('uint8'), 2), # noqa: E501 + rosidl_parser.definition.BasicType('uint8'), # noqa: E501 + rosidl_parser.definition.BasicType('uint32'), # noqa: E501 + rosidl_parser.definition.BasicType('uint32'), # noqa: E501 + ) + + def __init__(self, **kwargs): + assert all('_' + key in self.__slots__ for key in kwargs.keys()), \ + 'Invalid arguments passed to constructor: %s' % \ + ', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__)) + if 'head' not in kwargs: + self.head = numpy.zeros(2, dtype=numpy.uint8) + else: + self.head = numpy.array(kwargs.get('head'), dtype=numpy.uint8) + assert self.head.shape == (2, ) + self.level_flag = kwargs.get('level_flag', int()) + self.frame_reserve = kwargs.get('frame_reserve', int()) + if 'sn' not in kwargs: + self.sn = numpy.zeros(2, dtype=numpy.uint32) + else: + self.sn = numpy.array(kwargs.get('sn'), dtype=numpy.uint32) + assert self.sn.shape == (2, ) + if 'version' not in kwargs: + self.version = numpy.zeros(2, dtype=numpy.uint32) + else: + self.version = numpy.array(kwargs.get('version'), dtype=numpy.uint32) + assert self.version.shape == (2, ) + self.bandwidth = kwargs.get('bandwidth', int()) + from unitree_go.msg import MotorCmd + self.motor_cmd = kwargs.get( + 'motor_cmd', + [MotorCmd() for x in range(20)] + ) + from unitree_go.msg import BmsCmd + self.bms_cmd = kwargs.get('bms_cmd', BmsCmd()) + if 'wireless_remote' not in kwargs: + self.wireless_remote = numpy.zeros(40, dtype=numpy.uint8) + else: + self.wireless_remote = numpy.array(kwargs.get('wireless_remote'), dtype=numpy.uint8) + assert self.wireless_remote.shape == (40, ) + if 'led' not in kwargs: + self.led = numpy.zeros(12, dtype=numpy.uint8) + else: + self.led = numpy.array(kwargs.get('led'), dtype=numpy.uint8) + assert self.led.shape == (12, ) + if 'fan' not in kwargs: + self.fan = numpy.zeros(2, dtype=numpy.uint8) + else: + self.fan = numpy.array(kwargs.get('fan'), dtype=numpy.uint8) + assert self.fan.shape == (2, ) + self.gpio = kwargs.get('gpio', int()) + self.reserve = kwargs.get('reserve', int()) + self.crc = kwargs.get('crc', int()) + + def __repr__(self): + typename = self.__class__.__module__.split('.') + typename.pop() + typename.append(self.__class__.__name__) + args = [] + for s, t in zip(self.__slots__, self.SLOT_TYPES): + field = getattr(self, s) + fieldstr = repr(field) + # We use Python array type for fields that can be directly stored + # in them, and "normal" sequences for everything else. If it is + # a type that we store in an array, strip off the 'array' portion. + if ( + isinstance(t, rosidl_parser.definition.AbstractSequence) and + isinstance(t.value_type, rosidl_parser.definition.BasicType) and + t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64'] + ): + if len(field) == 0: + fieldstr = '[]' + else: + assert fieldstr.startswith('array(') + prefix = "array('X', " + suffix = ')' + fieldstr = fieldstr[len(prefix):-len(suffix)] + args.append(s[1:] + '=' + fieldstr) + return '%s(%s)' % ('.'.join(typename), ', '.join(args)) + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + if all(self.head != other.head): + return False + if self.level_flag != other.level_flag: + return False + if self.frame_reserve != other.frame_reserve: + return False + if all(self.sn != other.sn): + return False + if all(self.version != other.version): + return False + if self.bandwidth != other.bandwidth: + return False + if self.motor_cmd != other.motor_cmd: + return False + if self.bms_cmd != other.bms_cmd: + return False + if all(self.wireless_remote != other.wireless_remote): + return False + if all(self.led != other.led): + return False + if all(self.fan != other.fan): + return False + if self.gpio != other.gpio: + return False + if self.reserve != other.reserve: + return False + if self.crc != other.crc: + return False + return True + + @classmethod + def get_fields_and_field_types(cls): + from copy import copy + return copy(cls._fields_and_field_types) + + @property + def head(self): + """Message field 'head'.""" + return self._head + + @head.setter + def head(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.uint8, \ + "The 'head' numpy.ndarray() must have the dtype of 'numpy.uint8'" + assert value.size == 2, \ + "The 'head' numpy.ndarray() must have a size of 2" + self._head = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 2 and + all(isinstance(v, int) for v in value) and + all(val >= 0 and val < 256 for val in value)), \ + "The 'head' field must be a set or sequence with length 2 and each value of type 'int' and each unsigned integer in [0, 255]" + self._head = numpy.array(value, dtype=numpy.uint8) + + @property + def level_flag(self): + """Message field 'level_flag'.""" + return self._level_flag + + @level_flag.setter + def level_flag(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'level_flag' field must be of type 'int'" + assert value >= 0 and value < 256, \ + "The 'level_flag' field must be an unsigned integer in [0, 255]" + self._level_flag = value + + @property + def frame_reserve(self): + """Message field 'frame_reserve'.""" + return self._frame_reserve + + @frame_reserve.setter + def frame_reserve(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'frame_reserve' field must be of type 'int'" + assert value >= 0 and value < 256, \ + "The 'frame_reserve' field must be an unsigned integer in [0, 255]" + self._frame_reserve = value + + @property + def sn(self): + """Message field 'sn'.""" + return self._sn + + @sn.setter + def sn(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.uint32, \ + "The 'sn' numpy.ndarray() must have the dtype of 'numpy.uint32'" + assert value.size == 2, \ + "The 'sn' numpy.ndarray() must have a size of 2" + self._sn = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 2 and + all(isinstance(v, int) for v in value) and + all(val >= 0 and val < 4294967296 for val in value)), \ + "The 'sn' field must be a set or sequence with length 2 and each value of type 'int' and each unsigned integer in [0, 4294967295]" + self._sn = numpy.array(value, dtype=numpy.uint32) + + @property + def version(self): + """Message field 'version'.""" + return self._version + + @version.setter + def version(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.uint32, \ + "The 'version' numpy.ndarray() must have the dtype of 'numpy.uint32'" + assert value.size == 2, \ + "The 'version' numpy.ndarray() must have a size of 2" + self._version = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 2 and + all(isinstance(v, int) for v in value) and + all(val >= 0 and val < 4294967296 for val in value)), \ + "The 'version' field must be a set or sequence with length 2 and each value of type 'int' and each unsigned integer in [0, 4294967295]" + self._version = numpy.array(value, dtype=numpy.uint32) + + @property + def bandwidth(self): + """Message field 'bandwidth'.""" + return self._bandwidth + + @bandwidth.setter + def bandwidth(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'bandwidth' field must be of type 'int'" + assert value >= 0 and value < 65536, \ + "The 'bandwidth' field must be an unsigned integer in [0, 65535]" + self._bandwidth = value + + @property + def motor_cmd(self): + """Message field 'motor_cmd'.""" + return self._motor_cmd + + @motor_cmd.setter + def motor_cmd(self, value): + if __debug__: + from unitree_go.msg import MotorCmd + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 20 and + all(isinstance(v, MotorCmd) for v in value) and + True), \ + "The 'motor_cmd' field must be a set or sequence with length 20 and each value of type 'MotorCmd'" + self._motor_cmd = value + + @property + def bms_cmd(self): + """Message field 'bms_cmd'.""" + return self._bms_cmd + + @bms_cmd.setter + def bms_cmd(self, value): + if __debug__: + from unitree_go.msg import BmsCmd + assert \ + isinstance(value, BmsCmd), \ + "The 'bms_cmd' field must be a sub message of type 'BmsCmd'" + self._bms_cmd = value + + @property + def wireless_remote(self): + """Message field 'wireless_remote'.""" + return self._wireless_remote + + @wireless_remote.setter + def wireless_remote(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.uint8, \ + "The 'wireless_remote' numpy.ndarray() must have the dtype of 'numpy.uint8'" + assert value.size == 40, \ + "The 'wireless_remote' numpy.ndarray() must have a size of 40" + self._wireless_remote = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 40 and + all(isinstance(v, int) for v in value) and + all(val >= 0 and val < 256 for val in value)), \ + "The 'wireless_remote' field must be a set or sequence with length 40 and each value of type 'int' and each unsigned integer in [0, 255]" + self._wireless_remote = numpy.array(value, dtype=numpy.uint8) + + @property + def led(self): + """Message field 'led'.""" + return self._led + + @led.setter + def led(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.uint8, \ + "The 'led' numpy.ndarray() must have the dtype of 'numpy.uint8'" + assert value.size == 12, \ + "The 'led' numpy.ndarray() must have a size of 12" + self._led = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 12 and + all(isinstance(v, int) for v in value) and + all(val >= 0 and val < 256 for val in value)), \ + "The 'led' field must be a set or sequence with length 12 and each value of type 'int' and each unsigned integer in [0, 255]" + self._led = numpy.array(value, dtype=numpy.uint8) + + @property + def fan(self): + """Message field 'fan'.""" + return self._fan + + @fan.setter + def fan(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.uint8, \ + "The 'fan' numpy.ndarray() must have the dtype of 'numpy.uint8'" + assert value.size == 2, \ + "The 'fan' numpy.ndarray() must have a size of 2" + self._fan = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 2 and + all(isinstance(v, int) for v in value) and + all(val >= 0 and val < 256 for val in value)), \ + "The 'fan' field must be a set or sequence with length 2 and each value of type 'int' and each unsigned integer in [0, 255]" + self._fan = numpy.array(value, dtype=numpy.uint8) + + @property + def gpio(self): + """Message field 'gpio'.""" + return self._gpio + + @gpio.setter + def gpio(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'gpio' field must be of type 'int'" + assert value >= 0 and value < 256, \ + "The 'gpio' field must be an unsigned integer in [0, 255]" + self._gpio = value + + @property + def reserve(self): + """Message field 'reserve'.""" + return self._reserve + + @reserve.setter + def reserve(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'reserve' field must be of type 'int'" + assert value >= 0 and value < 4294967296, \ + "The 'reserve' field must be an unsigned integer in [0, 4294967295]" + self._reserve = value + + @property + def crc(self): + """Message field 'crc'.""" + return self._crc + + @crc.setter + def crc(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'crc' field must be of type 'int'" + assert value >= 0 and value < 4294967296, \ + "The 'crc' field must be an unsigned integer in [0, 4294967295]" + self._crc = value diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_low_cmd_s.c b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_low_cmd_s.c new file mode 100644 index 0000000..d868365 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_low_cmd_s.c @@ -0,0 +1,535 @@ +// generated from rosidl_generator_py/resource/_idl_support.c.em +// with input from unitree_go:msg/LowCmd.idl +// generated code does not contain a copyright notice +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#include +#include +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-function" +#endif +#include "numpy/ndarrayobject.h" +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/detail/low_cmd__struct.h" +#include "unitree_go/msg/detail/low_cmd__functions.h" + +#include "rosidl_runtime_c/primitives_sequence.h" +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +// Nested array functions includes +#include "unitree_go/msg/detail/motor_cmd__functions.h" +// end nested array functions include +bool unitree_go__msg__motor_cmd__convert_from_py(PyObject * _pymsg, void * _ros_message); +PyObject * unitree_go__msg__motor_cmd__convert_to_py(void * raw_ros_message); +bool unitree_go__msg__bms_cmd__convert_from_py(PyObject * _pymsg, void * _ros_message); +PyObject * unitree_go__msg__bms_cmd__convert_to_py(void * raw_ros_message); + +ROSIDL_GENERATOR_C_EXPORT +bool unitree_go__msg__low_cmd__convert_from_py(PyObject * _pymsg, void * _ros_message) +{ + // check that the passed message is of the expected Python class + { + char full_classname_dest[31]; + { + char * class_name = NULL; + char * module_name = NULL; + { + PyObject * class_attr = PyObject_GetAttrString(_pymsg, "__class__"); + if (class_attr) { + PyObject * name_attr = PyObject_GetAttrString(class_attr, "__name__"); + if (name_attr) { + class_name = (char *)PyUnicode_1BYTE_DATA(name_attr); + Py_DECREF(name_attr); + } + PyObject * module_attr = PyObject_GetAttrString(class_attr, "__module__"); + if (module_attr) { + module_name = (char *)PyUnicode_1BYTE_DATA(module_attr); + Py_DECREF(module_attr); + } + Py_DECREF(class_attr); + } + } + if (!class_name || !module_name) { + return false; + } + snprintf(full_classname_dest, sizeof(full_classname_dest), "%s.%s", module_name, class_name); + } + assert(strncmp("unitree_go.msg._low_cmd.LowCmd", full_classname_dest, 30) == 0); + } + unitree_go__msg__LowCmd * ros_message = _ros_message; + { // head + PyObject * field = PyObject_GetAttrString(_pymsg, "head"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_UINT8); + Py_ssize_t size = 2; + uint8_t * dest = ros_message->head; + for (Py_ssize_t i = 0; i < size; ++i) { + uint8_t tmp = *(npy_uint8 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(uint8_t)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + { // level_flag + PyObject * field = PyObject_GetAttrString(_pymsg, "level_flag"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->level_flag = (uint8_t)PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // frame_reserve + PyObject * field = PyObject_GetAttrString(_pymsg, "frame_reserve"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->frame_reserve = (uint8_t)PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // sn + PyObject * field = PyObject_GetAttrString(_pymsg, "sn"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_UINT32); + Py_ssize_t size = 2; + uint32_t * dest = ros_message->sn; + for (Py_ssize_t i = 0; i < size; ++i) { + uint32_t tmp = *(npy_uint32 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(uint32_t)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + { // version + PyObject * field = PyObject_GetAttrString(_pymsg, "version"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_UINT32); + Py_ssize_t size = 2; + uint32_t * dest = ros_message->version; + for (Py_ssize_t i = 0; i < size; ++i) { + uint32_t tmp = *(npy_uint32 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(uint32_t)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + { // bandwidth + PyObject * field = PyObject_GetAttrString(_pymsg, "bandwidth"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->bandwidth = (uint16_t)PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // motor_cmd + PyObject * field = PyObject_GetAttrString(_pymsg, "motor_cmd"); + if (!field) { + return false; + } + PyObject * seq_field = PySequence_Fast(field, "expected a sequence in 'motor_cmd'"); + if (!seq_field) { + Py_DECREF(field); + return false; + } + Py_ssize_t size = 20; + unitree_go__msg__MotorCmd * dest = ros_message->motor_cmd; + for (Py_ssize_t i = 0; i < size; ++i) { + if (!unitree_go__msg__motor_cmd__convert_from_py(PySequence_Fast_GET_ITEM(seq_field, i), &dest[i])) { + Py_DECREF(seq_field); + Py_DECREF(field); + return false; + } + } + Py_DECREF(seq_field); + Py_DECREF(field); + } + { // bms_cmd + PyObject * field = PyObject_GetAttrString(_pymsg, "bms_cmd"); + if (!field) { + return false; + } + if (!unitree_go__msg__bms_cmd__convert_from_py(field, &ros_message->bms_cmd)) { + Py_DECREF(field); + return false; + } + Py_DECREF(field); + } + { // wireless_remote + PyObject * field = PyObject_GetAttrString(_pymsg, "wireless_remote"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_UINT8); + Py_ssize_t size = 40; + uint8_t * dest = ros_message->wireless_remote; + for (Py_ssize_t i = 0; i < size; ++i) { + uint8_t tmp = *(npy_uint8 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(uint8_t)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + { // led + PyObject * field = PyObject_GetAttrString(_pymsg, "led"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_UINT8); + Py_ssize_t size = 12; + uint8_t * dest = ros_message->led; + for (Py_ssize_t i = 0; i < size; ++i) { + uint8_t tmp = *(npy_uint8 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(uint8_t)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + { // fan + PyObject * field = PyObject_GetAttrString(_pymsg, "fan"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_UINT8); + Py_ssize_t size = 2; + uint8_t * dest = ros_message->fan; + for (Py_ssize_t i = 0; i < size; ++i) { + uint8_t tmp = *(npy_uint8 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(uint8_t)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + { // gpio + PyObject * field = PyObject_GetAttrString(_pymsg, "gpio"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->gpio = (uint8_t)PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // reserve + PyObject * field = PyObject_GetAttrString(_pymsg, "reserve"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->reserve = PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // crc + PyObject * field = PyObject_GetAttrString(_pymsg, "crc"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->crc = PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + + return true; +} + +ROSIDL_GENERATOR_C_EXPORT +PyObject * unitree_go__msg__low_cmd__convert_to_py(void * raw_ros_message) +{ + /* NOTE(esteve): Call constructor of LowCmd */ + PyObject * _pymessage = NULL; + { + PyObject * pymessage_module = PyImport_ImportModule("unitree_go.msg._low_cmd"); + assert(pymessage_module); + PyObject * pymessage_class = PyObject_GetAttrString(pymessage_module, "LowCmd"); + assert(pymessage_class); + Py_DECREF(pymessage_module); + _pymessage = PyObject_CallObject(pymessage_class, NULL); + Py_DECREF(pymessage_class); + if (!_pymessage) { + return NULL; + } + } + unitree_go__msg__LowCmd * ros_message = (unitree_go__msg__LowCmd *)raw_ros_message; + { // head + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "head"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_UINT8); + assert(sizeof(npy_uint8) == sizeof(uint8_t)); + npy_uint8 * dst = (npy_uint8 *)PyArray_GETPTR1(seq_field, 0); + uint8_t * src = &(ros_message->head[0]); + memcpy(dst, src, 2 * sizeof(uint8_t)); + Py_DECREF(field); + } + { // level_flag + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->level_flag); + { + int rc = PyObject_SetAttrString(_pymessage, "level_flag", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // frame_reserve + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->frame_reserve); + { + int rc = PyObject_SetAttrString(_pymessage, "frame_reserve", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // sn + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "sn"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_UINT32); + assert(sizeof(npy_uint32) == sizeof(uint32_t)); + npy_uint32 * dst = (npy_uint32 *)PyArray_GETPTR1(seq_field, 0); + uint32_t * src = &(ros_message->sn[0]); + memcpy(dst, src, 2 * sizeof(uint32_t)); + Py_DECREF(field); + } + { // version + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "version"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_UINT32); + assert(sizeof(npy_uint32) == sizeof(uint32_t)); + npy_uint32 * dst = (npy_uint32 *)PyArray_GETPTR1(seq_field, 0); + uint32_t * src = &(ros_message->version[0]); + memcpy(dst, src, 2 * sizeof(uint32_t)); + Py_DECREF(field); + } + { // bandwidth + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->bandwidth); + { + int rc = PyObject_SetAttrString(_pymessage, "bandwidth", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // motor_cmd + PyObject * field = NULL; + size_t size = 20; + field = PyList_New(size); + if (!field) { + return NULL; + } + unitree_go__msg__MotorCmd * item; + for (size_t i = 0; i < size; ++i) { + item = &(ros_message->motor_cmd[i]); + PyObject * pyitem = unitree_go__msg__motor_cmd__convert_to_py(item); + if (!pyitem) { + Py_DECREF(field); + return NULL; + } + int rc = PyList_SetItem(field, i, pyitem); + (void)rc; + assert(rc == 0); + } + assert(PySequence_Check(field)); + { + int rc = PyObject_SetAttrString(_pymessage, "motor_cmd", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // bms_cmd + PyObject * field = NULL; + field = unitree_go__msg__bms_cmd__convert_to_py(&ros_message->bms_cmd); + if (!field) { + return NULL; + } + { + int rc = PyObject_SetAttrString(_pymessage, "bms_cmd", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // wireless_remote + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "wireless_remote"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_UINT8); + assert(sizeof(npy_uint8) == sizeof(uint8_t)); + npy_uint8 * dst = (npy_uint8 *)PyArray_GETPTR1(seq_field, 0); + uint8_t * src = &(ros_message->wireless_remote[0]); + memcpy(dst, src, 40 * sizeof(uint8_t)); + Py_DECREF(field); + } + { // led + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "led"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_UINT8); + assert(sizeof(npy_uint8) == sizeof(uint8_t)); + npy_uint8 * dst = (npy_uint8 *)PyArray_GETPTR1(seq_field, 0); + uint8_t * src = &(ros_message->led[0]); + memcpy(dst, src, 12 * sizeof(uint8_t)); + Py_DECREF(field); + } + { // fan + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "fan"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_UINT8); + assert(sizeof(npy_uint8) == sizeof(uint8_t)); + npy_uint8 * dst = (npy_uint8 *)PyArray_GETPTR1(seq_field, 0); + uint8_t * src = &(ros_message->fan[0]); + memcpy(dst, src, 2 * sizeof(uint8_t)); + Py_DECREF(field); + } + { // gpio + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->gpio); + { + int rc = PyObject_SetAttrString(_pymessage, "gpio", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // reserve + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->reserve); + { + int rc = PyObject_SetAttrString(_pymessage, "reserve", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // crc + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->crc); + { + int rc = PyObject_SetAttrString(_pymessage, "crc", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + + // ownership of _pymessage is transferred to the caller + return _pymessage; +} diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_low_state.py b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_low_state.py new file mode 100644 index 0000000..6c02bc4 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_low_state.py @@ -0,0 +1,734 @@ +# generated from rosidl_generator_py/resource/_idl.py.em +# with input from unitree_go:msg/LowState.idl +# generated code does not contain a copyright notice + + +# Import statements for member types + +# Member 'head' +# Member 'sn' +# Member 'version' +# Member 'foot_force' +# Member 'foot_force_est' +# Member 'wireless_remote' +# Member 'fan_frequency' +import numpy # noqa: E402, I100 + +import rosidl_parser.definition # noqa: E402, I100 + + +class Metaclass_LowState(type): + """Metaclass of message 'LowState'.""" + + _CREATE_ROS_MESSAGE = None + _CONVERT_FROM_PY = None + _CONVERT_TO_PY = None + _DESTROY_ROS_MESSAGE = None + _TYPE_SUPPORT = None + + __constants = { + } + + @classmethod + def __import_type_support__(cls): + try: + from rosidl_generator_py import import_type_support + module = import_type_support('unitree_go') + except ImportError: + import logging + import traceback + logger = logging.getLogger( + 'unitree_go.msg.LowState') + logger.debug( + 'Failed to import needed modules for type support:\n' + + traceback.format_exc()) + else: + cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__msg__low_state + cls._CONVERT_FROM_PY = module.convert_from_py_msg__msg__low_state + cls._CONVERT_TO_PY = module.convert_to_py_msg__msg__low_state + cls._TYPE_SUPPORT = module.type_support_msg__msg__low_state + cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__msg__low_state + + from unitree_go.msg import BmsState + if BmsState.__class__._TYPE_SUPPORT is None: + BmsState.__class__.__import_type_support__() + + from unitree_go.msg import IMUState + if IMUState.__class__._TYPE_SUPPORT is None: + IMUState.__class__.__import_type_support__() + + from unitree_go.msg import MotorState + if MotorState.__class__._TYPE_SUPPORT is None: + MotorState.__class__.__import_type_support__() + + @classmethod + def __prepare__(cls, name, bases, **kwargs): + # list constant names here so that they appear in the help text of + # the message class under "Data and other attributes defined here:" + # as well as populate each message instance + return { + } + + +class LowState(metaclass=Metaclass_LowState): + """Message class 'LowState'.""" + + __slots__ = [ + '_head', + '_level_flag', + '_frame_reserve', + '_sn', + '_version', + '_bandwidth', + '_imu_state', + '_motor_state', + '_bms_state', + '_foot_force', + '_foot_force_est', + '_tick', + '_wireless_remote', + '_bit_flag', + '_adc_reel', + '_temperature_ntc1', + '_temperature_ntc2', + '_power_v', + '_power_a', + '_fan_frequency', + '_reserve', + '_crc', + ] + + _fields_and_field_types = { + 'head': 'uint8[2]', + 'level_flag': 'uint8', + 'frame_reserve': 'uint8', + 'sn': 'uint32[2]', + 'version': 'uint32[2]', + 'bandwidth': 'uint16', + 'imu_state': 'unitree_go/IMUState', + 'motor_state': 'unitree_go/MotorState[20]', + 'bms_state': 'unitree_go/BmsState', + 'foot_force': 'int16[4]', + 'foot_force_est': 'int16[4]', + 'tick': 'uint32', + 'wireless_remote': 'uint8[40]', + 'bit_flag': 'uint8', + 'adc_reel': 'float', + 'temperature_ntc1': 'int8', + 'temperature_ntc2': 'int8', + 'power_v': 'float', + 'power_a': 'float', + 'fan_frequency': 'uint16[4]', + 'reserve': 'uint32', + 'crc': 'uint32', + } + + SLOT_TYPES = ( + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('uint8'), 2), # noqa: E501 + rosidl_parser.definition.BasicType('uint8'), # noqa: E501 + rosidl_parser.definition.BasicType('uint8'), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('uint32'), 2), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('uint32'), 2), # noqa: E501 + rosidl_parser.definition.BasicType('uint16'), # noqa: E501 + rosidl_parser.definition.NamespacedType(['unitree_go', 'msg'], 'IMUState'), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.NamespacedType(['unitree_go', 'msg'], 'MotorState'), 20), # noqa: E501 + rosidl_parser.definition.NamespacedType(['unitree_go', 'msg'], 'BmsState'), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('int16'), 4), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('int16'), 4), # noqa: E501 + rosidl_parser.definition.BasicType('uint32'), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('uint8'), 40), # noqa: E501 + rosidl_parser.definition.BasicType('uint8'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('int8'), # noqa: E501 + rosidl_parser.definition.BasicType('int8'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('uint16'), 4), # noqa: E501 + rosidl_parser.definition.BasicType('uint32'), # noqa: E501 + rosidl_parser.definition.BasicType('uint32'), # noqa: E501 + ) + + def __init__(self, **kwargs): + assert all('_' + key in self.__slots__ for key in kwargs.keys()), \ + 'Invalid arguments passed to constructor: %s' % \ + ', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__)) + if 'head' not in kwargs: + self.head = numpy.zeros(2, dtype=numpy.uint8) + else: + self.head = numpy.array(kwargs.get('head'), dtype=numpy.uint8) + assert self.head.shape == (2, ) + self.level_flag = kwargs.get('level_flag', int()) + self.frame_reserve = kwargs.get('frame_reserve', int()) + if 'sn' not in kwargs: + self.sn = numpy.zeros(2, dtype=numpy.uint32) + else: + self.sn = numpy.array(kwargs.get('sn'), dtype=numpy.uint32) + assert self.sn.shape == (2, ) + if 'version' not in kwargs: + self.version = numpy.zeros(2, dtype=numpy.uint32) + else: + self.version = numpy.array(kwargs.get('version'), dtype=numpy.uint32) + assert self.version.shape == (2, ) + self.bandwidth = kwargs.get('bandwidth', int()) + from unitree_go.msg import IMUState + self.imu_state = kwargs.get('imu_state', IMUState()) + from unitree_go.msg import MotorState + self.motor_state = kwargs.get( + 'motor_state', + [MotorState() for x in range(20)] + ) + from unitree_go.msg import BmsState + self.bms_state = kwargs.get('bms_state', BmsState()) + if 'foot_force' not in kwargs: + self.foot_force = numpy.zeros(4, dtype=numpy.int16) + else: + self.foot_force = numpy.array(kwargs.get('foot_force'), dtype=numpy.int16) + assert self.foot_force.shape == (4, ) + if 'foot_force_est' not in kwargs: + self.foot_force_est = numpy.zeros(4, dtype=numpy.int16) + else: + self.foot_force_est = numpy.array(kwargs.get('foot_force_est'), dtype=numpy.int16) + assert self.foot_force_est.shape == (4, ) + self.tick = kwargs.get('tick', int()) + if 'wireless_remote' not in kwargs: + self.wireless_remote = numpy.zeros(40, dtype=numpy.uint8) + else: + self.wireless_remote = numpy.array(kwargs.get('wireless_remote'), dtype=numpy.uint8) + assert self.wireless_remote.shape == (40, ) + self.bit_flag = kwargs.get('bit_flag', int()) + self.adc_reel = kwargs.get('adc_reel', float()) + self.temperature_ntc1 = kwargs.get('temperature_ntc1', int()) + self.temperature_ntc2 = kwargs.get('temperature_ntc2', int()) + self.power_v = kwargs.get('power_v', float()) + self.power_a = kwargs.get('power_a', float()) + if 'fan_frequency' not in kwargs: + self.fan_frequency = numpy.zeros(4, dtype=numpy.uint16) + else: + self.fan_frequency = numpy.array(kwargs.get('fan_frequency'), dtype=numpy.uint16) + assert self.fan_frequency.shape == (4, ) + self.reserve = kwargs.get('reserve', int()) + self.crc = kwargs.get('crc', int()) + + def __repr__(self): + typename = self.__class__.__module__.split('.') + typename.pop() + typename.append(self.__class__.__name__) + args = [] + for s, t in zip(self.__slots__, self.SLOT_TYPES): + field = getattr(self, s) + fieldstr = repr(field) + # We use Python array type for fields that can be directly stored + # in them, and "normal" sequences for everything else. If it is + # a type that we store in an array, strip off the 'array' portion. + if ( + isinstance(t, rosidl_parser.definition.AbstractSequence) and + isinstance(t.value_type, rosidl_parser.definition.BasicType) and + t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64'] + ): + if len(field) == 0: + fieldstr = '[]' + else: + assert fieldstr.startswith('array(') + prefix = "array('X', " + suffix = ')' + fieldstr = fieldstr[len(prefix):-len(suffix)] + args.append(s[1:] + '=' + fieldstr) + return '%s(%s)' % ('.'.join(typename), ', '.join(args)) + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + if all(self.head != other.head): + return False + if self.level_flag != other.level_flag: + return False + if self.frame_reserve != other.frame_reserve: + return False + if all(self.sn != other.sn): + return False + if all(self.version != other.version): + return False + if self.bandwidth != other.bandwidth: + return False + if self.imu_state != other.imu_state: + return False + if self.motor_state != other.motor_state: + return False + if self.bms_state != other.bms_state: + return False + if all(self.foot_force != other.foot_force): + return False + if all(self.foot_force_est != other.foot_force_est): + return False + if self.tick != other.tick: + return False + if all(self.wireless_remote != other.wireless_remote): + return False + if self.bit_flag != other.bit_flag: + return False + if self.adc_reel != other.adc_reel: + return False + if self.temperature_ntc1 != other.temperature_ntc1: + return False + if self.temperature_ntc2 != other.temperature_ntc2: + return False + if self.power_v != other.power_v: + return False + if self.power_a != other.power_a: + return False + if all(self.fan_frequency != other.fan_frequency): + return False + if self.reserve != other.reserve: + return False + if self.crc != other.crc: + return False + return True + + @classmethod + def get_fields_and_field_types(cls): + from copy import copy + return copy(cls._fields_and_field_types) + + @property + def head(self): + """Message field 'head'.""" + return self._head + + @head.setter + def head(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.uint8, \ + "The 'head' numpy.ndarray() must have the dtype of 'numpy.uint8'" + assert value.size == 2, \ + "The 'head' numpy.ndarray() must have a size of 2" + self._head = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 2 and + all(isinstance(v, int) for v in value) and + all(val >= 0 and val < 256 for val in value)), \ + "The 'head' field must be a set or sequence with length 2 and each value of type 'int' and each unsigned integer in [0, 255]" + self._head = numpy.array(value, dtype=numpy.uint8) + + @property + def level_flag(self): + """Message field 'level_flag'.""" + return self._level_flag + + @level_flag.setter + def level_flag(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'level_flag' field must be of type 'int'" + assert value >= 0 and value < 256, \ + "The 'level_flag' field must be an unsigned integer in [0, 255]" + self._level_flag = value + + @property + def frame_reserve(self): + """Message field 'frame_reserve'.""" + return self._frame_reserve + + @frame_reserve.setter + def frame_reserve(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'frame_reserve' field must be of type 'int'" + assert value >= 0 and value < 256, \ + "The 'frame_reserve' field must be an unsigned integer in [0, 255]" + self._frame_reserve = value + + @property + def sn(self): + """Message field 'sn'.""" + return self._sn + + @sn.setter + def sn(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.uint32, \ + "The 'sn' numpy.ndarray() must have the dtype of 'numpy.uint32'" + assert value.size == 2, \ + "The 'sn' numpy.ndarray() must have a size of 2" + self._sn = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 2 and + all(isinstance(v, int) for v in value) and + all(val >= 0 and val < 4294967296 for val in value)), \ + "The 'sn' field must be a set or sequence with length 2 and each value of type 'int' and each unsigned integer in [0, 4294967295]" + self._sn = numpy.array(value, dtype=numpy.uint32) + + @property + def version(self): + """Message field 'version'.""" + return self._version + + @version.setter + def version(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.uint32, \ + "The 'version' numpy.ndarray() must have the dtype of 'numpy.uint32'" + assert value.size == 2, \ + "The 'version' numpy.ndarray() must have a size of 2" + self._version = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 2 and + all(isinstance(v, int) for v in value) and + all(val >= 0 and val < 4294967296 for val in value)), \ + "The 'version' field must be a set or sequence with length 2 and each value of type 'int' and each unsigned integer in [0, 4294967295]" + self._version = numpy.array(value, dtype=numpy.uint32) + + @property + def bandwidth(self): + """Message field 'bandwidth'.""" + return self._bandwidth + + @bandwidth.setter + def bandwidth(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'bandwidth' field must be of type 'int'" + assert value >= 0 and value < 65536, \ + "The 'bandwidth' field must be an unsigned integer in [0, 65535]" + self._bandwidth = value + + @property + def imu_state(self): + """Message field 'imu_state'.""" + return self._imu_state + + @imu_state.setter + def imu_state(self, value): + if __debug__: + from unitree_go.msg import IMUState + assert \ + isinstance(value, IMUState), \ + "The 'imu_state' field must be a sub message of type 'IMUState'" + self._imu_state = value + + @property + def motor_state(self): + """Message field 'motor_state'.""" + return self._motor_state + + @motor_state.setter + def motor_state(self, value): + if __debug__: + from unitree_go.msg import MotorState + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 20 and + all(isinstance(v, MotorState) for v in value) and + True), \ + "The 'motor_state' field must be a set or sequence with length 20 and each value of type 'MotorState'" + self._motor_state = value + + @property + def bms_state(self): + """Message field 'bms_state'.""" + return self._bms_state + + @bms_state.setter + def bms_state(self, value): + if __debug__: + from unitree_go.msg import BmsState + assert \ + isinstance(value, BmsState), \ + "The 'bms_state' field must be a sub message of type 'BmsState'" + self._bms_state = value + + @property + def foot_force(self): + """Message field 'foot_force'.""" + return self._foot_force + + @foot_force.setter + def foot_force(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.int16, \ + "The 'foot_force' numpy.ndarray() must have the dtype of 'numpy.int16'" + assert value.size == 4, \ + "The 'foot_force' numpy.ndarray() must have a size of 4" + self._foot_force = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 4 and + all(isinstance(v, int) for v in value) and + all(val >= -32768 and val < 32768 for val in value)), \ + "The 'foot_force' field must be a set or sequence with length 4 and each value of type 'int' and each integer in [-32768, 32767]" + self._foot_force = numpy.array(value, dtype=numpy.int16) + + @property + def foot_force_est(self): + """Message field 'foot_force_est'.""" + return self._foot_force_est + + @foot_force_est.setter + def foot_force_est(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.int16, \ + "The 'foot_force_est' numpy.ndarray() must have the dtype of 'numpy.int16'" + assert value.size == 4, \ + "The 'foot_force_est' numpy.ndarray() must have a size of 4" + self._foot_force_est = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 4 and + all(isinstance(v, int) for v in value) and + all(val >= -32768 and val < 32768 for val in value)), \ + "The 'foot_force_est' field must be a set or sequence with length 4 and each value of type 'int' and each integer in [-32768, 32767]" + self._foot_force_est = numpy.array(value, dtype=numpy.int16) + + @property + def tick(self): + """Message field 'tick'.""" + return self._tick + + @tick.setter + def tick(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'tick' field must be of type 'int'" + assert value >= 0 and value < 4294967296, \ + "The 'tick' field must be an unsigned integer in [0, 4294967295]" + self._tick = value + + @property + def wireless_remote(self): + """Message field 'wireless_remote'.""" + return self._wireless_remote + + @wireless_remote.setter + def wireless_remote(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.uint8, \ + "The 'wireless_remote' numpy.ndarray() must have the dtype of 'numpy.uint8'" + assert value.size == 40, \ + "The 'wireless_remote' numpy.ndarray() must have a size of 40" + self._wireless_remote = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 40 and + all(isinstance(v, int) for v in value) and + all(val >= 0 and val < 256 for val in value)), \ + "The 'wireless_remote' field must be a set or sequence with length 40 and each value of type 'int' and each unsigned integer in [0, 255]" + self._wireless_remote = numpy.array(value, dtype=numpy.uint8) + + @property + def bit_flag(self): + """Message field 'bit_flag'.""" + return self._bit_flag + + @bit_flag.setter + def bit_flag(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'bit_flag' field must be of type 'int'" + assert value >= 0 and value < 256, \ + "The 'bit_flag' field must be an unsigned integer in [0, 255]" + self._bit_flag = value + + @property + def adc_reel(self): + """Message field 'adc_reel'.""" + return self._adc_reel + + @adc_reel.setter + def adc_reel(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'adc_reel' field must be of type 'float'" + self._adc_reel = value + + @property + def temperature_ntc1(self): + """Message field 'temperature_ntc1'.""" + return self._temperature_ntc1 + + @temperature_ntc1.setter + def temperature_ntc1(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'temperature_ntc1' field must be of type 'int'" + assert value >= -128 and value < 128, \ + "The 'temperature_ntc1' field must be an integer in [-128, 127]" + self._temperature_ntc1 = value + + @property + def temperature_ntc2(self): + """Message field 'temperature_ntc2'.""" + return self._temperature_ntc2 + + @temperature_ntc2.setter + def temperature_ntc2(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'temperature_ntc2' field must be of type 'int'" + assert value >= -128 and value < 128, \ + "The 'temperature_ntc2' field must be an integer in [-128, 127]" + self._temperature_ntc2 = value + + @property + def power_v(self): + """Message field 'power_v'.""" + return self._power_v + + @power_v.setter + def power_v(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'power_v' field must be of type 'float'" + self._power_v = value + + @property + def power_a(self): + """Message field 'power_a'.""" + return self._power_a + + @power_a.setter + def power_a(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'power_a' field must be of type 'float'" + self._power_a = value + + @property + def fan_frequency(self): + """Message field 'fan_frequency'.""" + return self._fan_frequency + + @fan_frequency.setter + def fan_frequency(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.uint16, \ + "The 'fan_frequency' numpy.ndarray() must have the dtype of 'numpy.uint16'" + assert value.size == 4, \ + "The 'fan_frequency' numpy.ndarray() must have a size of 4" + self._fan_frequency = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 4 and + all(isinstance(v, int) for v in value) and + all(val >= 0 and val < 65536 for val in value)), \ + "The 'fan_frequency' field must be a set or sequence with length 4 and each value of type 'int' and each unsigned integer in [0, 65535]" + self._fan_frequency = numpy.array(value, dtype=numpy.uint16) + + @property + def reserve(self): + """Message field 'reserve'.""" + return self._reserve + + @reserve.setter + def reserve(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'reserve' field must be of type 'int'" + assert value >= 0 and value < 4294967296, \ + "The 'reserve' field must be an unsigned integer in [0, 4294967295]" + self._reserve = value + + @property + def crc(self): + """Message field 'crc'.""" + return self._crc + + @crc.setter + def crc(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'crc' field must be of type 'int'" + assert value >= 0 and value < 4294967296, \ + "The 'crc' field must be an unsigned integer in [0, 4294967295]" + self._crc = value diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_low_state_s.c b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_low_state_s.c new file mode 100644 index 0000000..ad3c234 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_low_state_s.c @@ -0,0 +1,724 @@ +// generated from rosidl_generator_py/resource/_idl_support.c.em +// with input from unitree_go:msg/LowState.idl +// generated code does not contain a copyright notice +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#include +#include +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-function" +#endif +#include "numpy/ndarrayobject.h" +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/detail/low_state__struct.h" +#include "unitree_go/msg/detail/low_state__functions.h" + +#include "rosidl_runtime_c/primitives_sequence.h" +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +// Nested array functions includes +#include "unitree_go/msg/detail/motor_state__functions.h" +// end nested array functions include +bool unitree_go__msg__imu_state__convert_from_py(PyObject * _pymsg, void * _ros_message); +PyObject * unitree_go__msg__imu_state__convert_to_py(void * raw_ros_message); +bool unitree_go__msg__motor_state__convert_from_py(PyObject * _pymsg, void * _ros_message); +PyObject * unitree_go__msg__motor_state__convert_to_py(void * raw_ros_message); +bool unitree_go__msg__bms_state__convert_from_py(PyObject * _pymsg, void * _ros_message); +PyObject * unitree_go__msg__bms_state__convert_to_py(void * raw_ros_message); + +ROSIDL_GENERATOR_C_EXPORT +bool unitree_go__msg__low_state__convert_from_py(PyObject * _pymsg, void * _ros_message) +{ + // check that the passed message is of the expected Python class + { + char full_classname_dest[35]; + { + char * class_name = NULL; + char * module_name = NULL; + { + PyObject * class_attr = PyObject_GetAttrString(_pymsg, "__class__"); + if (class_attr) { + PyObject * name_attr = PyObject_GetAttrString(class_attr, "__name__"); + if (name_attr) { + class_name = (char *)PyUnicode_1BYTE_DATA(name_attr); + Py_DECREF(name_attr); + } + PyObject * module_attr = PyObject_GetAttrString(class_attr, "__module__"); + if (module_attr) { + module_name = (char *)PyUnicode_1BYTE_DATA(module_attr); + Py_DECREF(module_attr); + } + Py_DECREF(class_attr); + } + } + if (!class_name || !module_name) { + return false; + } + snprintf(full_classname_dest, sizeof(full_classname_dest), "%s.%s", module_name, class_name); + } + assert(strncmp("unitree_go.msg._low_state.LowState", full_classname_dest, 34) == 0); + } + unitree_go__msg__LowState * ros_message = _ros_message; + { // head + PyObject * field = PyObject_GetAttrString(_pymsg, "head"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_UINT8); + Py_ssize_t size = 2; + uint8_t * dest = ros_message->head; + for (Py_ssize_t i = 0; i < size; ++i) { + uint8_t tmp = *(npy_uint8 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(uint8_t)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + { // level_flag + PyObject * field = PyObject_GetAttrString(_pymsg, "level_flag"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->level_flag = (uint8_t)PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // frame_reserve + PyObject * field = PyObject_GetAttrString(_pymsg, "frame_reserve"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->frame_reserve = (uint8_t)PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // sn + PyObject * field = PyObject_GetAttrString(_pymsg, "sn"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_UINT32); + Py_ssize_t size = 2; + uint32_t * dest = ros_message->sn; + for (Py_ssize_t i = 0; i < size; ++i) { + uint32_t tmp = *(npy_uint32 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(uint32_t)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + { // version + PyObject * field = PyObject_GetAttrString(_pymsg, "version"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_UINT32); + Py_ssize_t size = 2; + uint32_t * dest = ros_message->version; + for (Py_ssize_t i = 0; i < size; ++i) { + uint32_t tmp = *(npy_uint32 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(uint32_t)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + { // bandwidth + PyObject * field = PyObject_GetAttrString(_pymsg, "bandwidth"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->bandwidth = (uint16_t)PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // imu_state + PyObject * field = PyObject_GetAttrString(_pymsg, "imu_state"); + if (!field) { + return false; + } + if (!unitree_go__msg__imu_state__convert_from_py(field, &ros_message->imu_state)) { + Py_DECREF(field); + return false; + } + Py_DECREF(field); + } + { // motor_state + PyObject * field = PyObject_GetAttrString(_pymsg, "motor_state"); + if (!field) { + return false; + } + PyObject * seq_field = PySequence_Fast(field, "expected a sequence in 'motor_state'"); + if (!seq_field) { + Py_DECREF(field); + return false; + } + Py_ssize_t size = 20; + unitree_go__msg__MotorState * dest = ros_message->motor_state; + for (Py_ssize_t i = 0; i < size; ++i) { + if (!unitree_go__msg__motor_state__convert_from_py(PySequence_Fast_GET_ITEM(seq_field, i), &dest[i])) { + Py_DECREF(seq_field); + Py_DECREF(field); + return false; + } + } + Py_DECREF(seq_field); + Py_DECREF(field); + } + { // bms_state + PyObject * field = PyObject_GetAttrString(_pymsg, "bms_state"); + if (!field) { + return false; + } + if (!unitree_go__msg__bms_state__convert_from_py(field, &ros_message->bms_state)) { + Py_DECREF(field); + return false; + } + Py_DECREF(field); + } + { // foot_force + PyObject * field = PyObject_GetAttrString(_pymsg, "foot_force"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_INT16); + Py_ssize_t size = 4; + int16_t * dest = ros_message->foot_force; + for (Py_ssize_t i = 0; i < size; ++i) { + int16_t tmp = *(npy_int16 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(int16_t)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + { // foot_force_est + PyObject * field = PyObject_GetAttrString(_pymsg, "foot_force_est"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_INT16); + Py_ssize_t size = 4; + int16_t * dest = ros_message->foot_force_est; + for (Py_ssize_t i = 0; i < size; ++i) { + int16_t tmp = *(npy_int16 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(int16_t)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + { // tick + PyObject * field = PyObject_GetAttrString(_pymsg, "tick"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->tick = PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // wireless_remote + PyObject * field = PyObject_GetAttrString(_pymsg, "wireless_remote"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_UINT8); + Py_ssize_t size = 40; + uint8_t * dest = ros_message->wireless_remote; + for (Py_ssize_t i = 0; i < size; ++i) { + uint8_t tmp = *(npy_uint8 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(uint8_t)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + { // bit_flag + PyObject * field = PyObject_GetAttrString(_pymsg, "bit_flag"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->bit_flag = (uint8_t)PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // adc_reel + PyObject * field = PyObject_GetAttrString(_pymsg, "adc_reel"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->adc_reel = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // temperature_ntc1 + PyObject * field = PyObject_GetAttrString(_pymsg, "temperature_ntc1"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->temperature_ntc1 = (int8_t)PyLong_AsLong(field); + Py_DECREF(field); + } + { // temperature_ntc2 + PyObject * field = PyObject_GetAttrString(_pymsg, "temperature_ntc2"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->temperature_ntc2 = (int8_t)PyLong_AsLong(field); + Py_DECREF(field); + } + { // power_v + PyObject * field = PyObject_GetAttrString(_pymsg, "power_v"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->power_v = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // power_a + PyObject * field = PyObject_GetAttrString(_pymsg, "power_a"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->power_a = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // fan_frequency + PyObject * field = PyObject_GetAttrString(_pymsg, "fan_frequency"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_UINT16); + Py_ssize_t size = 4; + uint16_t * dest = ros_message->fan_frequency; + for (Py_ssize_t i = 0; i < size; ++i) { + uint16_t tmp = *(npy_uint16 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(uint16_t)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + { // reserve + PyObject * field = PyObject_GetAttrString(_pymsg, "reserve"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->reserve = PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // crc + PyObject * field = PyObject_GetAttrString(_pymsg, "crc"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->crc = PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + + return true; +} + +ROSIDL_GENERATOR_C_EXPORT +PyObject * unitree_go__msg__low_state__convert_to_py(void * raw_ros_message) +{ + /* NOTE(esteve): Call constructor of LowState */ + PyObject * _pymessage = NULL; + { + PyObject * pymessage_module = PyImport_ImportModule("unitree_go.msg._low_state"); + assert(pymessage_module); + PyObject * pymessage_class = PyObject_GetAttrString(pymessage_module, "LowState"); + assert(pymessage_class); + Py_DECREF(pymessage_module); + _pymessage = PyObject_CallObject(pymessage_class, NULL); + Py_DECREF(pymessage_class); + if (!_pymessage) { + return NULL; + } + } + unitree_go__msg__LowState * ros_message = (unitree_go__msg__LowState *)raw_ros_message; + { // head + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "head"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_UINT8); + assert(sizeof(npy_uint8) == sizeof(uint8_t)); + npy_uint8 * dst = (npy_uint8 *)PyArray_GETPTR1(seq_field, 0); + uint8_t * src = &(ros_message->head[0]); + memcpy(dst, src, 2 * sizeof(uint8_t)); + Py_DECREF(field); + } + { // level_flag + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->level_flag); + { + int rc = PyObject_SetAttrString(_pymessage, "level_flag", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // frame_reserve + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->frame_reserve); + { + int rc = PyObject_SetAttrString(_pymessage, "frame_reserve", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // sn + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "sn"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_UINT32); + assert(sizeof(npy_uint32) == sizeof(uint32_t)); + npy_uint32 * dst = (npy_uint32 *)PyArray_GETPTR1(seq_field, 0); + uint32_t * src = &(ros_message->sn[0]); + memcpy(dst, src, 2 * sizeof(uint32_t)); + Py_DECREF(field); + } + { // version + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "version"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_UINT32); + assert(sizeof(npy_uint32) == sizeof(uint32_t)); + npy_uint32 * dst = (npy_uint32 *)PyArray_GETPTR1(seq_field, 0); + uint32_t * src = &(ros_message->version[0]); + memcpy(dst, src, 2 * sizeof(uint32_t)); + Py_DECREF(field); + } + { // bandwidth + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->bandwidth); + { + int rc = PyObject_SetAttrString(_pymessage, "bandwidth", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // imu_state + PyObject * field = NULL; + field = unitree_go__msg__imu_state__convert_to_py(&ros_message->imu_state); + if (!field) { + return NULL; + } + { + int rc = PyObject_SetAttrString(_pymessage, "imu_state", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // motor_state + PyObject * field = NULL; + size_t size = 20; + field = PyList_New(size); + if (!field) { + return NULL; + } + unitree_go__msg__MotorState * item; + for (size_t i = 0; i < size; ++i) { + item = &(ros_message->motor_state[i]); + PyObject * pyitem = unitree_go__msg__motor_state__convert_to_py(item); + if (!pyitem) { + Py_DECREF(field); + return NULL; + } + int rc = PyList_SetItem(field, i, pyitem); + (void)rc; + assert(rc == 0); + } + assert(PySequence_Check(field)); + { + int rc = PyObject_SetAttrString(_pymessage, "motor_state", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // bms_state + PyObject * field = NULL; + field = unitree_go__msg__bms_state__convert_to_py(&ros_message->bms_state); + if (!field) { + return NULL; + } + { + int rc = PyObject_SetAttrString(_pymessage, "bms_state", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // foot_force + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "foot_force"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_INT16); + assert(sizeof(npy_int16) == sizeof(int16_t)); + npy_int16 * dst = (npy_int16 *)PyArray_GETPTR1(seq_field, 0); + int16_t * src = &(ros_message->foot_force[0]); + memcpy(dst, src, 4 * sizeof(int16_t)); + Py_DECREF(field); + } + { // foot_force_est + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "foot_force_est"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_INT16); + assert(sizeof(npy_int16) == sizeof(int16_t)); + npy_int16 * dst = (npy_int16 *)PyArray_GETPTR1(seq_field, 0); + int16_t * src = &(ros_message->foot_force_est[0]); + memcpy(dst, src, 4 * sizeof(int16_t)); + Py_DECREF(field); + } + { // tick + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->tick); + { + int rc = PyObject_SetAttrString(_pymessage, "tick", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // wireless_remote + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "wireless_remote"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_UINT8); + assert(sizeof(npy_uint8) == sizeof(uint8_t)); + npy_uint8 * dst = (npy_uint8 *)PyArray_GETPTR1(seq_field, 0); + uint8_t * src = &(ros_message->wireless_remote[0]); + memcpy(dst, src, 40 * sizeof(uint8_t)); + Py_DECREF(field); + } + { // bit_flag + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->bit_flag); + { + int rc = PyObject_SetAttrString(_pymessage, "bit_flag", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // adc_reel + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->adc_reel); + { + int rc = PyObject_SetAttrString(_pymessage, "adc_reel", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // temperature_ntc1 + PyObject * field = NULL; + field = PyLong_FromLong(ros_message->temperature_ntc1); + { + int rc = PyObject_SetAttrString(_pymessage, "temperature_ntc1", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // temperature_ntc2 + PyObject * field = NULL; + field = PyLong_FromLong(ros_message->temperature_ntc2); + { + int rc = PyObject_SetAttrString(_pymessage, "temperature_ntc2", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // power_v + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->power_v); + { + int rc = PyObject_SetAttrString(_pymessage, "power_v", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // power_a + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->power_a); + { + int rc = PyObject_SetAttrString(_pymessage, "power_a", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // fan_frequency + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "fan_frequency"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_UINT16); + assert(sizeof(npy_uint16) == sizeof(uint16_t)); + npy_uint16 * dst = (npy_uint16 *)PyArray_GETPTR1(seq_field, 0); + uint16_t * src = &(ros_message->fan_frequency[0]); + memcpy(dst, src, 4 * sizeof(uint16_t)); + Py_DECREF(field); + } + { // reserve + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->reserve); + { + int rc = PyObject_SetAttrString(_pymessage, "reserve", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // crc + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->crc); + { + int rc = PyObject_SetAttrString(_pymessage, "crc", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + + // ownership of _pymessage is transferred to the caller + return _pymessage; +} diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_motor_cmd.py b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_motor_cmd.py new file mode 100644 index 0000000..f580bd6 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_motor_cmd.py @@ -0,0 +1,263 @@ +# generated from rosidl_generator_py/resource/_idl.py.em +# with input from unitree_go:msg/MotorCmd.idl +# generated code does not contain a copyright notice + + +# Import statements for member types + +# Member 'reserve' +import numpy # noqa: E402, I100 + +import rosidl_parser.definition # noqa: E402, I100 + + +class Metaclass_MotorCmd(type): + """Metaclass of message 'MotorCmd'.""" + + _CREATE_ROS_MESSAGE = None + _CONVERT_FROM_PY = None + _CONVERT_TO_PY = None + _DESTROY_ROS_MESSAGE = None + _TYPE_SUPPORT = None + + __constants = { + } + + @classmethod + def __import_type_support__(cls): + try: + from rosidl_generator_py import import_type_support + module = import_type_support('unitree_go') + except ImportError: + import logging + import traceback + logger = logging.getLogger( + 'unitree_go.msg.MotorCmd') + logger.debug( + 'Failed to import needed modules for type support:\n' + + traceback.format_exc()) + else: + cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__msg__motor_cmd + cls._CONVERT_FROM_PY = module.convert_from_py_msg__msg__motor_cmd + cls._CONVERT_TO_PY = module.convert_to_py_msg__msg__motor_cmd + cls._TYPE_SUPPORT = module.type_support_msg__msg__motor_cmd + cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__msg__motor_cmd + + @classmethod + def __prepare__(cls, name, bases, **kwargs): + # list constant names here so that they appear in the help text of + # the message class under "Data and other attributes defined here:" + # as well as populate each message instance + return { + } + + +class MotorCmd(metaclass=Metaclass_MotorCmd): + """Message class 'MotorCmd'.""" + + __slots__ = [ + '_mode', + '_q', + '_dq', + '_tau', + '_kp', + '_kd', + '_reserve', + ] + + _fields_and_field_types = { + 'mode': 'uint8', + 'q': 'float', + 'dq': 'float', + 'tau': 'float', + 'kp': 'float', + 'kd': 'float', + 'reserve': 'uint32[3]', + } + + SLOT_TYPES = ( + rosidl_parser.definition.BasicType('uint8'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('uint32'), 3), # noqa: E501 + ) + + def __init__(self, **kwargs): + assert all('_' + key in self.__slots__ for key in kwargs.keys()), \ + 'Invalid arguments passed to constructor: %s' % \ + ', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__)) + self.mode = kwargs.get('mode', int()) + self.q = kwargs.get('q', float()) + self.dq = kwargs.get('dq', float()) + self.tau = kwargs.get('tau', float()) + self.kp = kwargs.get('kp', float()) + self.kd = kwargs.get('kd', float()) + if 'reserve' not in kwargs: + self.reserve = numpy.zeros(3, dtype=numpy.uint32) + else: + self.reserve = numpy.array(kwargs.get('reserve'), dtype=numpy.uint32) + assert self.reserve.shape == (3, ) + + def __repr__(self): + typename = self.__class__.__module__.split('.') + typename.pop() + typename.append(self.__class__.__name__) + args = [] + for s, t in zip(self.__slots__, self.SLOT_TYPES): + field = getattr(self, s) + fieldstr = repr(field) + # We use Python array type for fields that can be directly stored + # in them, and "normal" sequences for everything else. If it is + # a type that we store in an array, strip off the 'array' portion. + if ( + isinstance(t, rosidl_parser.definition.AbstractSequence) and + isinstance(t.value_type, rosidl_parser.definition.BasicType) and + t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64'] + ): + if len(field) == 0: + fieldstr = '[]' + else: + assert fieldstr.startswith('array(') + prefix = "array('X', " + suffix = ')' + fieldstr = fieldstr[len(prefix):-len(suffix)] + args.append(s[1:] + '=' + fieldstr) + return '%s(%s)' % ('.'.join(typename), ', '.join(args)) + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + if self.mode != other.mode: + return False + if self.q != other.q: + return False + if self.dq != other.dq: + return False + if self.tau != other.tau: + return False + if self.kp != other.kp: + return False + if self.kd != other.kd: + return False + if all(self.reserve != other.reserve): + return False + return True + + @classmethod + def get_fields_and_field_types(cls): + from copy import copy + return copy(cls._fields_and_field_types) + + @property + def mode(self): + """Message field 'mode'.""" + return self._mode + + @mode.setter + def mode(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'mode' field must be of type 'int'" + assert value >= 0 and value < 256, \ + "The 'mode' field must be an unsigned integer in [0, 255]" + self._mode = value + + @property + def q(self): + """Message field 'q'.""" + return self._q + + @q.setter + def q(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'q' field must be of type 'float'" + self._q = value + + @property + def dq(self): + """Message field 'dq'.""" + return self._dq + + @dq.setter + def dq(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'dq' field must be of type 'float'" + self._dq = value + + @property + def tau(self): + """Message field 'tau'.""" + return self._tau + + @tau.setter + def tau(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'tau' field must be of type 'float'" + self._tau = value + + @property + def kp(self): + """Message field 'kp'.""" + return self._kp + + @kp.setter + def kp(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'kp' field must be of type 'float'" + self._kp = value + + @property + def kd(self): + """Message field 'kd'.""" + return self._kd + + @kd.setter + def kd(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'kd' field must be of type 'float'" + self._kd = value + + @property + def reserve(self): + """Message field 'reserve'.""" + return self._reserve + + @reserve.setter + def reserve(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.uint32, \ + "The 'reserve' numpy.ndarray() must have the dtype of 'numpy.uint32'" + assert value.size == 3, \ + "The 'reserve' numpy.ndarray() must have a size of 3" + self._reserve = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 3 and + all(isinstance(v, int) for v in value) and + all(val >= 0 and val < 4294967296 for val in value)), \ + "The 'reserve' field must be a set or sequence with length 3 and each value of type 'int' and each unsigned integer in [0, 4294967295]" + self._reserve = numpy.array(value, dtype=numpy.uint32) diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_motor_cmd_s.c b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_motor_cmd_s.c new file mode 100644 index 0000000..64fa078 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_motor_cmd_s.c @@ -0,0 +1,243 @@ +// generated from rosidl_generator_py/resource/_idl_support.c.em +// with input from unitree_go:msg/MotorCmd.idl +// generated code does not contain a copyright notice +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#include +#include +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-function" +#endif +#include "numpy/ndarrayobject.h" +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/detail/motor_cmd__struct.h" +#include "unitree_go/msg/detail/motor_cmd__functions.h" + +#include "rosidl_runtime_c/primitives_sequence.h" +#include "rosidl_runtime_c/primitives_sequence_functions.h" + + +ROSIDL_GENERATOR_C_EXPORT +bool unitree_go__msg__motor_cmd__convert_from_py(PyObject * _pymsg, void * _ros_message) +{ + // check that the passed message is of the expected Python class + { + char full_classname_dest[35]; + { + char * class_name = NULL; + char * module_name = NULL; + { + PyObject * class_attr = PyObject_GetAttrString(_pymsg, "__class__"); + if (class_attr) { + PyObject * name_attr = PyObject_GetAttrString(class_attr, "__name__"); + if (name_attr) { + class_name = (char *)PyUnicode_1BYTE_DATA(name_attr); + Py_DECREF(name_attr); + } + PyObject * module_attr = PyObject_GetAttrString(class_attr, "__module__"); + if (module_attr) { + module_name = (char *)PyUnicode_1BYTE_DATA(module_attr); + Py_DECREF(module_attr); + } + Py_DECREF(class_attr); + } + } + if (!class_name || !module_name) { + return false; + } + snprintf(full_classname_dest, sizeof(full_classname_dest), "%s.%s", module_name, class_name); + } + assert(strncmp("unitree_go.msg._motor_cmd.MotorCmd", full_classname_dest, 34) == 0); + } + unitree_go__msg__MotorCmd * ros_message = _ros_message; + { // mode + PyObject * field = PyObject_GetAttrString(_pymsg, "mode"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->mode = (uint8_t)PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // q + PyObject * field = PyObject_GetAttrString(_pymsg, "q"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->q = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // dq + PyObject * field = PyObject_GetAttrString(_pymsg, "dq"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->dq = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // tau + PyObject * field = PyObject_GetAttrString(_pymsg, "tau"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->tau = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // kp + PyObject * field = PyObject_GetAttrString(_pymsg, "kp"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->kp = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // kd + PyObject * field = PyObject_GetAttrString(_pymsg, "kd"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->kd = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // reserve + PyObject * field = PyObject_GetAttrString(_pymsg, "reserve"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_UINT32); + Py_ssize_t size = 3; + uint32_t * dest = ros_message->reserve; + for (Py_ssize_t i = 0; i < size; ++i) { + uint32_t tmp = *(npy_uint32 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(uint32_t)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + + return true; +} + +ROSIDL_GENERATOR_C_EXPORT +PyObject * unitree_go__msg__motor_cmd__convert_to_py(void * raw_ros_message) +{ + /* NOTE(esteve): Call constructor of MotorCmd */ + PyObject * _pymessage = NULL; + { + PyObject * pymessage_module = PyImport_ImportModule("unitree_go.msg._motor_cmd"); + assert(pymessage_module); + PyObject * pymessage_class = PyObject_GetAttrString(pymessage_module, "MotorCmd"); + assert(pymessage_class); + Py_DECREF(pymessage_module); + _pymessage = PyObject_CallObject(pymessage_class, NULL); + Py_DECREF(pymessage_class); + if (!_pymessage) { + return NULL; + } + } + unitree_go__msg__MotorCmd * ros_message = (unitree_go__msg__MotorCmd *)raw_ros_message; + { // mode + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->mode); + { + int rc = PyObject_SetAttrString(_pymessage, "mode", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // q + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->q); + { + int rc = PyObject_SetAttrString(_pymessage, "q", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // dq + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->dq); + { + int rc = PyObject_SetAttrString(_pymessage, "dq", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // tau + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->tau); + { + int rc = PyObject_SetAttrString(_pymessage, "tau", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // kp + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->kp); + { + int rc = PyObject_SetAttrString(_pymessage, "kp", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // kd + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->kd); + { + int rc = PyObject_SetAttrString(_pymessage, "kd", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // reserve + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "reserve"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_UINT32); + assert(sizeof(npy_uint32) == sizeof(uint32_t)); + npy_uint32 * dst = (npy_uint32 *)PyArray_GETPTR1(seq_field, 0); + uint32_t * src = &(ros_message->reserve[0]); + memcpy(dst, src, 3 * sizeof(uint32_t)); + Py_DECREF(field); + } + + // ownership of _pymessage is transferred to the caller + return _pymessage; +} diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_motor_state.py b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_motor_state.py new file mode 100644 index 0000000..739e8f0 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_motor_state.py @@ -0,0 +1,343 @@ +# generated from rosidl_generator_py/resource/_idl.py.em +# with input from unitree_go:msg/MotorState.idl +# generated code does not contain a copyright notice + + +# Import statements for member types + +# Member 'reserve' +import numpy # noqa: E402, I100 + +import rosidl_parser.definition # noqa: E402, I100 + + +class Metaclass_MotorState(type): + """Metaclass of message 'MotorState'.""" + + _CREATE_ROS_MESSAGE = None + _CONVERT_FROM_PY = None + _CONVERT_TO_PY = None + _DESTROY_ROS_MESSAGE = None + _TYPE_SUPPORT = None + + __constants = { + } + + @classmethod + def __import_type_support__(cls): + try: + from rosidl_generator_py import import_type_support + module = import_type_support('unitree_go') + except ImportError: + import logging + import traceback + logger = logging.getLogger( + 'unitree_go.msg.MotorState') + logger.debug( + 'Failed to import needed modules for type support:\n' + + traceback.format_exc()) + else: + cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__msg__motor_state + cls._CONVERT_FROM_PY = module.convert_from_py_msg__msg__motor_state + cls._CONVERT_TO_PY = module.convert_to_py_msg__msg__motor_state + cls._TYPE_SUPPORT = module.type_support_msg__msg__motor_state + cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__msg__motor_state + + @classmethod + def __prepare__(cls, name, bases, **kwargs): + # list constant names here so that they appear in the help text of + # the message class under "Data and other attributes defined here:" + # as well as populate each message instance + return { + } + + +class MotorState(metaclass=Metaclass_MotorState): + """Message class 'MotorState'.""" + + __slots__ = [ + '_mode', + '_q', + '_dq', + '_ddq', + '_tau_est', + '_q_raw', + '_dq_raw', + '_ddq_raw', + '_temperature', + '_lost', + '_reserve', + ] + + _fields_and_field_types = { + 'mode': 'uint8', + 'q': 'float', + 'dq': 'float', + 'ddq': 'float', + 'tau_est': 'float', + 'q_raw': 'float', + 'dq_raw': 'float', + 'ddq_raw': 'float', + 'temperature': 'int8', + 'lost': 'uint32', + 'reserve': 'uint32[2]', + } + + SLOT_TYPES = ( + rosidl_parser.definition.BasicType('uint8'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('int8'), # noqa: E501 + rosidl_parser.definition.BasicType('uint32'), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('uint32'), 2), # noqa: E501 + ) + + def __init__(self, **kwargs): + assert all('_' + key in self.__slots__ for key in kwargs.keys()), \ + 'Invalid arguments passed to constructor: %s' % \ + ', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__)) + self.mode = kwargs.get('mode', int()) + self.q = kwargs.get('q', float()) + self.dq = kwargs.get('dq', float()) + self.ddq = kwargs.get('ddq', float()) + self.tau_est = kwargs.get('tau_est', float()) + self.q_raw = kwargs.get('q_raw', float()) + self.dq_raw = kwargs.get('dq_raw', float()) + self.ddq_raw = kwargs.get('ddq_raw', float()) + self.temperature = kwargs.get('temperature', int()) + self.lost = kwargs.get('lost', int()) + if 'reserve' not in kwargs: + self.reserve = numpy.zeros(2, dtype=numpy.uint32) + else: + self.reserve = numpy.array(kwargs.get('reserve'), dtype=numpy.uint32) + assert self.reserve.shape == (2, ) + + def __repr__(self): + typename = self.__class__.__module__.split('.') + typename.pop() + typename.append(self.__class__.__name__) + args = [] + for s, t in zip(self.__slots__, self.SLOT_TYPES): + field = getattr(self, s) + fieldstr = repr(field) + # We use Python array type for fields that can be directly stored + # in them, and "normal" sequences for everything else. If it is + # a type that we store in an array, strip off the 'array' portion. + if ( + isinstance(t, rosidl_parser.definition.AbstractSequence) and + isinstance(t.value_type, rosidl_parser.definition.BasicType) and + t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64'] + ): + if len(field) == 0: + fieldstr = '[]' + else: + assert fieldstr.startswith('array(') + prefix = "array('X', " + suffix = ')' + fieldstr = fieldstr[len(prefix):-len(suffix)] + args.append(s[1:] + '=' + fieldstr) + return '%s(%s)' % ('.'.join(typename), ', '.join(args)) + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + if self.mode != other.mode: + return False + if self.q != other.q: + return False + if self.dq != other.dq: + return False + if self.ddq != other.ddq: + return False + if self.tau_est != other.tau_est: + return False + if self.q_raw != other.q_raw: + return False + if self.dq_raw != other.dq_raw: + return False + if self.ddq_raw != other.ddq_raw: + return False + if self.temperature != other.temperature: + return False + if self.lost != other.lost: + return False + if all(self.reserve != other.reserve): + return False + return True + + @classmethod + def get_fields_and_field_types(cls): + from copy import copy + return copy(cls._fields_and_field_types) + + @property + def mode(self): + """Message field 'mode'.""" + return self._mode + + @mode.setter + def mode(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'mode' field must be of type 'int'" + assert value >= 0 and value < 256, \ + "The 'mode' field must be an unsigned integer in [0, 255]" + self._mode = value + + @property + def q(self): + """Message field 'q'.""" + return self._q + + @q.setter + def q(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'q' field must be of type 'float'" + self._q = value + + @property + def dq(self): + """Message field 'dq'.""" + return self._dq + + @dq.setter + def dq(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'dq' field must be of type 'float'" + self._dq = value + + @property + def ddq(self): + """Message field 'ddq'.""" + return self._ddq + + @ddq.setter + def ddq(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'ddq' field must be of type 'float'" + self._ddq = value + + @property + def tau_est(self): + """Message field 'tau_est'.""" + return self._tau_est + + @tau_est.setter + def tau_est(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'tau_est' field must be of type 'float'" + self._tau_est = value + + @property + def q_raw(self): + """Message field 'q_raw'.""" + return self._q_raw + + @q_raw.setter + def q_raw(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'q_raw' field must be of type 'float'" + self._q_raw = value + + @property + def dq_raw(self): + """Message field 'dq_raw'.""" + return self._dq_raw + + @dq_raw.setter + def dq_raw(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'dq_raw' field must be of type 'float'" + self._dq_raw = value + + @property + def ddq_raw(self): + """Message field 'ddq_raw'.""" + return self._ddq_raw + + @ddq_raw.setter + def ddq_raw(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'ddq_raw' field must be of type 'float'" + self._ddq_raw = value + + @property + def temperature(self): + """Message field 'temperature'.""" + return self._temperature + + @temperature.setter + def temperature(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'temperature' field must be of type 'int'" + assert value >= -128 and value < 128, \ + "The 'temperature' field must be an integer in [-128, 127]" + self._temperature = value + + @property + def lost(self): + """Message field 'lost'.""" + return self._lost + + @lost.setter + def lost(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'lost' field must be of type 'int'" + assert value >= 0 and value < 4294967296, \ + "The 'lost' field must be an unsigned integer in [0, 4294967295]" + self._lost = value + + @property + def reserve(self): + """Message field 'reserve'.""" + return self._reserve + + @reserve.setter + def reserve(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.uint32, \ + "The 'reserve' numpy.ndarray() must have the dtype of 'numpy.uint32'" + assert value.size == 2, \ + "The 'reserve' numpy.ndarray() must have a size of 2" + self._reserve = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 2 and + all(isinstance(v, int) for v in value) and + all(val >= 0 and val < 4294967296 for val in value)), \ + "The 'reserve' field must be a set or sequence with length 2 and each value of type 'int' and each unsigned integer in [0, 4294967295]" + self._reserve = numpy.array(value, dtype=numpy.uint32) diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_motor_state_s.c b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_motor_state_s.c new file mode 100644 index 0000000..56d9526 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_motor_state_s.c @@ -0,0 +1,323 @@ +// generated from rosidl_generator_py/resource/_idl_support.c.em +// with input from unitree_go:msg/MotorState.idl +// generated code does not contain a copyright notice +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#include +#include +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-function" +#endif +#include "numpy/ndarrayobject.h" +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/detail/motor_state__struct.h" +#include "unitree_go/msg/detail/motor_state__functions.h" + +#include "rosidl_runtime_c/primitives_sequence.h" +#include "rosidl_runtime_c/primitives_sequence_functions.h" + + +ROSIDL_GENERATOR_C_EXPORT +bool unitree_go__msg__motor_state__convert_from_py(PyObject * _pymsg, void * _ros_message) +{ + // check that the passed message is of the expected Python class + { + char full_classname_dest[39]; + { + char * class_name = NULL; + char * module_name = NULL; + { + PyObject * class_attr = PyObject_GetAttrString(_pymsg, "__class__"); + if (class_attr) { + PyObject * name_attr = PyObject_GetAttrString(class_attr, "__name__"); + if (name_attr) { + class_name = (char *)PyUnicode_1BYTE_DATA(name_attr); + Py_DECREF(name_attr); + } + PyObject * module_attr = PyObject_GetAttrString(class_attr, "__module__"); + if (module_attr) { + module_name = (char *)PyUnicode_1BYTE_DATA(module_attr); + Py_DECREF(module_attr); + } + Py_DECREF(class_attr); + } + } + if (!class_name || !module_name) { + return false; + } + snprintf(full_classname_dest, sizeof(full_classname_dest), "%s.%s", module_name, class_name); + } + assert(strncmp("unitree_go.msg._motor_state.MotorState", full_classname_dest, 38) == 0); + } + unitree_go__msg__MotorState * ros_message = _ros_message; + { // mode + PyObject * field = PyObject_GetAttrString(_pymsg, "mode"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->mode = (uint8_t)PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // q + PyObject * field = PyObject_GetAttrString(_pymsg, "q"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->q = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // dq + PyObject * field = PyObject_GetAttrString(_pymsg, "dq"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->dq = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // ddq + PyObject * field = PyObject_GetAttrString(_pymsg, "ddq"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->ddq = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // tau_est + PyObject * field = PyObject_GetAttrString(_pymsg, "tau_est"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->tau_est = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // q_raw + PyObject * field = PyObject_GetAttrString(_pymsg, "q_raw"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->q_raw = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // dq_raw + PyObject * field = PyObject_GetAttrString(_pymsg, "dq_raw"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->dq_raw = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // ddq_raw + PyObject * field = PyObject_GetAttrString(_pymsg, "ddq_raw"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->ddq_raw = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // temperature + PyObject * field = PyObject_GetAttrString(_pymsg, "temperature"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->temperature = (int8_t)PyLong_AsLong(field); + Py_DECREF(field); + } + { // lost + PyObject * field = PyObject_GetAttrString(_pymsg, "lost"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->lost = PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // reserve + PyObject * field = PyObject_GetAttrString(_pymsg, "reserve"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_UINT32); + Py_ssize_t size = 2; + uint32_t * dest = ros_message->reserve; + for (Py_ssize_t i = 0; i < size; ++i) { + uint32_t tmp = *(npy_uint32 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(uint32_t)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + + return true; +} + +ROSIDL_GENERATOR_C_EXPORT +PyObject * unitree_go__msg__motor_state__convert_to_py(void * raw_ros_message) +{ + /* NOTE(esteve): Call constructor of MotorState */ + PyObject * _pymessage = NULL; + { + PyObject * pymessage_module = PyImport_ImportModule("unitree_go.msg._motor_state"); + assert(pymessage_module); + PyObject * pymessage_class = PyObject_GetAttrString(pymessage_module, "MotorState"); + assert(pymessage_class); + Py_DECREF(pymessage_module); + _pymessage = PyObject_CallObject(pymessage_class, NULL); + Py_DECREF(pymessage_class); + if (!_pymessage) { + return NULL; + } + } + unitree_go__msg__MotorState * ros_message = (unitree_go__msg__MotorState *)raw_ros_message; + { // mode + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->mode); + { + int rc = PyObject_SetAttrString(_pymessage, "mode", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // q + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->q); + { + int rc = PyObject_SetAttrString(_pymessage, "q", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // dq + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->dq); + { + int rc = PyObject_SetAttrString(_pymessage, "dq", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // ddq + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->ddq); + { + int rc = PyObject_SetAttrString(_pymessage, "ddq", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // tau_est + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->tau_est); + { + int rc = PyObject_SetAttrString(_pymessage, "tau_est", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // q_raw + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->q_raw); + { + int rc = PyObject_SetAttrString(_pymessage, "q_raw", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // dq_raw + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->dq_raw); + { + int rc = PyObject_SetAttrString(_pymessage, "dq_raw", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // ddq_raw + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->ddq_raw); + { + int rc = PyObject_SetAttrString(_pymessage, "ddq_raw", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // temperature + PyObject * field = NULL; + field = PyLong_FromLong(ros_message->temperature); + { + int rc = PyObject_SetAttrString(_pymessage, "temperature", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // lost + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->lost); + { + int rc = PyObject_SetAttrString(_pymessage, "lost", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // reserve + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "reserve"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_UINT32); + assert(sizeof(npy_uint32) == sizeof(uint32_t)); + npy_uint32 * dst = (npy_uint32 *)PyArray_GETPTR1(seq_field, 0); + uint32_t * src = &(ros_message->reserve[0]); + memcpy(dst, src, 2 * sizeof(uint32_t)); + Py_DECREF(field); + } + + // ownership of _pymessage is transferred to the caller + return _pymessage; +} diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_path_point.py b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_path_point.py new file mode 100644 index 0000000..1d70220 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_path_point.py @@ -0,0 +1,236 @@ +# generated from rosidl_generator_py/resource/_idl.py.em +# with input from unitree_go:msg/PathPoint.idl +# generated code does not contain a copyright notice + + +# Import statements for member types + +import rosidl_parser.definition # noqa: E402, I100 + + +class Metaclass_PathPoint(type): + """Metaclass of message 'PathPoint'.""" + + _CREATE_ROS_MESSAGE = None + _CONVERT_FROM_PY = None + _CONVERT_TO_PY = None + _DESTROY_ROS_MESSAGE = None + _TYPE_SUPPORT = None + + __constants = { + } + + @classmethod + def __import_type_support__(cls): + try: + from rosidl_generator_py import import_type_support + module = import_type_support('unitree_go') + except ImportError: + import logging + import traceback + logger = logging.getLogger( + 'unitree_go.msg.PathPoint') + logger.debug( + 'Failed to import needed modules for type support:\n' + + traceback.format_exc()) + else: + cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__msg__path_point + cls._CONVERT_FROM_PY = module.convert_from_py_msg__msg__path_point + cls._CONVERT_TO_PY = module.convert_to_py_msg__msg__path_point + cls._TYPE_SUPPORT = module.type_support_msg__msg__path_point + cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__msg__path_point + + @classmethod + def __prepare__(cls, name, bases, **kwargs): + # list constant names here so that they appear in the help text of + # the message class under "Data and other attributes defined here:" + # as well as populate each message instance + return { + } + + +class PathPoint(metaclass=Metaclass_PathPoint): + """Message class 'PathPoint'.""" + + __slots__ = [ + '_t_from_start', + '_x', + '_y', + '_yaw', + '_vx', + '_vy', + '_vyaw', + ] + + _fields_and_field_types = { + 't_from_start': 'float', + 'x': 'float', + 'y': 'float', + 'yaw': 'float', + 'vx': 'float', + 'vy': 'float', + 'vyaw': 'float', + } + + SLOT_TYPES = ( + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + ) + + def __init__(self, **kwargs): + assert all('_' + key in self.__slots__ for key in kwargs.keys()), \ + 'Invalid arguments passed to constructor: %s' % \ + ', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__)) + self.t_from_start = kwargs.get('t_from_start', float()) + self.x = kwargs.get('x', float()) + self.y = kwargs.get('y', float()) + self.yaw = kwargs.get('yaw', float()) + self.vx = kwargs.get('vx', float()) + self.vy = kwargs.get('vy', float()) + self.vyaw = kwargs.get('vyaw', float()) + + def __repr__(self): + typename = self.__class__.__module__.split('.') + typename.pop() + typename.append(self.__class__.__name__) + args = [] + for s, t in zip(self.__slots__, self.SLOT_TYPES): + field = getattr(self, s) + fieldstr = repr(field) + # We use Python array type for fields that can be directly stored + # in them, and "normal" sequences for everything else. If it is + # a type that we store in an array, strip off the 'array' portion. + if ( + isinstance(t, rosidl_parser.definition.AbstractSequence) and + isinstance(t.value_type, rosidl_parser.definition.BasicType) and + t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64'] + ): + if len(field) == 0: + fieldstr = '[]' + else: + assert fieldstr.startswith('array(') + prefix = "array('X', " + suffix = ')' + fieldstr = fieldstr[len(prefix):-len(suffix)] + args.append(s[1:] + '=' + fieldstr) + return '%s(%s)' % ('.'.join(typename), ', '.join(args)) + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + if self.t_from_start != other.t_from_start: + return False + if self.x != other.x: + return False + if self.y != other.y: + return False + if self.yaw != other.yaw: + return False + if self.vx != other.vx: + return False + if self.vy != other.vy: + return False + if self.vyaw != other.vyaw: + return False + return True + + @classmethod + def get_fields_and_field_types(cls): + from copy import copy + return copy(cls._fields_and_field_types) + + @property + def t_from_start(self): + """Message field 't_from_start'.""" + return self._t_from_start + + @t_from_start.setter + def t_from_start(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 't_from_start' field must be of type 'float'" + self._t_from_start = value + + @property + def x(self): + """Message field 'x'.""" + return self._x + + @x.setter + def x(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'x' field must be of type 'float'" + self._x = value + + @property + def y(self): + """Message field 'y'.""" + return self._y + + @y.setter + def y(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'y' field must be of type 'float'" + self._y = value + + @property + def yaw(self): + """Message field 'yaw'.""" + return self._yaw + + @yaw.setter + def yaw(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'yaw' field must be of type 'float'" + self._yaw = value + + @property + def vx(self): + """Message field 'vx'.""" + return self._vx + + @vx.setter + def vx(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'vx' field must be of type 'float'" + self._vx = value + + @property + def vy(self): + """Message field 'vy'.""" + return self._vy + + @vy.setter + def vy(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'vy' field must be of type 'float'" + self._vy = value + + @property + def vyaw(self): + """Message field 'vyaw'.""" + return self._vyaw + + @vyaw.setter + def vyaw(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'vyaw' field must be of type 'float'" + self._vyaw = value diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_path_point_s.c b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_path_point_s.c new file mode 100644 index 0000000..6be16c7 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_path_point_s.c @@ -0,0 +1,218 @@ +// generated from rosidl_generator_py/resource/_idl_support.c.em +// with input from unitree_go:msg/PathPoint.idl +// generated code does not contain a copyright notice +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#include +#include +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-function" +#endif +#include "numpy/ndarrayobject.h" +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/detail/path_point__struct.h" +#include "unitree_go/msg/detail/path_point__functions.h" + + +ROSIDL_GENERATOR_C_EXPORT +bool unitree_go__msg__path_point__convert_from_py(PyObject * _pymsg, void * _ros_message) +{ + // check that the passed message is of the expected Python class + { + char full_classname_dest[37]; + { + char * class_name = NULL; + char * module_name = NULL; + { + PyObject * class_attr = PyObject_GetAttrString(_pymsg, "__class__"); + if (class_attr) { + PyObject * name_attr = PyObject_GetAttrString(class_attr, "__name__"); + if (name_attr) { + class_name = (char *)PyUnicode_1BYTE_DATA(name_attr); + Py_DECREF(name_attr); + } + PyObject * module_attr = PyObject_GetAttrString(class_attr, "__module__"); + if (module_attr) { + module_name = (char *)PyUnicode_1BYTE_DATA(module_attr); + Py_DECREF(module_attr); + } + Py_DECREF(class_attr); + } + } + if (!class_name || !module_name) { + return false; + } + snprintf(full_classname_dest, sizeof(full_classname_dest), "%s.%s", module_name, class_name); + } + assert(strncmp("unitree_go.msg._path_point.PathPoint", full_classname_dest, 36) == 0); + } + unitree_go__msg__PathPoint * ros_message = _ros_message; + { // t_from_start + PyObject * field = PyObject_GetAttrString(_pymsg, "t_from_start"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->t_from_start = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // x + PyObject * field = PyObject_GetAttrString(_pymsg, "x"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->x = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // y + PyObject * field = PyObject_GetAttrString(_pymsg, "y"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->y = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // yaw + PyObject * field = PyObject_GetAttrString(_pymsg, "yaw"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->yaw = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // vx + PyObject * field = PyObject_GetAttrString(_pymsg, "vx"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->vx = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // vy + PyObject * field = PyObject_GetAttrString(_pymsg, "vy"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->vy = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // vyaw + PyObject * field = PyObject_GetAttrString(_pymsg, "vyaw"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->vyaw = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + + return true; +} + +ROSIDL_GENERATOR_C_EXPORT +PyObject * unitree_go__msg__path_point__convert_to_py(void * raw_ros_message) +{ + /* NOTE(esteve): Call constructor of PathPoint */ + PyObject * _pymessage = NULL; + { + PyObject * pymessage_module = PyImport_ImportModule("unitree_go.msg._path_point"); + assert(pymessage_module); + PyObject * pymessage_class = PyObject_GetAttrString(pymessage_module, "PathPoint"); + assert(pymessage_class); + Py_DECREF(pymessage_module); + _pymessage = PyObject_CallObject(pymessage_class, NULL); + Py_DECREF(pymessage_class); + if (!_pymessage) { + return NULL; + } + } + unitree_go__msg__PathPoint * ros_message = (unitree_go__msg__PathPoint *)raw_ros_message; + { // t_from_start + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->t_from_start); + { + int rc = PyObject_SetAttrString(_pymessage, "t_from_start", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // x + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->x); + { + int rc = PyObject_SetAttrString(_pymessage, "x", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // y + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->y); + { + int rc = PyObject_SetAttrString(_pymessage, "y", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // yaw + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->yaw); + { + int rc = PyObject_SetAttrString(_pymessage, "yaw", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // vx + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->vx); + { + int rc = PyObject_SetAttrString(_pymessage, "vx", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // vy + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->vy); + { + int rc = PyObject_SetAttrString(_pymessage, "vy", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // vyaw + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->vyaw); + { + int rc = PyObject_SetAttrString(_pymessage, "vyaw", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + + // ownership of _pymessage is transferred to the caller + return _pymessage; +} diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_req.py b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_req.py new file mode 100644 index 0000000..0827644 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_req.py @@ -0,0 +1,141 @@ +# generated from rosidl_generator_py/resource/_idl.py.em +# with input from unitree_go:msg/Req.idl +# generated code does not contain a copyright notice + + +# Import statements for member types + +import rosidl_parser.definition # noqa: E402, I100 + + +class Metaclass_Req(type): + """Metaclass of message 'Req'.""" + + _CREATE_ROS_MESSAGE = None + _CONVERT_FROM_PY = None + _CONVERT_TO_PY = None + _DESTROY_ROS_MESSAGE = None + _TYPE_SUPPORT = None + + __constants = { + } + + @classmethod + def __import_type_support__(cls): + try: + from rosidl_generator_py import import_type_support + module = import_type_support('unitree_go') + except ImportError: + import logging + import traceback + logger = logging.getLogger( + 'unitree_go.msg.Req') + logger.debug( + 'Failed to import needed modules for type support:\n' + + traceback.format_exc()) + else: + cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__msg__req + cls._CONVERT_FROM_PY = module.convert_from_py_msg__msg__req + cls._CONVERT_TO_PY = module.convert_to_py_msg__msg__req + cls._TYPE_SUPPORT = module.type_support_msg__msg__req + cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__msg__req + + @classmethod + def __prepare__(cls, name, bases, **kwargs): + # list constant names here so that they appear in the help text of + # the message class under "Data and other attributes defined here:" + # as well as populate each message instance + return { + } + + +class Req(metaclass=Metaclass_Req): + """Message class 'Req'.""" + + __slots__ = [ + '_uuid', + '_body', + ] + + _fields_and_field_types = { + 'uuid': 'string', + 'body': 'string', + } + + SLOT_TYPES = ( + rosidl_parser.definition.UnboundedString(), # noqa: E501 + rosidl_parser.definition.UnboundedString(), # noqa: E501 + ) + + def __init__(self, **kwargs): + assert all('_' + key in self.__slots__ for key in kwargs.keys()), \ + 'Invalid arguments passed to constructor: %s' % \ + ', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__)) + self.uuid = kwargs.get('uuid', str()) + self.body = kwargs.get('body', str()) + + def __repr__(self): + typename = self.__class__.__module__.split('.') + typename.pop() + typename.append(self.__class__.__name__) + args = [] + for s, t in zip(self.__slots__, self.SLOT_TYPES): + field = getattr(self, s) + fieldstr = repr(field) + # We use Python array type for fields that can be directly stored + # in them, and "normal" sequences for everything else. If it is + # a type that we store in an array, strip off the 'array' portion. + if ( + isinstance(t, rosidl_parser.definition.AbstractSequence) and + isinstance(t.value_type, rosidl_parser.definition.BasicType) and + t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64'] + ): + if len(field) == 0: + fieldstr = '[]' + else: + assert fieldstr.startswith('array(') + prefix = "array('X', " + suffix = ')' + fieldstr = fieldstr[len(prefix):-len(suffix)] + args.append(s[1:] + '=' + fieldstr) + return '%s(%s)' % ('.'.join(typename), ', '.join(args)) + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + if self.uuid != other.uuid: + return False + if self.body != other.body: + return False + return True + + @classmethod + def get_fields_and_field_types(cls): + from copy import copy + return copy(cls._fields_and_field_types) + + @property + def uuid(self): + """Message field 'uuid'.""" + return self._uuid + + @uuid.setter + def uuid(self, value): + if __debug__: + assert \ + isinstance(value, str), \ + "The 'uuid' field must be of type 'str'" + self._uuid = value + + @property + def body(self): + """Message field 'body'.""" + return self._body + + @body.setter + def body(self, value): + if __debug__: + assert \ + isinstance(value, str), \ + "The 'body' field must be of type 'str'" + self._body = value diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_req_s.c b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_req_s.c new file mode 100644 index 0000000..856782f --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_req_s.c @@ -0,0 +1,145 @@ +// generated from rosidl_generator_py/resource/_idl_support.c.em +// with input from unitree_go:msg/Req.idl +// generated code does not contain a copyright notice +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#include +#include +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-function" +#endif +#include "numpy/ndarrayobject.h" +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/detail/req__struct.h" +#include "unitree_go/msg/detail/req__functions.h" + +#include "rosidl_runtime_c/string.h" +#include "rosidl_runtime_c/string_functions.h" + + +ROSIDL_GENERATOR_C_EXPORT +bool unitree_go__msg__req__convert_from_py(PyObject * _pymsg, void * _ros_message) +{ + // check that the passed message is of the expected Python class + { + char full_classname_dest[24]; + { + char * class_name = NULL; + char * module_name = NULL; + { + PyObject * class_attr = PyObject_GetAttrString(_pymsg, "__class__"); + if (class_attr) { + PyObject * name_attr = PyObject_GetAttrString(class_attr, "__name__"); + if (name_attr) { + class_name = (char *)PyUnicode_1BYTE_DATA(name_attr); + Py_DECREF(name_attr); + } + PyObject * module_attr = PyObject_GetAttrString(class_attr, "__module__"); + if (module_attr) { + module_name = (char *)PyUnicode_1BYTE_DATA(module_attr); + Py_DECREF(module_attr); + } + Py_DECREF(class_attr); + } + } + if (!class_name || !module_name) { + return false; + } + snprintf(full_classname_dest, sizeof(full_classname_dest), "%s.%s", module_name, class_name); + } + assert(strncmp("unitree_go.msg._req.Req", full_classname_dest, 23) == 0); + } + unitree_go__msg__Req * ros_message = _ros_message; + { // uuid + PyObject * field = PyObject_GetAttrString(_pymsg, "uuid"); + if (!field) { + return false; + } + assert(PyUnicode_Check(field)); + PyObject * encoded_field = PyUnicode_AsUTF8String(field); + if (!encoded_field) { + Py_DECREF(field); + return false; + } + rosidl_runtime_c__String__assign(&ros_message->uuid, PyBytes_AS_STRING(encoded_field)); + Py_DECREF(encoded_field); + Py_DECREF(field); + } + { // body + PyObject * field = PyObject_GetAttrString(_pymsg, "body"); + if (!field) { + return false; + } + assert(PyUnicode_Check(field)); + PyObject * encoded_field = PyUnicode_AsUTF8String(field); + if (!encoded_field) { + Py_DECREF(field); + return false; + } + rosidl_runtime_c__String__assign(&ros_message->body, PyBytes_AS_STRING(encoded_field)); + Py_DECREF(encoded_field); + Py_DECREF(field); + } + + return true; +} + +ROSIDL_GENERATOR_C_EXPORT +PyObject * unitree_go__msg__req__convert_to_py(void * raw_ros_message) +{ + /* NOTE(esteve): Call constructor of Req */ + PyObject * _pymessage = NULL; + { + PyObject * pymessage_module = PyImport_ImportModule("unitree_go.msg._req"); + assert(pymessage_module); + PyObject * pymessage_class = PyObject_GetAttrString(pymessage_module, "Req"); + assert(pymessage_class); + Py_DECREF(pymessage_module); + _pymessage = PyObject_CallObject(pymessage_class, NULL); + Py_DECREF(pymessage_class); + if (!_pymessage) { + return NULL; + } + } + unitree_go__msg__Req * ros_message = (unitree_go__msg__Req *)raw_ros_message; + { // uuid + PyObject * field = NULL; + field = PyUnicode_DecodeUTF8( + ros_message->uuid.data, + strlen(ros_message->uuid.data), + "replace"); + if (!field) { + return NULL; + } + { + int rc = PyObject_SetAttrString(_pymessage, "uuid", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // body + PyObject * field = NULL; + field = PyUnicode_DecodeUTF8( + ros_message->body.data, + strlen(ros_message->body.data), + "replace"); + if (!field) { + return NULL; + } + { + int rc = PyObject_SetAttrString(_pymessage, "body", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + + // ownership of _pymessage is transferred to the caller + return _pymessage; +} diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_res.py b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_res.py new file mode 100644 index 0000000..da1126d --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_res.py @@ -0,0 +1,178 @@ +# generated from rosidl_generator_py/resource/_idl.py.em +# with input from unitree_go:msg/Res.idl +# generated code does not contain a copyright notice + + +# Import statements for member types + +# Member 'data' +import array # noqa: E402, I100 + +import rosidl_parser.definition # noqa: E402, I100 + + +class Metaclass_Res(type): + """Metaclass of message 'Res'.""" + + _CREATE_ROS_MESSAGE = None + _CONVERT_FROM_PY = None + _CONVERT_TO_PY = None + _DESTROY_ROS_MESSAGE = None + _TYPE_SUPPORT = None + + __constants = { + } + + @classmethod + def __import_type_support__(cls): + try: + from rosidl_generator_py import import_type_support + module = import_type_support('unitree_go') + except ImportError: + import logging + import traceback + logger = logging.getLogger( + 'unitree_go.msg.Res') + logger.debug( + 'Failed to import needed modules for type support:\n' + + traceback.format_exc()) + else: + cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__msg__res + cls._CONVERT_FROM_PY = module.convert_from_py_msg__msg__res + cls._CONVERT_TO_PY = module.convert_to_py_msg__msg__res + cls._TYPE_SUPPORT = module.type_support_msg__msg__res + cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__msg__res + + @classmethod + def __prepare__(cls, name, bases, **kwargs): + # list constant names here so that they appear in the help text of + # the message class under "Data and other attributes defined here:" + # as well as populate each message instance + return { + } + + +class Res(metaclass=Metaclass_Res): + """Message class 'Res'.""" + + __slots__ = [ + '_uuid', + '_data', + '_body', + ] + + _fields_and_field_types = { + 'uuid': 'string', + 'data': 'sequence', + 'body': 'string', + } + + SLOT_TYPES = ( + rosidl_parser.definition.UnboundedString(), # noqa: E501 + rosidl_parser.definition.UnboundedSequence(rosidl_parser.definition.BasicType('uint8')), # noqa: E501 + rosidl_parser.definition.UnboundedString(), # noqa: E501 + ) + + def __init__(self, **kwargs): + assert all('_' + key in self.__slots__ for key in kwargs.keys()), \ + 'Invalid arguments passed to constructor: %s' % \ + ', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__)) + self.uuid = kwargs.get('uuid', str()) + self.data = array.array('B', kwargs.get('data', [])) + self.body = kwargs.get('body', str()) + + def __repr__(self): + typename = self.__class__.__module__.split('.') + typename.pop() + typename.append(self.__class__.__name__) + args = [] + for s, t in zip(self.__slots__, self.SLOT_TYPES): + field = getattr(self, s) + fieldstr = repr(field) + # We use Python array type for fields that can be directly stored + # in them, and "normal" sequences for everything else. If it is + # a type that we store in an array, strip off the 'array' portion. + if ( + isinstance(t, rosidl_parser.definition.AbstractSequence) and + isinstance(t.value_type, rosidl_parser.definition.BasicType) and + t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64'] + ): + if len(field) == 0: + fieldstr = '[]' + else: + assert fieldstr.startswith('array(') + prefix = "array('X', " + suffix = ')' + fieldstr = fieldstr[len(prefix):-len(suffix)] + args.append(s[1:] + '=' + fieldstr) + return '%s(%s)' % ('.'.join(typename), ', '.join(args)) + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + if self.uuid != other.uuid: + return False + if self.data != other.data: + return False + if self.body != other.body: + return False + return True + + @classmethod + def get_fields_and_field_types(cls): + from copy import copy + return copy(cls._fields_and_field_types) + + @property + def uuid(self): + """Message field 'uuid'.""" + return self._uuid + + @uuid.setter + def uuid(self, value): + if __debug__: + assert \ + isinstance(value, str), \ + "The 'uuid' field must be of type 'str'" + self._uuid = value + + @property + def data(self): + """Message field 'data'.""" + return self._data + + @data.setter + def data(self, value): + if isinstance(value, array.array): + assert value.typecode == 'B', \ + "The 'data' array.array() must have the type code of 'B'" + self._data = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + all(isinstance(v, int) for v in value) and + all(val >= 0 and val < 256 for val in value)), \ + "The 'data' field must be a set or sequence and each value of type 'int' and each unsigned integer in [0, 255]" + self._data = array.array('B', value) + + @property + def body(self): + """Message field 'body'.""" + return self._body + + @body.setter + def body(self, value): + if __debug__: + assert \ + isinstance(value, str), \ + "The 'body' field must be of type 'str'" + self._body = value diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_res_s.c b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_res_s.c new file mode 100644 index 0000000..4e40f1d --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_res_s.c @@ -0,0 +1,268 @@ +// generated from rosidl_generator_py/resource/_idl_support.c.em +// with input from unitree_go:msg/Res.idl +// generated code does not contain a copyright notice +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#include +#include +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-function" +#endif +#include "numpy/ndarrayobject.h" +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/detail/res__struct.h" +#include "unitree_go/msg/detail/res__functions.h" + +#include "rosidl_runtime_c/string.h" +#include "rosidl_runtime_c/string_functions.h" + +#include "rosidl_runtime_c/primitives_sequence.h" +#include "rosidl_runtime_c/primitives_sequence_functions.h" + + +ROSIDL_GENERATOR_C_EXPORT +bool unitree_go__msg__res__convert_from_py(PyObject * _pymsg, void * _ros_message) +{ + // check that the passed message is of the expected Python class + { + char full_classname_dest[24]; + { + char * class_name = NULL; + char * module_name = NULL; + { + PyObject * class_attr = PyObject_GetAttrString(_pymsg, "__class__"); + if (class_attr) { + PyObject * name_attr = PyObject_GetAttrString(class_attr, "__name__"); + if (name_attr) { + class_name = (char *)PyUnicode_1BYTE_DATA(name_attr); + Py_DECREF(name_attr); + } + PyObject * module_attr = PyObject_GetAttrString(class_attr, "__module__"); + if (module_attr) { + module_name = (char *)PyUnicode_1BYTE_DATA(module_attr); + Py_DECREF(module_attr); + } + Py_DECREF(class_attr); + } + } + if (!class_name || !module_name) { + return false; + } + snprintf(full_classname_dest, sizeof(full_classname_dest), "%s.%s", module_name, class_name); + } + assert(strncmp("unitree_go.msg._res.Res", full_classname_dest, 23) == 0); + } + unitree_go__msg__Res * ros_message = _ros_message; + { // uuid + PyObject * field = PyObject_GetAttrString(_pymsg, "uuid"); + if (!field) { + return false; + } + assert(PyUnicode_Check(field)); + PyObject * encoded_field = PyUnicode_AsUTF8String(field); + if (!encoded_field) { + Py_DECREF(field); + return false; + } + rosidl_runtime_c__String__assign(&ros_message->uuid, PyBytes_AS_STRING(encoded_field)); + Py_DECREF(encoded_field); + Py_DECREF(field); + } + { // data + PyObject * field = PyObject_GetAttrString(_pymsg, "data"); + if (!field) { + return false; + } + if (PyObject_CheckBuffer(field)) { + // Optimization for converting arrays of primitives + Py_buffer view; + int rc = PyObject_GetBuffer(field, &view, PyBUF_SIMPLE); + if (rc < 0) { + Py_DECREF(field); + return false; + } + Py_ssize_t size = view.len / sizeof(uint8_t); + if (!rosidl_runtime_c__uint8__Sequence__init(&(ros_message->data), size)) { + PyErr_SetString(PyExc_RuntimeError, "unable to create uint8__Sequence ros_message"); + PyBuffer_Release(&view); + Py_DECREF(field); + return false; + } + uint8_t * dest = ros_message->data.data; + rc = PyBuffer_ToContiguous(dest, &view, view.len, 'C'); + if (rc < 0) { + PyBuffer_Release(&view); + Py_DECREF(field); + return false; + } + PyBuffer_Release(&view); + } else { + PyObject * seq_field = PySequence_Fast(field, "expected a sequence in 'data'"); + if (!seq_field) { + Py_DECREF(field); + return false; + } + Py_ssize_t size = PySequence_Size(field); + if (-1 == size) { + Py_DECREF(seq_field); + Py_DECREF(field); + return false; + } + if (!rosidl_runtime_c__uint8__Sequence__init(&(ros_message->data), size)) { + PyErr_SetString(PyExc_RuntimeError, "unable to create uint8__Sequence ros_message"); + Py_DECREF(seq_field); + Py_DECREF(field); + return false; + } + uint8_t * dest = ros_message->data.data; + for (Py_ssize_t i = 0; i < size; ++i) { + PyObject * item = PySequence_Fast_GET_ITEM(seq_field, i); + if (!item) { + Py_DECREF(seq_field); + Py_DECREF(field); + return false; + } + assert(PyLong_Check(item)); + uint8_t tmp = (uint8_t)PyLong_AsUnsignedLong(item); + + memcpy(&dest[i], &tmp, sizeof(uint8_t)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + { // body + PyObject * field = PyObject_GetAttrString(_pymsg, "body"); + if (!field) { + return false; + } + assert(PyUnicode_Check(field)); + PyObject * encoded_field = PyUnicode_AsUTF8String(field); + if (!encoded_field) { + Py_DECREF(field); + return false; + } + rosidl_runtime_c__String__assign(&ros_message->body, PyBytes_AS_STRING(encoded_field)); + Py_DECREF(encoded_field); + Py_DECREF(field); + } + + return true; +} + +ROSIDL_GENERATOR_C_EXPORT +PyObject * unitree_go__msg__res__convert_to_py(void * raw_ros_message) +{ + /* NOTE(esteve): Call constructor of Res */ + PyObject * _pymessage = NULL; + { + PyObject * pymessage_module = PyImport_ImportModule("unitree_go.msg._res"); + assert(pymessage_module); + PyObject * pymessage_class = PyObject_GetAttrString(pymessage_module, "Res"); + assert(pymessage_class); + Py_DECREF(pymessage_module); + _pymessage = PyObject_CallObject(pymessage_class, NULL); + Py_DECREF(pymessage_class); + if (!_pymessage) { + return NULL; + } + } + unitree_go__msg__Res * ros_message = (unitree_go__msg__Res *)raw_ros_message; + { // uuid + PyObject * field = NULL; + field = PyUnicode_DecodeUTF8( + ros_message->uuid.data, + strlen(ros_message->uuid.data), + "replace"); + if (!field) { + return NULL; + } + { + int rc = PyObject_SetAttrString(_pymessage, "uuid", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // data + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "data"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "array.array") == 0); + // ensure that itemsize matches the sizeof of the ROS message field + PyObject * itemsize_attr = PyObject_GetAttrString(field, "itemsize"); + assert(itemsize_attr != NULL); + size_t itemsize = PyLong_AsSize_t(itemsize_attr); + Py_DECREF(itemsize_attr); + if (itemsize != sizeof(uint8_t)) { + PyErr_SetString(PyExc_RuntimeError, "itemsize doesn't match expectation"); + Py_DECREF(field); + return NULL; + } + // clear the array, poor approach to remove potential default values + Py_ssize_t length = PyObject_Length(field); + if (-1 == length) { + Py_DECREF(field); + return NULL; + } + if (length > 0) { + PyObject * pop = PyObject_GetAttrString(field, "pop"); + assert(pop != NULL); + for (Py_ssize_t i = 0; i < length; ++i) { + PyObject * ret = PyObject_CallFunctionObjArgs(pop, NULL); + if (!ret) { + Py_DECREF(pop); + Py_DECREF(field); + return NULL; + } + Py_DECREF(ret); + } + Py_DECREF(pop); + } + if (ros_message->data.size > 0) { + // populating the array.array using the frombytes method + PyObject * frombytes = PyObject_GetAttrString(field, "frombytes"); + assert(frombytes != NULL); + uint8_t * src = &(ros_message->data.data[0]); + PyObject * data = PyBytes_FromStringAndSize((const char *)src, ros_message->data.size * sizeof(uint8_t)); + assert(data != NULL); + PyObject * ret = PyObject_CallFunctionObjArgs(frombytes, data, NULL); + Py_DECREF(data); + Py_DECREF(frombytes); + if (!ret) { + Py_DECREF(field); + return NULL; + } + Py_DECREF(ret); + } + Py_DECREF(field); + } + { // body + PyObject * field = NULL; + field = PyUnicode_DecodeUTF8( + ros_message->body.data, + strlen(ros_message->body.data), + "replace"); + if (!field) { + return NULL; + } + { + int rc = PyObject_SetAttrString(_pymessage, "body", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + + // ownership of _pymessage is transferred to the caller + return _pymessage; +} diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_sport_mode_cmd.py b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_sport_mode_cmd.py new file mode 100644 index 0000000..7bcaf06 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_sport_mode_cmd.py @@ -0,0 +1,415 @@ +# generated from rosidl_generator_py/resource/_idl.py.em +# with input from unitree_go:msg/SportModeCmd.idl +# generated code does not contain a copyright notice + + +# Import statements for member types + +# Member 'position' +# Member 'euler' +# Member 'velocity' +import numpy # noqa: E402, I100 + +import rosidl_parser.definition # noqa: E402, I100 + + +class Metaclass_SportModeCmd(type): + """Metaclass of message 'SportModeCmd'.""" + + _CREATE_ROS_MESSAGE = None + _CONVERT_FROM_PY = None + _CONVERT_TO_PY = None + _DESTROY_ROS_MESSAGE = None + _TYPE_SUPPORT = None + + __constants = { + } + + @classmethod + def __import_type_support__(cls): + try: + from rosidl_generator_py import import_type_support + module = import_type_support('unitree_go') + except ImportError: + import logging + import traceback + logger = logging.getLogger( + 'unitree_go.msg.SportModeCmd') + logger.debug( + 'Failed to import needed modules for type support:\n' + + traceback.format_exc()) + else: + cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__msg__sport_mode_cmd + cls._CONVERT_FROM_PY = module.convert_from_py_msg__msg__sport_mode_cmd + cls._CONVERT_TO_PY = module.convert_to_py_msg__msg__sport_mode_cmd + cls._TYPE_SUPPORT = module.type_support_msg__msg__sport_mode_cmd + cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__msg__sport_mode_cmd + + from unitree_go.msg import BmsCmd + if BmsCmd.__class__._TYPE_SUPPORT is None: + BmsCmd.__class__.__import_type_support__() + + from unitree_go.msg import PathPoint + if PathPoint.__class__._TYPE_SUPPORT is None: + PathPoint.__class__.__import_type_support__() + + @classmethod + def __prepare__(cls, name, bases, **kwargs): + # list constant names here so that they appear in the help text of + # the message class under "Data and other attributes defined here:" + # as well as populate each message instance + return { + } + + +class SportModeCmd(metaclass=Metaclass_SportModeCmd): + """Message class 'SportModeCmd'.""" + + __slots__ = [ + '_mode', + '_gait_type', + '_speed_level', + '_foot_raise_height', + '_body_height', + '_position', + '_euler', + '_velocity', + '_yaw_speed', + '_bms_cmd', + '_path_point', + ] + + _fields_and_field_types = { + 'mode': 'uint8', + 'gait_type': 'uint8', + 'speed_level': 'uint8', + 'foot_raise_height': 'float', + 'body_height': 'float', + 'position': 'float[2]', + 'euler': 'float[3]', + 'velocity': 'float[2]', + 'yaw_speed': 'float', + 'bms_cmd': 'unitree_go/BmsCmd', + 'path_point': 'unitree_go/PathPoint[30]', + } + + SLOT_TYPES = ( + rosidl_parser.definition.BasicType('uint8'), # noqa: E501 + rosidl_parser.definition.BasicType('uint8'), # noqa: E501 + rosidl_parser.definition.BasicType('uint8'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('float'), 2), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('float'), 3), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('float'), 2), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.NamespacedType(['unitree_go', 'msg'], 'BmsCmd'), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.NamespacedType(['unitree_go', 'msg'], 'PathPoint'), 30), # noqa: E501 + ) + + def __init__(self, **kwargs): + assert all('_' + key in self.__slots__ for key in kwargs.keys()), \ + 'Invalid arguments passed to constructor: %s' % \ + ', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__)) + self.mode = kwargs.get('mode', int()) + self.gait_type = kwargs.get('gait_type', int()) + self.speed_level = kwargs.get('speed_level', int()) + self.foot_raise_height = kwargs.get('foot_raise_height', float()) + self.body_height = kwargs.get('body_height', float()) + if 'position' not in kwargs: + self.position = numpy.zeros(2, dtype=numpy.float32) + else: + self.position = numpy.array(kwargs.get('position'), dtype=numpy.float32) + assert self.position.shape == (2, ) + if 'euler' not in kwargs: + self.euler = numpy.zeros(3, dtype=numpy.float32) + else: + self.euler = numpy.array(kwargs.get('euler'), dtype=numpy.float32) + assert self.euler.shape == (3, ) + if 'velocity' not in kwargs: + self.velocity = numpy.zeros(2, dtype=numpy.float32) + else: + self.velocity = numpy.array(kwargs.get('velocity'), dtype=numpy.float32) + assert self.velocity.shape == (2, ) + self.yaw_speed = kwargs.get('yaw_speed', float()) + from unitree_go.msg import BmsCmd + self.bms_cmd = kwargs.get('bms_cmd', BmsCmd()) + from unitree_go.msg import PathPoint + self.path_point = kwargs.get( + 'path_point', + [PathPoint() for x in range(30)] + ) + + def __repr__(self): + typename = self.__class__.__module__.split('.') + typename.pop() + typename.append(self.__class__.__name__) + args = [] + for s, t in zip(self.__slots__, self.SLOT_TYPES): + field = getattr(self, s) + fieldstr = repr(field) + # We use Python array type for fields that can be directly stored + # in them, and "normal" sequences for everything else. If it is + # a type that we store in an array, strip off the 'array' portion. + if ( + isinstance(t, rosidl_parser.definition.AbstractSequence) and + isinstance(t.value_type, rosidl_parser.definition.BasicType) and + t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64'] + ): + if len(field) == 0: + fieldstr = '[]' + else: + assert fieldstr.startswith('array(') + prefix = "array('X', " + suffix = ')' + fieldstr = fieldstr[len(prefix):-len(suffix)] + args.append(s[1:] + '=' + fieldstr) + return '%s(%s)' % ('.'.join(typename), ', '.join(args)) + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + if self.mode != other.mode: + return False + if self.gait_type != other.gait_type: + return False + if self.speed_level != other.speed_level: + return False + if self.foot_raise_height != other.foot_raise_height: + return False + if self.body_height != other.body_height: + return False + if all(self.position != other.position): + return False + if all(self.euler != other.euler): + return False + if all(self.velocity != other.velocity): + return False + if self.yaw_speed != other.yaw_speed: + return False + if self.bms_cmd != other.bms_cmd: + return False + if self.path_point != other.path_point: + return False + return True + + @classmethod + def get_fields_and_field_types(cls): + from copy import copy + return copy(cls._fields_and_field_types) + + @property + def mode(self): + """Message field 'mode'.""" + return self._mode + + @mode.setter + def mode(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'mode' field must be of type 'int'" + assert value >= 0 and value < 256, \ + "The 'mode' field must be an unsigned integer in [0, 255]" + self._mode = value + + @property + def gait_type(self): + """Message field 'gait_type'.""" + return self._gait_type + + @gait_type.setter + def gait_type(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'gait_type' field must be of type 'int'" + assert value >= 0 and value < 256, \ + "The 'gait_type' field must be an unsigned integer in [0, 255]" + self._gait_type = value + + @property + def speed_level(self): + """Message field 'speed_level'.""" + return self._speed_level + + @speed_level.setter + def speed_level(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'speed_level' field must be of type 'int'" + assert value >= 0 and value < 256, \ + "The 'speed_level' field must be an unsigned integer in [0, 255]" + self._speed_level = value + + @property + def foot_raise_height(self): + """Message field 'foot_raise_height'.""" + return self._foot_raise_height + + @foot_raise_height.setter + def foot_raise_height(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'foot_raise_height' field must be of type 'float'" + self._foot_raise_height = value + + @property + def body_height(self): + """Message field 'body_height'.""" + return self._body_height + + @body_height.setter + def body_height(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'body_height' field must be of type 'float'" + self._body_height = value + + @property + def position(self): + """Message field 'position'.""" + return self._position + + @position.setter + def position(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.float32, \ + "The 'position' numpy.ndarray() must have the dtype of 'numpy.float32'" + assert value.size == 2, \ + "The 'position' numpy.ndarray() must have a size of 2" + self._position = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 2 and + all(isinstance(v, float) for v in value) and + True), \ + "The 'position' field must be a set or sequence with length 2 and each value of type 'float'" + self._position = numpy.array(value, dtype=numpy.float32) + + @property + def euler(self): + """Message field 'euler'.""" + return self._euler + + @euler.setter + def euler(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.float32, \ + "The 'euler' numpy.ndarray() must have the dtype of 'numpy.float32'" + assert value.size == 3, \ + "The 'euler' numpy.ndarray() must have a size of 3" + self._euler = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 3 and + all(isinstance(v, float) for v in value) and + True), \ + "The 'euler' field must be a set or sequence with length 3 and each value of type 'float'" + self._euler = numpy.array(value, dtype=numpy.float32) + + @property + def velocity(self): + """Message field 'velocity'.""" + return self._velocity + + @velocity.setter + def velocity(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.float32, \ + "The 'velocity' numpy.ndarray() must have the dtype of 'numpy.float32'" + assert value.size == 2, \ + "The 'velocity' numpy.ndarray() must have a size of 2" + self._velocity = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 2 and + all(isinstance(v, float) for v in value) and + True), \ + "The 'velocity' field must be a set or sequence with length 2 and each value of type 'float'" + self._velocity = numpy.array(value, dtype=numpy.float32) + + @property + def yaw_speed(self): + """Message field 'yaw_speed'.""" + return self._yaw_speed + + @yaw_speed.setter + def yaw_speed(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'yaw_speed' field must be of type 'float'" + self._yaw_speed = value + + @property + def bms_cmd(self): + """Message field 'bms_cmd'.""" + return self._bms_cmd + + @bms_cmd.setter + def bms_cmd(self, value): + if __debug__: + from unitree_go.msg import BmsCmd + assert \ + isinstance(value, BmsCmd), \ + "The 'bms_cmd' field must be a sub message of type 'BmsCmd'" + self._bms_cmd = value + + @property + def path_point(self): + """Message field 'path_point'.""" + return self._path_point + + @path_point.setter + def path_point(self, value): + if __debug__: + from unitree_go.msg import PathPoint + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 30 and + all(isinstance(v, PathPoint) for v in value) and + True), \ + "The 'path_point' field must be a set or sequence with length 30 and each value of type 'PathPoint'" + self._path_point = value diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_sport_mode_cmd_s.c b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_sport_mode_cmd_s.c new file mode 100644 index 0000000..8163331 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_sport_mode_cmd_s.c @@ -0,0 +1,409 @@ +// generated from rosidl_generator_py/resource/_idl_support.c.em +// with input from unitree_go:msg/SportModeCmd.idl +// generated code does not contain a copyright notice +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#include +#include +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-function" +#endif +#include "numpy/ndarrayobject.h" +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/detail/sport_mode_cmd__struct.h" +#include "unitree_go/msg/detail/sport_mode_cmd__functions.h" + +#include "rosidl_runtime_c/primitives_sequence.h" +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +// Nested array functions includes +#include "unitree_go/msg/detail/path_point__functions.h" +// end nested array functions include +bool unitree_go__msg__bms_cmd__convert_from_py(PyObject * _pymsg, void * _ros_message); +PyObject * unitree_go__msg__bms_cmd__convert_to_py(void * raw_ros_message); +bool unitree_go__msg__path_point__convert_from_py(PyObject * _pymsg, void * _ros_message); +PyObject * unitree_go__msg__path_point__convert_to_py(void * raw_ros_message); + +ROSIDL_GENERATOR_C_EXPORT +bool unitree_go__msg__sport_mode_cmd__convert_from_py(PyObject * _pymsg, void * _ros_message) +{ + // check that the passed message is of the expected Python class + { + char full_classname_dest[44]; + { + char * class_name = NULL; + char * module_name = NULL; + { + PyObject * class_attr = PyObject_GetAttrString(_pymsg, "__class__"); + if (class_attr) { + PyObject * name_attr = PyObject_GetAttrString(class_attr, "__name__"); + if (name_attr) { + class_name = (char *)PyUnicode_1BYTE_DATA(name_attr); + Py_DECREF(name_attr); + } + PyObject * module_attr = PyObject_GetAttrString(class_attr, "__module__"); + if (module_attr) { + module_name = (char *)PyUnicode_1BYTE_DATA(module_attr); + Py_DECREF(module_attr); + } + Py_DECREF(class_attr); + } + } + if (!class_name || !module_name) { + return false; + } + snprintf(full_classname_dest, sizeof(full_classname_dest), "%s.%s", module_name, class_name); + } + assert(strncmp("unitree_go.msg._sport_mode_cmd.SportModeCmd", full_classname_dest, 43) == 0); + } + unitree_go__msg__SportModeCmd * ros_message = _ros_message; + { // mode + PyObject * field = PyObject_GetAttrString(_pymsg, "mode"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->mode = (uint8_t)PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // gait_type + PyObject * field = PyObject_GetAttrString(_pymsg, "gait_type"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->gait_type = (uint8_t)PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // speed_level + PyObject * field = PyObject_GetAttrString(_pymsg, "speed_level"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->speed_level = (uint8_t)PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // foot_raise_height + PyObject * field = PyObject_GetAttrString(_pymsg, "foot_raise_height"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->foot_raise_height = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // body_height + PyObject * field = PyObject_GetAttrString(_pymsg, "body_height"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->body_height = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // position + PyObject * field = PyObject_GetAttrString(_pymsg, "position"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_FLOAT32); + Py_ssize_t size = 2; + float * dest = ros_message->position; + for (Py_ssize_t i = 0; i < size; ++i) { + float tmp = *(npy_float32 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(float)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + { // euler + PyObject * field = PyObject_GetAttrString(_pymsg, "euler"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_FLOAT32); + Py_ssize_t size = 3; + float * dest = ros_message->euler; + for (Py_ssize_t i = 0; i < size; ++i) { + float tmp = *(npy_float32 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(float)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + { // velocity + PyObject * field = PyObject_GetAttrString(_pymsg, "velocity"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_FLOAT32); + Py_ssize_t size = 2; + float * dest = ros_message->velocity; + for (Py_ssize_t i = 0; i < size; ++i) { + float tmp = *(npy_float32 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(float)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + { // yaw_speed + PyObject * field = PyObject_GetAttrString(_pymsg, "yaw_speed"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->yaw_speed = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // bms_cmd + PyObject * field = PyObject_GetAttrString(_pymsg, "bms_cmd"); + if (!field) { + return false; + } + if (!unitree_go__msg__bms_cmd__convert_from_py(field, &ros_message->bms_cmd)) { + Py_DECREF(field); + return false; + } + Py_DECREF(field); + } + { // path_point + PyObject * field = PyObject_GetAttrString(_pymsg, "path_point"); + if (!field) { + return false; + } + PyObject * seq_field = PySequence_Fast(field, "expected a sequence in 'path_point'"); + if (!seq_field) { + Py_DECREF(field); + return false; + } + Py_ssize_t size = 30; + unitree_go__msg__PathPoint * dest = ros_message->path_point; + for (Py_ssize_t i = 0; i < size; ++i) { + if (!unitree_go__msg__path_point__convert_from_py(PySequence_Fast_GET_ITEM(seq_field, i), &dest[i])) { + Py_DECREF(seq_field); + Py_DECREF(field); + return false; + } + } + Py_DECREF(seq_field); + Py_DECREF(field); + } + + return true; +} + +ROSIDL_GENERATOR_C_EXPORT +PyObject * unitree_go__msg__sport_mode_cmd__convert_to_py(void * raw_ros_message) +{ + /* NOTE(esteve): Call constructor of SportModeCmd */ + PyObject * _pymessage = NULL; + { + PyObject * pymessage_module = PyImport_ImportModule("unitree_go.msg._sport_mode_cmd"); + assert(pymessage_module); + PyObject * pymessage_class = PyObject_GetAttrString(pymessage_module, "SportModeCmd"); + assert(pymessage_class); + Py_DECREF(pymessage_module); + _pymessage = PyObject_CallObject(pymessage_class, NULL); + Py_DECREF(pymessage_class); + if (!_pymessage) { + return NULL; + } + } + unitree_go__msg__SportModeCmd * ros_message = (unitree_go__msg__SportModeCmd *)raw_ros_message; + { // mode + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->mode); + { + int rc = PyObject_SetAttrString(_pymessage, "mode", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // gait_type + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->gait_type); + { + int rc = PyObject_SetAttrString(_pymessage, "gait_type", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // speed_level + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->speed_level); + { + int rc = PyObject_SetAttrString(_pymessage, "speed_level", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // foot_raise_height + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->foot_raise_height); + { + int rc = PyObject_SetAttrString(_pymessage, "foot_raise_height", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // body_height + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->body_height); + { + int rc = PyObject_SetAttrString(_pymessage, "body_height", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // position + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "position"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_FLOAT32); + assert(sizeof(npy_float32) == sizeof(float)); + npy_float32 * dst = (npy_float32 *)PyArray_GETPTR1(seq_field, 0); + float * src = &(ros_message->position[0]); + memcpy(dst, src, 2 * sizeof(float)); + Py_DECREF(field); + } + { // euler + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "euler"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_FLOAT32); + assert(sizeof(npy_float32) == sizeof(float)); + npy_float32 * dst = (npy_float32 *)PyArray_GETPTR1(seq_field, 0); + float * src = &(ros_message->euler[0]); + memcpy(dst, src, 3 * sizeof(float)); + Py_DECREF(field); + } + { // velocity + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "velocity"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_FLOAT32); + assert(sizeof(npy_float32) == sizeof(float)); + npy_float32 * dst = (npy_float32 *)PyArray_GETPTR1(seq_field, 0); + float * src = &(ros_message->velocity[0]); + memcpy(dst, src, 2 * sizeof(float)); + Py_DECREF(field); + } + { // yaw_speed + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->yaw_speed); + { + int rc = PyObject_SetAttrString(_pymessage, "yaw_speed", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // bms_cmd + PyObject * field = NULL; + field = unitree_go__msg__bms_cmd__convert_to_py(&ros_message->bms_cmd); + if (!field) { + return NULL; + } + { + int rc = PyObject_SetAttrString(_pymessage, "bms_cmd", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // path_point + PyObject * field = NULL; + size_t size = 30; + field = PyList_New(size); + if (!field) { + return NULL; + } + unitree_go__msg__PathPoint * item; + for (size_t i = 0; i < size; ++i) { + item = &(ros_message->path_point[i]); + PyObject * pyitem = unitree_go__msg__path_point__convert_to_py(item); + if (!pyitem) { + Py_DECREF(field); + return NULL; + } + int rc = PyList_SetItem(field, i, pyitem); + (void)rc; + assert(rc == 0); + } + assert(PySequence_Check(field)); + { + int rc = PyObject_SetAttrString(_pymessage, "path_point", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + + // ownership of _pymessage is transferred to the caller + return _pymessage; +} diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_sport_mode_state.py b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_sport_mode_state.py new file mode 100644 index 0000000..a00aa27 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_sport_mode_state.py @@ -0,0 +1,546 @@ +# generated from rosidl_generator_py/resource/_idl.py.em +# with input from unitree_go:msg/SportModeState.idl +# generated code does not contain a copyright notice + + +# Import statements for member types + +# Member 'position' +# Member 'velocity' +# Member 'range_obstacle' +# Member 'foot_force' +# Member 'foot_position_body' +# Member 'foot_speed_body' +import numpy # noqa: E402, I100 + +import rosidl_parser.definition # noqa: E402, I100 + + +class Metaclass_SportModeState(type): + """Metaclass of message 'SportModeState'.""" + + _CREATE_ROS_MESSAGE = None + _CONVERT_FROM_PY = None + _CONVERT_TO_PY = None + _DESTROY_ROS_MESSAGE = None + _TYPE_SUPPORT = None + + __constants = { + } + + @classmethod + def __import_type_support__(cls): + try: + from rosidl_generator_py import import_type_support + module = import_type_support('unitree_go') + except ImportError: + import logging + import traceback + logger = logging.getLogger( + 'unitree_go.msg.SportModeState') + logger.debug( + 'Failed to import needed modules for type support:\n' + + traceback.format_exc()) + else: + cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__msg__sport_mode_state + cls._CONVERT_FROM_PY = module.convert_from_py_msg__msg__sport_mode_state + cls._CONVERT_TO_PY = module.convert_to_py_msg__msg__sport_mode_state + cls._TYPE_SUPPORT = module.type_support_msg__msg__sport_mode_state + cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__msg__sport_mode_state + + from unitree_go.msg import IMUState + if IMUState.__class__._TYPE_SUPPORT is None: + IMUState.__class__.__import_type_support__() + + from unitree_go.msg import TimeSpec + if TimeSpec.__class__._TYPE_SUPPORT is None: + TimeSpec.__class__.__import_type_support__() + + @classmethod + def __prepare__(cls, name, bases, **kwargs): + # list constant names here so that they appear in the help text of + # the message class under "Data and other attributes defined here:" + # as well as populate each message instance + return { + } + + +class SportModeState(metaclass=Metaclass_SportModeState): + """Message class 'SportModeState'.""" + + __slots__ = [ + '_stamp', + '_error_code', + '_imu_state', + '_mode', + '_progress', + '_gait_type', + '_foot_raise_height', + '_position', + '_body_height', + '_velocity', + '_yaw_speed', + '_range_obstacle', + '_foot_force', + '_foot_position_body', + '_foot_speed_body', + ] + + _fields_and_field_types = { + 'stamp': 'unitree_go/TimeSpec', + 'error_code': 'uint32', + 'imu_state': 'unitree_go/IMUState', + 'mode': 'uint8', + 'progress': 'float', + 'gait_type': 'uint8', + 'foot_raise_height': 'float', + 'position': 'float[3]', + 'body_height': 'float', + 'velocity': 'float[3]', + 'yaw_speed': 'float', + 'range_obstacle': 'float[4]', + 'foot_force': 'int16[4]', + 'foot_position_body': 'float[12]', + 'foot_speed_body': 'float[12]', + } + + SLOT_TYPES = ( + rosidl_parser.definition.NamespacedType(['unitree_go', 'msg'], 'TimeSpec'), # noqa: E501 + rosidl_parser.definition.BasicType('uint32'), # noqa: E501 + rosidl_parser.definition.NamespacedType(['unitree_go', 'msg'], 'IMUState'), # noqa: E501 + rosidl_parser.definition.BasicType('uint8'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('uint8'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('float'), 3), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('float'), 3), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('float'), 4), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('int16'), 4), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('float'), 12), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('float'), 12), # noqa: E501 + ) + + def __init__(self, **kwargs): + assert all('_' + key in self.__slots__ for key in kwargs.keys()), \ + 'Invalid arguments passed to constructor: %s' % \ + ', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__)) + from unitree_go.msg import TimeSpec + self.stamp = kwargs.get('stamp', TimeSpec()) + self.error_code = kwargs.get('error_code', int()) + from unitree_go.msg import IMUState + self.imu_state = kwargs.get('imu_state', IMUState()) + self.mode = kwargs.get('mode', int()) + self.progress = kwargs.get('progress', float()) + self.gait_type = kwargs.get('gait_type', int()) + self.foot_raise_height = kwargs.get('foot_raise_height', float()) + if 'position' not in kwargs: + self.position = numpy.zeros(3, dtype=numpy.float32) + else: + self.position = numpy.array(kwargs.get('position'), dtype=numpy.float32) + assert self.position.shape == (3, ) + self.body_height = kwargs.get('body_height', float()) + if 'velocity' not in kwargs: + self.velocity = numpy.zeros(3, dtype=numpy.float32) + else: + self.velocity = numpy.array(kwargs.get('velocity'), dtype=numpy.float32) + assert self.velocity.shape == (3, ) + self.yaw_speed = kwargs.get('yaw_speed', float()) + if 'range_obstacle' not in kwargs: + self.range_obstacle = numpy.zeros(4, dtype=numpy.float32) + else: + self.range_obstacle = numpy.array(kwargs.get('range_obstacle'), dtype=numpy.float32) + assert self.range_obstacle.shape == (4, ) + if 'foot_force' not in kwargs: + self.foot_force = numpy.zeros(4, dtype=numpy.int16) + else: + self.foot_force = numpy.array(kwargs.get('foot_force'), dtype=numpy.int16) + assert self.foot_force.shape == (4, ) + if 'foot_position_body' not in kwargs: + self.foot_position_body = numpy.zeros(12, dtype=numpy.float32) + else: + self.foot_position_body = numpy.array(kwargs.get('foot_position_body'), dtype=numpy.float32) + assert self.foot_position_body.shape == (12, ) + if 'foot_speed_body' not in kwargs: + self.foot_speed_body = numpy.zeros(12, dtype=numpy.float32) + else: + self.foot_speed_body = numpy.array(kwargs.get('foot_speed_body'), dtype=numpy.float32) + assert self.foot_speed_body.shape == (12, ) + + def __repr__(self): + typename = self.__class__.__module__.split('.') + typename.pop() + typename.append(self.__class__.__name__) + args = [] + for s, t in zip(self.__slots__, self.SLOT_TYPES): + field = getattr(self, s) + fieldstr = repr(field) + # We use Python array type for fields that can be directly stored + # in them, and "normal" sequences for everything else. If it is + # a type that we store in an array, strip off the 'array' portion. + if ( + isinstance(t, rosidl_parser.definition.AbstractSequence) and + isinstance(t.value_type, rosidl_parser.definition.BasicType) and + t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64'] + ): + if len(field) == 0: + fieldstr = '[]' + else: + assert fieldstr.startswith('array(') + prefix = "array('X', " + suffix = ')' + fieldstr = fieldstr[len(prefix):-len(suffix)] + args.append(s[1:] + '=' + fieldstr) + return '%s(%s)' % ('.'.join(typename), ', '.join(args)) + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + if self.stamp != other.stamp: + return False + if self.error_code != other.error_code: + return False + if self.imu_state != other.imu_state: + return False + if self.mode != other.mode: + return False + if self.progress != other.progress: + return False + if self.gait_type != other.gait_type: + return False + if self.foot_raise_height != other.foot_raise_height: + return False + if all(self.position != other.position): + return False + if self.body_height != other.body_height: + return False + if all(self.velocity != other.velocity): + return False + if self.yaw_speed != other.yaw_speed: + return False + if all(self.range_obstacle != other.range_obstacle): + return False + if all(self.foot_force != other.foot_force): + return False + if all(self.foot_position_body != other.foot_position_body): + return False + if all(self.foot_speed_body != other.foot_speed_body): + return False + return True + + @classmethod + def get_fields_and_field_types(cls): + from copy import copy + return copy(cls._fields_and_field_types) + + @property + def stamp(self): + """Message field 'stamp'.""" + return self._stamp + + @stamp.setter + def stamp(self, value): + if __debug__: + from unitree_go.msg import TimeSpec + assert \ + isinstance(value, TimeSpec), \ + "The 'stamp' field must be a sub message of type 'TimeSpec'" + self._stamp = value + + @property + def error_code(self): + """Message field 'error_code'.""" + return self._error_code + + @error_code.setter + def error_code(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'error_code' field must be of type 'int'" + assert value >= 0 and value < 4294967296, \ + "The 'error_code' field must be an unsigned integer in [0, 4294967295]" + self._error_code = value + + @property + def imu_state(self): + """Message field 'imu_state'.""" + return self._imu_state + + @imu_state.setter + def imu_state(self, value): + if __debug__: + from unitree_go.msg import IMUState + assert \ + isinstance(value, IMUState), \ + "The 'imu_state' field must be a sub message of type 'IMUState'" + self._imu_state = value + + @property + def mode(self): + """Message field 'mode'.""" + return self._mode + + @mode.setter + def mode(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'mode' field must be of type 'int'" + assert value >= 0 and value < 256, \ + "The 'mode' field must be an unsigned integer in [0, 255]" + self._mode = value + + @property + def progress(self): + """Message field 'progress'.""" + return self._progress + + @progress.setter + def progress(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'progress' field must be of type 'float'" + self._progress = value + + @property + def gait_type(self): + """Message field 'gait_type'.""" + return self._gait_type + + @gait_type.setter + def gait_type(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'gait_type' field must be of type 'int'" + assert value >= 0 and value < 256, \ + "The 'gait_type' field must be an unsigned integer in [0, 255]" + self._gait_type = value + + @property + def foot_raise_height(self): + """Message field 'foot_raise_height'.""" + return self._foot_raise_height + + @foot_raise_height.setter + def foot_raise_height(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'foot_raise_height' field must be of type 'float'" + self._foot_raise_height = value + + @property + def position(self): + """Message field 'position'.""" + return self._position + + @position.setter + def position(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.float32, \ + "The 'position' numpy.ndarray() must have the dtype of 'numpy.float32'" + assert value.size == 3, \ + "The 'position' numpy.ndarray() must have a size of 3" + self._position = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 3 and + all(isinstance(v, float) for v in value) and + True), \ + "The 'position' field must be a set or sequence with length 3 and each value of type 'float'" + self._position = numpy.array(value, dtype=numpy.float32) + + @property + def body_height(self): + """Message field 'body_height'.""" + return self._body_height + + @body_height.setter + def body_height(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'body_height' field must be of type 'float'" + self._body_height = value + + @property + def velocity(self): + """Message field 'velocity'.""" + return self._velocity + + @velocity.setter + def velocity(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.float32, \ + "The 'velocity' numpy.ndarray() must have the dtype of 'numpy.float32'" + assert value.size == 3, \ + "The 'velocity' numpy.ndarray() must have a size of 3" + self._velocity = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 3 and + all(isinstance(v, float) for v in value) and + True), \ + "The 'velocity' field must be a set or sequence with length 3 and each value of type 'float'" + self._velocity = numpy.array(value, dtype=numpy.float32) + + @property + def yaw_speed(self): + """Message field 'yaw_speed'.""" + return self._yaw_speed + + @yaw_speed.setter + def yaw_speed(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'yaw_speed' field must be of type 'float'" + self._yaw_speed = value + + @property + def range_obstacle(self): + """Message field 'range_obstacle'.""" + return self._range_obstacle + + @range_obstacle.setter + def range_obstacle(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.float32, \ + "The 'range_obstacle' numpy.ndarray() must have the dtype of 'numpy.float32'" + assert value.size == 4, \ + "The 'range_obstacle' numpy.ndarray() must have a size of 4" + self._range_obstacle = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 4 and + all(isinstance(v, float) for v in value) and + True), \ + "The 'range_obstacle' field must be a set or sequence with length 4 and each value of type 'float'" + self._range_obstacle = numpy.array(value, dtype=numpy.float32) + + @property + def foot_force(self): + """Message field 'foot_force'.""" + return self._foot_force + + @foot_force.setter + def foot_force(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.int16, \ + "The 'foot_force' numpy.ndarray() must have the dtype of 'numpy.int16'" + assert value.size == 4, \ + "The 'foot_force' numpy.ndarray() must have a size of 4" + self._foot_force = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 4 and + all(isinstance(v, int) for v in value) and + all(val >= -32768 and val < 32768 for val in value)), \ + "The 'foot_force' field must be a set or sequence with length 4 and each value of type 'int' and each integer in [-32768, 32767]" + self._foot_force = numpy.array(value, dtype=numpy.int16) + + @property + def foot_position_body(self): + """Message field 'foot_position_body'.""" + return self._foot_position_body + + @foot_position_body.setter + def foot_position_body(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.float32, \ + "The 'foot_position_body' numpy.ndarray() must have the dtype of 'numpy.float32'" + assert value.size == 12, \ + "The 'foot_position_body' numpy.ndarray() must have a size of 12" + self._foot_position_body = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 12 and + all(isinstance(v, float) for v in value) and + True), \ + "The 'foot_position_body' field must be a set or sequence with length 12 and each value of type 'float'" + self._foot_position_body = numpy.array(value, dtype=numpy.float32) + + @property + def foot_speed_body(self): + """Message field 'foot_speed_body'.""" + return self._foot_speed_body + + @foot_speed_body.setter + def foot_speed_body(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.float32, \ + "The 'foot_speed_body' numpy.ndarray() must have the dtype of 'numpy.float32'" + assert value.size == 12, \ + "The 'foot_speed_body' numpy.ndarray() must have a size of 12" + self._foot_speed_body = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 12 and + all(isinstance(v, float) for v in value) and + True), \ + "The 'foot_speed_body' field must be a set or sequence with length 12 and each value of type 'float'" + self._foot_speed_body = numpy.array(value, dtype=numpy.float32) diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_sport_mode_state_s.c b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_sport_mode_state_s.c new file mode 100644 index 0000000..b25a50b --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_sport_mode_state_s.c @@ -0,0 +1,527 @@ +// generated from rosidl_generator_py/resource/_idl_support.c.em +// with input from unitree_go:msg/SportModeState.idl +// generated code does not contain a copyright notice +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#include +#include +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-function" +#endif +#include "numpy/ndarrayobject.h" +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/detail/sport_mode_state__struct.h" +#include "unitree_go/msg/detail/sport_mode_state__functions.h" + +#include "rosidl_runtime_c/primitives_sequence.h" +#include "rosidl_runtime_c/primitives_sequence_functions.h" + +bool unitree_go__msg__time_spec__convert_from_py(PyObject * _pymsg, void * _ros_message); +PyObject * unitree_go__msg__time_spec__convert_to_py(void * raw_ros_message); +bool unitree_go__msg__imu_state__convert_from_py(PyObject * _pymsg, void * _ros_message); +PyObject * unitree_go__msg__imu_state__convert_to_py(void * raw_ros_message); + +ROSIDL_GENERATOR_C_EXPORT +bool unitree_go__msg__sport_mode_state__convert_from_py(PyObject * _pymsg, void * _ros_message) +{ + // check that the passed message is of the expected Python class + { + char full_classname_dest[48]; + { + char * class_name = NULL; + char * module_name = NULL; + { + PyObject * class_attr = PyObject_GetAttrString(_pymsg, "__class__"); + if (class_attr) { + PyObject * name_attr = PyObject_GetAttrString(class_attr, "__name__"); + if (name_attr) { + class_name = (char *)PyUnicode_1BYTE_DATA(name_attr); + Py_DECREF(name_attr); + } + PyObject * module_attr = PyObject_GetAttrString(class_attr, "__module__"); + if (module_attr) { + module_name = (char *)PyUnicode_1BYTE_DATA(module_attr); + Py_DECREF(module_attr); + } + Py_DECREF(class_attr); + } + } + if (!class_name || !module_name) { + return false; + } + snprintf(full_classname_dest, sizeof(full_classname_dest), "%s.%s", module_name, class_name); + } + assert(strncmp("unitree_go.msg._sport_mode_state.SportModeState", full_classname_dest, 47) == 0); + } + unitree_go__msg__SportModeState * ros_message = _ros_message; + { // stamp + PyObject * field = PyObject_GetAttrString(_pymsg, "stamp"); + if (!field) { + return false; + } + if (!unitree_go__msg__time_spec__convert_from_py(field, &ros_message->stamp)) { + Py_DECREF(field); + return false; + } + Py_DECREF(field); + } + { // error_code + PyObject * field = PyObject_GetAttrString(_pymsg, "error_code"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->error_code = PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // imu_state + PyObject * field = PyObject_GetAttrString(_pymsg, "imu_state"); + if (!field) { + return false; + } + if (!unitree_go__msg__imu_state__convert_from_py(field, &ros_message->imu_state)) { + Py_DECREF(field); + return false; + } + Py_DECREF(field); + } + { // mode + PyObject * field = PyObject_GetAttrString(_pymsg, "mode"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->mode = (uint8_t)PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // progress + PyObject * field = PyObject_GetAttrString(_pymsg, "progress"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->progress = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // gait_type + PyObject * field = PyObject_GetAttrString(_pymsg, "gait_type"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->gait_type = (uint8_t)PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // foot_raise_height + PyObject * field = PyObject_GetAttrString(_pymsg, "foot_raise_height"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->foot_raise_height = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // position + PyObject * field = PyObject_GetAttrString(_pymsg, "position"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_FLOAT32); + Py_ssize_t size = 3; + float * dest = ros_message->position; + for (Py_ssize_t i = 0; i < size; ++i) { + float tmp = *(npy_float32 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(float)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + { // body_height + PyObject * field = PyObject_GetAttrString(_pymsg, "body_height"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->body_height = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // velocity + PyObject * field = PyObject_GetAttrString(_pymsg, "velocity"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_FLOAT32); + Py_ssize_t size = 3; + float * dest = ros_message->velocity; + for (Py_ssize_t i = 0; i < size; ++i) { + float tmp = *(npy_float32 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(float)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + { // yaw_speed + PyObject * field = PyObject_GetAttrString(_pymsg, "yaw_speed"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->yaw_speed = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // range_obstacle + PyObject * field = PyObject_GetAttrString(_pymsg, "range_obstacle"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_FLOAT32); + Py_ssize_t size = 4; + float * dest = ros_message->range_obstacle; + for (Py_ssize_t i = 0; i < size; ++i) { + float tmp = *(npy_float32 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(float)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + { // foot_force + PyObject * field = PyObject_GetAttrString(_pymsg, "foot_force"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_INT16); + Py_ssize_t size = 4; + int16_t * dest = ros_message->foot_force; + for (Py_ssize_t i = 0; i < size; ++i) { + int16_t tmp = *(npy_int16 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(int16_t)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + { // foot_position_body + PyObject * field = PyObject_GetAttrString(_pymsg, "foot_position_body"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_FLOAT32); + Py_ssize_t size = 12; + float * dest = ros_message->foot_position_body; + for (Py_ssize_t i = 0; i < size; ++i) { + float tmp = *(npy_float32 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(float)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + { // foot_speed_body + PyObject * field = PyObject_GetAttrString(_pymsg, "foot_speed_body"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_FLOAT32); + Py_ssize_t size = 12; + float * dest = ros_message->foot_speed_body; + for (Py_ssize_t i = 0; i < size; ++i) { + float tmp = *(npy_float32 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(float)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + + return true; +} + +ROSIDL_GENERATOR_C_EXPORT +PyObject * unitree_go__msg__sport_mode_state__convert_to_py(void * raw_ros_message) +{ + /* NOTE(esteve): Call constructor of SportModeState */ + PyObject * _pymessage = NULL; + { + PyObject * pymessage_module = PyImport_ImportModule("unitree_go.msg._sport_mode_state"); + assert(pymessage_module); + PyObject * pymessage_class = PyObject_GetAttrString(pymessage_module, "SportModeState"); + assert(pymessage_class); + Py_DECREF(pymessage_module); + _pymessage = PyObject_CallObject(pymessage_class, NULL); + Py_DECREF(pymessage_class); + if (!_pymessage) { + return NULL; + } + } + unitree_go__msg__SportModeState * ros_message = (unitree_go__msg__SportModeState *)raw_ros_message; + { // stamp + PyObject * field = NULL; + field = unitree_go__msg__time_spec__convert_to_py(&ros_message->stamp); + if (!field) { + return NULL; + } + { + int rc = PyObject_SetAttrString(_pymessage, "stamp", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // error_code + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->error_code); + { + int rc = PyObject_SetAttrString(_pymessage, "error_code", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // imu_state + PyObject * field = NULL; + field = unitree_go__msg__imu_state__convert_to_py(&ros_message->imu_state); + if (!field) { + return NULL; + } + { + int rc = PyObject_SetAttrString(_pymessage, "imu_state", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // mode + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->mode); + { + int rc = PyObject_SetAttrString(_pymessage, "mode", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // progress + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->progress); + { + int rc = PyObject_SetAttrString(_pymessage, "progress", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // gait_type + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->gait_type); + { + int rc = PyObject_SetAttrString(_pymessage, "gait_type", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // foot_raise_height + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->foot_raise_height); + { + int rc = PyObject_SetAttrString(_pymessage, "foot_raise_height", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // position + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "position"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_FLOAT32); + assert(sizeof(npy_float32) == sizeof(float)); + npy_float32 * dst = (npy_float32 *)PyArray_GETPTR1(seq_field, 0); + float * src = &(ros_message->position[0]); + memcpy(dst, src, 3 * sizeof(float)); + Py_DECREF(field); + } + { // body_height + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->body_height); + { + int rc = PyObject_SetAttrString(_pymessage, "body_height", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // velocity + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "velocity"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_FLOAT32); + assert(sizeof(npy_float32) == sizeof(float)); + npy_float32 * dst = (npy_float32 *)PyArray_GETPTR1(seq_field, 0); + float * src = &(ros_message->velocity[0]); + memcpy(dst, src, 3 * sizeof(float)); + Py_DECREF(field); + } + { // yaw_speed + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->yaw_speed); + { + int rc = PyObject_SetAttrString(_pymessage, "yaw_speed", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // range_obstacle + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "range_obstacle"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_FLOAT32); + assert(sizeof(npy_float32) == sizeof(float)); + npy_float32 * dst = (npy_float32 *)PyArray_GETPTR1(seq_field, 0); + float * src = &(ros_message->range_obstacle[0]); + memcpy(dst, src, 4 * sizeof(float)); + Py_DECREF(field); + } + { // foot_force + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "foot_force"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_INT16); + assert(sizeof(npy_int16) == sizeof(int16_t)); + npy_int16 * dst = (npy_int16 *)PyArray_GETPTR1(seq_field, 0); + int16_t * src = &(ros_message->foot_force[0]); + memcpy(dst, src, 4 * sizeof(int16_t)); + Py_DECREF(field); + } + { // foot_position_body + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "foot_position_body"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_FLOAT32); + assert(sizeof(npy_float32) == sizeof(float)); + npy_float32 * dst = (npy_float32 *)PyArray_GETPTR1(seq_field, 0); + float * src = &(ros_message->foot_position_body[0]); + memcpy(dst, src, 12 * sizeof(float)); + Py_DECREF(field); + } + { // foot_speed_body + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "foot_speed_body"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_FLOAT32); + assert(sizeof(npy_float32) == sizeof(float)); + npy_float32 * dst = (npy_float32 *)PyArray_GETPTR1(seq_field, 0); + float * src = &(ros_message->foot_speed_body[0]); + memcpy(dst, src, 12 * sizeof(float)); + Py_DECREF(field); + } + + // ownership of _pymessage is transferred to the caller + return _pymessage; +} diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_time_spec.py b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_time_spec.py new file mode 100644 index 0000000..2282825 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_time_spec.py @@ -0,0 +1,145 @@ +# generated from rosidl_generator_py/resource/_idl.py.em +# with input from unitree_go:msg/TimeSpec.idl +# generated code does not contain a copyright notice + + +# Import statements for member types + +import rosidl_parser.definition # noqa: E402, I100 + + +class Metaclass_TimeSpec(type): + """Metaclass of message 'TimeSpec'.""" + + _CREATE_ROS_MESSAGE = None + _CONVERT_FROM_PY = None + _CONVERT_TO_PY = None + _DESTROY_ROS_MESSAGE = None + _TYPE_SUPPORT = None + + __constants = { + } + + @classmethod + def __import_type_support__(cls): + try: + from rosidl_generator_py import import_type_support + module = import_type_support('unitree_go') + except ImportError: + import logging + import traceback + logger = logging.getLogger( + 'unitree_go.msg.TimeSpec') + logger.debug( + 'Failed to import needed modules for type support:\n' + + traceback.format_exc()) + else: + cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__msg__time_spec + cls._CONVERT_FROM_PY = module.convert_from_py_msg__msg__time_spec + cls._CONVERT_TO_PY = module.convert_to_py_msg__msg__time_spec + cls._TYPE_SUPPORT = module.type_support_msg__msg__time_spec + cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__msg__time_spec + + @classmethod + def __prepare__(cls, name, bases, **kwargs): + # list constant names here so that they appear in the help text of + # the message class under "Data and other attributes defined here:" + # as well as populate each message instance + return { + } + + +class TimeSpec(metaclass=Metaclass_TimeSpec): + """Message class 'TimeSpec'.""" + + __slots__ = [ + '_sec', + '_nanosec', + ] + + _fields_and_field_types = { + 'sec': 'int32', + 'nanosec': 'uint32', + } + + SLOT_TYPES = ( + rosidl_parser.definition.BasicType('int32'), # noqa: E501 + rosidl_parser.definition.BasicType('uint32'), # noqa: E501 + ) + + def __init__(self, **kwargs): + assert all('_' + key in self.__slots__ for key in kwargs.keys()), \ + 'Invalid arguments passed to constructor: %s' % \ + ', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__)) + self.sec = kwargs.get('sec', int()) + self.nanosec = kwargs.get('nanosec', int()) + + def __repr__(self): + typename = self.__class__.__module__.split('.') + typename.pop() + typename.append(self.__class__.__name__) + args = [] + for s, t in zip(self.__slots__, self.SLOT_TYPES): + field = getattr(self, s) + fieldstr = repr(field) + # We use Python array type for fields that can be directly stored + # in them, and "normal" sequences for everything else. If it is + # a type that we store in an array, strip off the 'array' portion. + if ( + isinstance(t, rosidl_parser.definition.AbstractSequence) and + isinstance(t.value_type, rosidl_parser.definition.BasicType) and + t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64'] + ): + if len(field) == 0: + fieldstr = '[]' + else: + assert fieldstr.startswith('array(') + prefix = "array('X', " + suffix = ')' + fieldstr = fieldstr[len(prefix):-len(suffix)] + args.append(s[1:] + '=' + fieldstr) + return '%s(%s)' % ('.'.join(typename), ', '.join(args)) + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + if self.sec != other.sec: + return False + if self.nanosec != other.nanosec: + return False + return True + + @classmethod + def get_fields_and_field_types(cls): + from copy import copy + return copy(cls._fields_and_field_types) + + @property + def sec(self): + """Message field 'sec'.""" + return self._sec + + @sec.setter + def sec(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'sec' field must be of type 'int'" + assert value >= -2147483648 and value < 2147483648, \ + "The 'sec' field must be an integer in [-2147483648, 2147483647]" + self._sec = value + + @property + def nanosec(self): + """Message field 'nanosec'.""" + return self._nanosec + + @nanosec.setter + def nanosec(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'nanosec' field must be of type 'int'" + assert value >= 0 and value < 4294967296, \ + "The 'nanosec' field must be an unsigned integer in [0, 4294967295]" + self._nanosec = value diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_time_spec_s.c b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_time_spec_s.c new file mode 100644 index 0000000..a9643e1 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_time_spec_s.c @@ -0,0 +1,118 @@ +// generated from rosidl_generator_py/resource/_idl_support.c.em +// with input from unitree_go:msg/TimeSpec.idl +// generated code does not contain a copyright notice +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#include +#include +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-function" +#endif +#include "numpy/ndarrayobject.h" +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/detail/time_spec__struct.h" +#include "unitree_go/msg/detail/time_spec__functions.h" + + +ROSIDL_GENERATOR_C_EXPORT +bool unitree_go__msg__time_spec__convert_from_py(PyObject * _pymsg, void * _ros_message) +{ + // check that the passed message is of the expected Python class + { + char full_classname_dest[35]; + { + char * class_name = NULL; + char * module_name = NULL; + { + PyObject * class_attr = PyObject_GetAttrString(_pymsg, "__class__"); + if (class_attr) { + PyObject * name_attr = PyObject_GetAttrString(class_attr, "__name__"); + if (name_attr) { + class_name = (char *)PyUnicode_1BYTE_DATA(name_attr); + Py_DECREF(name_attr); + } + PyObject * module_attr = PyObject_GetAttrString(class_attr, "__module__"); + if (module_attr) { + module_name = (char *)PyUnicode_1BYTE_DATA(module_attr); + Py_DECREF(module_attr); + } + Py_DECREF(class_attr); + } + } + if (!class_name || !module_name) { + return false; + } + snprintf(full_classname_dest, sizeof(full_classname_dest), "%s.%s", module_name, class_name); + } + assert(strncmp("unitree_go.msg._time_spec.TimeSpec", full_classname_dest, 34) == 0); + } + unitree_go__msg__TimeSpec * ros_message = _ros_message; + { // sec + PyObject * field = PyObject_GetAttrString(_pymsg, "sec"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->sec = (int32_t)PyLong_AsLong(field); + Py_DECREF(field); + } + { // nanosec + PyObject * field = PyObject_GetAttrString(_pymsg, "nanosec"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->nanosec = PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + + return true; +} + +ROSIDL_GENERATOR_C_EXPORT +PyObject * unitree_go__msg__time_spec__convert_to_py(void * raw_ros_message) +{ + /* NOTE(esteve): Call constructor of TimeSpec */ + PyObject * _pymessage = NULL; + { + PyObject * pymessage_module = PyImport_ImportModule("unitree_go.msg._time_spec"); + assert(pymessage_module); + PyObject * pymessage_class = PyObject_GetAttrString(pymessage_module, "TimeSpec"); + assert(pymessage_class); + Py_DECREF(pymessage_module); + _pymessage = PyObject_CallObject(pymessage_class, NULL); + Py_DECREF(pymessage_class); + if (!_pymessage) { + return NULL; + } + } + unitree_go__msg__TimeSpec * ros_message = (unitree_go__msg__TimeSpec *)raw_ros_message; + { // sec + PyObject * field = NULL; + field = PyLong_FromLong(ros_message->sec); + { + int rc = PyObject_SetAttrString(_pymessage, "sec", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // nanosec + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->nanosec); + { + int rc = PyObject_SetAttrString(_pymessage, "nanosec", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + + // ownership of _pymessage is transferred to the caller + return _pymessage; +} diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_uwb_state.py b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_uwb_state.py new file mode 100644 index 0000000..5ed22b5 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_uwb_state.py @@ -0,0 +1,484 @@ +# generated from rosidl_generator_py/resource/_idl.py.em +# with input from unitree_go:msg/UwbState.idl +# generated code does not contain a copyright notice + + +# Import statements for member types + +# Member 'version' +# Member 'joystick' +import numpy # noqa: E402, I100 + +import rosidl_parser.definition # noqa: E402, I100 + + +class Metaclass_UwbState(type): + """Metaclass of message 'UwbState'.""" + + _CREATE_ROS_MESSAGE = None + _CONVERT_FROM_PY = None + _CONVERT_TO_PY = None + _DESTROY_ROS_MESSAGE = None + _TYPE_SUPPORT = None + + __constants = { + } + + @classmethod + def __import_type_support__(cls): + try: + from rosidl_generator_py import import_type_support + module = import_type_support('unitree_go') + except ImportError: + import logging + import traceback + logger = logging.getLogger( + 'unitree_go.msg.UwbState') + logger.debug( + 'Failed to import needed modules for type support:\n' + + traceback.format_exc()) + else: + cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__msg__uwb_state + cls._CONVERT_FROM_PY = module.convert_from_py_msg__msg__uwb_state + cls._CONVERT_TO_PY = module.convert_to_py_msg__msg__uwb_state + cls._TYPE_SUPPORT = module.type_support_msg__msg__uwb_state + cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__msg__uwb_state + + @classmethod + def __prepare__(cls, name, bases, **kwargs): + # list constant names here so that they appear in the help text of + # the message class under "Data and other attributes defined here:" + # as well as populate each message instance + return { + } + + +class UwbState(metaclass=Metaclass_UwbState): + """Message class 'UwbState'.""" + + __slots__ = [ + '_version', + '_channel', + '_joy_mode', + '_orientation_est', + '_pitch_est', + '_distance_est', + '_yaw_est', + '_tag_roll', + '_tag_pitch', + '_tag_yaw', + '_base_roll', + '_base_pitch', + '_base_yaw', + '_joystick', + '_error_state', + '_buttons', + '_enabled_from_app', + ] + + _fields_and_field_types = { + 'version': 'uint8[2]', + 'channel': 'uint8', + 'joy_mode': 'uint8', + 'orientation_est': 'float', + 'pitch_est': 'float', + 'distance_est': 'float', + 'yaw_est': 'float', + 'tag_roll': 'float', + 'tag_pitch': 'float', + 'tag_yaw': 'float', + 'base_roll': 'float', + 'base_pitch': 'float', + 'base_yaw': 'float', + 'joystick': 'float[2]', + 'error_state': 'uint8', + 'buttons': 'uint8', + 'enabled_from_app': 'uint8', + } + + SLOT_TYPES = ( + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('uint8'), 2), # noqa: E501 + rosidl_parser.definition.BasicType('uint8'), # noqa: E501 + rosidl_parser.definition.BasicType('uint8'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.Array(rosidl_parser.definition.BasicType('float'), 2), # noqa: E501 + rosidl_parser.definition.BasicType('uint8'), # noqa: E501 + rosidl_parser.definition.BasicType('uint8'), # noqa: E501 + rosidl_parser.definition.BasicType('uint8'), # noqa: E501 + ) + + def __init__(self, **kwargs): + assert all('_' + key in self.__slots__ for key in kwargs.keys()), \ + 'Invalid arguments passed to constructor: %s' % \ + ', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__)) + if 'version' not in kwargs: + self.version = numpy.zeros(2, dtype=numpy.uint8) + else: + self.version = numpy.array(kwargs.get('version'), dtype=numpy.uint8) + assert self.version.shape == (2, ) + self.channel = kwargs.get('channel', int()) + self.joy_mode = kwargs.get('joy_mode', int()) + self.orientation_est = kwargs.get('orientation_est', float()) + self.pitch_est = kwargs.get('pitch_est', float()) + self.distance_est = kwargs.get('distance_est', float()) + self.yaw_est = kwargs.get('yaw_est', float()) + self.tag_roll = kwargs.get('tag_roll', float()) + self.tag_pitch = kwargs.get('tag_pitch', float()) + self.tag_yaw = kwargs.get('tag_yaw', float()) + self.base_roll = kwargs.get('base_roll', float()) + self.base_pitch = kwargs.get('base_pitch', float()) + self.base_yaw = kwargs.get('base_yaw', float()) + if 'joystick' not in kwargs: + self.joystick = numpy.zeros(2, dtype=numpy.float32) + else: + self.joystick = numpy.array(kwargs.get('joystick'), dtype=numpy.float32) + assert self.joystick.shape == (2, ) + self.error_state = kwargs.get('error_state', int()) + self.buttons = kwargs.get('buttons', int()) + self.enabled_from_app = kwargs.get('enabled_from_app', int()) + + def __repr__(self): + typename = self.__class__.__module__.split('.') + typename.pop() + typename.append(self.__class__.__name__) + args = [] + for s, t in zip(self.__slots__, self.SLOT_TYPES): + field = getattr(self, s) + fieldstr = repr(field) + # We use Python array type for fields that can be directly stored + # in them, and "normal" sequences for everything else. If it is + # a type that we store in an array, strip off the 'array' portion. + if ( + isinstance(t, rosidl_parser.definition.AbstractSequence) and + isinstance(t.value_type, rosidl_parser.definition.BasicType) and + t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64'] + ): + if len(field) == 0: + fieldstr = '[]' + else: + assert fieldstr.startswith('array(') + prefix = "array('X', " + suffix = ')' + fieldstr = fieldstr[len(prefix):-len(suffix)] + args.append(s[1:] + '=' + fieldstr) + return '%s(%s)' % ('.'.join(typename), ', '.join(args)) + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + if all(self.version != other.version): + return False + if self.channel != other.channel: + return False + if self.joy_mode != other.joy_mode: + return False + if self.orientation_est != other.orientation_est: + return False + if self.pitch_est != other.pitch_est: + return False + if self.distance_est != other.distance_est: + return False + if self.yaw_est != other.yaw_est: + return False + if self.tag_roll != other.tag_roll: + return False + if self.tag_pitch != other.tag_pitch: + return False + if self.tag_yaw != other.tag_yaw: + return False + if self.base_roll != other.base_roll: + return False + if self.base_pitch != other.base_pitch: + return False + if self.base_yaw != other.base_yaw: + return False + if all(self.joystick != other.joystick): + return False + if self.error_state != other.error_state: + return False + if self.buttons != other.buttons: + return False + if self.enabled_from_app != other.enabled_from_app: + return False + return True + + @classmethod + def get_fields_and_field_types(cls): + from copy import copy + return copy(cls._fields_and_field_types) + + @property + def version(self): + """Message field 'version'.""" + return self._version + + @version.setter + def version(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.uint8, \ + "The 'version' numpy.ndarray() must have the dtype of 'numpy.uint8'" + assert value.size == 2, \ + "The 'version' numpy.ndarray() must have a size of 2" + self._version = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 2 and + all(isinstance(v, int) for v in value) and + all(val >= 0 and val < 256 for val in value)), \ + "The 'version' field must be a set or sequence with length 2 and each value of type 'int' and each unsigned integer in [0, 255]" + self._version = numpy.array(value, dtype=numpy.uint8) + + @property + def channel(self): + """Message field 'channel'.""" + return self._channel + + @channel.setter + def channel(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'channel' field must be of type 'int'" + assert value >= 0 and value < 256, \ + "The 'channel' field must be an unsigned integer in [0, 255]" + self._channel = value + + @property + def joy_mode(self): + """Message field 'joy_mode'.""" + return self._joy_mode + + @joy_mode.setter + def joy_mode(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'joy_mode' field must be of type 'int'" + assert value >= 0 and value < 256, \ + "The 'joy_mode' field must be an unsigned integer in [0, 255]" + self._joy_mode = value + + @property + def orientation_est(self): + """Message field 'orientation_est'.""" + return self._orientation_est + + @orientation_est.setter + def orientation_est(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'orientation_est' field must be of type 'float'" + self._orientation_est = value + + @property + def pitch_est(self): + """Message field 'pitch_est'.""" + return self._pitch_est + + @pitch_est.setter + def pitch_est(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'pitch_est' field must be of type 'float'" + self._pitch_est = value + + @property + def distance_est(self): + """Message field 'distance_est'.""" + return self._distance_est + + @distance_est.setter + def distance_est(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'distance_est' field must be of type 'float'" + self._distance_est = value + + @property + def yaw_est(self): + """Message field 'yaw_est'.""" + return self._yaw_est + + @yaw_est.setter + def yaw_est(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'yaw_est' field must be of type 'float'" + self._yaw_est = value + + @property + def tag_roll(self): + """Message field 'tag_roll'.""" + return self._tag_roll + + @tag_roll.setter + def tag_roll(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'tag_roll' field must be of type 'float'" + self._tag_roll = value + + @property + def tag_pitch(self): + """Message field 'tag_pitch'.""" + return self._tag_pitch + + @tag_pitch.setter + def tag_pitch(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'tag_pitch' field must be of type 'float'" + self._tag_pitch = value + + @property + def tag_yaw(self): + """Message field 'tag_yaw'.""" + return self._tag_yaw + + @tag_yaw.setter + def tag_yaw(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'tag_yaw' field must be of type 'float'" + self._tag_yaw = value + + @property + def base_roll(self): + """Message field 'base_roll'.""" + return self._base_roll + + @base_roll.setter + def base_roll(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'base_roll' field must be of type 'float'" + self._base_roll = value + + @property + def base_pitch(self): + """Message field 'base_pitch'.""" + return self._base_pitch + + @base_pitch.setter + def base_pitch(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'base_pitch' field must be of type 'float'" + self._base_pitch = value + + @property + def base_yaw(self): + """Message field 'base_yaw'.""" + return self._base_yaw + + @base_yaw.setter + def base_yaw(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'base_yaw' field must be of type 'float'" + self._base_yaw = value + + @property + def joystick(self): + """Message field 'joystick'.""" + return self._joystick + + @joystick.setter + def joystick(self, value): + if isinstance(value, numpy.ndarray): + assert value.dtype == numpy.float32, \ + "The 'joystick' numpy.ndarray() must have the dtype of 'numpy.float32'" + assert value.size == 2, \ + "The 'joystick' numpy.ndarray() must have a size of 2" + self._joystick = value + return + if __debug__: + from collections.abc import Sequence + from collections.abc import Set + from collections import UserList + from collections import UserString + assert \ + ((isinstance(value, Sequence) or + isinstance(value, Set) or + isinstance(value, UserList)) and + not isinstance(value, str) and + not isinstance(value, UserString) and + len(value) == 2 and + all(isinstance(v, float) for v in value) and + True), \ + "The 'joystick' field must be a set or sequence with length 2 and each value of type 'float'" + self._joystick = numpy.array(value, dtype=numpy.float32) + + @property + def error_state(self): + """Message field 'error_state'.""" + return self._error_state + + @error_state.setter + def error_state(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'error_state' field must be of type 'int'" + assert value >= 0 and value < 256, \ + "The 'error_state' field must be an unsigned integer in [0, 255]" + self._error_state = value + + @property + def buttons(self): + """Message field 'buttons'.""" + return self._buttons + + @buttons.setter + def buttons(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'buttons' field must be of type 'int'" + assert value >= 0 and value < 256, \ + "The 'buttons' field must be an unsigned integer in [0, 255]" + self._buttons = value + + @property + def enabled_from_app(self): + """Message field 'enabled_from_app'.""" + return self._enabled_from_app + + @enabled_from_app.setter + def enabled_from_app(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'enabled_from_app' field must be of type 'int'" + assert value >= 0 and value < 256, \ + "The 'enabled_from_app' field must be an unsigned integer in [0, 255]" + self._enabled_from_app = value diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_uwb_state_s.c b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_uwb_state_s.c new file mode 100644 index 0000000..c551163 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_uwb_state_s.c @@ -0,0 +1,465 @@ +// generated from rosidl_generator_py/resource/_idl_support.c.em +// with input from unitree_go:msg/UwbState.idl +// generated code does not contain a copyright notice +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#include +#include +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-function" +#endif +#include "numpy/ndarrayobject.h" +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/detail/uwb_state__struct.h" +#include "unitree_go/msg/detail/uwb_state__functions.h" + +#include "rosidl_runtime_c/primitives_sequence.h" +#include "rosidl_runtime_c/primitives_sequence_functions.h" + + +ROSIDL_GENERATOR_C_EXPORT +bool unitree_go__msg__uwb_state__convert_from_py(PyObject * _pymsg, void * _ros_message) +{ + // check that the passed message is of the expected Python class + { + char full_classname_dest[35]; + { + char * class_name = NULL; + char * module_name = NULL; + { + PyObject * class_attr = PyObject_GetAttrString(_pymsg, "__class__"); + if (class_attr) { + PyObject * name_attr = PyObject_GetAttrString(class_attr, "__name__"); + if (name_attr) { + class_name = (char *)PyUnicode_1BYTE_DATA(name_attr); + Py_DECREF(name_attr); + } + PyObject * module_attr = PyObject_GetAttrString(class_attr, "__module__"); + if (module_attr) { + module_name = (char *)PyUnicode_1BYTE_DATA(module_attr); + Py_DECREF(module_attr); + } + Py_DECREF(class_attr); + } + } + if (!class_name || !module_name) { + return false; + } + snprintf(full_classname_dest, sizeof(full_classname_dest), "%s.%s", module_name, class_name); + } + assert(strncmp("unitree_go.msg._uwb_state.UwbState", full_classname_dest, 34) == 0); + } + unitree_go__msg__UwbState * ros_message = _ros_message; + { // version + PyObject * field = PyObject_GetAttrString(_pymsg, "version"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_UINT8); + Py_ssize_t size = 2; + uint8_t * dest = ros_message->version; + for (Py_ssize_t i = 0; i < size; ++i) { + uint8_t tmp = *(npy_uint8 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(uint8_t)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + { // channel + PyObject * field = PyObject_GetAttrString(_pymsg, "channel"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->channel = (uint8_t)PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // joy_mode + PyObject * field = PyObject_GetAttrString(_pymsg, "joy_mode"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->joy_mode = (uint8_t)PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // orientation_est + PyObject * field = PyObject_GetAttrString(_pymsg, "orientation_est"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->orientation_est = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // pitch_est + PyObject * field = PyObject_GetAttrString(_pymsg, "pitch_est"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->pitch_est = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // distance_est + PyObject * field = PyObject_GetAttrString(_pymsg, "distance_est"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->distance_est = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // yaw_est + PyObject * field = PyObject_GetAttrString(_pymsg, "yaw_est"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->yaw_est = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // tag_roll + PyObject * field = PyObject_GetAttrString(_pymsg, "tag_roll"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->tag_roll = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // tag_pitch + PyObject * field = PyObject_GetAttrString(_pymsg, "tag_pitch"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->tag_pitch = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // tag_yaw + PyObject * field = PyObject_GetAttrString(_pymsg, "tag_yaw"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->tag_yaw = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // base_roll + PyObject * field = PyObject_GetAttrString(_pymsg, "base_roll"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->base_roll = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // base_pitch + PyObject * field = PyObject_GetAttrString(_pymsg, "base_pitch"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->base_pitch = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // base_yaw + PyObject * field = PyObject_GetAttrString(_pymsg, "base_yaw"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->base_yaw = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // joystick + PyObject * field = PyObject_GetAttrString(_pymsg, "joystick"); + if (!field) { + return false; + } + { + // TODO(dirk-thomas) use a better way to check the type before casting + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + Py_INCREF(seq_field); + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_FLOAT32); + Py_ssize_t size = 2; + float * dest = ros_message->joystick; + for (Py_ssize_t i = 0; i < size; ++i) { + float tmp = *(npy_float32 *)PyArray_GETPTR1(seq_field, i); + memcpy(&dest[i], &tmp, sizeof(float)); + } + Py_DECREF(seq_field); + } + Py_DECREF(field); + } + { // error_state + PyObject * field = PyObject_GetAttrString(_pymsg, "error_state"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->error_state = (uint8_t)PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // buttons + PyObject * field = PyObject_GetAttrString(_pymsg, "buttons"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->buttons = (uint8_t)PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + { // enabled_from_app + PyObject * field = PyObject_GetAttrString(_pymsg, "enabled_from_app"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->enabled_from_app = (uint8_t)PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + + return true; +} + +ROSIDL_GENERATOR_C_EXPORT +PyObject * unitree_go__msg__uwb_state__convert_to_py(void * raw_ros_message) +{ + /* NOTE(esteve): Call constructor of UwbState */ + PyObject * _pymessage = NULL; + { + PyObject * pymessage_module = PyImport_ImportModule("unitree_go.msg._uwb_state"); + assert(pymessage_module); + PyObject * pymessage_class = PyObject_GetAttrString(pymessage_module, "UwbState"); + assert(pymessage_class); + Py_DECREF(pymessage_module); + _pymessage = PyObject_CallObject(pymessage_class, NULL); + Py_DECREF(pymessage_class); + if (!_pymessage) { + return NULL; + } + } + unitree_go__msg__UwbState * ros_message = (unitree_go__msg__UwbState *)raw_ros_message; + { // version + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "version"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_UINT8); + assert(sizeof(npy_uint8) == sizeof(uint8_t)); + npy_uint8 * dst = (npy_uint8 *)PyArray_GETPTR1(seq_field, 0); + uint8_t * src = &(ros_message->version[0]); + memcpy(dst, src, 2 * sizeof(uint8_t)); + Py_DECREF(field); + } + { // channel + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->channel); + { + int rc = PyObject_SetAttrString(_pymessage, "channel", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // joy_mode + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->joy_mode); + { + int rc = PyObject_SetAttrString(_pymessage, "joy_mode", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // orientation_est + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->orientation_est); + { + int rc = PyObject_SetAttrString(_pymessage, "orientation_est", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // pitch_est + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->pitch_est); + { + int rc = PyObject_SetAttrString(_pymessage, "pitch_est", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // distance_est + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->distance_est); + { + int rc = PyObject_SetAttrString(_pymessage, "distance_est", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // yaw_est + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->yaw_est); + { + int rc = PyObject_SetAttrString(_pymessage, "yaw_est", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // tag_roll + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->tag_roll); + { + int rc = PyObject_SetAttrString(_pymessage, "tag_roll", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // tag_pitch + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->tag_pitch); + { + int rc = PyObject_SetAttrString(_pymessage, "tag_pitch", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // tag_yaw + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->tag_yaw); + { + int rc = PyObject_SetAttrString(_pymessage, "tag_yaw", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // base_roll + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->base_roll); + { + int rc = PyObject_SetAttrString(_pymessage, "base_roll", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // base_pitch + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->base_pitch); + { + int rc = PyObject_SetAttrString(_pymessage, "base_pitch", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // base_yaw + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->base_yaw); + { + int rc = PyObject_SetAttrString(_pymessage, "base_yaw", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // joystick + PyObject * field = NULL; + field = PyObject_GetAttrString(_pymessage, "joystick"); + if (!field) { + return NULL; + } + assert(field->ob_type != NULL); + assert(field->ob_type->tp_name != NULL); + assert(strcmp(field->ob_type->tp_name, "numpy.ndarray") == 0); + PyArrayObject * seq_field = (PyArrayObject *)field; + assert(PyArray_NDIM(seq_field) == 1); + assert(PyArray_TYPE(seq_field) == NPY_FLOAT32); + assert(sizeof(npy_float32) == sizeof(float)); + npy_float32 * dst = (npy_float32 *)PyArray_GETPTR1(seq_field, 0); + float * src = &(ros_message->joystick[0]); + memcpy(dst, src, 2 * sizeof(float)); + Py_DECREF(field); + } + { // error_state + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->error_state); + { + int rc = PyObject_SetAttrString(_pymessage, "error_state", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // buttons + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->buttons); + { + int rc = PyObject_SetAttrString(_pymessage, "buttons", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // enabled_from_app + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->enabled_from_app); + { + int rc = PyObject_SetAttrString(_pymessage, "enabled_from_app", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + + // ownership of _pymessage is transferred to the caller + return _pymessage; +} diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_uwb_switch.py b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_uwb_switch.py new file mode 100644 index 0000000..5d28dcb --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_uwb_switch.py @@ -0,0 +1,124 @@ +# generated from rosidl_generator_py/resource/_idl.py.em +# with input from unitree_go:msg/UwbSwitch.idl +# generated code does not contain a copyright notice + + +# Import statements for member types + +import rosidl_parser.definition # noqa: E402, I100 + + +class Metaclass_UwbSwitch(type): + """Metaclass of message 'UwbSwitch'.""" + + _CREATE_ROS_MESSAGE = None + _CONVERT_FROM_PY = None + _CONVERT_TO_PY = None + _DESTROY_ROS_MESSAGE = None + _TYPE_SUPPORT = None + + __constants = { + } + + @classmethod + def __import_type_support__(cls): + try: + from rosidl_generator_py import import_type_support + module = import_type_support('unitree_go') + except ImportError: + import logging + import traceback + logger = logging.getLogger( + 'unitree_go.msg.UwbSwitch') + logger.debug( + 'Failed to import needed modules for type support:\n' + + traceback.format_exc()) + else: + cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__msg__uwb_switch + cls._CONVERT_FROM_PY = module.convert_from_py_msg__msg__uwb_switch + cls._CONVERT_TO_PY = module.convert_to_py_msg__msg__uwb_switch + cls._TYPE_SUPPORT = module.type_support_msg__msg__uwb_switch + cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__msg__uwb_switch + + @classmethod + def __prepare__(cls, name, bases, **kwargs): + # list constant names here so that they appear in the help text of + # the message class under "Data and other attributes defined here:" + # as well as populate each message instance + return { + } + + +class UwbSwitch(metaclass=Metaclass_UwbSwitch): + """Message class 'UwbSwitch'.""" + + __slots__ = [ + '_enabled', + ] + + _fields_and_field_types = { + 'enabled': 'uint8', + } + + SLOT_TYPES = ( + rosidl_parser.definition.BasicType('uint8'), # noqa: E501 + ) + + def __init__(self, **kwargs): + assert all('_' + key in self.__slots__ for key in kwargs.keys()), \ + 'Invalid arguments passed to constructor: %s' % \ + ', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__)) + self.enabled = kwargs.get('enabled', int()) + + def __repr__(self): + typename = self.__class__.__module__.split('.') + typename.pop() + typename.append(self.__class__.__name__) + args = [] + for s, t in zip(self.__slots__, self.SLOT_TYPES): + field = getattr(self, s) + fieldstr = repr(field) + # We use Python array type for fields that can be directly stored + # in them, and "normal" sequences for everything else. If it is + # a type that we store in an array, strip off the 'array' portion. + if ( + isinstance(t, rosidl_parser.definition.AbstractSequence) and + isinstance(t.value_type, rosidl_parser.definition.BasicType) and + t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64'] + ): + if len(field) == 0: + fieldstr = '[]' + else: + assert fieldstr.startswith('array(') + prefix = "array('X', " + suffix = ')' + fieldstr = fieldstr[len(prefix):-len(suffix)] + args.append(s[1:] + '=' + fieldstr) + return '%s(%s)' % ('.'.join(typename), ', '.join(args)) + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + if self.enabled != other.enabled: + return False + return True + + @classmethod + def get_fields_and_field_types(cls): + from copy import copy + return copy(cls._fields_and_field_types) + + @property + def enabled(self): + """Message field 'enabled'.""" + return self._enabled + + @enabled.setter + def enabled(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'enabled' field must be of type 'int'" + assert value >= 0 and value < 256, \ + "The 'enabled' field must be an unsigned integer in [0, 255]" + self._enabled = value diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_uwb_switch_s.c b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_uwb_switch_s.c new file mode 100644 index 0000000..64fae02 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_uwb_switch_s.c @@ -0,0 +1,98 @@ +// generated from rosidl_generator_py/resource/_idl_support.c.em +// with input from unitree_go:msg/UwbSwitch.idl +// generated code does not contain a copyright notice +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#include +#include +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-function" +#endif +#include "numpy/ndarrayobject.h" +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/detail/uwb_switch__struct.h" +#include "unitree_go/msg/detail/uwb_switch__functions.h" + + +ROSIDL_GENERATOR_C_EXPORT +bool unitree_go__msg__uwb_switch__convert_from_py(PyObject * _pymsg, void * _ros_message) +{ + // check that the passed message is of the expected Python class + { + char full_classname_dest[37]; + { + char * class_name = NULL; + char * module_name = NULL; + { + PyObject * class_attr = PyObject_GetAttrString(_pymsg, "__class__"); + if (class_attr) { + PyObject * name_attr = PyObject_GetAttrString(class_attr, "__name__"); + if (name_attr) { + class_name = (char *)PyUnicode_1BYTE_DATA(name_attr); + Py_DECREF(name_attr); + } + PyObject * module_attr = PyObject_GetAttrString(class_attr, "__module__"); + if (module_attr) { + module_name = (char *)PyUnicode_1BYTE_DATA(module_attr); + Py_DECREF(module_attr); + } + Py_DECREF(class_attr); + } + } + if (!class_name || !module_name) { + return false; + } + snprintf(full_classname_dest, sizeof(full_classname_dest), "%s.%s", module_name, class_name); + } + assert(strncmp("unitree_go.msg._uwb_switch.UwbSwitch", full_classname_dest, 36) == 0); + } + unitree_go__msg__UwbSwitch * ros_message = _ros_message; + { // enabled + PyObject * field = PyObject_GetAttrString(_pymsg, "enabled"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->enabled = (uint8_t)PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + + return true; +} + +ROSIDL_GENERATOR_C_EXPORT +PyObject * unitree_go__msg__uwb_switch__convert_to_py(void * raw_ros_message) +{ + /* NOTE(esteve): Call constructor of UwbSwitch */ + PyObject * _pymessage = NULL; + { + PyObject * pymessage_module = PyImport_ImportModule("unitree_go.msg._uwb_switch"); + assert(pymessage_module); + PyObject * pymessage_class = PyObject_GetAttrString(pymessage_module, "UwbSwitch"); + assert(pymessage_class); + Py_DECREF(pymessage_module); + _pymessage = PyObject_CallObject(pymessage_class, NULL); + Py_DECREF(pymessage_class); + if (!_pymessage) { + return NULL; + } + } + unitree_go__msg__UwbSwitch * ros_message = (unitree_go__msg__UwbSwitch *)raw_ros_message; + { // enabled + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->enabled); + { + int rc = PyObject_SetAttrString(_pymessage, "enabled", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + + // ownership of _pymessage is transferred to the caller + return _pymessage; +} diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_wireless_controller.py b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_wireless_controller.py new file mode 100644 index 0000000..ceeb80a --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_wireless_controller.py @@ -0,0 +1,200 @@ +# generated from rosidl_generator_py/resource/_idl.py.em +# with input from unitree_go:msg/WirelessController.idl +# generated code does not contain a copyright notice + + +# Import statements for member types + +import rosidl_parser.definition # noqa: E402, I100 + + +class Metaclass_WirelessController(type): + """Metaclass of message 'WirelessController'.""" + + _CREATE_ROS_MESSAGE = None + _CONVERT_FROM_PY = None + _CONVERT_TO_PY = None + _DESTROY_ROS_MESSAGE = None + _TYPE_SUPPORT = None + + __constants = { + } + + @classmethod + def __import_type_support__(cls): + try: + from rosidl_generator_py import import_type_support + module = import_type_support('unitree_go') + except ImportError: + import logging + import traceback + logger = logging.getLogger( + 'unitree_go.msg.WirelessController') + logger.debug( + 'Failed to import needed modules for type support:\n' + + traceback.format_exc()) + else: + cls._CREATE_ROS_MESSAGE = module.create_ros_message_msg__msg__wireless_controller + cls._CONVERT_FROM_PY = module.convert_from_py_msg__msg__wireless_controller + cls._CONVERT_TO_PY = module.convert_to_py_msg__msg__wireless_controller + cls._TYPE_SUPPORT = module.type_support_msg__msg__wireless_controller + cls._DESTROY_ROS_MESSAGE = module.destroy_ros_message_msg__msg__wireless_controller + + @classmethod + def __prepare__(cls, name, bases, **kwargs): + # list constant names here so that they appear in the help text of + # the message class under "Data and other attributes defined here:" + # as well as populate each message instance + return { + } + + +class WirelessController(metaclass=Metaclass_WirelessController): + """Message class 'WirelessController'.""" + + __slots__ = [ + '_lx', + '_ly', + '_rx', + '_ry', + '_keys', + ] + + _fields_and_field_types = { + 'lx': 'float', + 'ly': 'float', + 'rx': 'float', + 'ry': 'float', + 'keys': 'uint16', + } + + SLOT_TYPES = ( + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('float'), # noqa: E501 + rosidl_parser.definition.BasicType('uint16'), # noqa: E501 + ) + + def __init__(self, **kwargs): + assert all('_' + key in self.__slots__ for key in kwargs.keys()), \ + 'Invalid arguments passed to constructor: %s' % \ + ', '.join(sorted(k for k in kwargs.keys() if '_' + k not in self.__slots__)) + self.lx = kwargs.get('lx', float()) + self.ly = kwargs.get('ly', float()) + self.rx = kwargs.get('rx', float()) + self.ry = kwargs.get('ry', float()) + self.keys = kwargs.get('keys', int()) + + def __repr__(self): + typename = self.__class__.__module__.split('.') + typename.pop() + typename.append(self.__class__.__name__) + args = [] + for s, t in zip(self.__slots__, self.SLOT_TYPES): + field = getattr(self, s) + fieldstr = repr(field) + # We use Python array type for fields that can be directly stored + # in them, and "normal" sequences for everything else. If it is + # a type that we store in an array, strip off the 'array' portion. + if ( + isinstance(t, rosidl_parser.definition.AbstractSequence) and + isinstance(t.value_type, rosidl_parser.definition.BasicType) and + t.value_type.typename in ['float', 'double', 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64'] + ): + if len(field) == 0: + fieldstr = '[]' + else: + assert fieldstr.startswith('array(') + prefix = "array('X', " + suffix = ')' + fieldstr = fieldstr[len(prefix):-len(suffix)] + args.append(s[1:] + '=' + fieldstr) + return '%s(%s)' % ('.'.join(typename), ', '.join(args)) + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + if self.lx != other.lx: + return False + if self.ly != other.ly: + return False + if self.rx != other.rx: + return False + if self.ry != other.ry: + return False + if self.keys != other.keys: + return False + return True + + @classmethod + def get_fields_and_field_types(cls): + from copy import copy + return copy(cls._fields_and_field_types) + + @property + def lx(self): + """Message field 'lx'.""" + return self._lx + + @lx.setter + def lx(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'lx' field must be of type 'float'" + self._lx = value + + @property + def ly(self): + """Message field 'ly'.""" + return self._ly + + @ly.setter + def ly(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'ly' field must be of type 'float'" + self._ly = value + + @property + def rx(self): + """Message field 'rx'.""" + return self._rx + + @rx.setter + def rx(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'rx' field must be of type 'float'" + self._rx = value + + @property + def ry(self): + """Message field 'ry'.""" + return self._ry + + @ry.setter + def ry(self, value): + if __debug__: + assert \ + isinstance(value, float), \ + "The 'ry' field must be of type 'float'" + self._ry = value + + @property + def keys(self): + """Message field 'keys'.""" + return self._keys + + @keys.setter + def keys(self, value): + if __debug__: + assert \ + isinstance(value, int), \ + "The 'keys' field must be of type 'int'" + assert value >= 0 and value < 65536, \ + "The 'keys' field must be an unsigned integer in [0, 65535]" + self._keys = value diff --git a/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_wireless_controller_s.c b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_wireless_controller_s.c new file mode 100644 index 0000000..f02defc --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/lib/python3.8/site-packages/unitree_go/msg/_wireless_controller_s.c @@ -0,0 +1,178 @@ +// generated from rosidl_generator_py/resource/_idl_support.c.em +// with input from unitree_go:msg/WirelessController.idl +// generated code does not contain a copyright notice +#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION +#include +#include +#ifndef _WIN32 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-function" +#endif +#include "numpy/ndarrayobject.h" +#ifndef _WIN32 +# pragma GCC diagnostic pop +#endif +#include "rosidl_runtime_c/visibility_control.h" +#include "unitree_go/msg/detail/wireless_controller__struct.h" +#include "unitree_go/msg/detail/wireless_controller__functions.h" + + +ROSIDL_GENERATOR_C_EXPORT +bool unitree_go__msg__wireless_controller__convert_from_py(PyObject * _pymsg, void * _ros_message) +{ + // check that the passed message is of the expected Python class + { + char full_classname_dest[55]; + { + char * class_name = NULL; + char * module_name = NULL; + { + PyObject * class_attr = PyObject_GetAttrString(_pymsg, "__class__"); + if (class_attr) { + PyObject * name_attr = PyObject_GetAttrString(class_attr, "__name__"); + if (name_attr) { + class_name = (char *)PyUnicode_1BYTE_DATA(name_attr); + Py_DECREF(name_attr); + } + PyObject * module_attr = PyObject_GetAttrString(class_attr, "__module__"); + if (module_attr) { + module_name = (char *)PyUnicode_1BYTE_DATA(module_attr); + Py_DECREF(module_attr); + } + Py_DECREF(class_attr); + } + } + if (!class_name || !module_name) { + return false; + } + snprintf(full_classname_dest, sizeof(full_classname_dest), "%s.%s", module_name, class_name); + } + assert(strncmp("unitree_go.msg._wireless_controller.WirelessController", full_classname_dest, 54) == 0); + } + unitree_go__msg__WirelessController * ros_message = _ros_message; + { // lx + PyObject * field = PyObject_GetAttrString(_pymsg, "lx"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->lx = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // ly + PyObject * field = PyObject_GetAttrString(_pymsg, "ly"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->ly = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // rx + PyObject * field = PyObject_GetAttrString(_pymsg, "rx"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->rx = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // ry + PyObject * field = PyObject_GetAttrString(_pymsg, "ry"); + if (!field) { + return false; + } + assert(PyFloat_Check(field)); + ros_message->ry = (float)PyFloat_AS_DOUBLE(field); + Py_DECREF(field); + } + { // keys + PyObject * field = PyObject_GetAttrString(_pymsg, "keys"); + if (!field) { + return false; + } + assert(PyLong_Check(field)); + ros_message->keys = (uint16_t)PyLong_AsUnsignedLong(field); + Py_DECREF(field); + } + + return true; +} + +ROSIDL_GENERATOR_C_EXPORT +PyObject * unitree_go__msg__wireless_controller__convert_to_py(void * raw_ros_message) +{ + /* NOTE(esteve): Call constructor of WirelessController */ + PyObject * _pymessage = NULL; + { + PyObject * pymessage_module = PyImport_ImportModule("unitree_go.msg._wireless_controller"); + assert(pymessage_module); + PyObject * pymessage_class = PyObject_GetAttrString(pymessage_module, "WirelessController"); + assert(pymessage_class); + Py_DECREF(pymessage_module); + _pymessage = PyObject_CallObject(pymessage_class, NULL); + Py_DECREF(pymessage_class); + if (!_pymessage) { + return NULL; + } + } + unitree_go__msg__WirelessController * ros_message = (unitree_go__msg__WirelessController *)raw_ros_message; + { // lx + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->lx); + { + int rc = PyObject_SetAttrString(_pymessage, "lx", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // ly + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->ly); + { + int rc = PyObject_SetAttrString(_pymessage, "ly", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // rx + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->rx); + { + int rc = PyObject_SetAttrString(_pymessage, "rx", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // ry + PyObject * field = NULL; + field = PyFloat_FromDouble(ros_message->ry); + { + int rc = PyObject_SetAttrString(_pymessage, "ry", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + { // keys + PyObject * field = NULL; + field = PyLong_FromUnsignedLong(ros_message->keys); + { + int rc = PyObject_SetAttrString(_pymessage, "keys", field); + Py_DECREF(field); + if (rc) { + return NULL; + } + } + } + + // ownership of _pymessage is transferred to the caller + return _pymessage; +} diff --git a/deploy/robot_ws/install/unitree_go/share/ament_index/resource_index/package_run_dependencies/unitree_go b/deploy/robot_ws/install/unitree_go/share/ament_index/resource_index/package_run_dependencies/unitree_go new file mode 100644 index 0000000..cabffa8 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/ament_index/resource_index/package_run_dependencies/unitree_go @@ -0,0 +1 @@ +geometry_msgs;rosidl_default_runtime;ament_lint_auto;ament_lint_common \ No newline at end of file diff --git a/deploy/robot_ws/install/unitree_go/share/ament_index/resource_index/packages/unitree_go b/deploy/robot_ws/install/unitree_go/share/ament_index/resource_index/packages/unitree_go new file mode 100644 index 0000000..e69de29 diff --git a/deploy/robot_ws/install/unitree_go/share/ament_index/resource_index/parent_prefix_path/unitree_go b/deploy/robot_ws/install/unitree_go/share/ament_index/resource_index/parent_prefix_path/unitree_go new file mode 100644 index 0000000..e053138 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/ament_index/resource_index/parent_prefix_path/unitree_go @@ -0,0 +1 @@ +/home/unitree/locomotion/Go2Py/deploy/ros2_ws/install/go2py_node:/home/unitree/locomotion/Go2Py/deploy/ros2_ws/install/unitree_go:/home/unitree/locomotion/Go2Py/deploy/ros2_ws/install/unitree_api:/home/unitree/locomotion/Go2Py/deploy/ros2_ws/install/hesai_ros_driver:/home/unitree/locomotion/unitree_ros2/cyclonedds_ws/install/unitree_go:/home/unitree/locomotion/unitree_ros2/cyclonedds_ws/install/unitree_api:/home/unitree/locomotion/unitree_ros2/cyclonedds_ws/install/rmw_cyclonedds_cpp:/opt/ros/foxy \ No newline at end of file diff --git a/deploy/robot_ws/install/unitree_go/share/ament_index/resource_index/rosidl_interfaces/unitree_go b/deploy/robot_ws/install/unitree_go/share/ament_index/resource_index/rosidl_interfaces/unitree_go new file mode 100644 index 0000000..02ef2ab --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/ament_index/resource_index/rosidl_interfaces/unitree_go @@ -0,0 +1,44 @@ +msg/AudioData.idl +msg/AudioData.msg +msg/BmsCmd.idl +msg/BmsCmd.msg +msg/BmsState.idl +msg/BmsState.msg +msg/Error.idl +msg/Error.msg +msg/Go2FrontVideoData.idl +msg/Go2FrontVideoData.msg +msg/HeightMap.idl +msg/HeightMap.msg +msg/IMUState.idl +msg/IMUState.msg +msg/InterfaceConfig.idl +msg/InterfaceConfig.msg +msg/LidarState.idl +msg/LidarState.msg +msg/LowCmd.idl +msg/LowCmd.msg +msg/LowState.idl +msg/LowState.msg +msg/MotorCmd.idl +msg/MotorCmd.msg +msg/MotorState.idl +msg/MotorState.msg +msg/PathPoint.idl +msg/PathPoint.msg +msg/Req.idl +msg/Req.msg +msg/Res.idl +msg/Res.msg +msg/SportModeCmd.idl +msg/SportModeCmd.msg +msg/SportModeState.idl +msg/SportModeState.msg +msg/TimeSpec.idl +msg/TimeSpec.msg +msg/UwbState.idl +msg/UwbState.msg +msg/UwbSwitch.idl +msg/UwbSwitch.msg +msg/WirelessController.idl +msg/WirelessController.msg \ No newline at end of file diff --git a/deploy/robot_ws/install/unitree_go/share/colcon-core/packages/unitree_go b/deploy/robot_ws/install/unitree_go/share/colcon-core/packages/unitree_go new file mode 100644 index 0000000..c819a81 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/colcon-core/packages/unitree_go @@ -0,0 +1 @@ +geometry_msgs:rosidl_default_runtime \ No newline at end of file diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/ament_cmake_export_dependencies-extras.cmake b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/ament_cmake_export_dependencies-extras.cmake new file mode 100644 index 0000000..5b7890c --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/ament_cmake_export_dependencies-extras.cmake @@ -0,0 +1,92 @@ +# generated from ament_cmake_export_dependencies/cmake/ament_cmake_export_dependencies-extras.cmake.in + +set(_exported_dependencies "geometry_msgs;geometry_msgs;std_msgs;builtin_interfaces;rosidl_runtime_c;rosidl_typesupport_interface;geometry_msgs;std_msgs;builtin_interfaces;geometry_msgs;std_msgs;builtin_interfaces") + +find_package(ament_cmake_libraries QUIET REQUIRED) + +# find_package() all dependencies +# and append their DEFINITIONS INCLUDE_DIRS, LIBRARIES, and LINK_FLAGS +# variables to unitree_go_DEFINITIONS, unitree_go_INCLUDE_DIRS, +# unitree_go_LIBRARIES, and unitree_go_LINK_FLAGS. +# Additionally collect the direct dependency names in +# unitree_go_DEPENDENCIES as well as the recursive dependency names +# in unitree_go_RECURSIVE_DEPENDENCIES. +if(NOT _exported_dependencies STREQUAL "") + find_package(ament_cmake_core QUIET REQUIRED) + set(unitree_go_DEPENDENCIES ${_exported_dependencies}) + set(unitree_go_RECURSIVE_DEPENDENCIES ${_exported_dependencies}) + set(_libraries) + foreach(_dep ${_exported_dependencies}) + if(NOT ${_dep}_FOUND) + find_package("${_dep}" QUIET REQUIRED) + endif() + # if a package provides modern CMake interface targets use them + # exclusively assuming the classic CMake variables only exist for + # backward compatibility + set(use_modern_cmake FALSE) + if(NOT "${${_dep}_TARGETS}" STREQUAL "") + foreach(_target ${${_dep}_TARGETS}) + # only use actual targets + # in case a package uses this variable for other content + if(TARGET "${_target}") + get_target_property(_include_dirs ${_target} INTERFACE_INCLUDE_DIRECTORIES) + if(_include_dirs) + list_append_unique(unitree_go_INCLUDE_DIRS "${_include_dirs}") + endif() + + get_target_property(_imported_configurations ${_target} IMPORTED_CONFIGURATIONS) + if(_imported_configurations) + string(TOUPPER "${_imported_configurations}" _imported_configurations) + if(DEBUG_CONFIGURATIONS) + string(TOUPPER "${DEBUG_CONFIGURATIONS}" _debug_configurations_uppercase) + else() + set(_debug_configurations_uppercase "DEBUG") + endif() + foreach(_imported_config ${_imported_configurations}) + get_target_property(_imported_implib ${_target} IMPORTED_IMPLIB_${_imported_config}) + if(_imported_implib) + set(_imported_implib_config "optimized") + if(${_imported_config} IN_LIST _debug_configurations_uppercase) + set(_imported_implib_config "debug") + endif() + list(APPEND _libraries ${_imported_implib_config} ${_imported_implib}) + else() + get_target_property(_imported_location ${_target} IMPORTED_LOCATION_${_imported_config}) + if(_imported_location) + list(APPEND _libraries "${_imported_location}") + endif() + endif() + endforeach() + endif() + + get_target_property(_link_libraries ${_target} INTERFACE_LINK_LIBRARIES) + if(_link_libraries) + list(APPEND _libraries "${_link_libraries}") + endif() + set(use_modern_cmake TRUE) + endif() + endforeach() + endif() + if(NOT use_modern_cmake) + if(${_dep}_DEFINITIONS) + list_append_unique(unitree_go_DEFINITIONS "${${_dep}_DEFINITIONS}") + endif() + if(${_dep}_INCLUDE_DIRS) + list_append_unique(unitree_go_INCLUDE_DIRS "${${_dep}_INCLUDE_DIRS}") + endif() + if(${_dep}_LIBRARIES) + list(APPEND _libraries "${${_dep}_LIBRARIES}") + endif() + if(${_dep}_LINK_FLAGS) + list_append_unique(unitree_go_LINK_FLAGS "${${_dep}_LINK_FLAGS}") + endif() + if(${_dep}_RECURSIVE_DEPENDENCIES) + list_append_unique(unitree_go_RECURSIVE_DEPENDENCIES "${${_dep}_RECURSIVE_DEPENDENCIES}") + endif() + endif() + if(_libraries) + ament_libraries_deduplicate(_libraries "${_libraries}") + list(APPEND unitree_go_LIBRARIES "${_libraries}") + endif() + endforeach() +endif() diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/ament_cmake_export_include_directories-extras.cmake b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/ament_cmake_export_include_directories-extras.cmake new file mode 100644 index 0000000..00975c3 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/ament_cmake_export_include_directories-extras.cmake @@ -0,0 +1,16 @@ +# generated from ament_cmake_export_include_directories/cmake/ament_cmake_export_include_directories-extras.cmake.in + +set(_exported_include_dirs "${unitree_go_DIR}/../../../include") + +# append include directories to unitree_go_INCLUDE_DIRS +# warn about not existing paths +if(NOT _exported_include_dirs STREQUAL "") + find_package(ament_cmake_core QUIET REQUIRED) + foreach(_exported_include_dir ${_exported_include_dirs}) + if(NOT IS_DIRECTORY "${_exported_include_dir}") + message(WARNING "Package 'unitree_go' exports the include directory '${_exported_include_dir}' which doesn't exist") + endif() + normalize_path(_exported_include_dir "${_exported_include_dir}") + list(APPEND unitree_go_INCLUDE_DIRS "${_exported_include_dir}") + endforeach() +endif() diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/ament_cmake_export_libraries-extras.cmake b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/ament_cmake_export_libraries-extras.cmake new file mode 100644 index 0000000..0e66abf --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/ament_cmake_export_libraries-extras.cmake @@ -0,0 +1,140 @@ +# generated from ament_cmake_export_libraries/cmake/template/ament_cmake_export_libraries.cmake.in + +set(_exported_libraries "unitree_go__rosidl_generator_c;unitree_go__rosidl_typesupport_c;unitree_go__rosidl_typesupport_cpp") +set(_exported_library_names "") + +# populate unitree_go_LIBRARIES +if(NOT _exported_libraries STREQUAL "") + # loop over libraries, either target names or absolute paths + list(LENGTH _exported_libraries _length) + set(_i 0) + while(_i LESS _length) + list(GET _exported_libraries ${_i} _arg) + + # pass linker flags along + if("${_arg}" MATCHES "^-" AND NOT "${_arg}" MATCHES "^-[l|framework]") + list(APPEND unitree_go_LIBRARIES "${_arg}") + math(EXPR _i "${_i} + 1") + continue() + endif() + + if("${_arg}" MATCHES "^(debug|optimized|general)$") + # remember build configuration keyword + # and get following library + set(_cfg "${_arg}") + math(EXPR _i "${_i} + 1") + if(_i EQUAL _length) + message(FATAL_ERROR "Package 'unitree_go' passes the build configuration keyword '${_cfg}' as the last exported library") + endif() + list(GET _exported_libraries ${_i} _library) + else() + # the value is a library without a build configuration keyword + set(_cfg "") + set(_library "${_arg}") + endif() + math(EXPR _i "${_i} + 1") + + if(NOT IS_ABSOLUTE "${_library}") + # search for library target relative to this CMake file + set(_lib "NOTFOUND") + find_library( + _lib NAMES "${_library}" + PATHS "${unitree_go_DIR}/../../../lib" + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH + ) + + if(NOT _lib) + # warn about not existing library and ignore it + message(FATAL_ERROR "Package 'unitree_go' exports the library '${_library}' which couldn't be found") + elseif(NOT IS_ABSOLUTE "${_lib}") + # the found library must be an absolute path + message(FATAL_ERROR "Package 'unitree_go' found the library '${_library}' at '${_lib}' which is not an absolute path") + elseif(NOT EXISTS "${_lib}") + # the found library must exist + message(FATAL_ERROR "Package 'unitree_go' found the library '${_lib}' which doesn't exist") + else() + list(APPEND unitree_go_LIBRARIES ${_cfg} "${_lib}") + endif() + + else() + if(NOT EXISTS "${_library}") + # the found library must exist + message(WARNING "Package 'unitree_go' exports the library '${_library}' which doesn't exist") + else() + list(APPEND unitree_go_LIBRARIES ${_cfg} "${_library}") + endif() + endif() + endwhile() +endif() + +# find_library() library names with optional LIBRARY_DIRS +# and add the libraries to unitree_go_LIBRARIES +if(NOT _exported_library_names STREQUAL "") + # loop over library names + # but remember related build configuration keyword if available + list(LENGTH _exported_library_names _length) + set(_i 0) + while(_i LESS _length) + list(GET _exported_library_names ${_i} _arg) + # pass linker flags along + if("${_arg}" MATCHES "^-" AND NOT "${_arg}" MATCHES "^-[l|framework]") + list(APPEND unitree_go_LIBRARIES "${_arg}") + math(EXPR _i "${_i} + 1") + continue() + endif() + + if("${_arg}" MATCHES "^(debug|optimized|general)$") + # remember build configuration keyword + # and get following library name + set(_cfg "${_arg}") + math(EXPR _i "${_i} + 1") + if(_i EQUAL _length) + message(FATAL_ERROR "Package 'unitree_go' passes the build configuration keyword '${_cfg}' as the last exported target") + endif() + list(GET _exported_library_names ${_i} _library) + else() + # the value is a library target without a build configuration keyword + set(_cfg "") + set(_library "${_arg}") + endif() + math(EXPR _i "${_i} + 1") + + # extract optional LIBRARY_DIRS from library name + string(REPLACE ":" ";" _library_dirs "${_library}") + list(GET _library_dirs 0 _library_name) + list(REMOVE_AT _library_dirs 0) + + set(_lib "NOTFOUND") + if(NOT _library_dirs) + # search for library in the common locations + find_library( + _lib + NAMES "${_library_name}" + ) + if(NOT _lib) + # warn about not existing library and later ignore it + message(WARNING "Package 'unitree_go' exports library '${_library_name}' which couldn't be found") + endif() + else() + # search for library in the specified directories + find_library( + _lib + NAMES "${_library_name}" + PATHS ${_library_dirs} + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH + ) + if(NOT _lib) + # warn about not existing library and later ignore it + message(WARNING "Package 'unitree_go' exports library '${_library_name}' with LIBRARY_DIRS '${_library_dirs}' which couldn't be found") + endif() + endif() + if(_lib) + list(APPEND unitree_go_LIBRARIES ${_cfg} "${_lib}") + endif() + endwhile() +endif() + +# TODO(dirk-thomas) deduplicate unitree_go_LIBRARIES +# while maintaining library order +# as well as build configuration keywords +# as well as linker flags diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/ament_cmake_export_targets-extras.cmake b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/ament_cmake_export_targets-extras.cmake new file mode 100644 index 0000000..352e169 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/ament_cmake_export_targets-extras.cmake @@ -0,0 +1,27 @@ +# generated from ament_cmake_export_targets/cmake/ament_cmake_export_targets-extras.cmake.in + +set(_exported_targets "unitree_go__rosidl_generator_c;unitree_go__rosidl_typesupport_introspection_c;unitree_go__rosidl_typesupport_c;unitree_go__rosidl_generator_cpp;unitree_go__rosidl_typesupport_introspection_cpp;unitree_go__rosidl_typesupport_cpp") + +# include all exported targets +if(NOT _exported_targets STREQUAL "") + foreach(_target ${_exported_targets}) + set(_export_file "${unitree_go_DIR}/${_target}Export.cmake") + include("${_export_file}") + + # extract the target names associated with the export + set(_regex "foreach\\((_cmake)?_expected_?[Tt]arget (IN ITEMS )?(.+)\\)") + file( + STRINGS "${_export_file}" _foreach_targets + REGEX "${_regex}") + list(LENGTH _foreach_targets _matches) + if(NOT _matches EQUAL 1) + message(FATAL_ERROR + "Failed to find exported target names in '${_export_file}'") + endif() + string(REGEX REPLACE "${_regex}" "\\3" _targets "${_foreach_targets}") + string(REPLACE " " ";" _targets "${_targets}") + list(LENGTH _targets _length) + + list(APPEND unitree_go_TARGETS ${_targets}) + endforeach() +endif() diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/rosidl_cmake-extras.cmake b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/rosidl_cmake-extras.cmake new file mode 100644 index 0000000..7f78ab3 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/rosidl_cmake-extras.cmake @@ -0,0 +1,4 @@ +# generated from rosidl_cmake/cmake/rosidl_cmake-extras.cmake.in + +set(unitree_go_IDL_FILES "msg/AudioData.idl;msg/BmsCmd.idl;msg/BmsState.idl;msg/Error.idl;msg/Go2FrontVideoData.idl;msg/HeightMap.idl;msg/IMUState.idl;msg/InterfaceConfig.idl;msg/LidarState.idl;msg/LowCmd.idl;msg/LowState.idl;msg/MotorCmd.idl;msg/MotorState.idl;msg/PathPoint.idl;msg/Req.idl;msg/Res.idl;msg/SportModeCmd.idl;msg/SportModeState.idl;msg/TimeSpec.idl;msg/UwbState.idl;msg/UwbSwitch.idl;msg/WirelessController.idl") +set(unitree_go_INTERFACE_FILES "msg/AudioData.msg;msg/BmsCmd.msg;msg/BmsState.msg;msg/Error.msg;msg/Go2FrontVideoData.msg;msg/HeightMap.msg;msg/IMUState.msg;msg/InterfaceConfig.msg;msg/LidarState.msg;msg/LowCmd.msg;msg/LowState.msg;msg/MotorCmd.msg;msg/MotorState.msg;msg/PathPoint.msg;msg/Req.msg;msg/Res.msg;msg/SportModeCmd.msg;msg/SportModeState.msg;msg/TimeSpec.msg;msg/UwbState.msg;msg/UwbSwitch.msg;msg/WirelessController.msg") diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/rosidl_cmake_export_typesupport_libraries-extras.cmake b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/rosidl_cmake_export_typesupport_libraries-extras.cmake new file mode 100644 index 0000000..43f28e2 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/rosidl_cmake_export_typesupport_libraries-extras.cmake @@ -0,0 +1,46 @@ +# generated from +# rosidl_cmake/cmake/template/rosidl_cmake_export_typesupport_libraries.cmake.in + +set(_exported_typesupport_libraries + "__rosidl_typesupport_fastrtps_c:unitree_go__rosidl_typesupport_fastrtps_c;__rosidl_typesupport_fastrtps_cpp:unitree_go__rosidl_typesupport_fastrtps_cpp") + +# populate unitree_go_LIBRARIES_ +if(NOT _exported_typesupport_libraries STREQUAL "") + # loop over typesupport libraries + foreach(_tuple ${_exported_typesupport_libraries}) + string(REPLACE ":" ";" _tuple "${_tuple}") + list(GET _tuple 0 _suffix) + list(GET _tuple 1 _library) + + if(NOT IS_ABSOLUTE "${_library}") + # search for library target relative to this CMake file + set(_lib "NOTFOUND") + find_library( + _lib NAMES "${_library}" + PATHS "${unitree_go_DIR}/../../../lib" + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH + ) + + if(NOT _lib) + # the library wasn't found + message(FATAL_ERROR "Package 'unitree_go' exports the typesupport library '${_library}' which couldn't be found") + elseif(NOT IS_ABSOLUTE "${_lib}") + # the found library must be an absolute path + message(FATAL_ERROR "Package 'unitree_go' found the typesupport library '${_library}' at '${_lib}' which is not an absolute path") + elseif(NOT EXISTS "${_lib}") + # the found library must exist + message(FATAL_ERROR "Package 'unitree_go' found the typesupport library '${_lib}' which doesn't exist") + else() + list(APPEND unitree_go_LIBRARIES${_suffix} ${_cfg} "${_lib}") + endif() + + else() + if(NOT EXISTS "${_library}") + # the found library must exist + message(WARNING "Package 'unitree_go' exports the typesupport library '${_library}' which doesn't exist") + else() + list(APPEND unitree_go_LIBRARIES${_suffix} "${_library}") + endif() + endif() + endforeach() +endif() diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/rosidl_cmake_export_typesupport_targets-extras.cmake b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/rosidl_cmake_export_typesupport_targets-extras.cmake new file mode 100644 index 0000000..1243d23 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/rosidl_cmake_export_typesupport_targets-extras.cmake @@ -0,0 +1,23 @@ +# generated from +# rosidl_cmake/cmake/template/rosidl_cmake_export_typesupport_targets.cmake.in + +set(_exported_typesupport_targets + "__rosidl_typesupport_introspection_c:unitree_go__rosidl_typesupport_introspection_c;__rosidl_typesupport_introspection_cpp:unitree_go__rosidl_typesupport_introspection_cpp") + +# populate unitree_go_TARGETS_ +if(NOT _exported_typesupport_targets STREQUAL "") + # loop over typesupport targets + foreach(_tuple ${_exported_typesupport_targets}) + string(REPLACE ":" ";" _tuple "${_tuple}") + list(GET _tuple 0 _suffix) + list(GET _tuple 1 _target) + + set(_target "unitree_go::${_target}") + if(NOT TARGET "${_target}") + # the exported target must exist + message(WARNING "Package 'unitree_go' exports the typesupport target '${_target}' which doesn't exist") + else() + list(APPEND unitree_go_TARGETS${_suffix} "${_target}") + endif() + endforeach() +endif() diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_goConfig-version.cmake b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_goConfig-version.cmake new file mode 100644 index 0000000..7beb732 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_goConfig-version.cmake @@ -0,0 +1,14 @@ +# generated from ament/cmake/core/templates/nameConfig-version.cmake.in +set(PACKAGE_VERSION "0.0.0") + +set(PACKAGE_VERSION_EXACT False) +set(PACKAGE_VERSION_COMPATIBLE False) + +if("${PACKAGE_FIND_VERSION}" VERSION_EQUAL "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_EXACT True) + set(PACKAGE_VERSION_COMPATIBLE True) +endif() + +if("${PACKAGE_FIND_VERSION}" VERSION_LESS "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_COMPATIBLE True) +endif() diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_goConfig.cmake b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_goConfig.cmake new file mode 100644 index 0000000..484f8ec --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_goConfig.cmake @@ -0,0 +1,42 @@ +# generated from ament/cmake/core/templates/nameConfig.cmake.in + +# prevent multiple inclusion +if(_unitree_go_CONFIG_INCLUDED) + # ensure to keep the found flag the same + if(NOT DEFINED unitree_go_FOUND) + # explicitly set it to FALSE, otherwise CMake will set it to TRUE + set(unitree_go_FOUND FALSE) + elseif(NOT unitree_go_FOUND) + # use separate condition to avoid uninitialized variable warning + set(unitree_go_FOUND FALSE) + endif() + return() +endif() +set(_unitree_go_CONFIG_INCLUDED TRUE) + +# output package information +if(NOT unitree_go_FIND_QUIETLY) + message(STATUS "Found unitree_go: 0.0.0 (${unitree_go_DIR})") +endif() + +# warn when using a deprecated package +if(NOT "" STREQUAL "") + set(_msg "Package 'unitree_go' is deprecated") + # append custom deprecation text if available + if(NOT "" STREQUAL "TRUE") + set(_msg "${_msg} ()") + endif() + # optionally quiet the deprecation message + if(NOT ${unitree_go_DEPRECATED_QUIET}) + message(DEPRECATION "${_msg}") + endif() +endif() + +# flag package as ament-based to distinguish it after being find_package()-ed +set(unitree_go_FOUND_AMENT_PACKAGE TRUE) + +# include all config extra files +set(_extras "rosidl_cmake-extras.cmake;ament_cmake_export_dependencies-extras.cmake;ament_cmake_export_libraries-extras.cmake;ament_cmake_export_targets-extras.cmake;ament_cmake_export_include_directories-extras.cmake;rosidl_cmake_export_typesupport_libraries-extras.cmake;rosidl_cmake_export_typesupport_targets-extras.cmake") +foreach(_extra ${_extras}) + include("${unitree_go_DIR}/${_extra}") +endforeach() diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_go__rosidl_generator_cExport-noconfig.cmake b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_go__rosidl_generator_cExport-noconfig.cmake new file mode 100644 index 0000000..020323e --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_go__rosidl_generator_cExport-noconfig.cmake @@ -0,0 +1,19 @@ +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Import target "unitree_go::unitree_go__rosidl_generator_c" for configuration "" +set_property(TARGET unitree_go::unitree_go__rosidl_generator_c APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG) +set_target_properties(unitree_go::unitree_go__rosidl_generator_c PROPERTIES + IMPORTED_LOCATION_NOCONFIG "${_IMPORT_PREFIX}/lib/libunitree_go__rosidl_generator_c.so" + IMPORTED_SONAME_NOCONFIG "libunitree_go__rosidl_generator_c.so" + ) + +list(APPEND _IMPORT_CHECK_TARGETS unitree_go::unitree_go__rosidl_generator_c ) +list(APPEND _IMPORT_CHECK_FILES_FOR_unitree_go::unitree_go__rosidl_generator_c "${_IMPORT_PREFIX}/lib/libunitree_go__rosidl_generator_c.so" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_go__rosidl_generator_cExport.cmake b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_go__rosidl_generator_cExport.cmake new file mode 100644 index 0000000..81513c1 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_go__rosidl_generator_cExport.cmake @@ -0,0 +1,99 @@ +# Generated by CMake + +if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5) + message(FATAL_ERROR "CMake >= 2.6.0 required") +endif() +cmake_policy(PUSH) +cmake_policy(VERSION 2.6) +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Protect against multiple inclusion, which would fail when already imported targets are added once more. +set(_targetsDefined) +set(_targetsNotDefined) +set(_expectedTargets) +foreach(_expectedTarget unitree_go::unitree_go__rosidl_generator_c) + list(APPEND _expectedTargets ${_expectedTarget}) + if(NOT TARGET ${_expectedTarget}) + list(APPEND _targetsNotDefined ${_expectedTarget}) + endif() + if(TARGET ${_expectedTarget}) + list(APPEND _targetsDefined ${_expectedTarget}) + endif() +endforeach() +if("${_targetsDefined}" STREQUAL "${_expectedTargets}") + unset(_targetsDefined) + unset(_targetsNotDefined) + unset(_expectedTargets) + set(CMAKE_IMPORT_FILE_VERSION) + cmake_policy(POP) + return() +endif() +if(NOT "${_targetsDefined}" STREQUAL "") + message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n") +endif() +unset(_targetsDefined) +unset(_targetsNotDefined) +unset(_expectedTargets) + + +# Compute the installation prefix relative to this file. +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +if(_IMPORT_PREFIX STREQUAL "/") + set(_IMPORT_PREFIX "") +endif() + +# Create imported target unitree_go::unitree_go__rosidl_generator_c +add_library(unitree_go::unitree_go__rosidl_generator_c SHARED IMPORTED) + +set_target_properties(unitree_go::unitree_go__rosidl_generator_c PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" + INTERFACE_LINK_LIBRARIES "geometry_msgs::geometry_msgs__rosidl_generator_c;geometry_msgs::geometry_msgs__rosidl_typesupport_introspection_c;geometry_msgs::geometry_msgs__rosidl_typesupport_c;geometry_msgs::geometry_msgs__rosidl_generator_cpp;geometry_msgs::geometry_msgs__rosidl_typesupport_introspection_cpp;geometry_msgs::geometry_msgs__rosidl_typesupport_cpp;std_msgs::std_msgs__rosidl_generator_c;std_msgs::std_msgs__rosidl_typesupport_introspection_c;std_msgs::std_msgs__rosidl_typesupport_c;std_msgs::std_msgs__rosidl_generator_cpp;std_msgs::std_msgs__rosidl_typesupport_introspection_cpp;std_msgs::std_msgs__rosidl_typesupport_cpp;builtin_interfaces::builtin_interfaces__rosidl_generator_c;builtin_interfaces::builtin_interfaces__rosidl_typesupport_introspection_c;builtin_interfaces::builtin_interfaces__rosidl_typesupport_c;builtin_interfaces::builtin_interfaces__rosidl_generator_cpp;builtin_interfaces::builtin_interfaces__rosidl_typesupport_introspection_cpp;builtin_interfaces::builtin_interfaces__rosidl_typesupport_cpp;rosidl_runtime_c::rosidl_runtime_c;rosidl_typesupport_interface::rosidl_typesupport_interface;rcutils::rcutils" +) + +if(CMAKE_VERSION VERSION_LESS 2.8.12) + message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.") +endif() + +# Load information for each installed configuration. +get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +file(GLOB CONFIG_FILES "${_DIR}/unitree_go__rosidl_generator_cExport-*.cmake") +foreach(f ${CONFIG_FILES}) + include(${f}) +endforeach() + +# Cleanup temporary variables. +set(_IMPORT_PREFIX) + +# Loop over all imported files and verify that they actually exist +foreach(target ${_IMPORT_CHECK_TARGETS} ) + foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} ) + if(NOT EXISTS "${file}" ) + message(FATAL_ERROR "The imported target \"${target}\" references the file + \"${file}\" +but this file does not exist. Possible reasons include: +* The file was deleted, renamed, or moved to another location. +* An install or uninstall procedure did not complete successfully. +* The installation package was faulty and contained + \"${CMAKE_CURRENT_LIST_FILE}\" +but not all the files it references. +") + endif() + endforeach() + unset(_IMPORT_CHECK_FILES_FOR_${target}) +endforeach() +unset(_IMPORT_CHECK_TARGETS) + +# This file does not depend on other imported targets which have +# been exported from the same project but in a separate export set. + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) +cmake_policy(POP) diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_go__rosidl_generator_cppExport.cmake b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_go__rosidl_generator_cppExport.cmake new file mode 100644 index 0000000..35fc6a2 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_go__rosidl_generator_cppExport.cmake @@ -0,0 +1,99 @@ +# Generated by CMake + +if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5) + message(FATAL_ERROR "CMake >= 2.6.0 required") +endif() +cmake_policy(PUSH) +cmake_policy(VERSION 2.6) +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Protect against multiple inclusion, which would fail when already imported targets are added once more. +set(_targetsDefined) +set(_targetsNotDefined) +set(_expectedTargets) +foreach(_expectedTarget unitree_go::unitree_go__rosidl_generator_cpp) + list(APPEND _expectedTargets ${_expectedTarget}) + if(NOT TARGET ${_expectedTarget}) + list(APPEND _targetsNotDefined ${_expectedTarget}) + endif() + if(TARGET ${_expectedTarget}) + list(APPEND _targetsDefined ${_expectedTarget}) + endif() +endforeach() +if("${_targetsDefined}" STREQUAL "${_expectedTargets}") + unset(_targetsDefined) + unset(_targetsNotDefined) + unset(_expectedTargets) + set(CMAKE_IMPORT_FILE_VERSION) + cmake_policy(POP) + return() +endif() +if(NOT "${_targetsDefined}" STREQUAL "") + message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n") +endif() +unset(_targetsDefined) +unset(_targetsNotDefined) +unset(_expectedTargets) + + +# Compute the installation prefix relative to this file. +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +if(_IMPORT_PREFIX STREQUAL "/") + set(_IMPORT_PREFIX "") +endif() + +# Create imported target unitree_go::unitree_go__rosidl_generator_cpp +add_library(unitree_go::unitree_go__rosidl_generator_cpp INTERFACE IMPORTED) + +set_target_properties(unitree_go::unitree_go__rosidl_generator_cpp PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" + INTERFACE_LINK_LIBRARIES "geometry_msgs::geometry_msgs__rosidl_generator_c;geometry_msgs::geometry_msgs__rosidl_typesupport_introspection_c;geometry_msgs::geometry_msgs__rosidl_typesupport_c;geometry_msgs::geometry_msgs__rosidl_generator_cpp;geometry_msgs::geometry_msgs__rosidl_typesupport_introspection_cpp;geometry_msgs::geometry_msgs__rosidl_typesupport_cpp;std_msgs::std_msgs__rosidl_generator_c;std_msgs::std_msgs__rosidl_typesupport_introspection_c;std_msgs::std_msgs__rosidl_typesupport_c;std_msgs::std_msgs__rosidl_generator_cpp;std_msgs::std_msgs__rosidl_typesupport_introspection_cpp;std_msgs::std_msgs__rosidl_typesupport_cpp;builtin_interfaces::builtin_interfaces__rosidl_generator_c;builtin_interfaces::builtin_interfaces__rosidl_typesupport_introspection_c;builtin_interfaces::builtin_interfaces__rosidl_typesupport_c;builtin_interfaces::builtin_interfaces__rosidl_generator_cpp;builtin_interfaces::builtin_interfaces__rosidl_typesupport_introspection_cpp;builtin_interfaces::builtin_interfaces__rosidl_typesupport_cpp;rosidl_runtime_cpp::rosidl_runtime_cpp" +) + +if(CMAKE_VERSION VERSION_LESS 3.0.0) + message(FATAL_ERROR "This file relies on consumers using CMake 3.0.0 or greater.") +endif() + +# Load information for each installed configuration. +get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +file(GLOB CONFIG_FILES "${_DIR}/unitree_go__rosidl_generator_cppExport-*.cmake") +foreach(f ${CONFIG_FILES}) + include(${f}) +endforeach() + +# Cleanup temporary variables. +set(_IMPORT_PREFIX) + +# Loop over all imported files and verify that they actually exist +foreach(target ${_IMPORT_CHECK_TARGETS} ) + foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} ) + if(NOT EXISTS "${file}" ) + message(FATAL_ERROR "The imported target \"${target}\" references the file + \"${file}\" +but this file does not exist. Possible reasons include: +* The file was deleted, renamed, or moved to another location. +* An install or uninstall procedure did not complete successfully. +* The installation package was faulty and contained + \"${CMAKE_CURRENT_LIST_FILE}\" +but not all the files it references. +") + endif() + endforeach() + unset(_IMPORT_CHECK_FILES_FOR_${target}) +endforeach() +unset(_IMPORT_CHECK_TARGETS) + +# This file does not depend on other imported targets which have +# been exported from the same project but in a separate export set. + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) +cmake_policy(POP) diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_go__rosidl_typesupport_cExport-noconfig.cmake b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_go__rosidl_typesupport_cExport-noconfig.cmake new file mode 100644 index 0000000..d0ccbc0 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_go__rosidl_typesupport_cExport-noconfig.cmake @@ -0,0 +1,19 @@ +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Import target "unitree_go::unitree_go__rosidl_typesupport_c" for configuration "" +set_property(TARGET unitree_go::unitree_go__rosidl_typesupport_c APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG) +set_target_properties(unitree_go::unitree_go__rosidl_typesupport_c PROPERTIES + IMPORTED_LOCATION_NOCONFIG "${_IMPORT_PREFIX}/lib/libunitree_go__rosidl_typesupport_c.so" + IMPORTED_SONAME_NOCONFIG "libunitree_go__rosidl_typesupport_c.so" + ) + +list(APPEND _IMPORT_CHECK_TARGETS unitree_go::unitree_go__rosidl_typesupport_c ) +list(APPEND _IMPORT_CHECK_FILES_FOR_unitree_go::unitree_go__rosidl_typesupport_c "${_IMPORT_PREFIX}/lib/libunitree_go__rosidl_typesupport_c.so" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_go__rosidl_typesupport_cExport.cmake b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_go__rosidl_typesupport_cExport.cmake new file mode 100644 index 0000000..73793e0 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_go__rosidl_typesupport_cExport.cmake @@ -0,0 +1,99 @@ +# Generated by CMake + +if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5) + message(FATAL_ERROR "CMake >= 2.6.0 required") +endif() +cmake_policy(PUSH) +cmake_policy(VERSION 2.6) +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Protect against multiple inclusion, which would fail when already imported targets are added once more. +set(_targetsDefined) +set(_targetsNotDefined) +set(_expectedTargets) +foreach(_expectedTarget unitree_go::unitree_go__rosidl_typesupport_c) + list(APPEND _expectedTargets ${_expectedTarget}) + if(NOT TARGET ${_expectedTarget}) + list(APPEND _targetsNotDefined ${_expectedTarget}) + endif() + if(TARGET ${_expectedTarget}) + list(APPEND _targetsDefined ${_expectedTarget}) + endif() +endforeach() +if("${_targetsDefined}" STREQUAL "${_expectedTargets}") + unset(_targetsDefined) + unset(_targetsNotDefined) + unset(_expectedTargets) + set(CMAKE_IMPORT_FILE_VERSION) + cmake_policy(POP) + return() +endif() +if(NOT "${_targetsDefined}" STREQUAL "") + message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n") +endif() +unset(_targetsDefined) +unset(_targetsNotDefined) +unset(_expectedTargets) + + +# Compute the installation prefix relative to this file. +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +if(_IMPORT_PREFIX STREQUAL "/") + set(_IMPORT_PREFIX "") +endif() + +# Create imported target unitree_go::unitree_go__rosidl_typesupport_c +add_library(unitree_go::unitree_go__rosidl_typesupport_c SHARED IMPORTED) + +set_target_properties(unitree_go::unitree_go__rosidl_typesupport_c PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" + INTERFACE_LINK_LIBRARIES "rosidl_runtime_c::rosidl_runtime_c;rosidl_typesupport_c::rosidl_typesupport_c;rosidl_typesupport_interface::rosidl_typesupport_interface;geometry_msgs::geometry_msgs__rosidl_generator_c;geometry_msgs::geometry_msgs__rosidl_typesupport_introspection_c;geometry_msgs::geometry_msgs__rosidl_typesupport_c;geometry_msgs::geometry_msgs__rosidl_generator_cpp;geometry_msgs::geometry_msgs__rosidl_typesupport_introspection_cpp;geometry_msgs::geometry_msgs__rosidl_typesupport_cpp;std_msgs::std_msgs__rosidl_generator_c;std_msgs::std_msgs__rosidl_typesupport_introspection_c;std_msgs::std_msgs__rosidl_typesupport_c;std_msgs::std_msgs__rosidl_generator_cpp;std_msgs::std_msgs__rosidl_typesupport_introspection_cpp;std_msgs::std_msgs__rosidl_typesupport_cpp;builtin_interfaces::builtin_interfaces__rosidl_generator_c;builtin_interfaces::builtin_interfaces__rosidl_typesupport_introspection_c;builtin_interfaces::builtin_interfaces__rosidl_typesupport_c;builtin_interfaces::builtin_interfaces__rosidl_generator_cpp;builtin_interfaces::builtin_interfaces__rosidl_typesupport_introspection_cpp;builtin_interfaces::builtin_interfaces__rosidl_typesupport_cpp" +) + +if(CMAKE_VERSION VERSION_LESS 2.8.12) + message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.") +endif() + +# Load information for each installed configuration. +get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +file(GLOB CONFIG_FILES "${_DIR}/unitree_go__rosidl_typesupport_cExport-*.cmake") +foreach(f ${CONFIG_FILES}) + include(${f}) +endforeach() + +# Cleanup temporary variables. +set(_IMPORT_PREFIX) + +# Loop over all imported files and verify that they actually exist +foreach(target ${_IMPORT_CHECK_TARGETS} ) + foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} ) + if(NOT EXISTS "${file}" ) + message(FATAL_ERROR "The imported target \"${target}\" references the file + \"${file}\" +but this file does not exist. Possible reasons include: +* The file was deleted, renamed, or moved to another location. +* An install or uninstall procedure did not complete successfully. +* The installation package was faulty and contained + \"${CMAKE_CURRENT_LIST_FILE}\" +but not all the files it references. +") + endif() + endforeach() + unset(_IMPORT_CHECK_FILES_FOR_${target}) +endforeach() +unset(_IMPORT_CHECK_TARGETS) + +# This file does not depend on other imported targets which have +# been exported from the same project but in a separate export set. + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) +cmake_policy(POP) diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_go__rosidl_typesupport_cppExport-noconfig.cmake b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_go__rosidl_typesupport_cppExport-noconfig.cmake new file mode 100644 index 0000000..8a7e93a --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_go__rosidl_typesupport_cppExport-noconfig.cmake @@ -0,0 +1,19 @@ +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Import target "unitree_go::unitree_go__rosidl_typesupport_cpp" for configuration "" +set_property(TARGET unitree_go::unitree_go__rosidl_typesupport_cpp APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG) +set_target_properties(unitree_go::unitree_go__rosidl_typesupport_cpp PROPERTIES + IMPORTED_LOCATION_NOCONFIG "${_IMPORT_PREFIX}/lib/libunitree_go__rosidl_typesupport_cpp.so" + IMPORTED_SONAME_NOCONFIG "libunitree_go__rosidl_typesupport_cpp.so" + ) + +list(APPEND _IMPORT_CHECK_TARGETS unitree_go::unitree_go__rosidl_typesupport_cpp ) +list(APPEND _IMPORT_CHECK_FILES_FOR_unitree_go::unitree_go__rosidl_typesupport_cpp "${_IMPORT_PREFIX}/lib/libunitree_go__rosidl_typesupport_cpp.so" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_go__rosidl_typesupport_cppExport.cmake b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_go__rosidl_typesupport_cppExport.cmake new file mode 100644 index 0000000..58272c7 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_go__rosidl_typesupport_cppExport.cmake @@ -0,0 +1,99 @@ +# Generated by CMake + +if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5) + message(FATAL_ERROR "CMake >= 2.6.0 required") +endif() +cmake_policy(PUSH) +cmake_policy(VERSION 2.6) +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Protect against multiple inclusion, which would fail when already imported targets are added once more. +set(_targetsDefined) +set(_targetsNotDefined) +set(_expectedTargets) +foreach(_expectedTarget unitree_go::unitree_go__rosidl_typesupport_cpp) + list(APPEND _expectedTargets ${_expectedTarget}) + if(NOT TARGET ${_expectedTarget}) + list(APPEND _targetsNotDefined ${_expectedTarget}) + endif() + if(TARGET ${_expectedTarget}) + list(APPEND _targetsDefined ${_expectedTarget}) + endif() +endforeach() +if("${_targetsDefined}" STREQUAL "${_expectedTargets}") + unset(_targetsDefined) + unset(_targetsNotDefined) + unset(_expectedTargets) + set(CMAKE_IMPORT_FILE_VERSION) + cmake_policy(POP) + return() +endif() +if(NOT "${_targetsDefined}" STREQUAL "") + message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n") +endif() +unset(_targetsDefined) +unset(_targetsNotDefined) +unset(_expectedTargets) + + +# Compute the installation prefix relative to this file. +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +if(_IMPORT_PREFIX STREQUAL "/") + set(_IMPORT_PREFIX "") +endif() + +# Create imported target unitree_go::unitree_go__rosidl_typesupport_cpp +add_library(unitree_go::unitree_go__rosidl_typesupport_cpp SHARED IMPORTED) + +set_target_properties(unitree_go::unitree_go__rosidl_typesupport_cpp PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" + INTERFACE_LINK_LIBRARIES "rosidl_runtime_c::rosidl_runtime_c;rosidl_runtime_cpp::rosidl_runtime_cpp;rosidl_typesupport_cpp::rosidl_typesupport_cpp;rosidl_typesupport_interface::rosidl_typesupport_interface;geometry_msgs::geometry_msgs__rosidl_generator_c;geometry_msgs::geometry_msgs__rosidl_typesupport_introspection_c;geometry_msgs::geometry_msgs__rosidl_typesupport_c;geometry_msgs::geometry_msgs__rosidl_generator_cpp;geometry_msgs::geometry_msgs__rosidl_typesupport_introspection_cpp;geometry_msgs::geometry_msgs__rosidl_typesupport_cpp;std_msgs::std_msgs__rosidl_generator_c;std_msgs::std_msgs__rosidl_typesupport_introspection_c;std_msgs::std_msgs__rosidl_typesupport_c;std_msgs::std_msgs__rosidl_generator_cpp;std_msgs::std_msgs__rosidl_typesupport_introspection_cpp;std_msgs::std_msgs__rosidl_typesupport_cpp;builtin_interfaces::builtin_interfaces__rosidl_generator_c;builtin_interfaces::builtin_interfaces__rosidl_typesupport_introspection_c;builtin_interfaces::builtin_interfaces__rosidl_typesupport_c;builtin_interfaces::builtin_interfaces__rosidl_generator_cpp;builtin_interfaces::builtin_interfaces__rosidl_typesupport_introspection_cpp;builtin_interfaces::builtin_interfaces__rosidl_typesupport_cpp" +) + +if(CMAKE_VERSION VERSION_LESS 2.8.12) + message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.") +endif() + +# Load information for each installed configuration. +get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +file(GLOB CONFIG_FILES "${_DIR}/unitree_go__rosidl_typesupport_cppExport-*.cmake") +foreach(f ${CONFIG_FILES}) + include(${f}) +endforeach() + +# Cleanup temporary variables. +set(_IMPORT_PREFIX) + +# Loop over all imported files and verify that they actually exist +foreach(target ${_IMPORT_CHECK_TARGETS} ) + foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} ) + if(NOT EXISTS "${file}" ) + message(FATAL_ERROR "The imported target \"${target}\" references the file + \"${file}\" +but this file does not exist. Possible reasons include: +* The file was deleted, renamed, or moved to another location. +* An install or uninstall procedure did not complete successfully. +* The installation package was faulty and contained + \"${CMAKE_CURRENT_LIST_FILE}\" +but not all the files it references. +") + endif() + endforeach() + unset(_IMPORT_CHECK_FILES_FOR_${target}) +endforeach() +unset(_IMPORT_CHECK_TARGETS) + +# This file does not depend on other imported targets which have +# been exported from the same project but in a separate export set. + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) +cmake_policy(POP) diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_go__rosidl_typesupport_introspection_cExport-noconfig.cmake b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_go__rosidl_typesupport_introspection_cExport-noconfig.cmake new file mode 100644 index 0000000..16dc0ed --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_go__rosidl_typesupport_introspection_cExport-noconfig.cmake @@ -0,0 +1,19 @@ +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Import target "unitree_go::unitree_go__rosidl_typesupport_introspection_c" for configuration "" +set_property(TARGET unitree_go::unitree_go__rosidl_typesupport_introspection_c APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG) +set_target_properties(unitree_go::unitree_go__rosidl_typesupport_introspection_c PROPERTIES + IMPORTED_LOCATION_NOCONFIG "${_IMPORT_PREFIX}/lib/libunitree_go__rosidl_typesupport_introspection_c.so" + IMPORTED_SONAME_NOCONFIG "libunitree_go__rosidl_typesupport_introspection_c.so" + ) + +list(APPEND _IMPORT_CHECK_TARGETS unitree_go::unitree_go__rosidl_typesupport_introspection_c ) +list(APPEND _IMPORT_CHECK_FILES_FOR_unitree_go::unitree_go__rosidl_typesupport_introspection_c "${_IMPORT_PREFIX}/lib/libunitree_go__rosidl_typesupport_introspection_c.so" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_go__rosidl_typesupport_introspection_cExport.cmake b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_go__rosidl_typesupport_introspection_cExport.cmake new file mode 100644 index 0000000..479d5ce --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_go__rosidl_typesupport_introspection_cExport.cmake @@ -0,0 +1,114 @@ +# Generated by CMake + +if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5) + message(FATAL_ERROR "CMake >= 2.6.0 required") +endif() +cmake_policy(PUSH) +cmake_policy(VERSION 2.6) +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Protect against multiple inclusion, which would fail when already imported targets are added once more. +set(_targetsDefined) +set(_targetsNotDefined) +set(_expectedTargets) +foreach(_expectedTarget unitree_go::unitree_go__rosidl_typesupport_introspection_c) + list(APPEND _expectedTargets ${_expectedTarget}) + if(NOT TARGET ${_expectedTarget}) + list(APPEND _targetsNotDefined ${_expectedTarget}) + endif() + if(TARGET ${_expectedTarget}) + list(APPEND _targetsDefined ${_expectedTarget}) + endif() +endforeach() +if("${_targetsDefined}" STREQUAL "${_expectedTargets}") + unset(_targetsDefined) + unset(_targetsNotDefined) + unset(_expectedTargets) + set(CMAKE_IMPORT_FILE_VERSION) + cmake_policy(POP) + return() +endif() +if(NOT "${_targetsDefined}" STREQUAL "") + message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n") +endif() +unset(_targetsDefined) +unset(_targetsNotDefined) +unset(_expectedTargets) + + +# Compute the installation prefix relative to this file. +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +if(_IMPORT_PREFIX STREQUAL "/") + set(_IMPORT_PREFIX "") +endif() + +# Create imported target unitree_go::unitree_go__rosidl_typesupport_introspection_c +add_library(unitree_go::unitree_go__rosidl_typesupport_introspection_c SHARED IMPORTED) + +set_target_properties(unitree_go::unitree_go__rosidl_typesupport_introspection_c PROPERTIES + INTERFACE_LINK_LIBRARIES "unitree_go::unitree_go__rosidl_generator_c;rosidl_typesupport_introspection_c::rosidl_typesupport_introspection_c;geometry_msgs::geometry_msgs__rosidl_generator_c;geometry_msgs::geometry_msgs__rosidl_typesupport_introspection_c;geometry_msgs::geometry_msgs__rosidl_typesupport_c;geometry_msgs::geometry_msgs__rosidl_generator_cpp;geometry_msgs::geometry_msgs__rosidl_typesupport_introspection_cpp;geometry_msgs::geometry_msgs__rosidl_typesupport_cpp;geometry_msgs::geometry_msgs__rosidl_typesupport_introspection_c;std_msgs::std_msgs__rosidl_generator_c;std_msgs::std_msgs__rosidl_typesupport_introspection_c;std_msgs::std_msgs__rosidl_typesupport_c;std_msgs::std_msgs__rosidl_generator_cpp;std_msgs::std_msgs__rosidl_typesupport_introspection_cpp;std_msgs::std_msgs__rosidl_typesupport_cpp;std_msgs::std_msgs__rosidl_typesupport_introspection_c;builtin_interfaces::builtin_interfaces__rosidl_generator_c;builtin_interfaces::builtin_interfaces__rosidl_typesupport_introspection_c;builtin_interfaces::builtin_interfaces__rosidl_typesupport_c;builtin_interfaces::builtin_interfaces__rosidl_generator_cpp;builtin_interfaces::builtin_interfaces__rosidl_typesupport_introspection_cpp;builtin_interfaces::builtin_interfaces__rosidl_typesupport_cpp;builtin_interfaces::builtin_interfaces__rosidl_typesupport_introspection_c" +) + +if(CMAKE_VERSION VERSION_LESS 2.8.12) + message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.") +endif() + +# Load information for each installed configuration. +get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +file(GLOB CONFIG_FILES "${_DIR}/unitree_go__rosidl_typesupport_introspection_cExport-*.cmake") +foreach(f ${CONFIG_FILES}) + include(${f}) +endforeach() + +# Cleanup temporary variables. +set(_IMPORT_PREFIX) + +# Loop over all imported files and verify that they actually exist +foreach(target ${_IMPORT_CHECK_TARGETS} ) + foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} ) + if(NOT EXISTS "${file}" ) + message(FATAL_ERROR "The imported target \"${target}\" references the file + \"${file}\" +but this file does not exist. Possible reasons include: +* The file was deleted, renamed, or moved to another location. +* An install or uninstall procedure did not complete successfully. +* The installation package was faulty and contained + \"${CMAKE_CURRENT_LIST_FILE}\" +but not all the files it references. +") + endif() + endforeach() + unset(_IMPORT_CHECK_FILES_FOR_${target}) +endforeach() +unset(_IMPORT_CHECK_TARGETS) + +# Make sure the targets which have been exported in some other +# export set exist. +unset(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets) +foreach(_target "unitree_go::unitree_go__rosidl_generator_c" ) + if(NOT TARGET "${_target}" ) + set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets "${${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets} ${_target}") + endif() +endforeach() + +if(DEFINED ${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets) + if(CMAKE_FIND_PACKAGE_NAME) + set( ${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE) + set( ${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "The following imported targets are referenced, but are missing: ${${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets}") + else() + message(FATAL_ERROR "The following imported targets are referenced, but are missing: ${${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets}") + endif() +endif() +unset(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE_targets) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) +cmake_policy(POP) diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_go__rosidl_typesupport_introspection_cppExport-noconfig.cmake b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_go__rosidl_typesupport_introspection_cppExport-noconfig.cmake new file mode 100644 index 0000000..3cb5485 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_go__rosidl_typesupport_introspection_cppExport-noconfig.cmake @@ -0,0 +1,19 @@ +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Import target "unitree_go::unitree_go__rosidl_typesupport_introspection_cpp" for configuration "" +set_property(TARGET unitree_go::unitree_go__rosidl_typesupport_introspection_cpp APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG) +set_target_properties(unitree_go::unitree_go__rosidl_typesupport_introspection_cpp PROPERTIES + IMPORTED_LOCATION_NOCONFIG "${_IMPORT_PREFIX}/lib/libunitree_go__rosidl_typesupport_introspection_cpp.so" + IMPORTED_SONAME_NOCONFIG "libunitree_go__rosidl_typesupport_introspection_cpp.so" + ) + +list(APPEND _IMPORT_CHECK_TARGETS unitree_go::unitree_go__rosidl_typesupport_introspection_cpp ) +list(APPEND _IMPORT_CHECK_FILES_FOR_unitree_go::unitree_go__rosidl_typesupport_introspection_cpp "${_IMPORT_PREFIX}/lib/libunitree_go__rosidl_typesupport_introspection_cpp.so" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_go__rosidl_typesupport_introspection_cppExport.cmake b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_go__rosidl_typesupport_introspection_cppExport.cmake new file mode 100644 index 0000000..8fce41e --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/cmake/unitree_go__rosidl_typesupport_introspection_cppExport.cmake @@ -0,0 +1,98 @@ +# Generated by CMake + +if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5) + message(FATAL_ERROR "CMake >= 2.6.0 required") +endif() +cmake_policy(PUSH) +cmake_policy(VERSION 2.6) +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Protect against multiple inclusion, which would fail when already imported targets are added once more. +set(_targetsDefined) +set(_targetsNotDefined) +set(_expectedTargets) +foreach(_expectedTarget unitree_go::unitree_go__rosidl_typesupport_introspection_cpp) + list(APPEND _expectedTargets ${_expectedTarget}) + if(NOT TARGET ${_expectedTarget}) + list(APPEND _targetsNotDefined ${_expectedTarget}) + endif() + if(TARGET ${_expectedTarget}) + list(APPEND _targetsDefined ${_expectedTarget}) + endif() +endforeach() +if("${_targetsDefined}" STREQUAL "${_expectedTargets}") + unset(_targetsDefined) + unset(_targetsNotDefined) + unset(_expectedTargets) + set(CMAKE_IMPORT_FILE_VERSION) + cmake_policy(POP) + return() +endif() +if(NOT "${_targetsDefined}" STREQUAL "") + message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n") +endif() +unset(_targetsDefined) +unset(_targetsNotDefined) +unset(_expectedTargets) + + +# Compute the installation prefix relative to this file. +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +if(_IMPORT_PREFIX STREQUAL "/") + set(_IMPORT_PREFIX "") +endif() + +# Create imported target unitree_go::unitree_go__rosidl_typesupport_introspection_cpp +add_library(unitree_go::unitree_go__rosidl_typesupport_introspection_cpp SHARED IMPORTED) + +set_target_properties(unitree_go::unitree_go__rosidl_typesupport_introspection_cpp PROPERTIES + INTERFACE_LINK_LIBRARIES "rosidl_runtime_c::rosidl_runtime_c;rosidl_typesupport_interface::rosidl_typesupport_interface;rosidl_typesupport_introspection_cpp::rosidl_typesupport_introspection_cpp;geometry_msgs::geometry_msgs__rosidl_generator_c;geometry_msgs::geometry_msgs__rosidl_typesupport_introspection_c;geometry_msgs::geometry_msgs__rosidl_typesupport_c;geometry_msgs::geometry_msgs__rosidl_generator_cpp;geometry_msgs::geometry_msgs__rosidl_typesupport_introspection_cpp;geometry_msgs::geometry_msgs__rosidl_typesupport_cpp;geometry_msgs::geometry_msgs__rosidl_typesupport_introspection_cpp;std_msgs::std_msgs__rosidl_generator_c;std_msgs::std_msgs__rosidl_typesupport_introspection_c;std_msgs::std_msgs__rosidl_typesupport_c;std_msgs::std_msgs__rosidl_generator_cpp;std_msgs::std_msgs__rosidl_typesupport_introspection_cpp;std_msgs::std_msgs__rosidl_typesupport_cpp;std_msgs::std_msgs__rosidl_typesupport_introspection_cpp;builtin_interfaces::builtin_interfaces__rosidl_generator_c;builtin_interfaces::builtin_interfaces__rosidl_typesupport_introspection_c;builtin_interfaces::builtin_interfaces__rosidl_typesupport_c;builtin_interfaces::builtin_interfaces__rosidl_generator_cpp;builtin_interfaces::builtin_interfaces__rosidl_typesupport_introspection_cpp;builtin_interfaces::builtin_interfaces__rosidl_typesupport_cpp;builtin_interfaces::builtin_interfaces__rosidl_typesupport_introspection_cpp" +) + +if(CMAKE_VERSION VERSION_LESS 2.8.12) + message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.") +endif() + +# Load information for each installed configuration. +get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +file(GLOB CONFIG_FILES "${_DIR}/unitree_go__rosidl_typesupport_introspection_cppExport-*.cmake") +foreach(f ${CONFIG_FILES}) + include(${f}) +endforeach() + +# Cleanup temporary variables. +set(_IMPORT_PREFIX) + +# Loop over all imported files and verify that they actually exist +foreach(target ${_IMPORT_CHECK_TARGETS} ) + foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} ) + if(NOT EXISTS "${file}" ) + message(FATAL_ERROR "The imported target \"${target}\" references the file + \"${file}\" +but this file does not exist. Possible reasons include: +* The file was deleted, renamed, or moved to another location. +* An install or uninstall procedure did not complete successfully. +* The installation package was faulty and contained + \"${CMAKE_CURRENT_LIST_FILE}\" +but not all the files it references. +") + endif() + endforeach() + unset(_IMPORT_CHECK_FILES_FOR_${target}) +endforeach() +unset(_IMPORT_CHECK_TARGETS) + +# This file does not depend on other imported targets which have +# been exported from the same project but in a separate export set. + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) +cmake_policy(POP) diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/environment/ament_prefix_path.dsv b/deploy/robot_ws/install/unitree_go/share/unitree_go/environment/ament_prefix_path.dsv new file mode 100644 index 0000000..79d4c95 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/environment/ament_prefix_path.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;AMENT_PREFIX_PATH; diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/environment/ament_prefix_path.sh b/deploy/robot_ws/install/unitree_go/share/unitree_go/environment/ament_prefix_path.sh new file mode 100644 index 0000000..02e441b --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/environment/ament_prefix_path.sh @@ -0,0 +1,4 @@ +# copied from +# ament_cmake_core/cmake/environment_hooks/environment/ament_prefix_path.sh + +ament_prepend_unique_value AMENT_PREFIX_PATH "$AMENT_CURRENT_PREFIX" diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/environment/library_path.dsv b/deploy/robot_ws/install/unitree_go/share/unitree_go/environment/library_path.dsv new file mode 100644 index 0000000..89bec93 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/environment/library_path.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;LD_LIBRARY_PATH;lib diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/environment/library_path.sh b/deploy/robot_ws/install/unitree_go/share/unitree_go/environment/library_path.sh new file mode 100644 index 0000000..292e518 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/environment/library_path.sh @@ -0,0 +1,16 @@ +# copied from ament_package/template/environment_hook/library_path.sh + +# detect if running on Darwin platform +_UNAME=`uname -s` +_IS_DARWIN=0 +if [ "$_UNAME" = "Darwin" ]; then + _IS_DARWIN=1 +fi +unset _UNAME + +if [ $_IS_DARWIN -eq 0 ]; then + ament_prepend_unique_value LD_LIBRARY_PATH "$AMENT_CURRENT_PREFIX/lib" +else + ament_prepend_unique_value DYLD_LIBRARY_PATH "$AMENT_CURRENT_PREFIX/lib" +fi +unset _IS_DARWIN diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/environment/path.dsv b/deploy/robot_ws/install/unitree_go/share/unitree_go/environment/path.dsv new file mode 100644 index 0000000..b94426a --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/environment/path.dsv @@ -0,0 +1 @@ +prepend-non-duplicate-if-exists;PATH;bin diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/environment/path.sh b/deploy/robot_ws/install/unitree_go/share/unitree_go/environment/path.sh new file mode 100644 index 0000000..e59b749 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/environment/path.sh @@ -0,0 +1,5 @@ +# copied from ament_cmake_core/cmake/environment_hooks/environment/path.sh + +if [ -d "$AMENT_CURRENT_PREFIX/bin" ]; then + ament_prepend_unique_value PATH "$AMENT_CURRENT_PREFIX/bin" +fi diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/environment/pythonpath.dsv b/deploy/robot_ws/install/unitree_go/share/unitree_go/environment/pythonpath.dsv new file mode 100644 index 0000000..84dbc4c --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/environment/pythonpath.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;PYTHONPATH;lib/python3.8/site-packages diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/environment/pythonpath.sh b/deploy/robot_ws/install/unitree_go/share/unitree_go/environment/pythonpath.sh new file mode 100644 index 0000000..7fe2b2f --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/environment/pythonpath.sh @@ -0,0 +1,3 @@ +# generated from ament_package/template/environment_hook/pythonpath.sh.in + +ament_prepend_unique_value PYTHONPATH "$AMENT_CURRENT_PREFIX/lib/python3.8/site-packages" diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/hook/cmake_prefix_path.dsv b/deploy/robot_ws/install/unitree_go/share/unitree_go/hook/cmake_prefix_path.dsv new file mode 100644 index 0000000..e119f32 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/hook/cmake_prefix_path.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;CMAKE_PREFIX_PATH; diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/hook/cmake_prefix_path.ps1 b/deploy/robot_ws/install/unitree_go/share/unitree_go/hook/cmake_prefix_path.ps1 new file mode 100644 index 0000000..d03facc --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/hook/cmake_prefix_path.ps1 @@ -0,0 +1,3 @@ +# generated from colcon_powershell/shell/template/hook_prepend_value.ps1.em + +colcon_prepend_unique_value CMAKE_PREFIX_PATH "$env:COLCON_CURRENT_PREFIX" diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/hook/cmake_prefix_path.sh b/deploy/robot_ws/install/unitree_go/share/unitree_go/hook/cmake_prefix_path.sh new file mode 100644 index 0000000..a948e68 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/hook/cmake_prefix_path.sh @@ -0,0 +1,3 @@ +# generated from colcon_core/shell/template/hook_prepend_value.sh.em + +_colcon_prepend_unique_value CMAKE_PREFIX_PATH "$COLCON_CURRENT_PREFIX" diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/hook/ld_library_path_lib.dsv b/deploy/robot_ws/install/unitree_go/share/unitree_go/hook/ld_library_path_lib.dsv new file mode 100644 index 0000000..89bec93 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/hook/ld_library_path_lib.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;LD_LIBRARY_PATH;lib diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/hook/ld_library_path_lib.ps1 b/deploy/robot_ws/install/unitree_go/share/unitree_go/hook/ld_library_path_lib.ps1 new file mode 100644 index 0000000..f6df601 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/hook/ld_library_path_lib.ps1 @@ -0,0 +1,3 @@ +# generated from colcon_powershell/shell/template/hook_prepend_value.ps1.em + +colcon_prepend_unique_value LD_LIBRARY_PATH "$env:COLCON_CURRENT_PREFIX\lib" diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/hook/ld_library_path_lib.sh b/deploy/robot_ws/install/unitree_go/share/unitree_go/hook/ld_library_path_lib.sh new file mode 100644 index 0000000..ca3c102 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/hook/ld_library_path_lib.sh @@ -0,0 +1,3 @@ +# generated from colcon_core/shell/template/hook_prepend_value.sh.em + +_colcon_prepend_unique_value LD_LIBRARY_PATH "$COLCON_CURRENT_PREFIX/lib" diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/hook/pythonpath.dsv b/deploy/robot_ws/install/unitree_go/share/unitree_go/hook/pythonpath.dsv new file mode 100644 index 0000000..84dbc4c --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/hook/pythonpath.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;PYTHONPATH;lib/python3.8/site-packages diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/hook/pythonpath.ps1 b/deploy/robot_ws/install/unitree_go/share/unitree_go/hook/pythonpath.ps1 new file mode 100644 index 0000000..12877ef --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/hook/pythonpath.ps1 @@ -0,0 +1,3 @@ +# generated from colcon_powershell/shell/template/hook_prepend_value.ps1.em + +colcon_prepend_unique_value PYTHONPATH "$env:COLCON_CURRENT_PREFIX\lib/python3.8/site-packages" diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/hook/pythonpath.sh b/deploy/robot_ws/install/unitree_go/share/unitree_go/hook/pythonpath.sh new file mode 100644 index 0000000..ed8efd9 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/hook/pythonpath.sh @@ -0,0 +1,3 @@ +# generated from colcon_core/shell/template/hook_prepend_value.sh.em + +_colcon_prepend_unique_value PYTHONPATH "$COLCON_CURRENT_PREFIX/lib/python3.8/site-packages" diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/local_setup.bash b/deploy/robot_ws/install/unitree_go/share/unitree_go/local_setup.bash new file mode 100644 index 0000000..49782f2 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/local_setup.bash @@ -0,0 +1,46 @@ +# generated from ament_package/template/package_level/local_setup.bash.in + +# source local_setup.sh from same directory as this file +_this_path=$(builtin cd "`dirname "${BASH_SOURCE[0]}"`" && pwd) +# provide AMENT_CURRENT_PREFIX to shell script +AMENT_CURRENT_PREFIX=$(builtin cd "`dirname "${BASH_SOURCE[0]}"`/../.." && pwd) +# store AMENT_CURRENT_PREFIX to restore it before each environment hook +_package_local_setup_AMENT_CURRENT_PREFIX=$AMENT_CURRENT_PREFIX + +# trace output +if [ -n "$AMENT_TRACE_SETUP_FILES" ]; then + echo "# . \"$_this_path/local_setup.sh\"" +fi +. "$_this_path/local_setup.sh" +unset _this_path + +# unset AMENT_ENVIRONMENT_HOOKS +# if not appending to them for return +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + unset AMENT_ENVIRONMENT_HOOKS +fi + +# restore AMENT_CURRENT_PREFIX before evaluating the environment hooks +AMENT_CURRENT_PREFIX=$_package_local_setup_AMENT_CURRENT_PREFIX +# list all environment hooks of this package + +# source all shell-specific environment hooks of this package +# if not returning them +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + _package_local_setup_IFS=$IFS + IFS=":" + for _hook in $AMENT_ENVIRONMENT_HOOKS; do + # restore AMENT_CURRENT_PREFIX for each environment hook + AMENT_CURRENT_PREFIX=$_package_local_setup_AMENT_CURRENT_PREFIX + # restore IFS before sourcing other files + IFS=$_package_local_setup_IFS + . "$_hook" + done + unset _hook + IFS=$_package_local_setup_IFS + unset _package_local_setup_IFS + unset AMENT_ENVIRONMENT_HOOKS +fi + +unset _package_local_setup_AMENT_CURRENT_PREFIX +unset AMENT_CURRENT_PREFIX diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/local_setup.dsv b/deploy/robot_ws/install/unitree_go/share/unitree_go/local_setup.dsv new file mode 100644 index 0000000..03d396a --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/local_setup.dsv @@ -0,0 +1,4 @@ +source;share/unitree_go/environment/ament_prefix_path.sh +source;share/unitree_go/environment/library_path.sh +source;share/unitree_go/environment/path.sh +source;share/unitree_go/environment/pythonpath.sh diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/local_setup.sh b/deploy/robot_ws/install/unitree_go/share/unitree_go/local_setup.sh new file mode 100644 index 0000000..855df3c --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/local_setup.sh @@ -0,0 +1,135 @@ +# generated from ament_package/template/package_level/local_setup.sh.in + +# since this file is sourced use either the provided AMENT_CURRENT_PREFIX +# or fall back to the destination set at configure time +: ${AMENT_CURRENT_PREFIX:="/home/unitree/locomotion/Go2Py/deploy/ros2_ws/install/unitree_go"} +if [ ! -d "$AMENT_CURRENT_PREFIX" ]; then + if [ -z "$COLCON_CURRENT_PREFIX" ]; then + echo "The compile time prefix path '$AMENT_CURRENT_PREFIX' doesn't " \ + "exist. Consider sourcing a different extension than '.sh'." 1>&2 + else + AMENT_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" + fi +fi + +# function to append values to environment variables +# using colons as separators and avoiding leading separators +ament_append_value() { + # arguments + _listname="$1" + _value="$2" + #echo "listname $_listname" + #eval echo "list value \$$_listname" + #echo "value $_value" + + # avoid leading separator + eval _values=\"\$$_listname\" + if [ -z "$_values" ]; then + eval export $_listname=\"$_value\" + #eval echo "set list \$$_listname" + else + # field separator must not be a colon + _ament_append_value_IFS=$IFS + unset IFS + eval export $_listname=\"\$$_listname:$_value\" + #eval echo "append list \$$_listname" + IFS=$_ament_append_value_IFS + unset _ament_append_value_IFS + fi + unset _values + + unset _value + unset _listname +} + +# function to prepend non-duplicate values to environment variables +# using colons as separators and avoiding trailing separators +ament_prepend_unique_value() { + # arguments + _listname="$1" + _value="$2" + #echo "listname $_listname" + #eval echo "list value \$$_listname" + #echo "value $_value" + + # check if the list contains the value + eval _values=\"\$$_listname\" + _duplicate= + _ament_prepend_unique_value_IFS=$IFS + IFS=":" + if [ "$AMENT_SHELL" = "zsh" ]; then + ament_zsh_to_array _values + fi + for _item in $_values; do + # ignore empty strings + if [ -z "$_item" ]; then + continue + fi + if [ "$_item" = "$_value" ]; then + _duplicate=1 + fi + done + unset _item + + # prepend only non-duplicates + if [ -z "$_duplicate" ]; then + # avoid trailing separator + if [ -z "$_values" ]; then + eval export $_listname=\"$_value\" + #eval echo "set list \$$_listname" + else + # field separator must not be a colon + unset IFS + eval export $_listname=\"$_value:\$$_listname\" + #eval echo "prepend list \$$_listname" + fi + fi + IFS=$_ament_prepend_unique_value_IFS + unset _ament_prepend_unique_value_IFS + unset _duplicate + unset _values + + unset _value + unset _listname +} + +# unset AMENT_ENVIRONMENT_HOOKS +# if not appending to them for return +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + unset AMENT_ENVIRONMENT_HOOKS +fi + +# list all environment hooks of this package +ament_append_value AMENT_ENVIRONMENT_HOOKS "$AMENT_CURRENT_PREFIX/share/unitree_go/environment/ament_prefix_path.sh" +ament_append_value AMENT_ENVIRONMENT_HOOKS "$AMENT_CURRENT_PREFIX/share/unitree_go/environment/library_path.sh" +ament_append_value AMENT_ENVIRONMENT_HOOKS "$AMENT_CURRENT_PREFIX/share/unitree_go/environment/path.sh" +ament_append_value AMENT_ENVIRONMENT_HOOKS "$AMENT_CURRENT_PREFIX/share/unitree_go/environment/pythonpath.sh" + +# source all shell-specific environment hooks of this package +# if not returning them +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + _package_local_setup_IFS=$IFS + IFS=":" + if [ "$AMENT_SHELL" = "zsh" ]; then + ament_zsh_to_array AMENT_ENVIRONMENT_HOOKS + fi + for _hook in $AMENT_ENVIRONMENT_HOOKS; do + if [ -f "$_hook" ]; then + # restore IFS before sourcing other files + IFS=$_package_local_setup_IFS + # trace output + if [ -n "$AMENT_TRACE_SETUP_FILES" ]; then + echo "# . \"$_hook\"" + fi + . "$_hook" + fi + done + unset _hook + IFS=$_package_local_setup_IFS + unset _package_local_setup_IFS + unset AMENT_ENVIRONMENT_HOOKS +fi + +# reset AMENT_CURRENT_PREFIX after each package +# allowing to source multiple package-level setup files +unset AMENT_CURRENT_PREFIX diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/local_setup.zsh b/deploy/robot_ws/install/unitree_go/share/unitree_go/local_setup.zsh new file mode 100644 index 0000000..fe161be --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/local_setup.zsh @@ -0,0 +1,59 @@ +# generated from ament_package/template/package_level/local_setup.zsh.in + +AMENT_SHELL=zsh + +# source local_setup.sh from same directory as this file +_this_path=$(builtin cd -q "`dirname "${(%):-%N}"`" > /dev/null && pwd) +# provide AMENT_CURRENT_PREFIX to shell script +AMENT_CURRENT_PREFIX=$(builtin cd -q "`dirname "${(%):-%N}"`/../.." > /dev/null && pwd) +# store AMENT_CURRENT_PREFIX to restore it before each environment hook +_package_local_setup_AMENT_CURRENT_PREFIX=$AMENT_CURRENT_PREFIX + +# function to convert array-like strings into arrays +# to wordaround SH_WORD_SPLIT not being set +ament_zsh_to_array() { + local _listname=$1 + local _dollar="$" + local _split="{=" + local _to_array="(\"$_dollar$_split$_listname}\")" + eval $_listname=$_to_array +} + +# trace output +if [ -n "$AMENT_TRACE_SETUP_FILES" ]; then + echo "# . \"$_this_path/local_setup.sh\"" +fi +# the package-level local_setup file unsets AMENT_CURRENT_PREFIX +. "$_this_path/local_setup.sh" +unset _this_path + +# unset AMENT_ENVIRONMENT_HOOKS +# if not appending to them for return +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + unset AMENT_ENVIRONMENT_HOOKS +fi + +# restore AMENT_CURRENT_PREFIX before evaluating the environment hooks +AMENT_CURRENT_PREFIX=$_package_local_setup_AMENT_CURRENT_PREFIX +# list all environment hooks of this package + +# source all shell-specific environment hooks of this package +# if not returning them +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + _package_local_setup_IFS=$IFS + IFS=":" + for _hook in $AMENT_ENVIRONMENT_HOOKS; do + # restore AMENT_CURRENT_PREFIX for each environment hook + AMENT_CURRENT_PREFIX=$_package_local_setup_AMENT_CURRENT_PREFIX + # restore IFS before sourcing other files + IFS=$_package_local_setup_IFS + . "$_hook" + done + unset _hook + IFS=$_package_local_setup_IFS + unset _package_local_setup_IFS + unset AMENT_ENVIRONMENT_HOOKS +fi + +unset _package_local_setup_AMENT_CURRENT_PREFIX +unset AMENT_CURRENT_PREFIX diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/AudioData.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/AudioData.idl new file mode 100644 index 0000000..31c88ae --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/AudioData.idl @@ -0,0 +1,14 @@ +// generated from rosidl_adapter/resource/msg.idl.em +// with input from unitree_go/msg/AudioData.msg +// generated code does not contain a copyright notice + + +module unitree_go { + module msg { + struct AudioData { + uint64 time_frame; + + sequence data; + }; + }; +}; diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/AudioData.msg b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/AudioData.msg new file mode 100644 index 0000000..6e889bc --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/AudioData.msg @@ -0,0 +1,2 @@ +uint64 time_frame +uint8[] data \ No newline at end of file diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/BmsCmd.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/BmsCmd.idl new file mode 100644 index 0000000..c14a380 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/BmsCmd.idl @@ -0,0 +1,15 @@ +// generated from rosidl_adapter/resource/msg.idl.em +// with input from unitree_go/msg/BmsCmd.msg +// generated code does not contain a copyright notice + + +module unitree_go { + module msg { + typedef uint8 uint8__3[3]; + struct BmsCmd { + uint8 off; + + uint8__3 reserve; + }; + }; +}; diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/BmsCmd.msg b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/BmsCmd.msg new file mode 100644 index 0000000..bdbf9c3 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/BmsCmd.msg @@ -0,0 +1,2 @@ +uint8 off +uint8[3] reserve \ No newline at end of file diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/BmsState.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/BmsState.idl new file mode 100644 index 0000000..ccb75b5 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/BmsState.idl @@ -0,0 +1,30 @@ +// generated from rosidl_adapter/resource/msg.idl.em +// with input from unitree_go/msg/BmsState.msg +// generated code does not contain a copyright notice + + +module unitree_go { + module msg { + typedef int8 int8__2[2]; + typedef uint16 uint16__15[15]; + struct BmsState { + uint8 version_high; + + uint8 version_low; + + uint8 status; + + uint8 soc; + + int32 current; + + uint16 cycle; + + int8__2 bq_ntc; + + int8__2 mcu_ntc; + + uint16__15 cell_vol; + }; + }; +}; diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/BmsState.msg b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/BmsState.msg new file mode 100644 index 0000000..052e4d5 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/BmsState.msg @@ -0,0 +1,9 @@ +uint8 version_high +uint8 version_low +uint8 status +uint8 soc +int32 current +uint16 cycle +int8[2] bq_ntc +int8[2] mcu_ntc +uint16[15] cell_vol \ No newline at end of file diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/Error.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/Error.idl new file mode 100644 index 0000000..f732ed8 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/Error.idl @@ -0,0 +1,14 @@ +// generated from rosidl_adapter/resource/msg.idl.em +// with input from unitree_go/msg/Error.msg +// generated code does not contain a copyright notice + + +module unitree_go { + module msg { + struct Error { + uint32 source; + + uint32 state; + }; + }; +}; diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/Error.msg b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/Error.msg new file mode 100644 index 0000000..4a5a631 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/Error.msg @@ -0,0 +1,2 @@ +uint32 source +uint32 state \ No newline at end of file diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/Go2FrontVideoData.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/Go2FrontVideoData.idl new file mode 100644 index 0000000..9377c7b --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/Go2FrontVideoData.idl @@ -0,0 +1,18 @@ +// generated from rosidl_adapter/resource/msg.idl.em +// with input from unitree_go/msg/Go2FrontVideoData.msg +// generated code does not contain a copyright notice + + +module unitree_go { + module msg { + struct Go2FrontVideoData { + uint64 time_frame; + + sequence video720p; + + sequence video360p; + + sequence video180p; + }; + }; +}; diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/Go2FrontVideoData.msg b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/Go2FrontVideoData.msg new file mode 100644 index 0000000..3c294f3 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/Go2FrontVideoData.msg @@ -0,0 +1,4 @@ +uint64 time_frame +uint8[] video720p +uint8[] video360p +uint8[] video180p \ No newline at end of file diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/HeightMap.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/HeightMap.idl new file mode 100644 index 0000000..016e9a3 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/HeightMap.idl @@ -0,0 +1,49 @@ +// generated from rosidl_adapter/resource/msg.idl.em +// with input from unitree_go/msg/HeightMap.msg +// generated code does not contain a copyright notice + + +module unitree_go { + module msg { + typedef float float__2[2]; + @verbatim (language="comment", text= + " Header") + struct HeightMap { + @verbatim (language="comment", text= + " timestamp") + double stamp; + + @verbatim (language="comment", text= + " world frame id") + string frame_id; + + @verbatim (language="comment", text= + " Map info" "\n" + " The map resolution") + @unit (value="m/cell") + float resolution; + + @verbatim (language="comment", text= + " Map width along x-axis") + @unit (value="cells") + uint32 width; + + @verbatim (language="comment", text= + " Map height alonge y-axis") + @unit (value="cells") + uint32 height; + + @verbatim (language="comment", text= + " Map frame origin xy-position, the xyz-axis direction of map frame is aligned with the world frame") + @unit (value="m") + float__2 origin; + + @verbatim (language="comment", text= + " Map data, in x-major order, starting with [0,0], ending with [width, height]" "\n" + " For a cell whose 2d-array-index is [ix, iy]," "\n" + " its position in world frame is: [ix * resolution + origin[0], iy * resolution + origin[1]]" "\n" + " its cell value is: data[width * iy + ix]") + sequence data; + }; + }; +}; diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/HeightMap.msg b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/HeightMap.msg new file mode 100644 index 0000000..4e6f3b2 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/HeightMap.msg @@ -0,0 +1,15 @@ +# Header +float64 stamp # timestamp +string frame_id # world frame id + +# Map info +float32 resolution # The map resolution [m/cell] +uint32 width # Map width along x-axis [cells] +uint32 height # Map height alonge y-axis [cells] +float32[2] origin # Map frame origin xy-position [m], the xyz-axis direction of map frame is aligned with the world frame + +# Map data, in x-major order, starting with [0,0], ending with [width, height] +# For a cell whose 2d-array-index is [ix, iy], +# its position in world frame is: [ix * resolution + origin[0], iy * resolution + origin[1]] +# its cell value is: data[width * iy + ix] +float32[] data \ No newline at end of file diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/IMUState.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/IMUState.idl new file mode 100644 index 0000000..b9004f9 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/IMUState.idl @@ -0,0 +1,22 @@ +// generated from rosidl_adapter/resource/msg.idl.em +// with input from unitree_go/msg/IMUState.msg +// generated code does not contain a copyright notice + + +module unitree_go { + module msg { + typedef float float__4[4]; + typedef float float__3[3]; + struct IMUState { + float__4 quaternion; + + float__3 gyroscope; + + float__3 accelerometer; + + float__3 rpy; + + int8 temperature; + }; + }; +}; diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/IMUState.msg b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/IMUState.msg new file mode 100644 index 0000000..e065d04 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/IMUState.msg @@ -0,0 +1,5 @@ +float32[4] quaternion +float32[3] gyroscope +float32[3] accelerometer +float32[3] rpy +int8 temperature diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/InterfaceConfig.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/InterfaceConfig.idl new file mode 100644 index 0000000..acdbd97 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/InterfaceConfig.idl @@ -0,0 +1,17 @@ +// generated from rosidl_adapter/resource/msg.idl.em +// with input from unitree_go/msg/InterfaceConfig.msg +// generated code does not contain a copyright notice + + +module unitree_go { + module msg { + typedef uint8 uint8__2[2]; + struct InterfaceConfig { + uint8 mode; + + uint8 value; + + uint8__2 reserve; + }; + }; +}; diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/InterfaceConfig.msg b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/InterfaceConfig.msg new file mode 100644 index 0000000..c43bd20 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/InterfaceConfig.msg @@ -0,0 +1,3 @@ +uint8 mode +uint8 value +uint8[2] reserve \ No newline at end of file diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/LidarState.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/LidarState.idl new file mode 100644 index 0000000..e81c1ff --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/LidarState.idl @@ -0,0 +1,45 @@ +// generated from rosidl_adapter/resource/msg.idl.em +// with input from unitree_go/msg/LidarState.msg +// generated code does not contain a copyright notice + + +module unitree_go { + module msg { + typedef float float__3[3]; + struct LidarState { + double stamp; + + string firmware_version; + + string software_version; + + string sdk_version; + + float sys_rotation_speed; + + float com_rotation_speed; + + uint8 error_state; + + float cloud_frequency; + + float cloud_packet_loss_rate; + + uint32 cloud_size; + + uint32 cloud_scan_num; + + float imu_frequency; + + float imu_packet_loss_rate; + + float__3 imu_rpy; + + double serial_recv_stamp; + + uint32 serial_buffer_size; + + uint32 serial_buffer_read; + }; + }; +}; diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/LidarState.msg b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/LidarState.msg new file mode 100644 index 0000000..d8b4eb2 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/LidarState.msg @@ -0,0 +1,17 @@ +float64 stamp +string firmware_version +string software_version +string sdk_version +float32 sys_rotation_speed +float32 com_rotation_speed +uint8 error_state +float32 cloud_frequency +float32 cloud_packet_loss_rate +uint32 cloud_size +uint32 cloud_scan_num +float32 imu_frequency +float32 imu_packet_loss_rate +float32[3] imu_rpy +float64 serial_recv_stamp +uint32 serial_buffer_size +uint32 serial_buffer_read diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/LowCmd.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/LowCmd.idl new file mode 100644 index 0000000..82d46a4 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/LowCmd.idl @@ -0,0 +1,46 @@ +// generated from rosidl_adapter/resource/msg.idl.em +// with input from unitree_go/msg/LowCmd.msg +// generated code does not contain a copyright notice + +#include "unitree_go/msg/BmsCmd.idl" +#include "unitree_go/msg/MotorCmd.idl" + +module unitree_go { + module msg { + typedef uint8 uint8__2[2]; + typedef uint32 uint32__2[2]; + typedef unitree_go::msg::MotorCmd unitree_go__msg__MotorCmd; + typedef unitree_go__msg__MotorCmd unitree_go__msg__MotorCmd__20[20]; + typedef uint8 uint8__40[40]; + typedef uint8 uint8__12[12]; + struct LowCmd { + uint8__2 head; + + uint8 level_flag; + + uint8 frame_reserve; + + uint32__2 sn; + + uint32__2 version; + + uint16 bandwidth; + + unitree_go__msg__MotorCmd__20 motor_cmd; + + unitree_go::msg::BmsCmd bms_cmd; + + uint8__40 wireless_remote; + + uint8__12 led; + + uint8__2 fan; + + uint8 gpio; + + uint32 reserve; + + uint32 crc; + }; + }; +}; diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/LowCmd.msg b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/LowCmd.msg new file mode 100644 index 0000000..464a31d --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/LowCmd.msg @@ -0,0 +1,15 @@ +uint8[2] head +uint8 level_flag +uint8 frame_reserve +uint32[2] sn +uint32[2] version +uint16 bandwidth +MotorCmd[20] motor_cmd +BmsCmd bms_cmd +uint8[40] wireless_remote +uint8[12] led +uint8[2] fan +uint8 gpio +uint32 reserve +uint32 crc + diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/LowState.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/LowState.idl new file mode 100644 index 0000000..65e99d3 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/LowState.idl @@ -0,0 +1,64 @@ +// generated from rosidl_adapter/resource/msg.idl.em +// with input from unitree_go/msg/LowState.msg +// generated code does not contain a copyright notice + +#include "unitree_go/msg/BmsState.idl" +#include "unitree_go/msg/IMUState.idl" +#include "unitree_go/msg/MotorState.idl" + +module unitree_go { + module msg { + typedef uint8 uint8__2[2]; + typedef uint32 uint32__2[2]; + typedef unitree_go::msg::MotorState unitree_go__msg__MotorState; + typedef unitree_go__msg__MotorState unitree_go__msg__MotorState__20[20]; + typedef int16 int16__4[4]; + typedef uint8 uint8__40[40]; + typedef uint16 uint16__4[4]; + struct LowState { + uint8__2 head; + + uint8 level_flag; + + uint8 frame_reserve; + + uint32__2 sn; + + uint32__2 version; + + uint16 bandwidth; + + unitree_go::msg::IMUState imu_state; + + unitree_go__msg__MotorState__20 motor_state; + + unitree_go::msg::BmsState bms_state; + + int16__4 foot_force; + + int16__4 foot_force_est; + + uint32 tick; + + uint8__40 wireless_remote; + + uint8 bit_flag; + + float adc_reel; + + int8 temperature_ntc1; + + int8 temperature_ntc2; + + float power_v; + + float power_a; + + uint16__4 fan_frequency; + + uint32 reserve; + + uint32 crc; + }; + }; +}; diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/LowState.msg b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/LowState.msg new file mode 100644 index 0000000..ceaed32 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/LowState.msg @@ -0,0 +1,22 @@ +uint8[2] head +uint8 level_flag +uint8 frame_reserve +uint32[2] sn +uint32[2] version +uint16 bandwidth +IMUState imu_state +MotorState[20] motor_state +BmsState bms_state +int16[4] foot_force +int16[4] foot_force_est +uint32 tick +uint8[40] wireless_remote +uint8 bit_flag +float32 adc_reel +int8 temperature_ntc1 +int8 temperature_ntc2 +float32 power_v +float32 power_a +uint16[4] fan_frequency +uint32 reserve +uint32 crc \ No newline at end of file diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/MotorCmd.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/MotorCmd.idl new file mode 100644 index 0000000..8f698ff --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/MotorCmd.idl @@ -0,0 +1,25 @@ +// generated from rosidl_adapter/resource/msg.idl.em +// with input from unitree_go/msg/MotorCmd.msg +// generated code does not contain a copyright notice + + +module unitree_go { + module msg { + typedef uint32 uint32__3[3]; + struct MotorCmd { + uint8 mode; + + float q; + + float dq; + + float tau; + + float kp; + + float kd; + + uint32__3 reserve; + }; + }; +}; diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/MotorCmd.msg b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/MotorCmd.msg new file mode 100644 index 0000000..67cd1bf --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/MotorCmd.msg @@ -0,0 +1,7 @@ +uint8 mode +float32 q +float32 dq +float32 tau +float32 kp +float32 kd +uint32[3] reserve \ No newline at end of file diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/MotorState.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/MotorState.idl new file mode 100644 index 0000000..653ebc6 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/MotorState.idl @@ -0,0 +1,33 @@ +// generated from rosidl_adapter/resource/msg.idl.em +// with input from unitree_go/msg/MotorState.msg +// generated code does not contain a copyright notice + + +module unitree_go { + module msg { + typedef uint32 uint32__2[2]; + struct MotorState { + uint8 mode; + + float q; + + float dq; + + float ddq; + + float tau_est; + + float q_raw; + + float dq_raw; + + float ddq_raw; + + int8 temperature; + + uint32 lost; + + uint32__2 reserve; + }; + }; +}; diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/MotorState.msg b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/MotorState.msg new file mode 100644 index 0000000..2e1a739 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/MotorState.msg @@ -0,0 +1,11 @@ +uint8 mode +float32 q +float32 dq +float32 ddq +float32 tau_est +float32 q_raw +float32 dq_raw +float32 ddq_raw +int8 temperature +uint32 lost +uint32[2] reserve \ No newline at end of file diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/PathPoint.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/PathPoint.idl new file mode 100644 index 0000000..7e6e29f --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/PathPoint.idl @@ -0,0 +1,24 @@ +// generated from rosidl_adapter/resource/msg.idl.em +// with input from unitree_go/msg/PathPoint.msg +// generated code does not contain a copyright notice + + +module unitree_go { + module msg { + struct PathPoint { + float t_from_start; + + float x; + + float y; + + float yaw; + + float vx; + + float vy; + + float vyaw; + }; + }; +}; diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/PathPoint.msg b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/PathPoint.msg new file mode 100644 index 0000000..08b4945 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/PathPoint.msg @@ -0,0 +1,7 @@ +float32 t_from_start +float32 x +float32 y +float32 yaw +float32 vx +float32 vy +float32 vyaw \ No newline at end of file diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/Req.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/Req.idl new file mode 100644 index 0000000..ebbc611 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/Req.idl @@ -0,0 +1,14 @@ +// generated from rosidl_adapter/resource/msg.idl.em +// with input from unitree_go/msg/Req.msg +// generated code does not contain a copyright notice + + +module unitree_go { + module msg { + struct Req { + string uuid; + + string body; + }; + }; +}; diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/Req.msg b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/Req.msg new file mode 100644 index 0000000..af14a7d --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/Req.msg @@ -0,0 +1,2 @@ +string uuid +string body \ No newline at end of file diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/Res.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/Res.idl new file mode 100644 index 0000000..8d91e1c --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/Res.idl @@ -0,0 +1,16 @@ +// generated from rosidl_adapter/resource/msg.idl.em +// with input from unitree_go/msg/Res.msg +// generated code does not contain a copyright notice + + +module unitree_go { + module msg { + struct Res { + string uuid; + + sequence data; + + string body; + }; + }; +}; diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/Res.msg b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/Res.msg new file mode 100644 index 0000000..8070258 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/Res.msg @@ -0,0 +1,3 @@ +string uuid +uint8[] data +string body \ No newline at end of file diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/SportModeCmd.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/SportModeCmd.idl new file mode 100644 index 0000000..4b81956 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/SportModeCmd.idl @@ -0,0 +1,38 @@ +// generated from rosidl_adapter/resource/msg.idl.em +// with input from unitree_go/msg/SportModeCmd.msg +// generated code does not contain a copyright notice + +#include "unitree_go/msg/BmsCmd.idl" +#include "unitree_go/msg/PathPoint.idl" + +module unitree_go { + module msg { + typedef float float__2[2]; + typedef float float__3[3]; + typedef unitree_go::msg::PathPoint unitree_go__msg__PathPoint; + typedef unitree_go__msg__PathPoint unitree_go__msg__PathPoint__30[30]; + struct SportModeCmd { + uint8 mode; + + uint8 gait_type; + + uint8 speed_level; + + float foot_raise_height; + + float body_height; + + float__2 position; + + float__3 euler; + + float__2 velocity; + + float yaw_speed; + + unitree_go::msg::BmsCmd bms_cmd; + + unitree_go__msg__PathPoint__30 path_point; + }; + }; +}; diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/SportModeCmd.msg b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/SportModeCmd.msg new file mode 100644 index 0000000..e5ccb46 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/SportModeCmd.msg @@ -0,0 +1,13 @@ +uint8 mode +uint8 gait_type +uint8 speed_level +float32 foot_raise_height +float32 body_height +float32[2] position +float32[3] euler +float32[2] velocity +float32 yaw_speed +BmsCmd bms_cmd +PathPoint[30] path_point + + diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/SportModeState.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/SportModeState.idl new file mode 100644 index 0000000..9b90c9c --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/SportModeState.idl @@ -0,0 +1,46 @@ +// generated from rosidl_adapter/resource/msg.idl.em +// with input from unitree_go/msg/SportModeState.msg +// generated code does not contain a copyright notice + +#include "unitree_go/msg/IMUState.idl" +#include "unitree_go/msg/TimeSpec.idl" + +module unitree_go { + module msg { + typedef float float__3[3]; + typedef float float__4[4]; + typedef int16 int16__4[4]; + typedef float float__12[12]; + struct SportModeState { + unitree_go::msg::TimeSpec stamp; + + uint32 error_code; + + unitree_go::msg::IMUState imu_state; + + uint8 mode; + + float progress; + + uint8 gait_type; + + float foot_raise_height; + + float__3 position; + + float body_height; + + float__3 velocity; + + float yaw_speed; + + float__4 range_obstacle; + + int16__4 foot_force; + + float__12 foot_position_body; + + float__12 foot_speed_body; + }; + }; +}; diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/SportModeState.msg b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/SportModeState.msg new file mode 100644 index 0000000..7a6c1e6 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/SportModeState.msg @@ -0,0 +1,17 @@ +TimeSpec stamp +uint32 error_code +IMUState imu_state +uint8 mode +float32 progress +uint8 gait_type +float32 foot_raise_height +float32[3] position +float32 body_height +float32[3] velocity +float32 yaw_speed +float32[4] range_obstacle +int16[4] foot_force +float32[12] foot_position_body +float32[12] foot_speed_body + + diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/TimeSpec.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/TimeSpec.idl new file mode 100644 index 0000000..5d4c972 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/TimeSpec.idl @@ -0,0 +1,19 @@ +// generated from rosidl_adapter/resource/msg.idl.em +// with input from unitree_go/msg/TimeSpec.msg +// generated code does not contain a copyright notice + + +module unitree_go { + module msg { + @verbatim (language="comment", text= + " Time indicates a specific point in time, relative to a clock's 0 point." "\n" + " The seconds component, valid over all int32 values.") + struct TimeSpec { + int32 sec; + + @verbatim (language="comment", text= + " The nanoseconds component, valid in the range [0, 10e9).") + uint32 nanosec; + }; + }; +}; diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/TimeSpec.msg b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/TimeSpec.msg new file mode 100644 index 0000000..188b3c1 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/TimeSpec.msg @@ -0,0 +1,5 @@ +# Time indicates a specific point in time, relative to a clock's 0 point. +# The seconds component, valid over all int32 values. +int32 sec +# The nanoseconds component, valid in the range [0, 10e9). +uint32 nanosec diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/UwbState.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/UwbState.idl new file mode 100644 index 0000000..e32c0c0 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/UwbState.idl @@ -0,0 +1,46 @@ +// generated from rosidl_adapter/resource/msg.idl.em +// with input from unitree_go/msg/UwbState.msg +// generated code does not contain a copyright notice + + +module unitree_go { + module msg { + typedef uint8 uint8__2[2]; + typedef float float__2[2]; + struct UwbState { + uint8__2 version; + + uint8 channel; + + uint8 joy_mode; + + float orientation_est; + + float pitch_est; + + float distance_est; + + float yaw_est; + + float tag_roll; + + float tag_pitch; + + float tag_yaw; + + float base_roll; + + float base_pitch; + + float base_yaw; + + float__2 joystick; + + uint8 error_state; + + uint8 buttons; + + uint8 enabled_from_app; + }; + }; +}; diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/UwbState.msg b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/UwbState.msg new file mode 100644 index 0000000..ed1da3a --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/UwbState.msg @@ -0,0 +1,19 @@ +uint8[2] version +uint8 channel +uint8 joy_mode +float32 orientation_est +float32 pitch_est +float32 distance_est +float32 yaw_est +float32 tag_roll +float32 tag_pitch +float32 tag_yaw +float32 base_roll +float32 base_pitch +float32 base_yaw +float32[2] joystick +uint8 error_state +uint8 buttons +uint8 enabled_from_app + + diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/UwbSwitch.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/UwbSwitch.idl new file mode 100644 index 0000000..815c2d9 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/UwbSwitch.idl @@ -0,0 +1,12 @@ +// generated from rosidl_adapter/resource/msg.idl.em +// with input from unitree_go/msg/UwbSwitch.msg +// generated code does not contain a copyright notice + + +module unitree_go { + module msg { + struct UwbSwitch { + uint8 enabled; + }; + }; +}; diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/UwbSwitch.msg b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/UwbSwitch.msg new file mode 100644 index 0000000..db8ec91 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/UwbSwitch.msg @@ -0,0 +1 @@ +uint8 enabled \ No newline at end of file diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/WirelessController.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/WirelessController.idl new file mode 100644 index 0000000..4cfbe6c --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/WirelessController.idl @@ -0,0 +1,20 @@ +// generated from rosidl_adapter/resource/msg.idl.em +// with input from unitree_go/msg/WirelessController.msg +// generated code does not contain a copyright notice + + +module unitree_go { + module msg { + struct WirelessController { + float lx; + + float ly; + + float rx; + + float ry; + + uint16 keys; + }; + }; +}; diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/WirelessController.msg b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/WirelessController.msg new file mode 100644 index 0000000..12965ff --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/WirelessController.msg @@ -0,0 +1,5 @@ +float32 lx +float32 ly +float32 rx +float32 ry +uint16 keys \ No newline at end of file diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/AudioData_.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/AudioData_.idl new file mode 100644 index 0000000..d2ab5ec --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/AudioData_.idl @@ -0,0 +1,31 @@ +// generated from rosidl_generator_dds_idl/resource/idl.idl.em +// with input from unitree_go:msg/AudioData.idl +// generated code does not contain a copyright notice + +#ifndef __unitree_go__msg__audio_data__idl__ +#define __unitree_go__msg__audio_data__idl__ + + +module unitree_go { + +module msg { + +module dds_ { + + +struct AudioData_ { +unsigned long long time_frame_; +sequence data_; + + +}; + + +}; // module dds_ + +}; // module msg + +}; // module unitree_go + + +#endif // __unitree_go__msg__audio_data__idl__ diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/BmsCmd_.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/BmsCmd_.idl new file mode 100644 index 0000000..10c312e --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/BmsCmd_.idl @@ -0,0 +1,31 @@ +// generated from rosidl_generator_dds_idl/resource/idl.idl.em +// with input from unitree_go:msg/BmsCmd.idl +// generated code does not contain a copyright notice + +#ifndef __unitree_go__msg__bms_cmd__idl__ +#define __unitree_go__msg__bms_cmd__idl__ + + +module unitree_go { + +module msg { + +module dds_ { + + +struct BmsCmd_ { +octet off_; +octet reserve_[3]; + + +}; + + +}; // module dds_ + +}; // module msg + +}; // module unitree_go + + +#endif // __unitree_go__msg__bms_cmd__idl__ diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/BmsState_.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/BmsState_.idl new file mode 100644 index 0000000..b68a6a2 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/BmsState_.idl @@ -0,0 +1,40 @@ +// generated from rosidl_generator_dds_idl/resource/idl.idl.em +// with input from unitree_go:msg/BmsState.idl +// generated code does not contain a copyright notice + +#ifndef __unitree_go__msg__bms_state__idl__ +#define __unitree_go__msg__bms_state__idl__ + + +module unitree_go { + +module msg { + +module dds_ { + + +struct BmsState_ { +octet version_high_; +octet version_low_; +octet status_; +octet soc_; +long current_; +unsigned short cycle_; +octet bq_ntc_[2]; + +octet mcu_ntc_[2]; + +unsigned short cell_vol_[15]; + + +}; + + +}; // module dds_ + +}; // module msg + +}; // module unitree_go + + +#endif // __unitree_go__msg__bms_state__idl__ diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/Error_.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/Error_.idl new file mode 100644 index 0000000..813785b --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/Error_.idl @@ -0,0 +1,30 @@ +// generated from rosidl_generator_dds_idl/resource/idl.idl.em +// with input from unitree_go:msg/Error.idl +// generated code does not contain a copyright notice + +#ifndef __unitree_go__msg__error__idl__ +#define __unitree_go__msg__error__idl__ + + +module unitree_go { + +module msg { + +module dds_ { + + +struct Error_ { +unsigned long source_; +unsigned long state_; + +}; + + +}; // module dds_ + +}; // module msg + +}; // module unitree_go + + +#endif // __unitree_go__msg__error__idl__ diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/Go2FrontVideoData_.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/Go2FrontVideoData_.idl new file mode 100644 index 0000000..fae906d --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/Go2FrontVideoData_.idl @@ -0,0 +1,35 @@ +// generated from rosidl_generator_dds_idl/resource/idl.idl.em +// with input from unitree_go:msg/Go2FrontVideoData.idl +// generated code does not contain a copyright notice + +#ifndef __unitree_go__msg__go2_front_video_data__idl__ +#define __unitree_go__msg__go2_front_video_data__idl__ + + +module unitree_go { + +module msg { + +module dds_ { + + +struct Go2FrontVideoData_ { +unsigned long long time_frame_; +sequence video720p_; + +sequence video360p_; + +sequence video180p_; + + +}; + + +}; // module dds_ + +}; // module msg + +}; // module unitree_go + + +#endif // __unitree_go__msg__go2_front_video_data__idl__ diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/HeightMap_.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/HeightMap_.idl new file mode 100644 index 0000000..793833f --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/HeightMap_.idl @@ -0,0 +1,37 @@ +// generated from rosidl_generator_dds_idl/resource/idl.idl.em +// with input from unitree_go:msg/HeightMap.idl +// generated code does not contain a copyright notice + +#ifndef __unitree_go__msg__height_map__idl__ +#define __unitree_go__msg__height_map__idl__ + + +module unitree_go { + +module msg { + +module dds_ { + + +struct HeightMap_ { +double stamp_; +string frame_id_; +float resolution_; +unsigned long width_; +unsigned long height_; +float origin_[2]; + +sequence data_; + + +}; + + +}; // module dds_ + +}; // module msg + +}; // module unitree_go + + +#endif // __unitree_go__msg__height_map__idl__ diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/IMUState_.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/IMUState_.idl new file mode 100644 index 0000000..5728487 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/IMUState_.idl @@ -0,0 +1,37 @@ +// generated from rosidl_generator_dds_idl/resource/idl.idl.em +// with input from unitree_go:msg/IMUState.idl +// generated code does not contain a copyright notice + +#ifndef __unitree_go__msg__imu_state__idl__ +#define __unitree_go__msg__imu_state__idl__ + + +module unitree_go { + +module msg { + +module dds_ { + + +struct IMUState_ { +float quaternion_[4]; + +float gyroscope_[3]; + +float accelerometer_[3]; + +float rpy_[3]; + +octet temperature_; + +}; + + +}; // module dds_ + +}; // module msg + +}; // module unitree_go + + +#endif // __unitree_go__msg__imu_state__idl__ diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/InterfaceConfig_.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/InterfaceConfig_.idl new file mode 100644 index 0000000..1644752 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/InterfaceConfig_.idl @@ -0,0 +1,32 @@ +// generated from rosidl_generator_dds_idl/resource/idl.idl.em +// with input from unitree_go:msg/InterfaceConfig.idl +// generated code does not contain a copyright notice + +#ifndef __unitree_go__msg__interface_config__idl__ +#define __unitree_go__msg__interface_config__idl__ + + +module unitree_go { + +module msg { + +module dds_ { + + +struct InterfaceConfig_ { +octet mode_; +octet value_; +octet reserve_[2]; + + +}; + + +}; // module dds_ + +}; // module msg + +}; // module unitree_go + + +#endif // __unitree_go__msg__interface_config__idl__ diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/LidarState_.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/LidarState_.idl new file mode 100644 index 0000000..6ae1481 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/LidarState_.idl @@ -0,0 +1,46 @@ +// generated from rosidl_generator_dds_idl/resource/idl.idl.em +// with input from unitree_go:msg/LidarState.idl +// generated code does not contain a copyright notice + +#ifndef __unitree_go__msg__lidar_state__idl__ +#define __unitree_go__msg__lidar_state__idl__ + + +module unitree_go { + +module msg { + +module dds_ { + + +struct LidarState_ { +double stamp_; +string firmware_version_; +string software_version_; +string sdk_version_; +float sys_rotation_speed_; +float com_rotation_speed_; +octet error_state_; +float cloud_frequency_; +float cloud_packet_loss_rate_; +unsigned long cloud_size_; +unsigned long cloud_scan_num_; +float imu_frequency_; +float imu_packet_loss_rate_; +float imu_rpy_[3]; + +double serial_recv_stamp_; +unsigned long serial_buffer_size_; +unsigned long serial_buffer_read_; + +}; + + +}; // module dds_ + +}; // module msg + +}; // module unitree_go + + +#endif // __unitree_go__msg__lidar_state__idl__ diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/LowCmd_.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/LowCmd_.idl new file mode 100644 index 0000000..935655d --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/LowCmd_.idl @@ -0,0 +1,51 @@ +// generated from rosidl_generator_dds_idl/resource/idl.idl.em +// with input from unitree_go:msg/LowCmd.idl +// generated code does not contain a copyright notice +#include "unitree_go/msg/dds_connext/BmsCmd_.idl" +#include "unitree_go/msg/dds_connext/MotorCmd_.idl" + +#ifndef __unitree_go__msg__low_cmd__idl__ +#define __unitree_go__msg__low_cmd__idl__ + + +module unitree_go { + +module msg { + +module dds_ { + + +struct LowCmd_ { +octet head_[2]; + +octet level_flag_; +octet frame_reserve_; +unsigned long sn_[2]; + +unsigned long version_[2]; + +unsigned short bandwidth_; +unitree_go::msg::dds_::MotorCmd_ motor_cmd_[20]; + +unitree_go::msg::dds_::BmsCmd_ bms_cmd_; +octet wireless_remote_[40]; + +octet led_[12]; + +octet fan_[2]; + +octet gpio_; +unsigned long reserve_; +unsigned long crc_; + +}; + + +}; // module dds_ + +}; // module msg + +}; // module unitree_go + + +#endif // __unitree_go__msg__low_cmd__idl__ diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/LowState_.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/LowState_.idl new file mode 100644 index 0000000..e07295c --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/LowState_.idl @@ -0,0 +1,61 @@ +// generated from rosidl_generator_dds_idl/resource/idl.idl.em +// with input from unitree_go:msg/LowState.idl +// generated code does not contain a copyright notice +#include "unitree_go/msg/dds_connext/BmsState_.idl" +#include "unitree_go/msg/dds_connext/IMUState_.idl" +#include "unitree_go/msg/dds_connext/MotorState_.idl" + +#ifndef __unitree_go__msg__low_state__idl__ +#define __unitree_go__msg__low_state__idl__ + + +module unitree_go { + +module msg { + +module dds_ { + + +struct LowState_ { +octet head_[2]; + +octet level_flag_; +octet frame_reserve_; +unsigned long sn_[2]; + +unsigned long version_[2]; + +unsigned short bandwidth_; +unitree_go::msg::dds_::IMUState_ imu_state_; +unitree_go::msg::dds_::MotorState_ motor_state_[20]; + +unitree_go::msg::dds_::BmsState_ bms_state_; +short foot_force_[4]; + +short foot_force_est_[4]; + +unsigned long tick_; +octet wireless_remote_[40]; + +octet bit_flag_; +float adc_reel_; +octet temperature_ntc1_; +octet temperature_ntc2_; +float power_v_; +float power_a_; +unsigned short fan_frequency_[4]; + +unsigned long reserve_; +unsigned long crc_; + +}; + + +}; // module dds_ + +}; // module msg + +}; // module unitree_go + + +#endif // __unitree_go__msg__low_state__idl__ diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/MotorCmd_.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/MotorCmd_.idl new file mode 100644 index 0000000..acbd929 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/MotorCmd_.idl @@ -0,0 +1,36 @@ +// generated from rosidl_generator_dds_idl/resource/idl.idl.em +// with input from unitree_go:msg/MotorCmd.idl +// generated code does not contain a copyright notice + +#ifndef __unitree_go__msg__motor_cmd__idl__ +#define __unitree_go__msg__motor_cmd__idl__ + + +module unitree_go { + +module msg { + +module dds_ { + + +struct MotorCmd_ { +octet mode_; +float q_; +float dq_; +float tau_; +float kp_; +float kd_; +unsigned long reserve_[3]; + + +}; + + +}; // module dds_ + +}; // module msg + +}; // module unitree_go + + +#endif // __unitree_go__msg__motor_cmd__idl__ diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/MotorState_.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/MotorState_.idl new file mode 100644 index 0000000..0766406 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/MotorState_.idl @@ -0,0 +1,40 @@ +// generated from rosidl_generator_dds_idl/resource/idl.idl.em +// with input from unitree_go:msg/MotorState.idl +// generated code does not contain a copyright notice + +#ifndef __unitree_go__msg__motor_state__idl__ +#define __unitree_go__msg__motor_state__idl__ + + +module unitree_go { + +module msg { + +module dds_ { + + +struct MotorState_ { +octet mode_; +float q_; +float dq_; +float ddq_; +float tau_est_; +float q_raw_; +float dq_raw_; +float ddq_raw_; +octet temperature_; +unsigned long lost_; +unsigned long reserve_[2]; + + +}; + + +}; // module dds_ + +}; // module msg + +}; // module unitree_go + + +#endif // __unitree_go__msg__motor_state__idl__ diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/PathPoint_.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/PathPoint_.idl new file mode 100644 index 0000000..a85bac7 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/PathPoint_.idl @@ -0,0 +1,35 @@ +// generated from rosidl_generator_dds_idl/resource/idl.idl.em +// with input from unitree_go:msg/PathPoint.idl +// generated code does not contain a copyright notice + +#ifndef __unitree_go__msg__path_point__idl__ +#define __unitree_go__msg__path_point__idl__ + + +module unitree_go { + +module msg { + +module dds_ { + + +struct PathPoint_ { +float t_from_start_; +float x_; +float y_; +float yaw_; +float vx_; +float vy_; +float vyaw_; + +}; + + +}; // module dds_ + +}; // module msg + +}; // module unitree_go + + +#endif // __unitree_go__msg__path_point__idl__ diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/Req_.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/Req_.idl new file mode 100644 index 0000000..10bbcaa --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/Req_.idl @@ -0,0 +1,30 @@ +// generated from rosidl_generator_dds_idl/resource/idl.idl.em +// with input from unitree_go:msg/Req.idl +// generated code does not contain a copyright notice + +#ifndef __unitree_go__msg__req__idl__ +#define __unitree_go__msg__req__idl__ + + +module unitree_go { + +module msg { + +module dds_ { + + +struct Req_ { +string uuid_; +string body_; + +}; + + +}; // module dds_ + +}; // module msg + +}; // module unitree_go + + +#endif // __unitree_go__msg__req__idl__ diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/Res_.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/Res_.idl new file mode 100644 index 0000000..6bd68ce --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/Res_.idl @@ -0,0 +1,32 @@ +// generated from rosidl_generator_dds_idl/resource/idl.idl.em +// with input from unitree_go:msg/Res.idl +// generated code does not contain a copyright notice + +#ifndef __unitree_go__msg__res__idl__ +#define __unitree_go__msg__res__idl__ + + +module unitree_go { + +module msg { + +module dds_ { + + +struct Res_ { +string uuid_; +sequence data_; + +string body_; + +}; + + +}; // module dds_ + +}; // module msg + +}; // module unitree_go + + +#endif // __unitree_go__msg__res__idl__ diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/SportModeCmd_.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/SportModeCmd_.idl new file mode 100644 index 0000000..d52c30d --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/SportModeCmd_.idl @@ -0,0 +1,45 @@ +// generated from rosidl_generator_dds_idl/resource/idl.idl.em +// with input from unitree_go:msg/SportModeCmd.idl +// generated code does not contain a copyright notice +#include "unitree_go/msg/dds_connext/BmsCmd_.idl" +#include "unitree_go/msg/dds_connext/PathPoint_.idl" + +#ifndef __unitree_go__msg__sport_mode_cmd__idl__ +#define __unitree_go__msg__sport_mode_cmd__idl__ + + +module unitree_go { + +module msg { + +module dds_ { + + +struct SportModeCmd_ { +octet mode_; +octet gait_type_; +octet speed_level_; +float foot_raise_height_; +float body_height_; +float position_[2]; + +float euler_[3]; + +float velocity_[2]; + +float yaw_speed_; +unitree_go::msg::dds_::BmsCmd_ bms_cmd_; +unitree_go::msg::dds_::PathPoint_ path_point_[30]; + + +}; + + +}; // module dds_ + +}; // module msg + +}; // module unitree_go + + +#endif // __unitree_go__msg__sport_mode_cmd__idl__ diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/SportModeState_.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/SportModeState_.idl new file mode 100644 index 0000000..e746045 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/SportModeState_.idl @@ -0,0 +1,51 @@ +// generated from rosidl_generator_dds_idl/resource/idl.idl.em +// with input from unitree_go:msg/SportModeState.idl +// generated code does not contain a copyright notice +#include "unitree_go/msg/dds_connext/IMUState_.idl" +#include "unitree_go/msg/dds_connext/TimeSpec_.idl" + +#ifndef __unitree_go__msg__sport_mode_state__idl__ +#define __unitree_go__msg__sport_mode_state__idl__ + + +module unitree_go { + +module msg { + +module dds_ { + + +struct SportModeState_ { +unitree_go::msg::dds_::TimeSpec_ stamp_; +unsigned long error_code_; +unitree_go::msg::dds_::IMUState_ imu_state_; +octet mode_; +float progress_; +octet gait_type_; +float foot_raise_height_; +float position_[3]; + +float body_height_; +float velocity_[3]; + +float yaw_speed_; +float range_obstacle_[4]; + +short foot_force_[4]; + +float foot_position_body_[12]; + +float foot_speed_body_[12]; + + +}; + + +}; // module dds_ + +}; // module msg + +}; // module unitree_go + + +#endif // __unitree_go__msg__sport_mode_state__idl__ diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/TimeSpec_.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/TimeSpec_.idl new file mode 100644 index 0000000..d0278a1 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/TimeSpec_.idl @@ -0,0 +1,30 @@ +// generated from rosidl_generator_dds_idl/resource/idl.idl.em +// with input from unitree_go:msg/TimeSpec.idl +// generated code does not contain a copyright notice + +#ifndef __unitree_go__msg__time_spec__idl__ +#define __unitree_go__msg__time_spec__idl__ + + +module unitree_go { + +module msg { + +module dds_ { + + +struct TimeSpec_ { +long sec_; +unsigned long nanosec_; + +}; + + +}; // module dds_ + +}; // module msg + +}; // module unitree_go + + +#endif // __unitree_go__msg__time_spec__idl__ diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/UwbState_.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/UwbState_.idl new file mode 100644 index 0000000..5b77fed --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/UwbState_.idl @@ -0,0 +1,47 @@ +// generated from rosidl_generator_dds_idl/resource/idl.idl.em +// with input from unitree_go:msg/UwbState.idl +// generated code does not contain a copyright notice + +#ifndef __unitree_go__msg__uwb_state__idl__ +#define __unitree_go__msg__uwb_state__idl__ + + +module unitree_go { + +module msg { + +module dds_ { + + +struct UwbState_ { +octet version_[2]; + +octet channel_; +octet joy_mode_; +float orientation_est_; +float pitch_est_; +float distance_est_; +float yaw_est_; +float tag_roll_; +float tag_pitch_; +float tag_yaw_; +float base_roll_; +float base_pitch_; +float base_yaw_; +float joystick_[2]; + +octet error_state_; +octet buttons_; +octet enabled_from_app_; + +}; + + +}; // module dds_ + +}; // module msg + +}; // module unitree_go + + +#endif // __unitree_go__msg__uwb_state__idl__ diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/UwbSwitch_.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/UwbSwitch_.idl new file mode 100644 index 0000000..29e8f20 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/UwbSwitch_.idl @@ -0,0 +1,29 @@ +// generated from rosidl_generator_dds_idl/resource/idl.idl.em +// with input from unitree_go:msg/UwbSwitch.idl +// generated code does not contain a copyright notice + +#ifndef __unitree_go__msg__uwb_switch__idl__ +#define __unitree_go__msg__uwb_switch__idl__ + + +module unitree_go { + +module msg { + +module dds_ { + + +struct UwbSwitch_ { +octet enabled_; + +}; + + +}; // module dds_ + +}; // module msg + +}; // module unitree_go + + +#endif // __unitree_go__msg__uwb_switch__idl__ diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/WirelessController_.idl b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/WirelessController_.idl new file mode 100644 index 0000000..f7ae454 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/msg/dds_connext/WirelessController_.idl @@ -0,0 +1,33 @@ +// generated from rosidl_generator_dds_idl/resource/idl.idl.em +// with input from unitree_go:msg/WirelessController.idl +// generated code does not contain a copyright notice + +#ifndef __unitree_go__msg__wireless_controller__idl__ +#define __unitree_go__msg__wireless_controller__idl__ + + +module unitree_go { + +module msg { + +module dds_ { + + +struct WirelessController_ { +float lx_; +float ly_; +float rx_; +float ry_; +unsigned short keys_; + +}; + + +}; // module dds_ + +}; // module msg + +}; // module unitree_go + + +#endif // __unitree_go__msg__wireless_controller__idl__ diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/package.bash b/deploy/robot_ws/install/unitree_go/share/unitree_go/package.bash new file mode 100644 index 0000000..0d83431 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/package.bash @@ -0,0 +1,39 @@ +# generated from colcon_bash/shell/template/package.bash.em + +# This script extends the environment for this package. + +# a bash script is able to determine its own path if necessary +if [ -z "$COLCON_CURRENT_PREFIX" ]; then + # the prefix is two levels up from the package specific share directory + _colcon_package_bash_COLCON_CURRENT_PREFIX="$(builtin cd "`dirname "${BASH_SOURCE[0]}"`/../.." > /dev/null && pwd)" +else + _colcon_package_bash_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" +fi + +# function to source another script with conditional trace output +# first argument: the path of the script +# additional arguments: arguments to the script +_colcon_package_bash_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo "# . \"$1\"" + fi + . "$@" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# source sh script of this package +_colcon_package_bash_source_script "$_colcon_package_bash_COLCON_CURRENT_PREFIX/share/unitree_go/package.sh" + +# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced scripts +COLCON_CURRENT_PREFIX="$_colcon_package_bash_COLCON_CURRENT_PREFIX" + +# source bash hooks +_colcon_package_bash_source_script "$COLCON_CURRENT_PREFIX/share/unitree_go/local_setup.bash" + +unset COLCON_CURRENT_PREFIX + +unset _colcon_package_bash_source_script +unset _colcon_package_bash_COLCON_CURRENT_PREFIX diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/package.dsv b/deploy/robot_ws/install/unitree_go/share/unitree_go/package.dsv new file mode 100644 index 0000000..43ce51e --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/package.dsv @@ -0,0 +1,14 @@ +source;share/unitree_go/hook/cmake_prefix_path.ps1 +source;share/unitree_go/hook/cmake_prefix_path.dsv +source;share/unitree_go/hook/cmake_prefix_path.sh +source;share/unitree_go/hook/ld_library_path_lib.ps1 +source;share/unitree_go/hook/ld_library_path_lib.dsv +source;share/unitree_go/hook/ld_library_path_lib.sh +source;share/unitree_go/hook/pythonpath.ps1 +source;share/unitree_go/hook/pythonpath.dsv +source;share/unitree_go/hook/pythonpath.sh +source;share/unitree_go/local_setup.bash +source;share/unitree_go/local_setup.dsv +source;share/unitree_go/local_setup.ps1 +source;share/unitree_go/local_setup.sh +source;share/unitree_go/local_setup.zsh diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/package.ps1 b/deploy/robot_ws/install/unitree_go/share/unitree_go/package.ps1 new file mode 100644 index 0000000..5d026e2 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/package.ps1 @@ -0,0 +1,118 @@ +# generated from colcon_powershell/shell/template/package.ps1.em + +# function to append a value to a variable +# which uses colons as separators +# duplicates as well as leading separators are avoided +# first argument: the name of the result variable +# second argument: the value to be prepended +function colcon_append_unique_value { + param ( + $_listname, + $_value + ) + + # get values from variable + if (Test-Path Env:$_listname) { + $_values=(Get-Item env:$_listname).Value + } else { + $_values="" + } + $_duplicate="" + # start with no values + $_all_values="" + # iterate over existing values in the variable + if ($_values) { + $_values.Split(";") | ForEach { + # not an empty string + if ($_) { + # not a duplicate of _value + if ($_ -eq $_value) { + $_duplicate="1" + } + if ($_all_values) { + $_all_values="${_all_values};$_" + } else { + $_all_values="$_" + } + } + } + } + # append only non-duplicates + if (!$_duplicate) { + # avoid leading separator + if ($_all_values) { + $_all_values="${_all_values};${_value}" + } else { + $_all_values="${_value}" + } + } + + # export the updated variable + Set-Item env:\$_listname -Value "$_all_values" +} + +# function to prepend a value to a variable +# which uses colons as separators +# duplicates as well as trailing separators are avoided +# first argument: the name of the result variable +# second argument: the value to be prepended +function colcon_prepend_unique_value { + param ( + $_listname, + $_value + ) + + # get values from variable + if (Test-Path Env:$_listname) { + $_values=(Get-Item env:$_listname).Value + } else { + $_values="" + } + # start with the new value + $_all_values="$_value" + # iterate over existing values in the variable + if ($_values) { + $_values.Split(";") | ForEach { + # not an empty string + if ($_) { + # not a duplicate of _value + if ($_ -ne $_value) { + # keep non-duplicate values + $_all_values="${_all_values};$_" + } + } + } + } + # export the updated variable + Set-Item env:\$_listname -Value "$_all_values" +} + +# function to source another script with conditional trace output +# first argument: the path of the script +# additional arguments: arguments to the script +function colcon_package_source_powershell_script { + param ( + $_colcon_package_source_powershell_script + ) + # source script with conditional trace output + if (Test-Path $_colcon_package_source_powershell_script) { + if ($env:COLCON_TRACE) { + echo ". '$_colcon_package_source_powershell_script'" + } + . "$_colcon_package_source_powershell_script" + } else { + Write-Error "not found: '$_colcon_package_source_powershell_script'" + } +} + + +# a powershell script is able to determine its own path +# the prefix is two levels up from the package specific share directory +$env:COLCON_CURRENT_PREFIX=(Get-Item $PSCommandPath).Directory.Parent.Parent.FullName + +colcon_package_source_powershell_script "$env:COLCON_CURRENT_PREFIX\share/unitree_go/hook/cmake_prefix_path.ps1" +colcon_package_source_powershell_script "$env:COLCON_CURRENT_PREFIX\share/unitree_go/hook/ld_library_path_lib.ps1" +colcon_package_source_powershell_script "$env:COLCON_CURRENT_PREFIX\share/unitree_go/hook/pythonpath.ps1" +colcon_package_source_powershell_script "$env:COLCON_CURRENT_PREFIX\share/unitree_go/local_setup.ps1" + +Remove-Item Env:\COLCON_CURRENT_PREFIX diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/package.sh b/deploy/robot_ws/install/unitree_go/share/unitree_go/package.sh new file mode 100644 index 0000000..0d5f19f --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/package.sh @@ -0,0 +1,89 @@ +# generated from colcon_core/shell/template/package.sh.em + +# This script extends the environment for this package. + +# function to prepend a value to a variable +# which uses colons as separators +# duplicates as well as trailing separators are avoided +# first argument: the name of the result variable +# second argument: the value to be prepended +_colcon_prepend_unique_value() { + # arguments + _listname="$1" + _value="$2" + + # get values from variable + eval _values=\"\$$_listname\" + # backup the field separator + _colcon_prepend_unique_value_IFS=$IFS + IFS=":" + # start with the new value + _all_values="$_value" + # workaround SH_WORD_SPLIT not being set in zsh + if [ "$(command -v colcon_zsh_convert_to_array)" ]; then + colcon_zsh_convert_to_array _values + fi + # iterate over existing values in the variable + for _item in $_values; do + # ignore empty strings + if [ -z "$_item" ]; then + continue + fi + # ignore duplicates of _value + if [ "$_item" = "$_value" ]; then + continue + fi + # keep non-duplicate values + _all_values="$_all_values:$_item" + done + unset _item + # restore the field separator + IFS=$_colcon_prepend_unique_value_IFS + unset _colcon_prepend_unique_value_IFS + # export the updated variable + eval export $_listname=\"$_all_values\" + unset _all_values + unset _values + + unset _value + unset _listname +} + +# since a plain shell script can't determine its own path when being sourced +# either use the provided COLCON_CURRENT_PREFIX +# or fall back to the build time prefix (if it exists) +_colcon_package_sh_COLCON_CURRENT_PREFIX="/home/unitree/locomotion/Go2Py/deploy/ros2_ws/install/unitree_go" +if [ -z "$COLCON_CURRENT_PREFIX" ]; then + if [ ! -d "$_colcon_package_sh_COLCON_CURRENT_PREFIX" ]; then + echo "The build time path \"$_colcon_package_sh_COLCON_CURRENT_PREFIX\" doesn't exist. Either source a script for a different shell or set the environment variable \"COLCON_CURRENT_PREFIX\" explicitly." 1>&2 + unset _colcon_package_sh_COLCON_CURRENT_PREFIX + return 1 + fi + COLCON_CURRENT_PREFIX="$_colcon_package_sh_COLCON_CURRENT_PREFIX" +fi +unset _colcon_package_sh_COLCON_CURRENT_PREFIX + +# function to source another script with conditional trace output +# first argument: the path of the script +# additional arguments: arguments to the script +_colcon_package_sh_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo "# . \"$1\"" + fi + . "$@" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# source sh hooks +_colcon_package_sh_source_script "$COLCON_CURRENT_PREFIX/share/unitree_go/hook/cmake_prefix_path.sh" +_colcon_package_sh_source_script "$COLCON_CURRENT_PREFIX/share/unitree_go/hook/ld_library_path_lib.sh" +_colcon_package_sh_source_script "$COLCON_CURRENT_PREFIX/share/unitree_go/hook/pythonpath.sh" +_colcon_package_sh_source_script "$COLCON_CURRENT_PREFIX/share/unitree_go/local_setup.sh" + +unset _colcon_package_sh_source_script +unset COLCON_CURRENT_PREFIX + +# do not unset _colcon_prepend_unique_value since it might be used by non-primary shell hooks diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/package.xml b/deploy/robot_ws/install/unitree_go/share/unitree_go/package.xml new file mode 100644 index 0000000..1a26d14 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/package.xml @@ -0,0 +1,23 @@ + + + + unitree_go + 0.0.0 + TODO: Package description + czk + TODO: License declaration + + rosidl_default_generators + rosidl_default_runtime + rosidl_interface_packages + ament_cmake + + geometry_msgs + + ament_lint_auto + ament_lint_common + + + ament_cmake + + diff --git a/deploy/robot_ws/install/unitree_go/share/unitree_go/package.zsh b/deploy/robot_ws/install/unitree_go/share/unitree_go/package.zsh new file mode 100644 index 0000000..e8c5370 --- /dev/null +++ b/deploy/robot_ws/install/unitree_go/share/unitree_go/package.zsh @@ -0,0 +1,50 @@ +# generated from colcon_zsh/shell/template/package.zsh.em + +# This script extends the environment for this package. + +# a zsh script is able to determine its own path if necessary +if [ -z "$COLCON_CURRENT_PREFIX" ]; then + # the prefix is two levels up from the package specific share directory + _colcon_package_zsh_COLCON_CURRENT_PREFIX="$(builtin cd -q "`dirname "${(%):-%N}"`/../.." > /dev/null && pwd)" +else + _colcon_package_zsh_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" +fi + +# function to source another script with conditional trace output +# first argument: the path of the script +# additional arguments: arguments to the script +_colcon_package_zsh_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo "# . \"$1\"" + fi + . "$@" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# function to convert array-like strings into arrays +# to workaround SH_WORD_SPLIT not being set +colcon_zsh_convert_to_array() { + local _listname=$1 + local _dollar="$" + local _split="{=" + local _to_array="(\"$_dollar$_split$_listname}\")" + eval $_listname=$_to_array +} + +# source sh script of this package +_colcon_package_zsh_source_script "$_colcon_package_zsh_COLCON_CURRENT_PREFIX/share/unitree_go/package.sh" +unset convert_zsh_to_array + +# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced scripts +COLCON_CURRENT_PREFIX="$_colcon_package_zsh_COLCON_CURRENT_PREFIX" + +# source zsh hooks +_colcon_package_zsh_source_script "$COLCON_CURRENT_PREFIX/share/unitree_go/local_setup.zsh" + +unset COLCON_CURRENT_PREFIX + +unset _colcon_package_zsh_source_script +unset _colcon_package_zsh_COLCON_CURRENT_PREFIX diff --git a/deploy/robot_ws/log/COLCON_IGNORE b/deploy/robot_ws/log/COLCON_IGNORE new file mode 100644 index 0000000..e69de29 diff --git a/deploy/robot_ws/log/latest b/deploy/robot_ws/log/latest new file mode 120000 index 0000000..b57d247 --- /dev/null +++ b/deploy/robot_ws/log/latest @@ -0,0 +1 @@ +latest_build \ No newline at end of file diff --git a/deploy/robot_ws/log/latest_build b/deploy/robot_ws/log/latest_build new file mode 120000 index 0000000..06a8618 --- /dev/null +++ b/deploy/robot_ws/log/latest_build @@ -0,0 +1 @@ +build_2024-02-09_01-44-22 \ No newline at end of file diff --git a/deploy/robot_ws/src/go2py_node/CMakeLists.txt b/deploy/robot_ws/src/go2py_node/CMakeLists.txt new file mode 100644 index 0000000..4c4b588 --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/CMakeLists.txt @@ -0,0 +1,74 @@ +cmake_minimum_required(VERSION 3.5) +project(go2py_node) + +# Default to C99 +if(NOT CMAKE_C_STANDARD) + set(CMAKE_C_STANDARD 99) +endif() + +# Default to C++14 +if(NOT CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 14) +endif() + +if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") + add_compile_options(-Wall -Wextra -Wpedantic) +endif() + + +include_directories(include include/common include/nlohmann) +link_directories(src) + +set ( + DEPENDENCY_LIST + unitree_go + unitree_api + rclcpp + std_msgs + rosbag2_cpp + sensor_msgs + geometry_msgs + nav_msgs + tf2 + tf2_geometry_msgs + tf2_ros + tf2_sensor_msgs +) + +# find dependencies +find_package(ament_cmake REQUIRED) +find_package(unitree_go REQUIRED) +find_package(unitree_go REQUIRED) +find_package(unitree_api REQUIRED) +find_package(rclcpp REQUIRED) +find_package(std_msgs REQUIRED) +find_package(rosbag2_cpp REQUIRED) +find_package(sensor_msgs REQUIRED) +find_package(geometry_msgs REQUIRED) +find_package(nav_msgs REQUIRED) +find_package(tf2 REQUIRED) +find_package(tf2_geometry_msgs REQUIRED) +find_package(tf2_ros REQUIRED) +find_package(tf2_sensor_msgs REQUIRED) + +add_executable(bridge src/bridge.cpp src/common/ros2_sport_client.cpp src/common/motor_crc.cpp) +ament_target_dependencies(bridge ${DEPENDENCY_LIST}) + + +install(TARGETS + bridge + DESTINATION lib/${PROJECT_NAME}) + + +if(BUILD_TESTING) + find_package(ament_lint_auto REQUIRED) + # the following line skips the linter which checks for copyrights + # uncomment the line when a copyright and license is not present in all source files + #set(ament_cmake_copyright_FOUND TRUE) + # the following line skips cpplint (only works in a git repo) + # uncomment the line when this package is not in a git repo + #set(ament_cmake_cpplint_FOUND TRUE) + ament_lint_auto_find_test_dependencies() +endif() + +ament_package() diff --git a/deploy/robot_ws/src/go2py_node/include/common/motor_crc.h b/deploy/robot_ws/src/go2py_node/include/common/motor_crc.h new file mode 100644 index 0000000..c7a5c29 --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/include/common/motor_crc.h @@ -0,0 +1,87 @@ +/***************************************************************** + Copyright (c) 2020, Unitree Robotics.Co.Ltd. All rights reserved. +******************************************************************/ + +#ifndef _MOTOR_CRC_H_ +#define _MOTOR_CRC_H_ + +#include +#include +#include "rclcpp/rclcpp.hpp" +#include "unitree_go/msg/low_cmd.hpp" +#include "unitree_go/msg/motor_cmd.hpp" +#include "unitree_go/msg/bms_cmd.hpp" + +constexpr int HIGHLEVEL = 0xee; +constexpr int LOWLEVEL = 0xff; +constexpr int TRIGERLEVEL = 0xf0; +constexpr double PosStopF = (2.146E+9f); +constexpr double VelStopF = (16000.0f); + +// joint index +constexpr int FR_0 = 0; +constexpr int FR_1 = 1; +constexpr int FR_2 = 2; + +constexpr int FL_0 = 3; +constexpr int FL_1 = 4; +constexpr int FL_2 = 5; + +constexpr int RR_0 = 6; +constexpr int RR_1 = 7; +constexpr int RR_2 = 8; + +constexpr int RL_0 = 9; +constexpr int RL_1 = 10; +constexpr int RL_2 = 11; + + +typedef struct +{ + uint8_t off; // off 0xA5 + std::array reserve; +} BmsCmd; + + + +typedef struct +{ + uint8_t mode; // desired working mode + float q; // desired angle (unit: radian) + float dq; // desired velocity (unit: radian/second) + float tau; // desired output torque (unit: N.m) + float Kp; // desired position stiffness (unit: N.m/rad ) + float Kd; // desired velocity stiffness (unit: N.m/(rad/s) ) + std::array reserve; +} MotorCmd; // motor control + + + +typedef struct +{ + std::array head; + uint8_t levelFlag; + uint8_t frameReserve; + + std::array SN; + std::array version; + uint16_t bandWidth; + std::array motorCmd; + BmsCmd bms; + std::array wirelessRemote; + std::array led; + std::array fan; + uint8_t gpio; + uint32_t reserve; + + uint32_t crc; +} LowCmd; + +uint32_t crc32_core(uint32_t* ptr, uint32_t len); +void get_crc(unitree_go::msg::LowCmd& msg); + + + + + +#endif \ No newline at end of file diff --git a/deploy/robot_ws/src/go2py_node/include/common/ros2_sport_client.h b/deploy/robot_ws/src/go2py_node/include/common/ros2_sport_client.h new file mode 100644 index 0000000..c137e16 --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/include/common/ros2_sport_client.h @@ -0,0 +1,231 @@ +#ifndef _ROS2_SPORT_CLIENT_ +#define _ROS2_SPORT_CLIENT_ +#include +#include "nlohmann/json.hpp" +#include "unitree_api/msg/request.hpp" + + +#pragma pack(1) +const int32_t ROBOT_SPORT_API_ID_DAMP = 1001; +const int32_t ROBOT_SPORT_API_ID_BALANCESTAND = 1002; +const int32_t ROBOT_SPORT_API_ID_STOPMOVE = 1003; +const int32_t ROBOT_SPORT_API_ID_STANDUP = 1004; +const int32_t ROBOT_SPORT_API_ID_STANDDOWN = 1005; +const int32_t ROBOT_SPORT_API_ID_RECOVERYSTAND = 1006; +const int32_t ROBOT_SPORT_API_ID_EULER = 1007; +const int32_t ROBOT_SPORT_API_ID_MOVE = 1008; +const int32_t ROBOT_SPORT_API_ID_SIT = 1009; +const int32_t ROBOT_SPORT_API_ID_RISESIT = 1010; +const int32_t ROBOT_SPORT_API_ID_SWITCHGAIT = 1011; +const int32_t ROBOT_SPORT_API_ID_TRIGGER = 1012; +const int32_t ROBOT_SPORT_API_ID_BODYHEIGHT = 1013; +const int32_t ROBOT_SPORT_API_ID_FOOTRAISEHEIGHT = 1014; +const int32_t ROBOT_SPORT_API_ID_SPEEDLEVEL = 1015; +const int32_t ROBOT_SPORT_API_ID_HELLO = 1016; +const int32_t ROBOT_SPORT_API_ID_STRETCH = 1017; +const int32_t ROBOT_SPORT_API_ID_TRAJECTORYFOLLOW = 1018; +const int32_t ROBOT_SPORT_API_ID_CONTINUOUSGAIT = 1019; +const int32_t ROBOT_SPORT_API_ID_CONTENT = 1020; +const int32_t ROBOT_SPORT_API_ID_WALLOW = 1021; +const int32_t ROBOT_SPORT_API_ID_DANCE1 = 1022; +const int32_t ROBOT_SPORT_API_ID_DANCE2 = 1023; +const int32_t ROBOT_SPORT_API_ID_GETBODYHEIGHT = 1024; +const int32_t ROBOT_SPORT_API_ID_GETFOOTRAISEHEIGHT = 1025; +const int32_t ROBOT_SPORT_API_ID_GETSPEEDLEVEL = 1026; +const int32_t ROBOT_SPORT_API_ID_SWITCHJOYSTICK = 1027; +const int32_t ROBOT_SPORT_API_ID_POSE = 1028; +const int32_t ROBOT_SPORT_API_ID_SCRAPE = 1029; +const int32_t ROBOT_SPORT_API_ID_FRONTFLIP = 1030; +const int32_t ROBOT_SPORT_API_ID_FRONTJUMP = 1031; +const int32_t ROBOT_SPORT_API_ID_FRONTPOUNCE = 1032; + +typedef struct +{ + float timeFromStart; + float x; + float y; + float yaw; + float vx; + float vy; + float vyaw; +} PathPoint; + +class SportClient +{ +public: + /* + * @brief Damp + * @api: 1001 + */ + void Damp(unitree_api::msg::Request &req); + + /* + * @brief BalanceStand + * @api: 1002 + */ + void BalanceStand(unitree_api::msg::Request &req); + + /* + * @brief StopMove + * @api: 1003 + */ + void StopMove(unitree_api::msg::Request &req); + + /* + * @brief StandUp + * @api: 1004 + */ + void StandUp(unitree_api::msg::Request &req); + + /* + * @brief StandDown + * @api: 1005 + */ + void StandDown(unitree_api::msg::Request &req); + + /* + * @brief RecoveryStand + * @api: 1006 + */ + void RecoveryStand(unitree_api::msg::Request &req); + + /* + * @brief Euler + * @api: 1007 + */ + void Euler(unitree_api::msg::Request &req, float roll, float pitch, float yaw); + + /* + * @brief Move + * @api: 1008 + */ + void Move(unitree_api::msg::Request &req, float vx, float vy, float vyaw); + + /* + * @brief Sit + * @api: 1009 + */ + void Sit(unitree_api::msg::Request &req); + + /* + * @brief RiseSit + * @api: 1010 + */ + void RiseSit(unitree_api::msg::Request &req); + + /* + * @brief SwitchGait + * @api: 1011 + */ + void SwitchGait(unitree_api::msg::Request &req, int d); + + /* + * @brief Trigger + * @api: 1012 + */ + void Trigger(unitree_api::msg::Request &req); + + /* + * @brief BodyHeight + * @api: 1013 + */ + void BodyHeight(unitree_api::msg::Request &req, float height); + + /* + * @brief FootRaiseHeight + * @api: 1014 + */ + void FootRaiseHeight(unitree_api::msg::Request &req, float height); + + /* + * @brief SpeedLevel + * @api: 1015 + */ + void SpeedLevel(unitree_api::msg::Request &req, int level); + + /* + * @brief Hello + * @api: 1016 + */ + void Hello(unitree_api::msg::Request &req); + + /* + * @brief Stretch + * @api: 1017 + */ + void Stretch(unitree_api::msg::Request &req); + + /* + * @brief TrajectoryFollow + * @api: 1018 + */ + void TrajectoryFollow(unitree_api::msg::Request &req, std::vector &path); + + /* + * @brief SwitchJoystick + * @api: 1027 + */ + void SwitchJoystick(unitree_api::msg::Request &req, bool flag); + + /* + * @brief ContinuousGait + * @api: 1019 + */ + void ContinuousGait(unitree_api::msg::Request &req, bool flag); + + /* + * @brief Wallow + * @api: 1021 + */ + void Wallow(unitree_api::msg::Request &req); + + /* + * @brief Content + * @api: 1020 + */ + void Content(unitree_api::msg::Request &req); + + /* + * @brief Pose + * @api: 1028 + */ + void Pose(unitree_api::msg::Request &req, bool flag); + + /* + * @brief Scrape + * @api: 1029 + */ + void Scrape(unitree_api::msg::Request &req); + + /* + * @brief FrontFlip + * @api: 1030 + */ + void FrontFlip(unitree_api::msg::Request &req); + + /* + * @brief FrontJump + * @api: 1031 + */ + void FrontJump(unitree_api::msg::Request &req); + + /* + * @brief FrontPounce + * @api: 1032 + */ + void FrontPounce(unitree_api::msg::Request &req); + + /* + * @brief Dance1 + * @api: 1022 + */ + void Dance1(unitree_api::msg::Request &req); + + /* + * @brief Dance2 + * @api: 1023 + */ + void Dance2(unitree_api::msg::Request &req); +}; + +#endif \ No newline at end of file diff --git a/deploy/robot_ws/src/go2py_node/include/nlohmann/adl_serializer.hpp b/deploy/robot_ws/src/go2py_node/include/nlohmann/adl_serializer.hpp new file mode 100644 index 0000000..f77f944 --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/include/nlohmann/adl_serializer.hpp @@ -0,0 +1,55 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + +#pragma once + +#include + +#include +#include +#include +#include + +NLOHMANN_JSON_NAMESPACE_BEGIN + +/// @sa https://json.nlohmann.me/api/adl_serializer/ +template +struct adl_serializer +{ + /// @brief convert a JSON value to any value type + /// @sa https://json.nlohmann.me/api/adl_serializer/from_json/ + template + static auto from_json(BasicJsonType && j, TargetType& val) noexcept( + noexcept(::nlohmann::from_json(std::forward(j), val))) + -> decltype(::nlohmann::from_json(std::forward(j), val), void()) + { + ::nlohmann::from_json(std::forward(j), val); + } + + /// @brief convert a JSON value to any value type + /// @sa https://json.nlohmann.me/api/adl_serializer/from_json/ + template + static auto from_json(BasicJsonType && j) noexcept( + noexcept(::nlohmann::from_json(std::forward(j), detail::identity_tag {}))) + -> decltype(::nlohmann::from_json(std::forward(j), detail::identity_tag {})) + { + return ::nlohmann::from_json(std::forward(j), detail::identity_tag {}); + } + + /// @brief convert any value type to a JSON value + /// @sa https://json.nlohmann.me/api/adl_serializer/to_json/ + template + static auto to_json(BasicJsonType& j, TargetType && val) noexcept( + noexcept(::nlohmann::to_json(j, std::forward(val)))) + -> decltype(::nlohmann::to_json(j, std::forward(val)), void()) + { + ::nlohmann::to_json(j, std::forward(val)); + } +}; + +NLOHMANN_JSON_NAMESPACE_END diff --git a/deploy/robot_ws/src/go2py_node/include/nlohmann/byte_container_with_subtype.hpp b/deploy/robot_ws/src/go2py_node/include/nlohmann/byte_container_with_subtype.hpp new file mode 100644 index 0000000..1031cdc --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/include/nlohmann/byte_container_with_subtype.hpp @@ -0,0 +1,103 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + +#pragma once + +#include // uint8_t, uint64_t +#include // tie +#include // move + +#include + +NLOHMANN_JSON_NAMESPACE_BEGIN + +/// @brief an internal type for a backed binary type +/// @sa https://json.nlohmann.me/api/byte_container_with_subtype/ +template +class byte_container_with_subtype : public BinaryType +{ + public: + using container_type = BinaryType; + using subtype_type = std::uint64_t; + + /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/byte_container_with_subtype/ + byte_container_with_subtype() noexcept(noexcept(container_type())) + : container_type() + {} + + /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/byte_container_with_subtype/ + byte_container_with_subtype(const container_type& b) noexcept(noexcept(container_type(b))) + : container_type(b) + {} + + /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/byte_container_with_subtype/ + byte_container_with_subtype(container_type&& b) noexcept(noexcept(container_type(std::move(b)))) + : container_type(std::move(b)) + {} + + /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/byte_container_with_subtype/ + byte_container_with_subtype(const container_type& b, subtype_type subtype_) noexcept(noexcept(container_type(b))) + : container_type(b) + , m_subtype(subtype_) + , m_has_subtype(true) + {} + + /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/byte_container_with_subtype/ + byte_container_with_subtype(container_type&& b, subtype_type subtype_) noexcept(noexcept(container_type(std::move(b)))) + : container_type(std::move(b)) + , m_subtype(subtype_) + , m_has_subtype(true) + {} + + bool operator==(const byte_container_with_subtype& rhs) const + { + return std::tie(static_cast(*this), m_subtype, m_has_subtype) == + std::tie(static_cast(rhs), rhs.m_subtype, rhs.m_has_subtype); + } + + bool operator!=(const byte_container_with_subtype& rhs) const + { + return !(rhs == *this); + } + + /// @brief sets the binary subtype + /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/set_subtype/ + void set_subtype(subtype_type subtype_) noexcept + { + m_subtype = subtype_; + m_has_subtype = true; + } + + /// @brief return the binary subtype + /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/subtype/ + constexpr subtype_type subtype() const noexcept + { + return m_has_subtype ? m_subtype : static_cast(-1); + } + + /// @brief return whether the value has a subtype + /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/has_subtype/ + constexpr bool has_subtype() const noexcept + { + return m_has_subtype; + } + + /// @brief clears the binary subtype + /// @sa https://json.nlohmann.me/api/byte_container_with_subtype/clear_subtype/ + void clear_subtype() noexcept + { + m_subtype = 0; + m_has_subtype = false; + } + + private: + subtype_type m_subtype = 0; + bool m_has_subtype = false; +}; + +NLOHMANN_JSON_NAMESPACE_END diff --git a/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/abi_macros.hpp b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/abi_macros.hpp new file mode 100644 index 0000000..0d3108d --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/abi_macros.hpp @@ -0,0 +1,100 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + +#pragma once + +// This file contains all macro definitions affecting or depending on the ABI + +#ifndef JSON_SKIP_LIBRARY_VERSION_CHECK + #if defined(NLOHMANN_JSON_VERSION_MAJOR) && defined(NLOHMANN_JSON_VERSION_MINOR) && defined(NLOHMANN_JSON_VERSION_PATCH) + #if NLOHMANN_JSON_VERSION_MAJOR != 3 || NLOHMANN_JSON_VERSION_MINOR != 11 || NLOHMANN_JSON_VERSION_PATCH != 2 + #warning "Already included a different version of the library!" + #endif + #endif +#endif + +#define NLOHMANN_JSON_VERSION_MAJOR 3 // NOLINT(modernize-macro-to-enum) +#define NLOHMANN_JSON_VERSION_MINOR 11 // NOLINT(modernize-macro-to-enum) +#define NLOHMANN_JSON_VERSION_PATCH 2 // NOLINT(modernize-macro-to-enum) + +#ifndef JSON_DIAGNOSTICS + #define JSON_DIAGNOSTICS 0 +#endif + +#ifndef JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON + #define JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON 0 +#endif + +#if JSON_DIAGNOSTICS + #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS _diag +#else + #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS +#endif + +#if JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON + #define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON _ldvcmp +#else + #define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON +#endif + +#ifndef NLOHMANN_JSON_NAMESPACE_NO_VERSION + #define NLOHMANN_JSON_NAMESPACE_NO_VERSION 0 +#endif + +// Construct the namespace ABI tags component +#define NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b) json_abi ## a ## b +#define NLOHMANN_JSON_ABI_TAGS_CONCAT(a, b) \ + NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b) + +#define NLOHMANN_JSON_ABI_TAGS \ + NLOHMANN_JSON_ABI_TAGS_CONCAT( \ + NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS, \ + NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON) + +// Construct the namespace version component +#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) \ + _v ## major ## _ ## minor ## _ ## patch +#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(major, minor, patch) \ + NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) + +#if NLOHMANN_JSON_NAMESPACE_NO_VERSION +#define NLOHMANN_JSON_NAMESPACE_VERSION +#else +#define NLOHMANN_JSON_NAMESPACE_VERSION \ + NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(NLOHMANN_JSON_VERSION_MAJOR, \ + NLOHMANN_JSON_VERSION_MINOR, \ + NLOHMANN_JSON_VERSION_PATCH) +#endif + +// Combine namespace components +#define NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b) a ## b +#define NLOHMANN_JSON_NAMESPACE_CONCAT(a, b) \ + NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b) + +#ifndef NLOHMANN_JSON_NAMESPACE +#define NLOHMANN_JSON_NAMESPACE \ + nlohmann::NLOHMANN_JSON_NAMESPACE_CONCAT( \ + NLOHMANN_JSON_ABI_TAGS, \ + NLOHMANN_JSON_NAMESPACE_VERSION) +#endif + +#ifndef NLOHMANN_JSON_NAMESPACE_BEGIN +#define NLOHMANN_JSON_NAMESPACE_BEGIN \ + namespace nlohmann \ + { \ + inline namespace NLOHMANN_JSON_NAMESPACE_CONCAT( \ + NLOHMANN_JSON_ABI_TAGS, \ + NLOHMANN_JSON_NAMESPACE_VERSION) \ + { +#endif + +#ifndef NLOHMANN_JSON_NAMESPACE_END +#define NLOHMANN_JSON_NAMESPACE_END \ + } /* namespace (inline namespace) NOLINT(readability/namespace) */ \ + } // namespace nlohmann +#endif diff --git a/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/conversions/from_json.hpp b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/conversions/from_json.hpp new file mode 100644 index 0000000..c6299aa --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/conversions/from_json.hpp @@ -0,0 +1,497 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + +#pragma once + +#include // transform +#include // array +#include // forward_list +#include // inserter, front_inserter, end +#include // map +#include // string +#include // tuple, make_tuple +#include // is_arithmetic, is_same, is_enum, underlying_type, is_convertible +#include // unordered_map +#include // pair, declval +#include // valarray + +#include +#include +#include +#include +#include +#include +#include +#include + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +template +inline void from_json(const BasicJsonType& j, typename std::nullptr_t& n) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_null())) + { + JSON_THROW(type_error::create(302, concat("type must be null, but is ", j.type_name()), &j)); + } + n = nullptr; +} + +// overloads for basic_json template parameters +template < typename BasicJsonType, typename ArithmeticType, + enable_if_t < std::is_arithmetic::value&& + !std::is_same::value, + int > = 0 > +void get_arithmetic_value(const BasicJsonType& j, ArithmeticType& val) +{ + switch (static_cast(j)) + { + case value_t::number_unsigned: + { + val = static_cast(*j.template get_ptr()); + break; + } + case value_t::number_integer: + { + val = static_cast(*j.template get_ptr()); + break; + } + case value_t::number_float: + { + val = static_cast(*j.template get_ptr()); + break; + } + + case value_t::null: + case value_t::object: + case value_t::array: + case value_t::string: + case value_t::boolean: + case value_t::binary: + case value_t::discarded: + default: + JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j)); + } +} + +template +inline void from_json(const BasicJsonType& j, typename BasicJsonType::boolean_t& b) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_boolean())) + { + JSON_THROW(type_error::create(302, concat("type must be boolean, but is ", j.type_name()), &j)); + } + b = *j.template get_ptr(); +} + +template +inline void from_json(const BasicJsonType& j, typename BasicJsonType::string_t& s) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_string())) + { + JSON_THROW(type_error::create(302, concat("type must be string, but is ", j.type_name()), &j)); + } + s = *j.template get_ptr(); +} + +template < + typename BasicJsonType, typename StringType, + enable_if_t < + std::is_assignable::value + && is_detected_exact::value + && !std::is_same::value + && !is_json_ref::value, int > = 0 > +inline void from_json(const BasicJsonType& j, StringType& s) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_string())) + { + JSON_THROW(type_error::create(302, concat("type must be string, but is ", j.type_name()), &j)); + } + + s = *j.template get_ptr(); +} + +template +inline void from_json(const BasicJsonType& j, typename BasicJsonType::number_float_t& val) +{ + get_arithmetic_value(j, val); +} + +template +inline void from_json(const BasicJsonType& j, typename BasicJsonType::number_unsigned_t& val) +{ + get_arithmetic_value(j, val); +} + +template +inline void from_json(const BasicJsonType& j, typename BasicJsonType::number_integer_t& val) +{ + get_arithmetic_value(j, val); +} + +#if !JSON_DISABLE_ENUM_SERIALIZATION +template::value, int> = 0> +inline void from_json(const BasicJsonType& j, EnumType& e) +{ + typename std::underlying_type::type val; + get_arithmetic_value(j, val); + e = static_cast(val); +} +#endif // JSON_DISABLE_ENUM_SERIALIZATION + +// forward_list doesn't have an insert method +template::value, int> = 0> +inline void from_json(const BasicJsonType& j, std::forward_list& l) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_array())) + { + JSON_THROW(type_error::create(302, concat("type must be array, but is ", j.type_name()), &j)); + } + l.clear(); + std::transform(j.rbegin(), j.rend(), + std::front_inserter(l), [](const BasicJsonType & i) + { + return i.template get(); + }); +} + +// valarray doesn't have an insert method +template::value, int> = 0> +inline void from_json(const BasicJsonType& j, std::valarray& l) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_array())) + { + JSON_THROW(type_error::create(302, concat("type must be array, but is ", j.type_name()), &j)); + } + l.resize(j.size()); + std::transform(j.begin(), j.end(), std::begin(l), + [](const BasicJsonType & elem) + { + return elem.template get(); + }); +} + +template +auto from_json(const BasicJsonType& j, T (&arr)[N]) // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays) +-> decltype(j.template get(), void()) +{ + for (std::size_t i = 0; i < N; ++i) + { + arr[i] = j.at(i).template get(); + } +} + +template +inline void from_json_array_impl(const BasicJsonType& j, typename BasicJsonType::array_t& arr, priority_tag<3> /*unused*/) +{ + arr = *j.template get_ptr(); +} + +template +auto from_json_array_impl(const BasicJsonType& j, std::array& arr, + priority_tag<2> /*unused*/) +-> decltype(j.template get(), void()) +{ + for (std::size_t i = 0; i < N; ++i) + { + arr[i] = j.at(i).template get(); + } +} + +template::value, + int> = 0> +auto from_json_array_impl(const BasicJsonType& j, ConstructibleArrayType& arr, priority_tag<1> /*unused*/) +-> decltype( + arr.reserve(std::declval()), + j.template get(), + void()) +{ + using std::end; + + ConstructibleArrayType ret; + ret.reserve(j.size()); + std::transform(j.begin(), j.end(), + std::inserter(ret, end(ret)), [](const BasicJsonType & i) + { + // get() returns *this, this won't call a from_json + // method when value_type is BasicJsonType + return i.template get(); + }); + arr = std::move(ret); +} + +template::value, + int> = 0> +inline void from_json_array_impl(const BasicJsonType& j, ConstructibleArrayType& arr, + priority_tag<0> /*unused*/) +{ + using std::end; + + ConstructibleArrayType ret; + std::transform( + j.begin(), j.end(), std::inserter(ret, end(ret)), + [](const BasicJsonType & i) + { + // get() returns *this, this won't call a from_json + // method when value_type is BasicJsonType + return i.template get(); + }); + arr = std::move(ret); +} + +template < typename BasicJsonType, typename ConstructibleArrayType, + enable_if_t < + is_constructible_array_type::value&& + !is_constructible_object_type::value&& + !is_constructible_string_type::value&& + !std::is_same::value&& + !is_basic_json::value, + int > = 0 > +auto from_json(const BasicJsonType& j, ConstructibleArrayType& arr) +-> decltype(from_json_array_impl(j, arr, priority_tag<3> {}), +j.template get(), +void()) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_array())) + { + JSON_THROW(type_error::create(302, concat("type must be array, but is ", j.type_name()), &j)); + } + + from_json_array_impl(j, arr, priority_tag<3> {}); +} + +template < typename BasicJsonType, typename T, std::size_t... Idx > +std::array from_json_inplace_array_impl(BasicJsonType&& j, + identity_tag> /*unused*/, index_sequence /*unused*/) +{ + return { { std::forward(j).at(Idx).template get()... } }; +} + +template < typename BasicJsonType, typename T, std::size_t N > +auto from_json(BasicJsonType&& j, identity_tag> tag) +-> decltype(from_json_inplace_array_impl(std::forward(j), tag, make_index_sequence {})) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_array())) + { + JSON_THROW(type_error::create(302, concat("type must be array, but is ", j.type_name()), &j)); + } + + return from_json_inplace_array_impl(std::forward(j), tag, make_index_sequence {}); +} + +template +inline void from_json(const BasicJsonType& j, typename BasicJsonType::binary_t& bin) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_binary())) + { + JSON_THROW(type_error::create(302, concat("type must be binary, but is ", j.type_name()), &j)); + } + + bin = *j.template get_ptr(); +} + +template::value, int> = 0> +inline void from_json(const BasicJsonType& j, ConstructibleObjectType& obj) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_object())) + { + JSON_THROW(type_error::create(302, concat("type must be object, but is ", j.type_name()), &j)); + } + + ConstructibleObjectType ret; + const auto* inner_object = j.template get_ptr(); + using value_type = typename ConstructibleObjectType::value_type; + std::transform( + inner_object->begin(), inner_object->end(), + std::inserter(ret, ret.begin()), + [](typename BasicJsonType::object_t::value_type const & p) + { + return value_type(p.first, p.second.template get()); + }); + obj = std::move(ret); +} + +// overload for arithmetic types, not chosen for basic_json template arguments +// (BooleanType, etc..); note: Is it really necessary to provide explicit +// overloads for boolean_t etc. in case of a custom BooleanType which is not +// an arithmetic type? +template < typename BasicJsonType, typename ArithmeticType, + enable_if_t < + std::is_arithmetic::value&& + !std::is_same::value&& + !std::is_same::value&& + !std::is_same::value&& + !std::is_same::value, + int > = 0 > +inline void from_json(const BasicJsonType& j, ArithmeticType& val) +{ + switch (static_cast(j)) + { + case value_t::number_unsigned: + { + val = static_cast(*j.template get_ptr()); + break; + } + case value_t::number_integer: + { + val = static_cast(*j.template get_ptr()); + break; + } + case value_t::number_float: + { + val = static_cast(*j.template get_ptr()); + break; + } + case value_t::boolean: + { + val = static_cast(*j.template get_ptr()); + break; + } + + case value_t::null: + case value_t::object: + case value_t::array: + case value_t::string: + case value_t::binary: + case value_t::discarded: + default: + JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j)); + } +} + +template +std::tuple from_json_tuple_impl_base(BasicJsonType&& j, index_sequence /*unused*/) +{ + return std::make_tuple(std::forward(j).at(Idx).template get()...); +} + +template < typename BasicJsonType, class A1, class A2 > +std::pair from_json_tuple_impl(BasicJsonType&& j, identity_tag> /*unused*/, priority_tag<0> /*unused*/) +{ + return {std::forward(j).at(0).template get(), + std::forward(j).at(1).template get()}; +} + +template +inline void from_json_tuple_impl(BasicJsonType&& j, std::pair& p, priority_tag<1> /*unused*/) +{ + p = from_json_tuple_impl(std::forward(j), identity_tag> {}, priority_tag<0> {}); +} + +template +std::tuple from_json_tuple_impl(BasicJsonType&& j, identity_tag> /*unused*/, priority_tag<2> /*unused*/) +{ + return from_json_tuple_impl_base(std::forward(j), index_sequence_for {}); +} + +template +inline void from_json_tuple_impl(BasicJsonType&& j, std::tuple& t, priority_tag<3> /*unused*/) +{ + t = from_json_tuple_impl_base(std::forward(j), index_sequence_for {}); +} + +template +auto from_json(BasicJsonType&& j, TupleRelated&& t) +-> decltype(from_json_tuple_impl(std::forward(j), std::forward(t), priority_tag<3> {})) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_array())) + { + JSON_THROW(type_error::create(302, concat("type must be array, but is ", j.type_name()), &j)); + } + + return from_json_tuple_impl(std::forward(j), std::forward(t), priority_tag<3> {}); +} + +template < typename BasicJsonType, typename Key, typename Value, typename Compare, typename Allocator, + typename = enable_if_t < !std::is_constructible < + typename BasicJsonType::string_t, Key >::value >> +inline void from_json(const BasicJsonType& j, std::map& m) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_array())) + { + JSON_THROW(type_error::create(302, concat("type must be array, but is ", j.type_name()), &j)); + } + m.clear(); + for (const auto& p : j) + { + if (JSON_HEDLEY_UNLIKELY(!p.is_array())) + { + JSON_THROW(type_error::create(302, concat("type must be array, but is ", p.type_name()), &j)); + } + m.emplace(p.at(0).template get(), p.at(1).template get()); + } +} + +template < typename BasicJsonType, typename Key, typename Value, typename Hash, typename KeyEqual, typename Allocator, + typename = enable_if_t < !std::is_constructible < + typename BasicJsonType::string_t, Key >::value >> +inline void from_json(const BasicJsonType& j, std::unordered_map& m) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_array())) + { + JSON_THROW(type_error::create(302, concat("type must be array, but is ", j.type_name()), &j)); + } + m.clear(); + for (const auto& p : j) + { + if (JSON_HEDLEY_UNLIKELY(!p.is_array())) + { + JSON_THROW(type_error::create(302, concat("type must be array, but is ", p.type_name()), &j)); + } + m.emplace(p.at(0).template get(), p.at(1).template get()); + } +} + +#if JSON_HAS_FILESYSTEM || JSON_HAS_EXPERIMENTAL_FILESYSTEM +template +inline void from_json(const BasicJsonType& j, std_fs::path& p) +{ + if (JSON_HEDLEY_UNLIKELY(!j.is_string())) + { + JSON_THROW(type_error::create(302, concat("type must be string, but is ", j.type_name()), &j)); + } + p = *j.template get_ptr(); +} +#endif + +struct from_json_fn +{ + template + auto operator()(const BasicJsonType& j, T&& val) const + noexcept(noexcept(from_json(j, std::forward(val)))) + -> decltype(from_json(j, std::forward(val))) + { + return from_json(j, std::forward(val)); + } +}; + +} // namespace detail + +#ifndef JSON_HAS_CPP_17 +/// namespace to hold default `from_json` function +/// to see why this is required: +/// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4381.html +namespace // NOLINT(cert-dcl59-cpp,fuchsia-header-anon-namespaces,google-build-namespaces) +{ +#endif +JSON_INLINE_VARIABLE constexpr const auto& from_json = // NOLINT(misc-definitions-in-headers) + detail::static_const::value; +#ifndef JSON_HAS_CPP_17 +} // namespace +#endif + +NLOHMANN_JSON_NAMESPACE_END diff --git a/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/conversions/to_chars.hpp b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/conversions/to_chars.hpp new file mode 100644 index 0000000..2d0914d --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/conversions/to_chars.hpp @@ -0,0 +1,1118 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2009 Florian Loitsch +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + +#pragma once + +#include // array +#include // signbit, isfinite +#include // intN_t, uintN_t +#include // memcpy, memmove +#include // numeric_limits +#include // conditional + +#include + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +/*! +@brief implements the Grisu2 algorithm for binary to decimal floating-point +conversion. + +This implementation is a slightly modified version of the reference +implementation which may be obtained from +http://florian.loitsch.com/publications (bench.tar.gz). + +The code is distributed under the MIT license, Copyright (c) 2009 Florian Loitsch. + +For a detailed description of the algorithm see: + +[1] Loitsch, "Printing Floating-Point Numbers Quickly and Accurately with + Integers", Proceedings of the ACM SIGPLAN 2010 Conference on Programming + Language Design and Implementation, PLDI 2010 +[2] Burger, Dybvig, "Printing Floating-Point Numbers Quickly and Accurately", + Proceedings of the ACM SIGPLAN 1996 Conference on Programming Language + Design and Implementation, PLDI 1996 +*/ +namespace dtoa_impl +{ + +template +Target reinterpret_bits(const Source source) +{ + static_assert(sizeof(Target) == sizeof(Source), "size mismatch"); + + Target target; + std::memcpy(&target, &source, sizeof(Source)); + return target; +} + +struct diyfp // f * 2^e +{ + static constexpr int kPrecision = 64; // = q + + std::uint64_t f = 0; + int e = 0; + + constexpr diyfp(std::uint64_t f_, int e_) noexcept : f(f_), e(e_) {} + + /*! + @brief returns x - y + @pre x.e == y.e and x.f >= y.f + */ + static diyfp sub(const diyfp& x, const diyfp& y) noexcept + { + JSON_ASSERT(x.e == y.e); + JSON_ASSERT(x.f >= y.f); + + return {x.f - y.f, x.e}; + } + + /*! + @brief returns x * y + @note The result is rounded. (Only the upper q bits are returned.) + */ + static diyfp mul(const diyfp& x, const diyfp& y) noexcept + { + static_assert(kPrecision == 64, "internal error"); + + // Computes: + // f = round((x.f * y.f) / 2^q) + // e = x.e + y.e + q + + // Emulate the 64-bit * 64-bit multiplication: + // + // p = u * v + // = (u_lo + 2^32 u_hi) (v_lo + 2^32 v_hi) + // = (u_lo v_lo ) + 2^32 ((u_lo v_hi ) + (u_hi v_lo )) + 2^64 (u_hi v_hi ) + // = (p0 ) + 2^32 ((p1 ) + (p2 )) + 2^64 (p3 ) + // = (p0_lo + 2^32 p0_hi) + 2^32 ((p1_lo + 2^32 p1_hi) + (p2_lo + 2^32 p2_hi)) + 2^64 (p3 ) + // = (p0_lo ) + 2^32 (p0_hi + p1_lo + p2_lo ) + 2^64 (p1_hi + p2_hi + p3) + // = (p0_lo ) + 2^32 (Q ) + 2^64 (H ) + // = (p0_lo ) + 2^32 (Q_lo + 2^32 Q_hi ) + 2^64 (H ) + // + // (Since Q might be larger than 2^32 - 1) + // + // = (p0_lo + 2^32 Q_lo) + 2^64 (Q_hi + H) + // + // (Q_hi + H does not overflow a 64-bit int) + // + // = p_lo + 2^64 p_hi + + const std::uint64_t u_lo = x.f & 0xFFFFFFFFu; + const std::uint64_t u_hi = x.f >> 32u; + const std::uint64_t v_lo = y.f & 0xFFFFFFFFu; + const std::uint64_t v_hi = y.f >> 32u; + + const std::uint64_t p0 = u_lo * v_lo; + const std::uint64_t p1 = u_lo * v_hi; + const std::uint64_t p2 = u_hi * v_lo; + const std::uint64_t p3 = u_hi * v_hi; + + const std::uint64_t p0_hi = p0 >> 32u; + const std::uint64_t p1_lo = p1 & 0xFFFFFFFFu; + const std::uint64_t p1_hi = p1 >> 32u; + const std::uint64_t p2_lo = p2 & 0xFFFFFFFFu; + const std::uint64_t p2_hi = p2 >> 32u; + + std::uint64_t Q = p0_hi + p1_lo + p2_lo; + + // The full product might now be computed as + // + // p_hi = p3 + p2_hi + p1_hi + (Q >> 32) + // p_lo = p0_lo + (Q << 32) + // + // But in this particular case here, the full p_lo is not required. + // Effectively we only need to add the highest bit in p_lo to p_hi (and + // Q_hi + 1 does not overflow). + + Q += std::uint64_t{1} << (64u - 32u - 1u); // round, ties up + + const std::uint64_t h = p3 + p2_hi + p1_hi + (Q >> 32u); + + return {h, x.e + y.e + 64}; + } + + /*! + @brief normalize x such that the significand is >= 2^(q-1) + @pre x.f != 0 + */ + static diyfp normalize(diyfp x) noexcept + { + JSON_ASSERT(x.f != 0); + + while ((x.f >> 63u) == 0) + { + x.f <<= 1u; + x.e--; + } + + return x; + } + + /*! + @brief normalize x such that the result has the exponent E + @pre e >= x.e and the upper e - x.e bits of x.f must be zero. + */ + static diyfp normalize_to(const diyfp& x, const int target_exponent) noexcept + { + const int delta = x.e - target_exponent; + + JSON_ASSERT(delta >= 0); + JSON_ASSERT(((x.f << delta) >> delta) == x.f); + + return {x.f << delta, target_exponent}; + } +}; + +struct boundaries +{ + diyfp w; + diyfp minus; + diyfp plus; +}; + +/*! +Compute the (normalized) diyfp representing the input number 'value' and its +boundaries. + +@pre value must be finite and positive +*/ +template +boundaries compute_boundaries(FloatType value) +{ + JSON_ASSERT(std::isfinite(value)); + JSON_ASSERT(value > 0); + + // Convert the IEEE representation into a diyfp. + // + // If v is denormal: + // value = 0.F * 2^(1 - bias) = ( F) * 2^(1 - bias - (p-1)) + // If v is normalized: + // value = 1.F * 2^(E - bias) = (2^(p-1) + F) * 2^(E - bias - (p-1)) + + static_assert(std::numeric_limits::is_iec559, + "internal error: dtoa_short requires an IEEE-754 floating-point implementation"); + + constexpr int kPrecision = std::numeric_limits::digits; // = p (includes the hidden bit) + constexpr int kBias = std::numeric_limits::max_exponent - 1 + (kPrecision - 1); + constexpr int kMinExp = 1 - kBias; + constexpr std::uint64_t kHiddenBit = std::uint64_t{1} << (kPrecision - 1); // = 2^(p-1) + + using bits_type = typename std::conditional::type; + + const auto bits = static_cast(reinterpret_bits(value)); + const std::uint64_t E = bits >> (kPrecision - 1); + const std::uint64_t F = bits & (kHiddenBit - 1); + + const bool is_denormal = E == 0; + const diyfp v = is_denormal + ? diyfp(F, kMinExp) + : diyfp(F + kHiddenBit, static_cast(E) - kBias); + + // Compute the boundaries m- and m+ of the floating-point value + // v = f * 2^e. + // + // Determine v- and v+, the floating-point predecessor and successor if v, + // respectively. + // + // v- = v - 2^e if f != 2^(p-1) or e == e_min (A) + // = v - 2^(e-1) if f == 2^(p-1) and e > e_min (B) + // + // v+ = v + 2^e + // + // Let m- = (v- + v) / 2 and m+ = (v + v+) / 2. All real numbers _strictly_ + // between m- and m+ round to v, regardless of how the input rounding + // algorithm breaks ties. + // + // ---+-------------+-------------+-------------+-------------+--- (A) + // v- m- v m+ v+ + // + // -----------------+------+------+-------------+-------------+--- (B) + // v- m- v m+ v+ + + const bool lower_boundary_is_closer = F == 0 && E > 1; + const diyfp m_plus = diyfp(2 * v.f + 1, v.e - 1); + const diyfp m_minus = lower_boundary_is_closer + ? diyfp(4 * v.f - 1, v.e - 2) // (B) + : diyfp(2 * v.f - 1, v.e - 1); // (A) + + // Determine the normalized w+ = m+. + const diyfp w_plus = diyfp::normalize(m_plus); + + // Determine w- = m- such that e_(w-) = e_(w+). + const diyfp w_minus = diyfp::normalize_to(m_minus, w_plus.e); + + return {diyfp::normalize(v), w_minus, w_plus}; +} + +// Given normalized diyfp w, Grisu needs to find a (normalized) cached +// power-of-ten c, such that the exponent of the product c * w = f * 2^e lies +// within a certain range [alpha, gamma] (Definition 3.2 from [1]) +// +// alpha <= e = e_c + e_w + q <= gamma +// +// or +// +// f_c * f_w * 2^alpha <= f_c 2^(e_c) * f_w 2^(e_w) * 2^q +// <= f_c * f_w * 2^gamma +// +// Since c and w are normalized, i.e. 2^(q-1) <= f < 2^q, this implies +// +// 2^(q-1) * 2^(q-1) * 2^alpha <= c * w * 2^q < 2^q * 2^q * 2^gamma +// +// or +// +// 2^(q - 2 + alpha) <= c * w < 2^(q + gamma) +// +// The choice of (alpha,gamma) determines the size of the table and the form of +// the digit generation procedure. Using (alpha,gamma)=(-60,-32) works out well +// in practice: +// +// The idea is to cut the number c * w = f * 2^e into two parts, which can be +// processed independently: An integral part p1, and a fractional part p2: +// +// f * 2^e = ( (f div 2^-e) * 2^-e + (f mod 2^-e) ) * 2^e +// = (f div 2^-e) + (f mod 2^-e) * 2^e +// = p1 + p2 * 2^e +// +// The conversion of p1 into decimal form requires a series of divisions and +// modulos by (a power of) 10. These operations are faster for 32-bit than for +// 64-bit integers, so p1 should ideally fit into a 32-bit integer. This can be +// achieved by choosing +// +// -e >= 32 or e <= -32 := gamma +// +// In order to convert the fractional part +// +// p2 * 2^e = p2 / 2^-e = d[-1] / 10^1 + d[-2] / 10^2 + ... +// +// into decimal form, the fraction is repeatedly multiplied by 10 and the digits +// d[-i] are extracted in order: +// +// (10 * p2) div 2^-e = d[-1] +// (10 * p2) mod 2^-e = d[-2] / 10^1 + ... +// +// The multiplication by 10 must not overflow. It is sufficient to choose +// +// 10 * p2 < 16 * p2 = 2^4 * p2 <= 2^64. +// +// Since p2 = f mod 2^-e < 2^-e, +// +// -e <= 60 or e >= -60 := alpha + +constexpr int kAlpha = -60; +constexpr int kGamma = -32; + +struct cached_power // c = f * 2^e ~= 10^k +{ + std::uint64_t f; + int e; + int k; +}; + +/*! +For a normalized diyfp w = f * 2^e, this function returns a (normalized) cached +power-of-ten c = f_c * 2^e_c, such that the exponent of the product w * c +satisfies (Definition 3.2 from [1]) + + alpha <= e_c + e + q <= gamma. +*/ +inline cached_power get_cached_power_for_binary_exponent(int e) +{ + // Now + // + // alpha <= e_c + e + q <= gamma (1) + // ==> f_c * 2^alpha <= c * 2^e * 2^q + // + // and since the c's are normalized, 2^(q-1) <= f_c, + // + // ==> 2^(q - 1 + alpha) <= c * 2^(e + q) + // ==> 2^(alpha - e - 1) <= c + // + // If c were an exact power of ten, i.e. c = 10^k, one may determine k as + // + // k = ceil( log_10( 2^(alpha - e - 1) ) ) + // = ceil( (alpha - e - 1) * log_10(2) ) + // + // From the paper: + // "In theory the result of the procedure could be wrong since c is rounded, + // and the computation itself is approximated [...]. In practice, however, + // this simple function is sufficient." + // + // For IEEE double precision floating-point numbers converted into + // normalized diyfp's w = f * 2^e, with q = 64, + // + // e >= -1022 (min IEEE exponent) + // -52 (p - 1) + // -52 (p - 1, possibly normalize denormal IEEE numbers) + // -11 (normalize the diyfp) + // = -1137 + // + // and + // + // e <= +1023 (max IEEE exponent) + // -52 (p - 1) + // -11 (normalize the diyfp) + // = 960 + // + // This binary exponent range [-1137,960] results in a decimal exponent + // range [-307,324]. One does not need to store a cached power for each + // k in this range. For each such k it suffices to find a cached power + // such that the exponent of the product lies in [alpha,gamma]. + // This implies that the difference of the decimal exponents of adjacent + // table entries must be less than or equal to + // + // floor( (gamma - alpha) * log_10(2) ) = 8. + // + // (A smaller distance gamma-alpha would require a larger table.) + + // NB: + // Actually this function returns c, such that -60 <= e_c + e + 64 <= -34. + + constexpr int kCachedPowersMinDecExp = -300; + constexpr int kCachedPowersDecStep = 8; + + static constexpr std::array kCachedPowers = + { + { + { 0xAB70FE17C79AC6CA, -1060, -300 }, + { 0xFF77B1FCBEBCDC4F, -1034, -292 }, + { 0xBE5691EF416BD60C, -1007, -284 }, + { 0x8DD01FAD907FFC3C, -980, -276 }, + { 0xD3515C2831559A83, -954, -268 }, + { 0x9D71AC8FADA6C9B5, -927, -260 }, + { 0xEA9C227723EE8BCB, -901, -252 }, + { 0xAECC49914078536D, -874, -244 }, + { 0x823C12795DB6CE57, -847, -236 }, + { 0xC21094364DFB5637, -821, -228 }, + { 0x9096EA6F3848984F, -794, -220 }, + { 0xD77485CB25823AC7, -768, -212 }, + { 0xA086CFCD97BF97F4, -741, -204 }, + { 0xEF340A98172AACE5, -715, -196 }, + { 0xB23867FB2A35B28E, -688, -188 }, + { 0x84C8D4DFD2C63F3B, -661, -180 }, + { 0xC5DD44271AD3CDBA, -635, -172 }, + { 0x936B9FCEBB25C996, -608, -164 }, + { 0xDBAC6C247D62A584, -582, -156 }, + { 0xA3AB66580D5FDAF6, -555, -148 }, + { 0xF3E2F893DEC3F126, -529, -140 }, + { 0xB5B5ADA8AAFF80B8, -502, -132 }, + { 0x87625F056C7C4A8B, -475, -124 }, + { 0xC9BCFF6034C13053, -449, -116 }, + { 0x964E858C91BA2655, -422, -108 }, + { 0xDFF9772470297EBD, -396, -100 }, + { 0xA6DFBD9FB8E5B88F, -369, -92 }, + { 0xF8A95FCF88747D94, -343, -84 }, + { 0xB94470938FA89BCF, -316, -76 }, + { 0x8A08F0F8BF0F156B, -289, -68 }, + { 0xCDB02555653131B6, -263, -60 }, + { 0x993FE2C6D07B7FAC, -236, -52 }, + { 0xE45C10C42A2B3B06, -210, -44 }, + { 0xAA242499697392D3, -183, -36 }, + { 0xFD87B5F28300CA0E, -157, -28 }, + { 0xBCE5086492111AEB, -130, -20 }, + { 0x8CBCCC096F5088CC, -103, -12 }, + { 0xD1B71758E219652C, -77, -4 }, + { 0x9C40000000000000, -50, 4 }, + { 0xE8D4A51000000000, -24, 12 }, + { 0xAD78EBC5AC620000, 3, 20 }, + { 0x813F3978F8940984, 30, 28 }, + { 0xC097CE7BC90715B3, 56, 36 }, + { 0x8F7E32CE7BEA5C70, 83, 44 }, + { 0xD5D238A4ABE98068, 109, 52 }, + { 0x9F4F2726179A2245, 136, 60 }, + { 0xED63A231D4C4FB27, 162, 68 }, + { 0xB0DE65388CC8ADA8, 189, 76 }, + { 0x83C7088E1AAB65DB, 216, 84 }, + { 0xC45D1DF942711D9A, 242, 92 }, + { 0x924D692CA61BE758, 269, 100 }, + { 0xDA01EE641A708DEA, 295, 108 }, + { 0xA26DA3999AEF774A, 322, 116 }, + { 0xF209787BB47D6B85, 348, 124 }, + { 0xB454E4A179DD1877, 375, 132 }, + { 0x865B86925B9BC5C2, 402, 140 }, + { 0xC83553C5C8965D3D, 428, 148 }, + { 0x952AB45CFA97A0B3, 455, 156 }, + { 0xDE469FBD99A05FE3, 481, 164 }, + { 0xA59BC234DB398C25, 508, 172 }, + { 0xF6C69A72A3989F5C, 534, 180 }, + { 0xB7DCBF5354E9BECE, 561, 188 }, + { 0x88FCF317F22241E2, 588, 196 }, + { 0xCC20CE9BD35C78A5, 614, 204 }, + { 0x98165AF37B2153DF, 641, 212 }, + { 0xE2A0B5DC971F303A, 667, 220 }, + { 0xA8D9D1535CE3B396, 694, 228 }, + { 0xFB9B7CD9A4A7443C, 720, 236 }, + { 0xBB764C4CA7A44410, 747, 244 }, + { 0x8BAB8EEFB6409C1A, 774, 252 }, + { 0xD01FEF10A657842C, 800, 260 }, + { 0x9B10A4E5E9913129, 827, 268 }, + { 0xE7109BFBA19C0C9D, 853, 276 }, + { 0xAC2820D9623BF429, 880, 284 }, + { 0x80444B5E7AA7CF85, 907, 292 }, + { 0xBF21E44003ACDD2D, 933, 300 }, + { 0x8E679C2F5E44FF8F, 960, 308 }, + { 0xD433179D9C8CB841, 986, 316 }, + { 0x9E19DB92B4E31BA9, 1013, 324 }, + } + }; + + // This computation gives exactly the same results for k as + // k = ceil((kAlpha - e - 1) * 0.30102999566398114) + // for |e| <= 1500, but doesn't require floating-point operations. + // NB: log_10(2) ~= 78913 / 2^18 + JSON_ASSERT(e >= -1500); + JSON_ASSERT(e <= 1500); + const int f = kAlpha - e - 1; + const int k = (f * 78913) / (1 << 18) + static_cast(f > 0); + + const int index = (-kCachedPowersMinDecExp + k + (kCachedPowersDecStep - 1)) / kCachedPowersDecStep; + JSON_ASSERT(index >= 0); + JSON_ASSERT(static_cast(index) < kCachedPowers.size()); + + const cached_power cached = kCachedPowers[static_cast(index)]; + JSON_ASSERT(kAlpha <= cached.e + e + 64); + JSON_ASSERT(kGamma >= cached.e + e + 64); + + return cached; +} + +/*! +For n != 0, returns k, such that pow10 := 10^(k-1) <= n < 10^k. +For n == 0, returns 1 and sets pow10 := 1. +*/ +inline int find_largest_pow10(const std::uint32_t n, std::uint32_t& pow10) +{ + // LCOV_EXCL_START + if (n >= 1000000000) + { + pow10 = 1000000000; + return 10; + } + // LCOV_EXCL_STOP + if (n >= 100000000) + { + pow10 = 100000000; + return 9; + } + if (n >= 10000000) + { + pow10 = 10000000; + return 8; + } + if (n >= 1000000) + { + pow10 = 1000000; + return 7; + } + if (n >= 100000) + { + pow10 = 100000; + return 6; + } + if (n >= 10000) + { + pow10 = 10000; + return 5; + } + if (n >= 1000) + { + pow10 = 1000; + return 4; + } + if (n >= 100) + { + pow10 = 100; + return 3; + } + if (n >= 10) + { + pow10 = 10; + return 2; + } + + pow10 = 1; + return 1; +} + +inline void grisu2_round(char* buf, int len, std::uint64_t dist, std::uint64_t delta, + std::uint64_t rest, std::uint64_t ten_k) +{ + JSON_ASSERT(len >= 1); + JSON_ASSERT(dist <= delta); + JSON_ASSERT(rest <= delta); + JSON_ASSERT(ten_k > 0); + + // <--------------------------- delta ----> + // <---- dist ---------> + // --------------[------------------+-------------------]-------------- + // M- w M+ + // + // ten_k + // <------> + // <---- rest ----> + // --------------[------------------+----+--------------]-------------- + // w V + // = buf * 10^k + // + // ten_k represents a unit-in-the-last-place in the decimal representation + // stored in buf. + // Decrement buf by ten_k while this takes buf closer to w. + + // The tests are written in this order to avoid overflow in unsigned + // integer arithmetic. + + while (rest < dist + && delta - rest >= ten_k + && (rest + ten_k < dist || dist - rest > rest + ten_k - dist)) + { + JSON_ASSERT(buf[len - 1] != '0'); + buf[len - 1]--; + rest += ten_k; + } +} + +/*! +Generates V = buffer * 10^decimal_exponent, such that M- <= V <= M+. +M- and M+ must be normalized and share the same exponent -60 <= e <= -32. +*/ +inline void grisu2_digit_gen(char* buffer, int& length, int& decimal_exponent, + diyfp M_minus, diyfp w, diyfp M_plus) +{ + static_assert(kAlpha >= -60, "internal error"); + static_assert(kGamma <= -32, "internal error"); + + // Generates the digits (and the exponent) of a decimal floating-point + // number V = buffer * 10^decimal_exponent in the range [M-, M+]. The diyfp's + // w, M- and M+ share the same exponent e, which satisfies alpha <= e <= gamma. + // + // <--------------------------- delta ----> + // <---- dist ---------> + // --------------[------------------+-------------------]-------------- + // M- w M+ + // + // Grisu2 generates the digits of M+ from left to right and stops as soon as + // V is in [M-,M+]. + + JSON_ASSERT(M_plus.e >= kAlpha); + JSON_ASSERT(M_plus.e <= kGamma); + + std::uint64_t delta = diyfp::sub(M_plus, M_minus).f; // (significand of (M+ - M-), implicit exponent is e) + std::uint64_t dist = diyfp::sub(M_plus, w ).f; // (significand of (M+ - w ), implicit exponent is e) + + // Split M+ = f * 2^e into two parts p1 and p2 (note: e < 0): + // + // M+ = f * 2^e + // = ((f div 2^-e) * 2^-e + (f mod 2^-e)) * 2^e + // = ((p1 ) * 2^-e + (p2 )) * 2^e + // = p1 + p2 * 2^e + + const diyfp one(std::uint64_t{1} << -M_plus.e, M_plus.e); + + auto p1 = static_cast(M_plus.f >> -one.e); // p1 = f div 2^-e (Since -e >= 32, p1 fits into a 32-bit int.) + std::uint64_t p2 = M_plus.f & (one.f - 1); // p2 = f mod 2^-e + + // 1) + // + // Generate the digits of the integral part p1 = d[n-1]...d[1]d[0] + + JSON_ASSERT(p1 > 0); + + std::uint32_t pow10{}; + const int k = find_largest_pow10(p1, pow10); + + // 10^(k-1) <= p1 < 10^k, pow10 = 10^(k-1) + // + // p1 = (p1 div 10^(k-1)) * 10^(k-1) + (p1 mod 10^(k-1)) + // = (d[k-1] ) * 10^(k-1) + (p1 mod 10^(k-1)) + // + // M+ = p1 + p2 * 2^e + // = d[k-1] * 10^(k-1) + (p1 mod 10^(k-1)) + p2 * 2^e + // = d[k-1] * 10^(k-1) + ((p1 mod 10^(k-1)) * 2^-e + p2) * 2^e + // = d[k-1] * 10^(k-1) + ( rest) * 2^e + // + // Now generate the digits d[n] of p1 from left to right (n = k-1,...,0) + // + // p1 = d[k-1]...d[n] * 10^n + d[n-1]...d[0] + // + // but stop as soon as + // + // rest * 2^e = (d[n-1]...d[0] * 2^-e + p2) * 2^e <= delta * 2^e + + int n = k; + while (n > 0) + { + // Invariants: + // M+ = buffer * 10^n + (p1 + p2 * 2^e) (buffer = 0 for n = k) + // pow10 = 10^(n-1) <= p1 < 10^n + // + const std::uint32_t d = p1 / pow10; // d = p1 div 10^(n-1) + const std::uint32_t r = p1 % pow10; // r = p1 mod 10^(n-1) + // + // M+ = buffer * 10^n + (d * 10^(n-1) + r) + p2 * 2^e + // = (buffer * 10 + d) * 10^(n-1) + (r + p2 * 2^e) + // + JSON_ASSERT(d <= 9); + buffer[length++] = static_cast('0' + d); // buffer := buffer * 10 + d + // + // M+ = buffer * 10^(n-1) + (r + p2 * 2^e) + // + p1 = r; + n--; + // + // M+ = buffer * 10^n + (p1 + p2 * 2^e) + // pow10 = 10^n + // + + // Now check if enough digits have been generated. + // Compute + // + // p1 + p2 * 2^e = (p1 * 2^-e + p2) * 2^e = rest * 2^e + // + // Note: + // Since rest and delta share the same exponent e, it suffices to + // compare the significands. + const std::uint64_t rest = (std::uint64_t{p1} << -one.e) + p2; + if (rest <= delta) + { + // V = buffer * 10^n, with M- <= V <= M+. + + decimal_exponent += n; + + // We may now just stop. But instead look if the buffer could be + // decremented to bring V closer to w. + // + // pow10 = 10^n is now 1 ulp in the decimal representation V. + // The rounding procedure works with diyfp's with an implicit + // exponent of e. + // + // 10^n = (10^n * 2^-e) * 2^e = ulp * 2^e + // + const std::uint64_t ten_n = std::uint64_t{pow10} << -one.e; + grisu2_round(buffer, length, dist, delta, rest, ten_n); + + return; + } + + pow10 /= 10; + // + // pow10 = 10^(n-1) <= p1 < 10^n + // Invariants restored. + } + + // 2) + // + // The digits of the integral part have been generated: + // + // M+ = d[k-1]...d[1]d[0] + p2 * 2^e + // = buffer + p2 * 2^e + // + // Now generate the digits of the fractional part p2 * 2^e. + // + // Note: + // No decimal point is generated: the exponent is adjusted instead. + // + // p2 actually represents the fraction + // + // p2 * 2^e + // = p2 / 2^-e + // = d[-1] / 10^1 + d[-2] / 10^2 + ... + // + // Now generate the digits d[-m] of p1 from left to right (m = 1,2,...) + // + // p2 * 2^e = d[-1]d[-2]...d[-m] * 10^-m + // + 10^-m * (d[-m-1] / 10^1 + d[-m-2] / 10^2 + ...) + // + // using + // + // 10^m * p2 = ((10^m * p2) div 2^-e) * 2^-e + ((10^m * p2) mod 2^-e) + // = ( d) * 2^-e + ( r) + // + // or + // 10^m * p2 * 2^e = d + r * 2^e + // + // i.e. + // + // M+ = buffer + p2 * 2^e + // = buffer + 10^-m * (d + r * 2^e) + // = (buffer * 10^m + d) * 10^-m + 10^-m * r * 2^e + // + // and stop as soon as 10^-m * r * 2^e <= delta * 2^e + + JSON_ASSERT(p2 > delta); + + int m = 0; + for (;;) + { + // Invariant: + // M+ = buffer * 10^-m + 10^-m * (d[-m-1] / 10 + d[-m-2] / 10^2 + ...) * 2^e + // = buffer * 10^-m + 10^-m * (p2 ) * 2^e + // = buffer * 10^-m + 10^-m * (1/10 * (10 * p2) ) * 2^e + // = buffer * 10^-m + 10^-m * (1/10 * ((10*p2 div 2^-e) * 2^-e + (10*p2 mod 2^-e)) * 2^e + // + JSON_ASSERT(p2 <= (std::numeric_limits::max)() / 10); + p2 *= 10; + const std::uint64_t d = p2 >> -one.e; // d = (10 * p2) div 2^-e + const std::uint64_t r = p2 & (one.f - 1); // r = (10 * p2) mod 2^-e + // + // M+ = buffer * 10^-m + 10^-m * (1/10 * (d * 2^-e + r) * 2^e + // = buffer * 10^-m + 10^-m * (1/10 * (d + r * 2^e)) + // = (buffer * 10 + d) * 10^(-m-1) + 10^(-m-1) * r * 2^e + // + JSON_ASSERT(d <= 9); + buffer[length++] = static_cast('0' + d); // buffer := buffer * 10 + d + // + // M+ = buffer * 10^(-m-1) + 10^(-m-1) * r * 2^e + // + p2 = r; + m++; + // + // M+ = buffer * 10^-m + 10^-m * p2 * 2^e + // Invariant restored. + + // Check if enough digits have been generated. + // + // 10^-m * p2 * 2^e <= delta * 2^e + // p2 * 2^e <= 10^m * delta * 2^e + // p2 <= 10^m * delta + delta *= 10; + dist *= 10; + if (p2 <= delta) + { + break; + } + } + + // V = buffer * 10^-m, with M- <= V <= M+. + + decimal_exponent -= m; + + // 1 ulp in the decimal representation is now 10^-m. + // Since delta and dist are now scaled by 10^m, we need to do the + // same with ulp in order to keep the units in sync. + // + // 10^m * 10^-m = 1 = 2^-e * 2^e = ten_m * 2^e + // + const std::uint64_t ten_m = one.f; + grisu2_round(buffer, length, dist, delta, p2, ten_m); + + // By construction this algorithm generates the shortest possible decimal + // number (Loitsch, Theorem 6.2) which rounds back to w. + // For an input number of precision p, at least + // + // N = 1 + ceil(p * log_10(2)) + // + // decimal digits are sufficient to identify all binary floating-point + // numbers (Matula, "In-and-Out conversions"). + // This implies that the algorithm does not produce more than N decimal + // digits. + // + // N = 17 for p = 53 (IEEE double precision) + // N = 9 for p = 24 (IEEE single precision) +} + +/*! +v = buf * 10^decimal_exponent +len is the length of the buffer (number of decimal digits) +The buffer must be large enough, i.e. >= max_digits10. +*/ +JSON_HEDLEY_NON_NULL(1) +inline void grisu2(char* buf, int& len, int& decimal_exponent, + diyfp m_minus, diyfp v, diyfp m_plus) +{ + JSON_ASSERT(m_plus.e == m_minus.e); + JSON_ASSERT(m_plus.e == v.e); + + // --------(-----------------------+-----------------------)-------- (A) + // m- v m+ + // + // --------------------(-----------+-----------------------)-------- (B) + // m- v m+ + // + // First scale v (and m- and m+) such that the exponent is in the range + // [alpha, gamma]. + + const cached_power cached = get_cached_power_for_binary_exponent(m_plus.e); + + const diyfp c_minus_k(cached.f, cached.e); // = c ~= 10^-k + + // The exponent of the products is = v.e + c_minus_k.e + q and is in the range [alpha,gamma] + const diyfp w = diyfp::mul(v, c_minus_k); + const diyfp w_minus = diyfp::mul(m_minus, c_minus_k); + const diyfp w_plus = diyfp::mul(m_plus, c_minus_k); + + // ----(---+---)---------------(---+---)---------------(---+---)---- + // w- w w+ + // = c*m- = c*v = c*m+ + // + // diyfp::mul rounds its result and c_minus_k is approximated too. w, w- and + // w+ are now off by a small amount. + // In fact: + // + // w - v * 10^k < 1 ulp + // + // To account for this inaccuracy, add resp. subtract 1 ulp. + // + // --------+---[---------------(---+---)---------------]---+-------- + // w- M- w M+ w+ + // + // Now any number in [M-, M+] (bounds included) will round to w when input, + // regardless of how the input rounding algorithm breaks ties. + // + // And digit_gen generates the shortest possible such number in [M-, M+]. + // Note that this does not mean that Grisu2 always generates the shortest + // possible number in the interval (m-, m+). + const diyfp M_minus(w_minus.f + 1, w_minus.e); + const diyfp M_plus (w_plus.f - 1, w_plus.e ); + + decimal_exponent = -cached.k; // = -(-k) = k + + grisu2_digit_gen(buf, len, decimal_exponent, M_minus, w, M_plus); +} + +/*! +v = buf * 10^decimal_exponent +len is the length of the buffer (number of decimal digits) +The buffer must be large enough, i.e. >= max_digits10. +*/ +template +JSON_HEDLEY_NON_NULL(1) +void grisu2(char* buf, int& len, int& decimal_exponent, FloatType value) +{ + static_assert(diyfp::kPrecision >= std::numeric_limits::digits + 3, + "internal error: not enough precision"); + + JSON_ASSERT(std::isfinite(value)); + JSON_ASSERT(value > 0); + + // If the neighbors (and boundaries) of 'value' are always computed for double-precision + // numbers, all float's can be recovered using strtod (and strtof). However, the resulting + // decimal representations are not exactly "short". + // + // The documentation for 'std::to_chars' (https://en.cppreference.com/w/cpp/utility/to_chars) + // says "value is converted to a string as if by std::sprintf in the default ("C") locale" + // and since sprintf promotes floats to doubles, I think this is exactly what 'std::to_chars' + // does. + // On the other hand, the documentation for 'std::to_chars' requires that "parsing the + // representation using the corresponding std::from_chars function recovers value exactly". That + // indicates that single precision floating-point numbers should be recovered using + // 'std::strtof'. + // + // NB: If the neighbors are computed for single-precision numbers, there is a single float + // (7.0385307e-26f) which can't be recovered using strtod. The resulting double precision + // value is off by 1 ulp. +#if 0 // NOLINT(readability-avoid-unconditional-preprocessor-if) + const boundaries w = compute_boundaries(static_cast(value)); +#else + const boundaries w = compute_boundaries(value); +#endif + + grisu2(buf, len, decimal_exponent, w.minus, w.w, w.plus); +} + +/*! +@brief appends a decimal representation of e to buf +@return a pointer to the element following the exponent. +@pre -1000 < e < 1000 +*/ +JSON_HEDLEY_NON_NULL(1) +JSON_HEDLEY_RETURNS_NON_NULL +inline char* append_exponent(char* buf, int e) +{ + JSON_ASSERT(e > -1000); + JSON_ASSERT(e < 1000); + + if (e < 0) + { + e = -e; + *buf++ = '-'; + } + else + { + *buf++ = '+'; + } + + auto k = static_cast(e); + if (k < 10) + { + // Always print at least two digits in the exponent. + // This is for compatibility with printf("%g"). + *buf++ = '0'; + *buf++ = static_cast('0' + k); + } + else if (k < 100) + { + *buf++ = static_cast('0' + k / 10); + k %= 10; + *buf++ = static_cast('0' + k); + } + else + { + *buf++ = static_cast('0' + k / 100); + k %= 100; + *buf++ = static_cast('0' + k / 10); + k %= 10; + *buf++ = static_cast('0' + k); + } + + return buf; +} + +/*! +@brief prettify v = buf * 10^decimal_exponent + +If v is in the range [10^min_exp, 10^max_exp) it will be printed in fixed-point +notation. Otherwise it will be printed in exponential notation. + +@pre min_exp < 0 +@pre max_exp > 0 +*/ +JSON_HEDLEY_NON_NULL(1) +JSON_HEDLEY_RETURNS_NON_NULL +inline char* format_buffer(char* buf, int len, int decimal_exponent, + int min_exp, int max_exp) +{ + JSON_ASSERT(min_exp < 0); + JSON_ASSERT(max_exp > 0); + + const int k = len; + const int n = len + decimal_exponent; + + // v = buf * 10^(n-k) + // k is the length of the buffer (number of decimal digits) + // n is the position of the decimal point relative to the start of the buffer. + + if (k <= n && n <= max_exp) + { + // digits[000] + // len <= max_exp + 2 + + std::memset(buf + k, '0', static_cast(n) - static_cast(k)); + // Make it look like a floating-point number (#362, #378) + buf[n + 0] = '.'; + buf[n + 1] = '0'; + return buf + (static_cast(n) + 2); + } + + if (0 < n && n <= max_exp) + { + // dig.its + // len <= max_digits10 + 1 + + JSON_ASSERT(k > n); + + std::memmove(buf + (static_cast(n) + 1), buf + n, static_cast(k) - static_cast(n)); + buf[n] = '.'; + return buf + (static_cast(k) + 1U); + } + + if (min_exp < n && n <= 0) + { + // 0.[000]digits + // len <= 2 + (-min_exp - 1) + max_digits10 + + std::memmove(buf + (2 + static_cast(-n)), buf, static_cast(k)); + buf[0] = '0'; + buf[1] = '.'; + std::memset(buf + 2, '0', static_cast(-n)); + return buf + (2U + static_cast(-n) + static_cast(k)); + } + + if (k == 1) + { + // dE+123 + // len <= 1 + 5 + + buf += 1; + } + else + { + // d.igitsE+123 + // len <= max_digits10 + 1 + 5 + + std::memmove(buf + 2, buf + 1, static_cast(k) - 1); + buf[1] = '.'; + buf += 1 + static_cast(k); + } + + *buf++ = 'e'; + return append_exponent(buf, n - 1); +} + +} // namespace dtoa_impl + +/*! +@brief generates a decimal representation of the floating-point number value in [first, last). + +The format of the resulting decimal representation is similar to printf's %g +format. Returns an iterator pointing past-the-end of the decimal representation. + +@note The input number must be finite, i.e. NaN's and Inf's are not supported. +@note The buffer must be large enough. +@note The result is NOT null-terminated. +*/ +template +JSON_HEDLEY_NON_NULL(1, 2) +JSON_HEDLEY_RETURNS_NON_NULL +char* to_chars(char* first, const char* last, FloatType value) +{ + static_cast(last); // maybe unused - fix warning + JSON_ASSERT(std::isfinite(value)); + + // Use signbit(value) instead of (value < 0) since signbit works for -0. + if (std::signbit(value)) + { + value = -value; + *first++ = '-'; + } + +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wfloat-equal" +#endif + if (value == 0) // +-0 + { + *first++ = '0'; + // Make it look like a floating-point number (#362, #378) + *first++ = '.'; + *first++ = '0'; + return first; + } +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif + + JSON_ASSERT(last - first >= std::numeric_limits::max_digits10); + + // Compute v = buffer * 10^decimal_exponent. + // The decimal digits are stored in the buffer, which needs to be interpreted + // as an unsigned decimal integer. + // len is the length of the buffer, i.e. the number of decimal digits. + int len = 0; + int decimal_exponent = 0; + dtoa_impl::grisu2(first, len, decimal_exponent, value); + + JSON_ASSERT(len <= std::numeric_limits::max_digits10); + + // Format the buffer like printf("%.*g", prec, value) + constexpr int kMinExp = -4; + // Use digits10 here to increase compatibility with version 2. + constexpr int kMaxExp = std::numeric_limits::digits10; + + JSON_ASSERT(last - first >= kMaxExp + 2); + JSON_ASSERT(last - first >= 2 + (-kMinExp - 1) + std::numeric_limits::max_digits10); + JSON_ASSERT(last - first >= std::numeric_limits::max_digits10 + 6); + + return dtoa_impl::format_buffer(first, len, decimal_exponent, kMinExp, kMaxExp); +} + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END diff --git a/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/conversions/to_json.hpp b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/conversions/to_json.hpp new file mode 100644 index 0000000..e70207f --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/conversions/to_json.hpp @@ -0,0 +1,446 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + +#pragma once + +#include // copy +#include // begin, end +#include // string +#include // tuple, get +#include // is_same, is_constructible, is_floating_point, is_enum, underlying_type +#include // move, forward, declval, pair +#include // valarray +#include // vector + +#include +#include +#include +#include +#include +#include + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +////////////////// +// constructors // +////////////////// + +/* + * Note all external_constructor<>::construct functions need to call + * j.m_data.m_value.destroy(j.m_data.m_type) to avoid a memory leak in case j contains an + * allocated value (e.g., a string). See bug issue + * https://github.com/nlohmann/json/issues/2865 for more information. + */ + +template struct external_constructor; + +template<> +struct external_constructor +{ + template + static void construct(BasicJsonType& j, typename BasicJsonType::boolean_t b) noexcept + { + j.m_data.m_value.destroy(j.m_data.m_type); + j.m_data.m_type = value_t::boolean; + j.m_data.m_value = b; + j.assert_invariant(); + } +}; + +template<> +struct external_constructor +{ + template + static void construct(BasicJsonType& j, const typename BasicJsonType::string_t& s) + { + j.m_data.m_value.destroy(j.m_data.m_type); + j.m_data.m_type = value_t::string; + j.m_data.m_value = s; + j.assert_invariant(); + } + + template + static void construct(BasicJsonType& j, typename BasicJsonType::string_t&& s) + { + j.m_data.m_value.destroy(j.m_data.m_type); + j.m_data.m_type = value_t::string; + j.m_data.m_value = std::move(s); + j.assert_invariant(); + } + + template < typename BasicJsonType, typename CompatibleStringType, + enable_if_t < !std::is_same::value, + int > = 0 > + static void construct(BasicJsonType& j, const CompatibleStringType& str) + { + j.m_data.m_value.destroy(j.m_data.m_type); + j.m_data.m_type = value_t::string; + j.m_data.m_value.string = j.template create(str); + j.assert_invariant(); + } +}; + +template<> +struct external_constructor +{ + template + static void construct(BasicJsonType& j, const typename BasicJsonType::binary_t& b) + { + j.m_data.m_value.destroy(j.m_data.m_type); + j.m_data.m_type = value_t::binary; + j.m_data.m_value = typename BasicJsonType::binary_t(b); + j.assert_invariant(); + } + + template + static void construct(BasicJsonType& j, typename BasicJsonType::binary_t&& b) + { + j.m_data.m_value.destroy(j.m_data.m_type); + j.m_data.m_type = value_t::binary; + j.m_data.m_value = typename BasicJsonType::binary_t(std::move(b)); + j.assert_invariant(); + } +}; + +template<> +struct external_constructor +{ + template + static void construct(BasicJsonType& j, typename BasicJsonType::number_float_t val) noexcept + { + j.m_data.m_value.destroy(j.m_data.m_type); + j.m_data.m_type = value_t::number_float; + j.m_data.m_value = val; + j.assert_invariant(); + } +}; + +template<> +struct external_constructor +{ + template + static void construct(BasicJsonType& j, typename BasicJsonType::number_unsigned_t val) noexcept + { + j.m_data.m_value.destroy(j.m_data.m_type); + j.m_data.m_type = value_t::number_unsigned; + j.m_data.m_value = val; + j.assert_invariant(); + } +}; + +template<> +struct external_constructor +{ + template + static void construct(BasicJsonType& j, typename BasicJsonType::number_integer_t val) noexcept + { + j.m_data.m_value.destroy(j.m_data.m_type); + j.m_data.m_type = value_t::number_integer; + j.m_data.m_value = val; + j.assert_invariant(); + } +}; + +template<> +struct external_constructor +{ + template + static void construct(BasicJsonType& j, const typename BasicJsonType::array_t& arr) + { + j.m_data.m_value.destroy(j.m_data.m_type); + j.m_data.m_type = value_t::array; + j.m_data.m_value = arr; + j.set_parents(); + j.assert_invariant(); + } + + template + static void construct(BasicJsonType& j, typename BasicJsonType::array_t&& arr) + { + j.m_data.m_value.destroy(j.m_data.m_type); + j.m_data.m_type = value_t::array; + j.m_data.m_value = std::move(arr); + j.set_parents(); + j.assert_invariant(); + } + + template < typename BasicJsonType, typename CompatibleArrayType, + enable_if_t < !std::is_same::value, + int > = 0 > + static void construct(BasicJsonType& j, const CompatibleArrayType& arr) + { + using std::begin; + using std::end; + + j.m_data.m_value.destroy(j.m_data.m_type); + j.m_data.m_type = value_t::array; + j.m_data.m_value.array = j.template create(begin(arr), end(arr)); + j.set_parents(); + j.assert_invariant(); + } + + template + static void construct(BasicJsonType& j, const std::vector& arr) + { + j.m_data.m_value.destroy(j.m_data.m_type); + j.m_data.m_type = value_t::array; + j.m_data.m_value = value_t::array; + j.m_data.m_value.array->reserve(arr.size()); + for (const bool x : arr) + { + j.m_data.m_value.array->push_back(x); + j.set_parent(j.m_data.m_value.array->back()); + } + j.assert_invariant(); + } + + template::value, int> = 0> + static void construct(BasicJsonType& j, const std::valarray& arr) + { + j.m_data.m_value.destroy(j.m_data.m_type); + j.m_data.m_type = value_t::array; + j.m_data.m_value = value_t::array; + j.m_data.m_value.array->resize(arr.size()); + if (arr.size() > 0) + { + std::copy(std::begin(arr), std::end(arr), j.m_data.m_value.array->begin()); + } + j.set_parents(); + j.assert_invariant(); + } +}; + +template<> +struct external_constructor +{ + template + static void construct(BasicJsonType& j, const typename BasicJsonType::object_t& obj) + { + j.m_data.m_value.destroy(j.m_data.m_type); + j.m_data.m_type = value_t::object; + j.m_data.m_value = obj; + j.set_parents(); + j.assert_invariant(); + } + + template + static void construct(BasicJsonType& j, typename BasicJsonType::object_t&& obj) + { + j.m_data.m_value.destroy(j.m_data.m_type); + j.m_data.m_type = value_t::object; + j.m_data.m_value = std::move(obj); + j.set_parents(); + j.assert_invariant(); + } + + template < typename BasicJsonType, typename CompatibleObjectType, + enable_if_t < !std::is_same::value, int > = 0 > + static void construct(BasicJsonType& j, const CompatibleObjectType& obj) + { + using std::begin; + using std::end; + + j.m_data.m_value.destroy(j.m_data.m_type); + j.m_data.m_type = value_t::object; + j.m_data.m_value.object = j.template create(begin(obj), end(obj)); + j.set_parents(); + j.assert_invariant(); + } +}; + +///////////// +// to_json // +///////////// + +template::value, int> = 0> +inline void to_json(BasicJsonType& j, T b) noexcept +{ + external_constructor::construct(j, b); +} + +template < typename BasicJsonType, typename BoolRef, + enable_if_t < + ((std::is_same::reference, BoolRef>::value + && !std::is_same ::reference, typename BasicJsonType::boolean_t&>::value) + || (std::is_same::const_reference, BoolRef>::value + && !std::is_same ::const_reference>, + typename BasicJsonType::boolean_t >::value)) + && std::is_convertible::value, int > = 0 > +inline void to_json(BasicJsonType& j, const BoolRef& b) noexcept +{ + external_constructor::construct(j, static_cast(b)); +} + +template::value, int> = 0> +inline void to_json(BasicJsonType& j, const CompatibleString& s) +{ + external_constructor::construct(j, s); +} + +template +inline void to_json(BasicJsonType& j, typename BasicJsonType::string_t&& s) +{ + external_constructor::construct(j, std::move(s)); +} + +template::value, int> = 0> +inline void to_json(BasicJsonType& j, FloatType val) noexcept +{ + external_constructor::construct(j, static_cast(val)); +} + +template::value, int> = 0> +inline void to_json(BasicJsonType& j, CompatibleNumberUnsignedType val) noexcept +{ + external_constructor::construct(j, static_cast(val)); +} + +template::value, int> = 0> +inline void to_json(BasicJsonType& j, CompatibleNumberIntegerType val) noexcept +{ + external_constructor::construct(j, static_cast(val)); +} + +#if !JSON_DISABLE_ENUM_SERIALIZATION +template::value, int> = 0> +inline void to_json(BasicJsonType& j, EnumType e) noexcept +{ + using underlying_type = typename std::underlying_type::type; + external_constructor::construct(j, static_cast(e)); +} +#endif // JSON_DISABLE_ENUM_SERIALIZATION + +template +inline void to_json(BasicJsonType& j, const std::vector& e) +{ + external_constructor::construct(j, e); +} + +template < typename BasicJsonType, typename CompatibleArrayType, + enable_if_t < is_compatible_array_type::value&& + !is_compatible_object_type::value&& + !is_compatible_string_type::value&& + !std::is_same::value&& + !is_basic_json::value, + int > = 0 > +inline void to_json(BasicJsonType& j, const CompatibleArrayType& arr) +{ + external_constructor::construct(j, arr); +} + +template +inline void to_json(BasicJsonType& j, const typename BasicJsonType::binary_t& bin) +{ + external_constructor::construct(j, bin); +} + +template::value, int> = 0> +inline void to_json(BasicJsonType& j, const std::valarray& arr) +{ + external_constructor::construct(j, std::move(arr)); +} + +template +inline void to_json(BasicJsonType& j, typename BasicJsonType::array_t&& arr) +{ + external_constructor::construct(j, std::move(arr)); +} + +template < typename BasicJsonType, typename CompatibleObjectType, + enable_if_t < is_compatible_object_type::value&& !is_basic_json::value, int > = 0 > +inline void to_json(BasicJsonType& j, const CompatibleObjectType& obj) +{ + external_constructor::construct(j, obj); +} + +template +inline void to_json(BasicJsonType& j, typename BasicJsonType::object_t&& obj) +{ + external_constructor::construct(j, std::move(obj)); +} + +template < + typename BasicJsonType, typename T, std::size_t N, + enable_if_t < !std::is_constructible::value, // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays) + int > = 0 > +inline void to_json(BasicJsonType& j, const T(&arr)[N]) // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays) +{ + external_constructor::construct(j, arr); +} + +template < typename BasicJsonType, typename T1, typename T2, enable_if_t < std::is_constructible::value&& std::is_constructible::value, int > = 0 > +inline void to_json(BasicJsonType& j, const std::pair& p) +{ + j = { p.first, p.second }; +} + +// for https://github.com/nlohmann/json/pull/1134 +template>::value, int> = 0> +inline void to_json(BasicJsonType& j, const T& b) +{ + j = { {b.key(), b.value()} }; +} + +template +inline void to_json_tuple_impl(BasicJsonType& j, const Tuple& t, index_sequence /*unused*/) +{ + j = { std::get(t)... }; +} + +template::value, int > = 0> +inline void to_json(BasicJsonType& j, const T& t) +{ + to_json_tuple_impl(j, t, make_index_sequence::value> {}); +} + +#if JSON_HAS_FILESYSTEM || JSON_HAS_EXPERIMENTAL_FILESYSTEM +template +inline void to_json(BasicJsonType& j, const std_fs::path& p) +{ + j = p.string(); +} +#endif + +struct to_json_fn +{ + template + auto operator()(BasicJsonType& j, T&& val) const noexcept(noexcept(to_json(j, std::forward(val)))) + -> decltype(to_json(j, std::forward(val)), void()) + { + return to_json(j, std::forward(val)); + } +}; +} // namespace detail + +#ifndef JSON_HAS_CPP_17 +/// namespace to hold default `to_json` function +/// to see why this is required: +/// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4381.html +namespace // NOLINT(cert-dcl59-cpp,fuchsia-header-anon-namespaces,google-build-namespaces) +{ +#endif +JSON_INLINE_VARIABLE constexpr const auto& to_json = // NOLINT(misc-definitions-in-headers) + detail::static_const::value; +#ifndef JSON_HAS_CPP_17 +} // namespace +#endif + +NLOHMANN_JSON_NAMESPACE_END diff --git a/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/exceptions.hpp b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/exceptions.hpp new file mode 100644 index 0000000..23b390c --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/exceptions.hpp @@ -0,0 +1,258 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + +#pragma once + +#include // nullptr_t +#include // exception +#if JSON_DIAGNOSTICS + #include // accumulate +#endif +#include // runtime_error +#include // to_string +#include // vector + +#include +#include +#include +#include +#include +#include +#include + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +//////////////// +// exceptions // +//////////////// + +/// @brief general exception of the @ref basic_json class +/// @sa https://json.nlohmann.me/api/basic_json/exception/ +class exception : public std::exception +{ + public: + /// returns the explanatory string + const char* what() const noexcept override + { + return m.what(); + } + + /// the id of the exception + const int id; // NOLINT(cppcoreguidelines-non-private-member-variables-in-classes) + + protected: + JSON_HEDLEY_NON_NULL(3) + exception(int id_, const char* what_arg) : id(id_), m(what_arg) {} // NOLINT(bugprone-throw-keyword-missing) + + static std::string name(const std::string& ename, int id_) + { + return concat("[json.exception.", ename, '.', std::to_string(id_), "] "); + } + + static std::string diagnostics(std::nullptr_t /*leaf_element*/) + { + return ""; + } + + template + static std::string diagnostics(const BasicJsonType* leaf_element) + { +#if JSON_DIAGNOSTICS + std::vector tokens; + for (const auto* current = leaf_element; current != nullptr && current->m_parent != nullptr; current = current->m_parent) + { + switch (current->m_parent->type()) + { + case value_t::array: + { + for (std::size_t i = 0; i < current->m_parent->m_data.m_value.array->size(); ++i) + { + if (¤t->m_parent->m_data.m_value.array->operator[](i) == current) + { + tokens.emplace_back(std::to_string(i)); + break; + } + } + break; + } + + case value_t::object: + { + for (const auto& element : *current->m_parent->m_data.m_value.object) + { + if (&element.second == current) + { + tokens.emplace_back(element.first.c_str()); + break; + } + } + break; + } + + case value_t::null: // LCOV_EXCL_LINE + case value_t::string: // LCOV_EXCL_LINE + case value_t::boolean: // LCOV_EXCL_LINE + case value_t::number_integer: // LCOV_EXCL_LINE + case value_t::number_unsigned: // LCOV_EXCL_LINE + case value_t::number_float: // LCOV_EXCL_LINE + case value_t::binary: // LCOV_EXCL_LINE + case value_t::discarded: // LCOV_EXCL_LINE + default: // LCOV_EXCL_LINE + break; // LCOV_EXCL_LINE + } + } + + if (tokens.empty()) + { + return ""; + } + + auto str = std::accumulate(tokens.rbegin(), tokens.rend(), std::string{}, + [](const std::string & a, const std::string & b) + { + return concat(a, '/', detail::escape(b)); + }); + return concat('(', str, ") "); +#else + static_cast(leaf_element); + return ""; +#endif + } + + private: + /// an exception object as storage for error messages + std::runtime_error m; +}; + +/// @brief exception indicating a parse error +/// @sa https://json.nlohmann.me/api/basic_json/parse_error/ +class parse_error : public exception +{ + public: + /*! + @brief create a parse error exception + @param[in] id_ the id of the exception + @param[in] pos the position where the error occurred (or with + chars_read_total=0 if the position cannot be + determined) + @param[in] what_arg the explanatory string + @return parse_error object + */ + template::value, int> = 0> + static parse_error create(int id_, const position_t& pos, const std::string& what_arg, BasicJsonContext context) + { + const std::string w = concat(exception::name("parse_error", id_), "parse error", + position_string(pos), ": ", exception::diagnostics(context), what_arg); + return {id_, pos.chars_read_total, w.c_str()}; + } + + template::value, int> = 0> + static parse_error create(int id_, std::size_t byte_, const std::string& what_arg, BasicJsonContext context) + { + const std::string w = concat(exception::name("parse_error", id_), "parse error", + (byte_ != 0 ? (concat(" at byte ", std::to_string(byte_))) : ""), + ": ", exception::diagnostics(context), what_arg); + return {id_, byte_, w.c_str()}; + } + + /*! + @brief byte index of the parse error + + The byte index of the last read character in the input file. + + @note For an input with n bytes, 1 is the index of the first character and + n+1 is the index of the terminating null byte or the end of file. + This also holds true when reading a byte vector (CBOR or MessagePack). + */ + const std::size_t byte; + + private: + parse_error(int id_, std::size_t byte_, const char* what_arg) + : exception(id_, what_arg), byte(byte_) {} + + static std::string position_string(const position_t& pos) + { + return concat(" at line ", std::to_string(pos.lines_read + 1), + ", column ", std::to_string(pos.chars_read_current_line)); + } +}; + +/// @brief exception indicating errors with iterators +/// @sa https://json.nlohmann.me/api/basic_json/invalid_iterator/ +class invalid_iterator : public exception +{ + public: + template::value, int> = 0> + static invalid_iterator create(int id_, const std::string& what_arg, BasicJsonContext context) + { + const std::string w = concat(exception::name("invalid_iterator", id_), exception::diagnostics(context), what_arg); + return {id_, w.c_str()}; + } + + private: + JSON_HEDLEY_NON_NULL(3) + invalid_iterator(int id_, const char* what_arg) + : exception(id_, what_arg) {} +}; + +/// @brief exception indicating executing a member function with a wrong type +/// @sa https://json.nlohmann.me/api/basic_json/type_error/ +class type_error : public exception +{ + public: + template::value, int> = 0> + static type_error create(int id_, const std::string& what_arg, BasicJsonContext context) + { + const std::string w = concat(exception::name("type_error", id_), exception::diagnostics(context), what_arg); + return {id_, w.c_str()}; + } + + private: + JSON_HEDLEY_NON_NULL(3) + type_error(int id_, const char* what_arg) : exception(id_, what_arg) {} +}; + +/// @brief exception indicating access out of the defined range +/// @sa https://json.nlohmann.me/api/basic_json/out_of_range/ +class out_of_range : public exception +{ + public: + template::value, int> = 0> + static out_of_range create(int id_, const std::string& what_arg, BasicJsonContext context) + { + const std::string w = concat(exception::name("out_of_range", id_), exception::diagnostics(context), what_arg); + return {id_, w.c_str()}; + } + + private: + JSON_HEDLEY_NON_NULL(3) + out_of_range(int id_, const char* what_arg) : exception(id_, what_arg) {} +}; + +/// @brief exception indicating other library errors +/// @sa https://json.nlohmann.me/api/basic_json/other_error/ +class other_error : public exception +{ + public: + template::value, int> = 0> + static other_error create(int id_, const std::string& what_arg, BasicJsonContext context) + { + const std::string w = concat(exception::name("other_error", id_), exception::diagnostics(context), what_arg); + return {id_, w.c_str()}; + } + + private: + JSON_HEDLEY_NON_NULL(3) + other_error(int id_, const char* what_arg) : exception(id_, what_arg) {} +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END diff --git a/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/hash.hpp b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/hash.hpp new file mode 100644 index 0000000..3f05af8 --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/hash.hpp @@ -0,0 +1,129 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + +#pragma once + +#include // uint8_t +#include // size_t +#include // hash + +#include +#include + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +// boost::hash_combine +inline std::size_t combine(std::size_t seed, std::size_t h) noexcept +{ + seed ^= h + 0x9e3779b9 + (seed << 6U) + (seed >> 2U); + return seed; +} + +/*! +@brief hash a JSON value + +The hash function tries to rely on std::hash where possible. Furthermore, the +type of the JSON value is taken into account to have different hash values for +null, 0, 0U, and false, etc. + +@tparam BasicJsonType basic_json specialization +@param j JSON value to hash +@return hash value of j +*/ +template +std::size_t hash(const BasicJsonType& j) +{ + using string_t = typename BasicJsonType::string_t; + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + + const auto type = static_cast(j.type()); + switch (j.type()) + { + case BasicJsonType::value_t::null: + case BasicJsonType::value_t::discarded: + { + return combine(type, 0); + } + + case BasicJsonType::value_t::object: + { + auto seed = combine(type, j.size()); + for (const auto& element : j.items()) + { + const auto h = std::hash {}(element.key()); + seed = combine(seed, h); + seed = combine(seed, hash(element.value())); + } + return seed; + } + + case BasicJsonType::value_t::array: + { + auto seed = combine(type, j.size()); + for (const auto& element : j) + { + seed = combine(seed, hash(element)); + } + return seed; + } + + case BasicJsonType::value_t::string: + { + const auto h = std::hash {}(j.template get_ref()); + return combine(type, h); + } + + case BasicJsonType::value_t::boolean: + { + const auto h = std::hash {}(j.template get()); + return combine(type, h); + } + + case BasicJsonType::value_t::number_integer: + { + const auto h = std::hash {}(j.template get()); + return combine(type, h); + } + + case BasicJsonType::value_t::number_unsigned: + { + const auto h = std::hash {}(j.template get()); + return combine(type, h); + } + + case BasicJsonType::value_t::number_float: + { + const auto h = std::hash {}(j.template get()); + return combine(type, h); + } + + case BasicJsonType::value_t::binary: + { + auto seed = combine(type, j.get_binary().size()); + const auto h = std::hash {}(j.get_binary().has_subtype()); + seed = combine(seed, h); + seed = combine(seed, static_cast(j.get_binary().subtype())); + for (const auto byte : j.get_binary()) + { + seed = combine(seed, std::hash {}(byte)); + } + return seed; + } + + default: // LCOV_EXCL_LINE + JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE + return 0; // LCOV_EXCL_LINE + } +} + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END diff --git a/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/input/binary_reader.hpp b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/input/binary_reader.hpp new file mode 100644 index 0000000..832c36d --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/input/binary_reader.hpp @@ -0,0 +1,3010 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + +#pragma once + +#include // generate_n +#include // array +#include // ldexp +#include // size_t +#include // uint8_t, uint16_t, uint32_t, uint64_t +#include // snprintf +#include // memcpy +#include // back_inserter +#include // numeric_limits +#include // char_traits, string +#include // make_pair, move +#include // vector + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +/// how to treat CBOR tags +enum class cbor_tag_handler_t +{ + error, ///< throw a parse_error exception in case of a tag + ignore, ///< ignore tags + store ///< store tags as binary type +}; + +/*! +@brief determine system byte order + +@return true if and only if system's byte order is little endian + +@note from https://stackoverflow.com/a/1001328/266378 +*/ +static inline bool little_endianness(int num = 1) noexcept +{ + return *reinterpret_cast(&num) == 1; +} + + +/////////////////// +// binary reader // +/////////////////// + +/*! +@brief deserialization of CBOR, MessagePack, and UBJSON values +*/ +template> +class binary_reader +{ + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using binary_t = typename BasicJsonType::binary_t; + using json_sax_t = SAX; + using char_type = typename InputAdapterType::char_type; + using char_int_type = typename std::char_traits::int_type; + + public: + /*! + @brief create a binary reader + + @param[in] adapter input adapter to read from + */ + explicit binary_reader(InputAdapterType&& adapter, const input_format_t format = input_format_t::json) noexcept : ia(std::move(adapter)), input_format(format) + { + (void)detail::is_sax_static_asserts {}; + } + + // make class move-only + binary_reader(const binary_reader&) = delete; + binary_reader(binary_reader&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) + binary_reader& operator=(const binary_reader&) = delete; + binary_reader& operator=(binary_reader&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) + ~binary_reader() = default; + + /*! + @param[in] format the binary format to parse + @param[in] sax_ a SAX event processor + @param[in] strict whether to expect the input to be consumed completed + @param[in] tag_handler how to treat CBOR tags + + @return whether parsing was successful + */ + JSON_HEDLEY_NON_NULL(3) + bool sax_parse(const input_format_t format, + json_sax_t* sax_, + const bool strict = true, + const cbor_tag_handler_t tag_handler = cbor_tag_handler_t::error) + { + sax = sax_; + bool result = false; + + switch (format) + { + case input_format_t::bson: + result = parse_bson_internal(); + break; + + case input_format_t::cbor: + result = parse_cbor_internal(true, tag_handler); + break; + + case input_format_t::msgpack: + result = parse_msgpack_internal(); + break; + + case input_format_t::ubjson: + case input_format_t::bjdata: + result = parse_ubjson_internal(); + break; + + case input_format_t::json: // LCOV_EXCL_LINE + default: // LCOV_EXCL_LINE + JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE + } + + // strict mode: next byte must be EOF + if (result && strict) + { + if (input_format == input_format_t::ubjson || input_format == input_format_t::bjdata) + { + get_ignore_noop(); + } + else + { + get(); + } + + if (JSON_HEDLEY_UNLIKELY(current != std::char_traits::eof())) + { + return sax->parse_error(chars_read, get_token_string(), parse_error::create(110, chars_read, + exception_message(input_format, concat("expected end of input; last byte: 0x", get_token_string()), "value"), nullptr)); + } + } + + return result; + } + + private: + ////////// + // BSON // + ////////// + + /*! + @brief Reads in a BSON-object and passes it to the SAX-parser. + @return whether a valid BSON-value was passed to the SAX parser + */ + bool parse_bson_internal() + { + std::int32_t document_size{}; + get_number(input_format_t::bson, document_size); + + if (JSON_HEDLEY_UNLIKELY(!sax->start_object(static_cast(-1)))) + { + return false; + } + + if (JSON_HEDLEY_UNLIKELY(!parse_bson_element_list(/*is_array*/false))) + { + return false; + } + + return sax->end_object(); + } + + /*! + @brief Parses a C-style string from the BSON input. + @param[in,out] result A reference to the string variable where the read + string is to be stored. + @return `true` if the \x00-byte indicating the end of the string was + encountered before the EOF; false` indicates an unexpected EOF. + */ + bool get_bson_cstr(string_t& result) + { + auto out = std::back_inserter(result); + while (true) + { + get(); + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::bson, "cstring"))) + { + return false; + } + if (current == 0x00) + { + return true; + } + *out++ = static_cast(current); + } + } + + /*! + @brief Parses a zero-terminated string of length @a len from the BSON + input. + @param[in] len The length (including the zero-byte at the end) of the + string to be read. + @param[in,out] result A reference to the string variable where the read + string is to be stored. + @tparam NumberType The type of the length @a len + @pre len >= 1 + @return `true` if the string was successfully parsed + */ + template + bool get_bson_string(const NumberType len, string_t& result) + { + if (JSON_HEDLEY_UNLIKELY(len < 1)) + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, + exception_message(input_format_t::bson, concat("string length must be at least 1, is ", std::to_string(len)), "string"), nullptr)); + } + + return get_string(input_format_t::bson, len - static_cast(1), result) && get() != std::char_traits::eof(); + } + + /*! + @brief Parses a byte array input of length @a len from the BSON input. + @param[in] len The length of the byte array to be read. + @param[in,out] result A reference to the binary variable where the read + array is to be stored. + @tparam NumberType The type of the length @a len + @pre len >= 0 + @return `true` if the byte array was successfully parsed + */ + template + bool get_bson_binary(const NumberType len, binary_t& result) + { + if (JSON_HEDLEY_UNLIKELY(len < 0)) + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, + exception_message(input_format_t::bson, concat("byte array length cannot be negative, is ", std::to_string(len)), "binary"), nullptr)); + } + + // All BSON binary values have a subtype + std::uint8_t subtype{}; + get_number(input_format_t::bson, subtype); + result.set_subtype(subtype); + + return get_binary(input_format_t::bson, len, result); + } + + /*! + @brief Read a BSON document element of the given @a element_type. + @param[in] element_type The BSON element type, c.f. http://bsonspec.org/spec.html + @param[in] element_type_parse_position The position in the input stream, + where the `element_type` was read. + @warning Not all BSON element types are supported yet. An unsupported + @a element_type will give rise to a parse_error.114: + Unsupported BSON record type 0x... + @return whether a valid BSON-object/array was passed to the SAX parser + */ + bool parse_bson_element_internal(const char_int_type element_type, + const std::size_t element_type_parse_position) + { + switch (element_type) + { + case 0x01: // double + { + double number{}; + return get_number(input_format_t::bson, number) && sax->number_float(static_cast(number), ""); + } + + case 0x02: // string + { + std::int32_t len{}; + string_t value; + return get_number(input_format_t::bson, len) && get_bson_string(len, value) && sax->string(value); + } + + case 0x03: // object + { + return parse_bson_internal(); + } + + case 0x04: // array + { + return parse_bson_array(); + } + + case 0x05: // binary + { + std::int32_t len{}; + binary_t value; + return get_number(input_format_t::bson, len) && get_bson_binary(len, value) && sax->binary(value); + } + + case 0x08: // boolean + { + return sax->boolean(get() != 0); + } + + case 0x0A: // null + { + return sax->null(); + } + + case 0x10: // int32 + { + std::int32_t value{}; + return get_number(input_format_t::bson, value) && sax->number_integer(value); + } + + case 0x12: // int64 + { + std::int64_t value{}; + return get_number(input_format_t::bson, value) && sax->number_integer(value); + } + + default: // anything else not supported (yet) + { + std::array cr{{}}; + static_cast((std::snprintf)(cr.data(), cr.size(), "%.2hhX", static_cast(element_type))); // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg) + const std::string cr_str{cr.data()}; + return sax->parse_error(element_type_parse_position, cr_str, + parse_error::create(114, element_type_parse_position, concat("Unsupported BSON record type 0x", cr_str), nullptr)); + } + } + } + + /*! + @brief Read a BSON element list (as specified in the BSON-spec) + + The same binary layout is used for objects and arrays, hence it must be + indicated with the argument @a is_array which one is expected + (true --> array, false --> object). + + @param[in] is_array Determines if the element list being read is to be + treated as an object (@a is_array == false), or as an + array (@a is_array == true). + @return whether a valid BSON-object/array was passed to the SAX parser + */ + bool parse_bson_element_list(const bool is_array) + { + string_t key; + + while (auto element_type = get()) + { + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::bson, "element list"))) + { + return false; + } + + const std::size_t element_type_parse_position = chars_read; + if (JSON_HEDLEY_UNLIKELY(!get_bson_cstr(key))) + { + return false; + } + + if (!is_array && !sax->key(key)) + { + return false; + } + + if (JSON_HEDLEY_UNLIKELY(!parse_bson_element_internal(element_type, element_type_parse_position))) + { + return false; + } + + // get_bson_cstr only appends + key.clear(); + } + + return true; + } + + /*! + @brief Reads an array from the BSON input and passes it to the SAX-parser. + @return whether a valid BSON-array was passed to the SAX parser + */ + bool parse_bson_array() + { + std::int32_t document_size{}; + get_number(input_format_t::bson, document_size); + + if (JSON_HEDLEY_UNLIKELY(!sax->start_array(static_cast(-1)))) + { + return false; + } + + if (JSON_HEDLEY_UNLIKELY(!parse_bson_element_list(/*is_array*/true))) + { + return false; + } + + return sax->end_array(); + } + + ////////// + // CBOR // + ////////// + + /*! + @param[in] get_char whether a new character should be retrieved from the + input (true) or whether the last read character should + be considered instead (false) + @param[in] tag_handler how CBOR tags should be treated + + @return whether a valid CBOR value was passed to the SAX parser + */ + bool parse_cbor_internal(const bool get_char, + const cbor_tag_handler_t tag_handler) + { + switch (get_char ? get() : current) + { + // EOF + case std::char_traits::eof(): + return unexpect_eof(input_format_t::cbor, "value"); + + // Integer 0x00..0x17 (0..23) + case 0x00: + case 0x01: + case 0x02: + case 0x03: + case 0x04: + case 0x05: + case 0x06: + case 0x07: + case 0x08: + case 0x09: + case 0x0A: + case 0x0B: + case 0x0C: + case 0x0D: + case 0x0E: + case 0x0F: + case 0x10: + case 0x11: + case 0x12: + case 0x13: + case 0x14: + case 0x15: + case 0x16: + case 0x17: + return sax->number_unsigned(static_cast(current)); + + case 0x18: // Unsigned integer (one-byte uint8_t follows) + { + std::uint8_t number{}; + return get_number(input_format_t::cbor, number) && sax->number_unsigned(number); + } + + case 0x19: // Unsigned integer (two-byte uint16_t follows) + { + std::uint16_t number{}; + return get_number(input_format_t::cbor, number) && sax->number_unsigned(number); + } + + case 0x1A: // Unsigned integer (four-byte uint32_t follows) + { + std::uint32_t number{}; + return get_number(input_format_t::cbor, number) && sax->number_unsigned(number); + } + + case 0x1B: // Unsigned integer (eight-byte uint64_t follows) + { + std::uint64_t number{}; + return get_number(input_format_t::cbor, number) && sax->number_unsigned(number); + } + + // Negative integer -1-0x00..-1-0x17 (-1..-24) + case 0x20: + case 0x21: + case 0x22: + case 0x23: + case 0x24: + case 0x25: + case 0x26: + case 0x27: + case 0x28: + case 0x29: + case 0x2A: + case 0x2B: + case 0x2C: + case 0x2D: + case 0x2E: + case 0x2F: + case 0x30: + case 0x31: + case 0x32: + case 0x33: + case 0x34: + case 0x35: + case 0x36: + case 0x37: + return sax->number_integer(static_cast(0x20 - 1 - current)); + + case 0x38: // Negative integer (one-byte uint8_t follows) + { + std::uint8_t number{}; + return get_number(input_format_t::cbor, number) && sax->number_integer(static_cast(-1) - number); + } + + case 0x39: // Negative integer -1-n (two-byte uint16_t follows) + { + std::uint16_t number{}; + return get_number(input_format_t::cbor, number) && sax->number_integer(static_cast(-1) - number); + } + + case 0x3A: // Negative integer -1-n (four-byte uint32_t follows) + { + std::uint32_t number{}; + return get_number(input_format_t::cbor, number) && sax->number_integer(static_cast(-1) - number); + } + + case 0x3B: // Negative integer -1-n (eight-byte uint64_t follows) + { + std::uint64_t number{}; + return get_number(input_format_t::cbor, number) && sax->number_integer(static_cast(-1) + - static_cast(number)); + } + + // Binary data (0x00..0x17 bytes follow) + case 0x40: + case 0x41: + case 0x42: + case 0x43: + case 0x44: + case 0x45: + case 0x46: + case 0x47: + case 0x48: + case 0x49: + case 0x4A: + case 0x4B: + case 0x4C: + case 0x4D: + case 0x4E: + case 0x4F: + case 0x50: + case 0x51: + case 0x52: + case 0x53: + case 0x54: + case 0x55: + case 0x56: + case 0x57: + case 0x58: // Binary data (one-byte uint8_t for n follows) + case 0x59: // Binary data (two-byte uint16_t for n follow) + case 0x5A: // Binary data (four-byte uint32_t for n follow) + case 0x5B: // Binary data (eight-byte uint64_t for n follow) + case 0x5F: // Binary data (indefinite length) + { + binary_t b; + return get_cbor_binary(b) && sax->binary(b); + } + + // UTF-8 string (0x00..0x17 bytes follow) + case 0x60: + case 0x61: + case 0x62: + case 0x63: + case 0x64: + case 0x65: + case 0x66: + case 0x67: + case 0x68: + case 0x69: + case 0x6A: + case 0x6B: + case 0x6C: + case 0x6D: + case 0x6E: + case 0x6F: + case 0x70: + case 0x71: + case 0x72: + case 0x73: + case 0x74: + case 0x75: + case 0x76: + case 0x77: + case 0x78: // UTF-8 string (one-byte uint8_t for n follows) + case 0x79: // UTF-8 string (two-byte uint16_t for n follow) + case 0x7A: // UTF-8 string (four-byte uint32_t for n follow) + case 0x7B: // UTF-8 string (eight-byte uint64_t for n follow) + case 0x7F: // UTF-8 string (indefinite length) + { + string_t s; + return get_cbor_string(s) && sax->string(s); + } + + // array (0x00..0x17 data items follow) + case 0x80: + case 0x81: + case 0x82: + case 0x83: + case 0x84: + case 0x85: + case 0x86: + case 0x87: + case 0x88: + case 0x89: + case 0x8A: + case 0x8B: + case 0x8C: + case 0x8D: + case 0x8E: + case 0x8F: + case 0x90: + case 0x91: + case 0x92: + case 0x93: + case 0x94: + case 0x95: + case 0x96: + case 0x97: + return get_cbor_array( + conditional_static_cast(static_cast(current) & 0x1Fu), tag_handler); + + case 0x98: // array (one-byte uint8_t for n follows) + { + std::uint8_t len{}; + return get_number(input_format_t::cbor, len) && get_cbor_array(static_cast(len), tag_handler); + } + + case 0x99: // array (two-byte uint16_t for n follow) + { + std::uint16_t len{}; + return get_number(input_format_t::cbor, len) && get_cbor_array(static_cast(len), tag_handler); + } + + case 0x9A: // array (four-byte uint32_t for n follow) + { + std::uint32_t len{}; + return get_number(input_format_t::cbor, len) && get_cbor_array(conditional_static_cast(len), tag_handler); + } + + case 0x9B: // array (eight-byte uint64_t for n follow) + { + std::uint64_t len{}; + return get_number(input_format_t::cbor, len) && get_cbor_array(conditional_static_cast(len), tag_handler); + } + + case 0x9F: // array (indefinite length) + return get_cbor_array(static_cast(-1), tag_handler); + + // map (0x00..0x17 pairs of data items follow) + case 0xA0: + case 0xA1: + case 0xA2: + case 0xA3: + case 0xA4: + case 0xA5: + case 0xA6: + case 0xA7: + case 0xA8: + case 0xA9: + case 0xAA: + case 0xAB: + case 0xAC: + case 0xAD: + case 0xAE: + case 0xAF: + case 0xB0: + case 0xB1: + case 0xB2: + case 0xB3: + case 0xB4: + case 0xB5: + case 0xB6: + case 0xB7: + return get_cbor_object(conditional_static_cast(static_cast(current) & 0x1Fu), tag_handler); + + case 0xB8: // map (one-byte uint8_t for n follows) + { + std::uint8_t len{}; + return get_number(input_format_t::cbor, len) && get_cbor_object(static_cast(len), tag_handler); + } + + case 0xB9: // map (two-byte uint16_t for n follow) + { + std::uint16_t len{}; + return get_number(input_format_t::cbor, len) && get_cbor_object(static_cast(len), tag_handler); + } + + case 0xBA: // map (four-byte uint32_t for n follow) + { + std::uint32_t len{}; + return get_number(input_format_t::cbor, len) && get_cbor_object(conditional_static_cast(len), tag_handler); + } + + case 0xBB: // map (eight-byte uint64_t for n follow) + { + std::uint64_t len{}; + return get_number(input_format_t::cbor, len) && get_cbor_object(conditional_static_cast(len), tag_handler); + } + + case 0xBF: // map (indefinite length) + return get_cbor_object(static_cast(-1), tag_handler); + + case 0xC6: // tagged item + case 0xC7: + case 0xC8: + case 0xC9: + case 0xCA: + case 0xCB: + case 0xCC: + case 0xCD: + case 0xCE: + case 0xCF: + case 0xD0: + case 0xD1: + case 0xD2: + case 0xD3: + case 0xD4: + case 0xD8: // tagged item (1 bytes follow) + case 0xD9: // tagged item (2 bytes follow) + case 0xDA: // tagged item (4 bytes follow) + case 0xDB: // tagged item (8 bytes follow) + { + switch (tag_handler) + { + case cbor_tag_handler_t::error: + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, + exception_message(input_format_t::cbor, concat("invalid byte: 0x", last_token), "value"), nullptr)); + } + + case cbor_tag_handler_t::ignore: + { + // ignore binary subtype + switch (current) + { + case 0xD8: + { + std::uint8_t subtype_to_ignore{}; + get_number(input_format_t::cbor, subtype_to_ignore); + break; + } + case 0xD9: + { + std::uint16_t subtype_to_ignore{}; + get_number(input_format_t::cbor, subtype_to_ignore); + break; + } + case 0xDA: + { + std::uint32_t subtype_to_ignore{}; + get_number(input_format_t::cbor, subtype_to_ignore); + break; + } + case 0xDB: + { + std::uint64_t subtype_to_ignore{}; + get_number(input_format_t::cbor, subtype_to_ignore); + break; + } + default: + break; + } + return parse_cbor_internal(true, tag_handler); + } + + case cbor_tag_handler_t::store: + { + binary_t b; + // use binary subtype and store in binary container + switch (current) + { + case 0xD8: + { + std::uint8_t subtype{}; + get_number(input_format_t::cbor, subtype); + b.set_subtype(detail::conditional_static_cast(subtype)); + break; + } + case 0xD9: + { + std::uint16_t subtype{}; + get_number(input_format_t::cbor, subtype); + b.set_subtype(detail::conditional_static_cast(subtype)); + break; + } + case 0xDA: + { + std::uint32_t subtype{}; + get_number(input_format_t::cbor, subtype); + b.set_subtype(detail::conditional_static_cast(subtype)); + break; + } + case 0xDB: + { + std::uint64_t subtype{}; + get_number(input_format_t::cbor, subtype); + b.set_subtype(detail::conditional_static_cast(subtype)); + break; + } + default: + return parse_cbor_internal(true, tag_handler); + } + get(); + return get_cbor_binary(b) && sax->binary(b); + } + + default: // LCOV_EXCL_LINE + JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE + return false; // LCOV_EXCL_LINE + } + } + + case 0xF4: // false + return sax->boolean(false); + + case 0xF5: // true + return sax->boolean(true); + + case 0xF6: // null + return sax->null(); + + case 0xF9: // Half-Precision Float (two-byte IEEE 754) + { + const auto byte1_raw = get(); + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::cbor, "number"))) + { + return false; + } + const auto byte2_raw = get(); + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::cbor, "number"))) + { + return false; + } + + const auto byte1 = static_cast(byte1_raw); + const auto byte2 = static_cast(byte2_raw); + + // code from RFC 7049, Appendix D, Figure 3: + // As half-precision floating-point numbers were only added + // to IEEE 754 in 2008, today's programming platforms often + // still only have limited support for them. It is very + // easy to include at least decoding support for them even + // without such support. An example of a small decoder for + // half-precision floating-point numbers in the C language + // is shown in Fig. 3. + const auto half = static_cast((byte1 << 8u) + byte2); + const double val = [&half] + { + const int exp = (half >> 10u) & 0x1Fu; + const unsigned int mant = half & 0x3FFu; + JSON_ASSERT(0 <= exp&& exp <= 32); + JSON_ASSERT(mant <= 1024); + switch (exp) + { + case 0: + return std::ldexp(mant, -24); + case 31: + return (mant == 0) + ? std::numeric_limits::infinity() + : std::numeric_limits::quiet_NaN(); + default: + return std::ldexp(mant + 1024, exp - 25); + } + }(); + return sax->number_float((half & 0x8000u) != 0 + ? static_cast(-val) + : static_cast(val), ""); + } + + case 0xFA: // Single-Precision Float (four-byte IEEE 754) + { + float number{}; + return get_number(input_format_t::cbor, number) && sax->number_float(static_cast(number), ""); + } + + case 0xFB: // Double-Precision Float (eight-byte IEEE 754) + { + double number{}; + return get_number(input_format_t::cbor, number) && sax->number_float(static_cast(number), ""); + } + + default: // anything else (0xFF is handled inside the other types) + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, + exception_message(input_format_t::cbor, concat("invalid byte: 0x", last_token), "value"), nullptr)); + } + } + } + + /*! + @brief reads a CBOR string + + This function first reads starting bytes to determine the expected + string length and then copies this number of bytes into a string. + Additionally, CBOR's strings with indefinite lengths are supported. + + @param[out] result created string + + @return whether string creation completed + */ + bool get_cbor_string(string_t& result) + { + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::cbor, "string"))) + { + return false; + } + + switch (current) + { + // UTF-8 string (0x00..0x17 bytes follow) + case 0x60: + case 0x61: + case 0x62: + case 0x63: + case 0x64: + case 0x65: + case 0x66: + case 0x67: + case 0x68: + case 0x69: + case 0x6A: + case 0x6B: + case 0x6C: + case 0x6D: + case 0x6E: + case 0x6F: + case 0x70: + case 0x71: + case 0x72: + case 0x73: + case 0x74: + case 0x75: + case 0x76: + case 0x77: + { + return get_string(input_format_t::cbor, static_cast(current) & 0x1Fu, result); + } + + case 0x78: // UTF-8 string (one-byte uint8_t for n follows) + { + std::uint8_t len{}; + return get_number(input_format_t::cbor, len) && get_string(input_format_t::cbor, len, result); + } + + case 0x79: // UTF-8 string (two-byte uint16_t for n follow) + { + std::uint16_t len{}; + return get_number(input_format_t::cbor, len) && get_string(input_format_t::cbor, len, result); + } + + case 0x7A: // UTF-8 string (four-byte uint32_t for n follow) + { + std::uint32_t len{}; + return get_number(input_format_t::cbor, len) && get_string(input_format_t::cbor, len, result); + } + + case 0x7B: // UTF-8 string (eight-byte uint64_t for n follow) + { + std::uint64_t len{}; + return get_number(input_format_t::cbor, len) && get_string(input_format_t::cbor, len, result); + } + + case 0x7F: // UTF-8 string (indefinite length) + { + while (get() != 0xFF) + { + string_t chunk; + if (!get_cbor_string(chunk)) + { + return false; + } + result.append(chunk); + } + return true; + } + + default: + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, + exception_message(input_format_t::cbor, concat("expected length specification (0x60-0x7B) or indefinite string type (0x7F); last byte: 0x", last_token), "string"), nullptr)); + } + } + } + + /*! + @brief reads a CBOR byte array + + This function first reads starting bytes to determine the expected + byte array length and then copies this number of bytes into the byte array. + Additionally, CBOR's byte arrays with indefinite lengths are supported. + + @param[out] result created byte array + + @return whether byte array creation completed + */ + bool get_cbor_binary(binary_t& result) + { + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::cbor, "binary"))) + { + return false; + } + + switch (current) + { + // Binary data (0x00..0x17 bytes follow) + case 0x40: + case 0x41: + case 0x42: + case 0x43: + case 0x44: + case 0x45: + case 0x46: + case 0x47: + case 0x48: + case 0x49: + case 0x4A: + case 0x4B: + case 0x4C: + case 0x4D: + case 0x4E: + case 0x4F: + case 0x50: + case 0x51: + case 0x52: + case 0x53: + case 0x54: + case 0x55: + case 0x56: + case 0x57: + { + return get_binary(input_format_t::cbor, static_cast(current) & 0x1Fu, result); + } + + case 0x58: // Binary data (one-byte uint8_t for n follows) + { + std::uint8_t len{}; + return get_number(input_format_t::cbor, len) && + get_binary(input_format_t::cbor, len, result); + } + + case 0x59: // Binary data (two-byte uint16_t for n follow) + { + std::uint16_t len{}; + return get_number(input_format_t::cbor, len) && + get_binary(input_format_t::cbor, len, result); + } + + case 0x5A: // Binary data (four-byte uint32_t for n follow) + { + std::uint32_t len{}; + return get_number(input_format_t::cbor, len) && + get_binary(input_format_t::cbor, len, result); + } + + case 0x5B: // Binary data (eight-byte uint64_t for n follow) + { + std::uint64_t len{}; + return get_number(input_format_t::cbor, len) && + get_binary(input_format_t::cbor, len, result); + } + + case 0x5F: // Binary data (indefinite length) + { + while (get() != 0xFF) + { + binary_t chunk; + if (!get_cbor_binary(chunk)) + { + return false; + } + result.insert(result.end(), chunk.begin(), chunk.end()); + } + return true; + } + + default: + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, + exception_message(input_format_t::cbor, concat("expected length specification (0x40-0x5B) or indefinite binary array type (0x5F); last byte: 0x", last_token), "binary"), nullptr)); + } + } + } + + /*! + @param[in] len the length of the array or static_cast(-1) for an + array of indefinite size + @param[in] tag_handler how CBOR tags should be treated + @return whether array creation completed + */ + bool get_cbor_array(const std::size_t len, + const cbor_tag_handler_t tag_handler) + { + if (JSON_HEDLEY_UNLIKELY(!sax->start_array(len))) + { + return false; + } + + if (len != static_cast(-1)) + { + for (std::size_t i = 0; i < len; ++i) + { + if (JSON_HEDLEY_UNLIKELY(!parse_cbor_internal(true, tag_handler))) + { + return false; + } + } + } + else + { + while (get() != 0xFF) + { + if (JSON_HEDLEY_UNLIKELY(!parse_cbor_internal(false, tag_handler))) + { + return false; + } + } + } + + return sax->end_array(); + } + + /*! + @param[in] len the length of the object or static_cast(-1) for an + object of indefinite size + @param[in] tag_handler how CBOR tags should be treated + @return whether object creation completed + */ + bool get_cbor_object(const std::size_t len, + const cbor_tag_handler_t tag_handler) + { + if (JSON_HEDLEY_UNLIKELY(!sax->start_object(len))) + { + return false; + } + + if (len != 0) + { + string_t key; + if (len != static_cast(-1)) + { + for (std::size_t i = 0; i < len; ++i) + { + get(); + if (JSON_HEDLEY_UNLIKELY(!get_cbor_string(key) || !sax->key(key))) + { + return false; + } + + if (JSON_HEDLEY_UNLIKELY(!parse_cbor_internal(true, tag_handler))) + { + return false; + } + key.clear(); + } + } + else + { + while (get() != 0xFF) + { + if (JSON_HEDLEY_UNLIKELY(!get_cbor_string(key) || !sax->key(key))) + { + return false; + } + + if (JSON_HEDLEY_UNLIKELY(!parse_cbor_internal(true, tag_handler))) + { + return false; + } + key.clear(); + } + } + } + + return sax->end_object(); + } + + ///////////// + // MsgPack // + ///////////// + + /*! + @return whether a valid MessagePack value was passed to the SAX parser + */ + bool parse_msgpack_internal() + { + switch (get()) + { + // EOF + case std::char_traits::eof(): + return unexpect_eof(input_format_t::msgpack, "value"); + + // positive fixint + case 0x00: + case 0x01: + case 0x02: + case 0x03: + case 0x04: + case 0x05: + case 0x06: + case 0x07: + case 0x08: + case 0x09: + case 0x0A: + case 0x0B: + case 0x0C: + case 0x0D: + case 0x0E: + case 0x0F: + case 0x10: + case 0x11: + case 0x12: + case 0x13: + case 0x14: + case 0x15: + case 0x16: + case 0x17: + case 0x18: + case 0x19: + case 0x1A: + case 0x1B: + case 0x1C: + case 0x1D: + case 0x1E: + case 0x1F: + case 0x20: + case 0x21: + case 0x22: + case 0x23: + case 0x24: + case 0x25: + case 0x26: + case 0x27: + case 0x28: + case 0x29: + case 0x2A: + case 0x2B: + case 0x2C: + case 0x2D: + case 0x2E: + case 0x2F: + case 0x30: + case 0x31: + case 0x32: + case 0x33: + case 0x34: + case 0x35: + case 0x36: + case 0x37: + case 0x38: + case 0x39: + case 0x3A: + case 0x3B: + case 0x3C: + case 0x3D: + case 0x3E: + case 0x3F: + case 0x40: + case 0x41: + case 0x42: + case 0x43: + case 0x44: + case 0x45: + case 0x46: + case 0x47: + case 0x48: + case 0x49: + case 0x4A: + case 0x4B: + case 0x4C: + case 0x4D: + case 0x4E: + case 0x4F: + case 0x50: + case 0x51: + case 0x52: + case 0x53: + case 0x54: + case 0x55: + case 0x56: + case 0x57: + case 0x58: + case 0x59: + case 0x5A: + case 0x5B: + case 0x5C: + case 0x5D: + case 0x5E: + case 0x5F: + case 0x60: + case 0x61: + case 0x62: + case 0x63: + case 0x64: + case 0x65: + case 0x66: + case 0x67: + case 0x68: + case 0x69: + case 0x6A: + case 0x6B: + case 0x6C: + case 0x6D: + case 0x6E: + case 0x6F: + case 0x70: + case 0x71: + case 0x72: + case 0x73: + case 0x74: + case 0x75: + case 0x76: + case 0x77: + case 0x78: + case 0x79: + case 0x7A: + case 0x7B: + case 0x7C: + case 0x7D: + case 0x7E: + case 0x7F: + return sax->number_unsigned(static_cast(current)); + + // fixmap + case 0x80: + case 0x81: + case 0x82: + case 0x83: + case 0x84: + case 0x85: + case 0x86: + case 0x87: + case 0x88: + case 0x89: + case 0x8A: + case 0x8B: + case 0x8C: + case 0x8D: + case 0x8E: + case 0x8F: + return get_msgpack_object(conditional_static_cast(static_cast(current) & 0x0Fu)); + + // fixarray + case 0x90: + case 0x91: + case 0x92: + case 0x93: + case 0x94: + case 0x95: + case 0x96: + case 0x97: + case 0x98: + case 0x99: + case 0x9A: + case 0x9B: + case 0x9C: + case 0x9D: + case 0x9E: + case 0x9F: + return get_msgpack_array(conditional_static_cast(static_cast(current) & 0x0Fu)); + + // fixstr + case 0xA0: + case 0xA1: + case 0xA2: + case 0xA3: + case 0xA4: + case 0xA5: + case 0xA6: + case 0xA7: + case 0xA8: + case 0xA9: + case 0xAA: + case 0xAB: + case 0xAC: + case 0xAD: + case 0xAE: + case 0xAF: + case 0xB0: + case 0xB1: + case 0xB2: + case 0xB3: + case 0xB4: + case 0xB5: + case 0xB6: + case 0xB7: + case 0xB8: + case 0xB9: + case 0xBA: + case 0xBB: + case 0xBC: + case 0xBD: + case 0xBE: + case 0xBF: + case 0xD9: // str 8 + case 0xDA: // str 16 + case 0xDB: // str 32 + { + string_t s; + return get_msgpack_string(s) && sax->string(s); + } + + case 0xC0: // nil + return sax->null(); + + case 0xC2: // false + return sax->boolean(false); + + case 0xC3: // true + return sax->boolean(true); + + case 0xC4: // bin 8 + case 0xC5: // bin 16 + case 0xC6: // bin 32 + case 0xC7: // ext 8 + case 0xC8: // ext 16 + case 0xC9: // ext 32 + case 0xD4: // fixext 1 + case 0xD5: // fixext 2 + case 0xD6: // fixext 4 + case 0xD7: // fixext 8 + case 0xD8: // fixext 16 + { + binary_t b; + return get_msgpack_binary(b) && sax->binary(b); + } + + case 0xCA: // float 32 + { + float number{}; + return get_number(input_format_t::msgpack, number) && sax->number_float(static_cast(number), ""); + } + + case 0xCB: // float 64 + { + double number{}; + return get_number(input_format_t::msgpack, number) && sax->number_float(static_cast(number), ""); + } + + case 0xCC: // uint 8 + { + std::uint8_t number{}; + return get_number(input_format_t::msgpack, number) && sax->number_unsigned(number); + } + + case 0xCD: // uint 16 + { + std::uint16_t number{}; + return get_number(input_format_t::msgpack, number) && sax->number_unsigned(number); + } + + case 0xCE: // uint 32 + { + std::uint32_t number{}; + return get_number(input_format_t::msgpack, number) && sax->number_unsigned(number); + } + + case 0xCF: // uint 64 + { + std::uint64_t number{}; + return get_number(input_format_t::msgpack, number) && sax->number_unsigned(number); + } + + case 0xD0: // int 8 + { + std::int8_t number{}; + return get_number(input_format_t::msgpack, number) && sax->number_integer(number); + } + + case 0xD1: // int 16 + { + std::int16_t number{}; + return get_number(input_format_t::msgpack, number) && sax->number_integer(number); + } + + case 0xD2: // int 32 + { + std::int32_t number{}; + return get_number(input_format_t::msgpack, number) && sax->number_integer(number); + } + + case 0xD3: // int 64 + { + std::int64_t number{}; + return get_number(input_format_t::msgpack, number) && sax->number_integer(number); + } + + case 0xDC: // array 16 + { + std::uint16_t len{}; + return get_number(input_format_t::msgpack, len) && get_msgpack_array(static_cast(len)); + } + + case 0xDD: // array 32 + { + std::uint32_t len{}; + return get_number(input_format_t::msgpack, len) && get_msgpack_array(conditional_static_cast(len)); + } + + case 0xDE: // map 16 + { + std::uint16_t len{}; + return get_number(input_format_t::msgpack, len) && get_msgpack_object(static_cast(len)); + } + + case 0xDF: // map 32 + { + std::uint32_t len{}; + return get_number(input_format_t::msgpack, len) && get_msgpack_object(conditional_static_cast(len)); + } + + // negative fixint + case 0xE0: + case 0xE1: + case 0xE2: + case 0xE3: + case 0xE4: + case 0xE5: + case 0xE6: + case 0xE7: + case 0xE8: + case 0xE9: + case 0xEA: + case 0xEB: + case 0xEC: + case 0xED: + case 0xEE: + case 0xEF: + case 0xF0: + case 0xF1: + case 0xF2: + case 0xF3: + case 0xF4: + case 0xF5: + case 0xF6: + case 0xF7: + case 0xF8: + case 0xF9: + case 0xFA: + case 0xFB: + case 0xFC: + case 0xFD: + case 0xFE: + case 0xFF: + return sax->number_integer(static_cast(current)); + + default: // anything else + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, + exception_message(input_format_t::msgpack, concat("invalid byte: 0x", last_token), "value"), nullptr)); + } + } + } + + /*! + @brief reads a MessagePack string + + This function first reads starting bytes to determine the expected + string length and then copies this number of bytes into a string. + + @param[out] result created string + + @return whether string creation completed + */ + bool get_msgpack_string(string_t& result) + { + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::msgpack, "string"))) + { + return false; + } + + switch (current) + { + // fixstr + case 0xA0: + case 0xA1: + case 0xA2: + case 0xA3: + case 0xA4: + case 0xA5: + case 0xA6: + case 0xA7: + case 0xA8: + case 0xA9: + case 0xAA: + case 0xAB: + case 0xAC: + case 0xAD: + case 0xAE: + case 0xAF: + case 0xB0: + case 0xB1: + case 0xB2: + case 0xB3: + case 0xB4: + case 0xB5: + case 0xB6: + case 0xB7: + case 0xB8: + case 0xB9: + case 0xBA: + case 0xBB: + case 0xBC: + case 0xBD: + case 0xBE: + case 0xBF: + { + return get_string(input_format_t::msgpack, static_cast(current) & 0x1Fu, result); + } + + case 0xD9: // str 8 + { + std::uint8_t len{}; + return get_number(input_format_t::msgpack, len) && get_string(input_format_t::msgpack, len, result); + } + + case 0xDA: // str 16 + { + std::uint16_t len{}; + return get_number(input_format_t::msgpack, len) && get_string(input_format_t::msgpack, len, result); + } + + case 0xDB: // str 32 + { + std::uint32_t len{}; + return get_number(input_format_t::msgpack, len) && get_string(input_format_t::msgpack, len, result); + } + + default: + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, + exception_message(input_format_t::msgpack, concat("expected length specification (0xA0-0xBF, 0xD9-0xDB); last byte: 0x", last_token), "string"), nullptr)); + } + } + } + + /*! + @brief reads a MessagePack byte array + + This function first reads starting bytes to determine the expected + byte array length and then copies this number of bytes into a byte array. + + @param[out] result created byte array + + @return whether byte array creation completed + */ + bool get_msgpack_binary(binary_t& result) + { + // helper function to set the subtype + auto assign_and_return_true = [&result](std::int8_t subtype) + { + result.set_subtype(static_cast(subtype)); + return true; + }; + + switch (current) + { + case 0xC4: // bin 8 + { + std::uint8_t len{}; + return get_number(input_format_t::msgpack, len) && + get_binary(input_format_t::msgpack, len, result); + } + + case 0xC5: // bin 16 + { + std::uint16_t len{}; + return get_number(input_format_t::msgpack, len) && + get_binary(input_format_t::msgpack, len, result); + } + + case 0xC6: // bin 32 + { + std::uint32_t len{}; + return get_number(input_format_t::msgpack, len) && + get_binary(input_format_t::msgpack, len, result); + } + + case 0xC7: // ext 8 + { + std::uint8_t len{}; + std::int8_t subtype{}; + return get_number(input_format_t::msgpack, len) && + get_number(input_format_t::msgpack, subtype) && + get_binary(input_format_t::msgpack, len, result) && + assign_and_return_true(subtype); + } + + case 0xC8: // ext 16 + { + std::uint16_t len{}; + std::int8_t subtype{}; + return get_number(input_format_t::msgpack, len) && + get_number(input_format_t::msgpack, subtype) && + get_binary(input_format_t::msgpack, len, result) && + assign_and_return_true(subtype); + } + + case 0xC9: // ext 32 + { + std::uint32_t len{}; + std::int8_t subtype{}; + return get_number(input_format_t::msgpack, len) && + get_number(input_format_t::msgpack, subtype) && + get_binary(input_format_t::msgpack, len, result) && + assign_and_return_true(subtype); + } + + case 0xD4: // fixext 1 + { + std::int8_t subtype{}; + return get_number(input_format_t::msgpack, subtype) && + get_binary(input_format_t::msgpack, 1, result) && + assign_and_return_true(subtype); + } + + case 0xD5: // fixext 2 + { + std::int8_t subtype{}; + return get_number(input_format_t::msgpack, subtype) && + get_binary(input_format_t::msgpack, 2, result) && + assign_and_return_true(subtype); + } + + case 0xD6: // fixext 4 + { + std::int8_t subtype{}; + return get_number(input_format_t::msgpack, subtype) && + get_binary(input_format_t::msgpack, 4, result) && + assign_and_return_true(subtype); + } + + case 0xD7: // fixext 8 + { + std::int8_t subtype{}; + return get_number(input_format_t::msgpack, subtype) && + get_binary(input_format_t::msgpack, 8, result) && + assign_and_return_true(subtype); + } + + case 0xD8: // fixext 16 + { + std::int8_t subtype{}; + return get_number(input_format_t::msgpack, subtype) && + get_binary(input_format_t::msgpack, 16, result) && + assign_and_return_true(subtype); + } + + default: // LCOV_EXCL_LINE + return false; // LCOV_EXCL_LINE + } + } + + /*! + @param[in] len the length of the array + @return whether array creation completed + */ + bool get_msgpack_array(const std::size_t len) + { + if (JSON_HEDLEY_UNLIKELY(!sax->start_array(len))) + { + return false; + } + + for (std::size_t i = 0; i < len; ++i) + { + if (JSON_HEDLEY_UNLIKELY(!parse_msgpack_internal())) + { + return false; + } + } + + return sax->end_array(); + } + + /*! + @param[in] len the length of the object + @return whether object creation completed + */ + bool get_msgpack_object(const std::size_t len) + { + if (JSON_HEDLEY_UNLIKELY(!sax->start_object(len))) + { + return false; + } + + string_t key; + for (std::size_t i = 0; i < len; ++i) + { + get(); + if (JSON_HEDLEY_UNLIKELY(!get_msgpack_string(key) || !sax->key(key))) + { + return false; + } + + if (JSON_HEDLEY_UNLIKELY(!parse_msgpack_internal())) + { + return false; + } + key.clear(); + } + + return sax->end_object(); + } + + //////////// + // UBJSON // + //////////// + + /*! + @param[in] get_char whether a new character should be retrieved from the + input (true, default) or whether the last read + character should be considered instead + + @return whether a valid UBJSON value was passed to the SAX parser + */ + bool parse_ubjson_internal(const bool get_char = true) + { + return get_ubjson_value(get_char ? get_ignore_noop() : current); + } + + /*! + @brief reads a UBJSON string + + This function is either called after reading the 'S' byte explicitly + indicating a string, or in case of an object key where the 'S' byte can be + left out. + + @param[out] result created string + @param[in] get_char whether a new character should be retrieved from the + input (true, default) or whether the last read + character should be considered instead + + @return whether string creation completed + */ + bool get_ubjson_string(string_t& result, const bool get_char = true) + { + if (get_char) + { + get(); // TODO(niels): may we ignore N here? + } + + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format, "value"))) + { + return false; + } + + switch (current) + { + case 'U': + { + std::uint8_t len{}; + return get_number(input_format, len) && get_string(input_format, len, result); + } + + case 'i': + { + std::int8_t len{}; + return get_number(input_format, len) && get_string(input_format, len, result); + } + + case 'I': + { + std::int16_t len{}; + return get_number(input_format, len) && get_string(input_format, len, result); + } + + case 'l': + { + std::int32_t len{}; + return get_number(input_format, len) && get_string(input_format, len, result); + } + + case 'L': + { + std::int64_t len{}; + return get_number(input_format, len) && get_string(input_format, len, result); + } + + case 'u': + { + if (input_format != input_format_t::bjdata) + { + break; + } + std::uint16_t len{}; + return get_number(input_format, len) && get_string(input_format, len, result); + } + + case 'm': + { + if (input_format != input_format_t::bjdata) + { + break; + } + std::uint32_t len{}; + return get_number(input_format, len) && get_string(input_format, len, result); + } + + case 'M': + { + if (input_format != input_format_t::bjdata) + { + break; + } + std::uint64_t len{}; + return get_number(input_format, len) && get_string(input_format, len, result); + } + + default: + break; + } + auto last_token = get_token_string(); + std::string message; + + if (input_format != input_format_t::bjdata) + { + message = "expected length type specification (U, i, I, l, L); last byte: 0x" + last_token; + } + else + { + message = "expected length type specification (U, i, u, I, m, l, M, L); last byte: 0x" + last_token; + } + return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, exception_message(input_format, message, "string"), nullptr)); + } + + /*! + @param[out] dim an integer vector storing the ND array dimensions + @return whether reading ND array size vector is successful + */ + bool get_ubjson_ndarray_size(std::vector& dim) + { + std::pair size_and_type; + size_t dimlen = 0; + bool no_ndarray = true; + + if (JSON_HEDLEY_UNLIKELY(!get_ubjson_size_type(size_and_type, no_ndarray))) + { + return false; + } + + if (size_and_type.first != npos) + { + if (size_and_type.second != 0) + { + if (size_and_type.second != 'N') + { + for (std::size_t i = 0; i < size_and_type.first; ++i) + { + if (JSON_HEDLEY_UNLIKELY(!get_ubjson_size_value(dimlen, no_ndarray, size_and_type.second))) + { + return false; + } + dim.push_back(dimlen); + } + } + } + else + { + for (std::size_t i = 0; i < size_and_type.first; ++i) + { + if (JSON_HEDLEY_UNLIKELY(!get_ubjson_size_value(dimlen, no_ndarray))) + { + return false; + } + dim.push_back(dimlen); + } + } + } + else + { + while (current != ']') + { + if (JSON_HEDLEY_UNLIKELY(!get_ubjson_size_value(dimlen, no_ndarray, current))) + { + return false; + } + dim.push_back(dimlen); + get_ignore_noop(); + } + } + return true; + } + + /*! + @param[out] result determined size + @param[in,out] is_ndarray for input, `true` means already inside an ndarray vector + or ndarray dimension is not allowed; `false` means ndarray + is allowed; for output, `true` means an ndarray is found; + is_ndarray can only return `true` when its initial value + is `false` + @param[in] prefix type marker if already read, otherwise set to 0 + + @return whether size determination completed + */ + bool get_ubjson_size_value(std::size_t& result, bool& is_ndarray, char_int_type prefix = 0) + { + if (prefix == 0) + { + prefix = get_ignore_noop(); + } + + switch (prefix) + { + case 'U': + { + std::uint8_t number{}; + if (JSON_HEDLEY_UNLIKELY(!get_number(input_format, number))) + { + return false; + } + result = static_cast(number); + return true; + } + + case 'i': + { + std::int8_t number{}; + if (JSON_HEDLEY_UNLIKELY(!get_number(input_format, number))) + { + return false; + } + if (number < 0) + { + return sax->parse_error(chars_read, get_token_string(), parse_error::create(113, chars_read, + exception_message(input_format, "count in an optimized container must be positive", "size"), nullptr)); + } + result = static_cast(number); // NOLINT(bugprone-signed-char-misuse,cert-str34-c): number is not a char + return true; + } + + case 'I': + { + std::int16_t number{}; + if (JSON_HEDLEY_UNLIKELY(!get_number(input_format, number))) + { + return false; + } + if (number < 0) + { + return sax->parse_error(chars_read, get_token_string(), parse_error::create(113, chars_read, + exception_message(input_format, "count in an optimized container must be positive", "size"), nullptr)); + } + result = static_cast(number); + return true; + } + + case 'l': + { + std::int32_t number{}; + if (JSON_HEDLEY_UNLIKELY(!get_number(input_format, number))) + { + return false; + } + if (number < 0) + { + return sax->parse_error(chars_read, get_token_string(), parse_error::create(113, chars_read, + exception_message(input_format, "count in an optimized container must be positive", "size"), nullptr)); + } + result = static_cast(number); + return true; + } + + case 'L': + { + std::int64_t number{}; + if (JSON_HEDLEY_UNLIKELY(!get_number(input_format, number))) + { + return false; + } + if (number < 0) + { + return sax->parse_error(chars_read, get_token_string(), parse_error::create(113, chars_read, + exception_message(input_format, "count in an optimized container must be positive", "size"), nullptr)); + } + if (!value_in_range_of(number)) + { + return sax->parse_error(chars_read, get_token_string(), out_of_range::create(408, + exception_message(input_format, "integer value overflow", "size"), nullptr)); + } + result = static_cast(number); + return true; + } + + case 'u': + { + if (input_format != input_format_t::bjdata) + { + break; + } + std::uint16_t number{}; + if (JSON_HEDLEY_UNLIKELY(!get_number(input_format, number))) + { + return false; + } + result = static_cast(number); + return true; + } + + case 'm': + { + if (input_format != input_format_t::bjdata) + { + break; + } + std::uint32_t number{}; + if (JSON_HEDLEY_UNLIKELY(!get_number(input_format, number))) + { + return false; + } + result = conditional_static_cast(number); + return true; + } + + case 'M': + { + if (input_format != input_format_t::bjdata) + { + break; + } + std::uint64_t number{}; + if (JSON_HEDLEY_UNLIKELY(!get_number(input_format, number))) + { + return false; + } + if (!value_in_range_of(number)) + { + return sax->parse_error(chars_read, get_token_string(), out_of_range::create(408, + exception_message(input_format, "integer value overflow", "size"), nullptr)); + } + result = detail::conditional_static_cast(number); + return true; + } + + case '[': + { + if (input_format != input_format_t::bjdata) + { + break; + } + if (is_ndarray) // ndarray dimensional vector can only contain integers, and can not embed another array + { + return sax->parse_error(chars_read, get_token_string(), parse_error::create(113, chars_read, exception_message(input_format, "ndarray dimensional vector is not allowed", "size"), nullptr)); + } + std::vector dim; + if (JSON_HEDLEY_UNLIKELY(!get_ubjson_ndarray_size(dim))) + { + return false; + } + if (dim.size() == 1 || (dim.size() == 2 && dim.at(0) == 1)) // return normal array size if 1D row vector + { + result = dim.at(dim.size() - 1); + return true; + } + if (!dim.empty()) // if ndarray, convert to an object in JData annotated array format + { + for (auto i : dim) // test if any dimension in an ndarray is 0, if so, return a 1D empty container + { + if ( i == 0 ) + { + result = 0; + return true; + } + } + + string_t key = "_ArraySize_"; + if (JSON_HEDLEY_UNLIKELY(!sax->start_object(3) || !sax->key(key) || !sax->start_array(dim.size()))) + { + return false; + } + result = 1; + for (auto i : dim) + { + result *= i; + if (result == 0 || result == npos) // because dim elements shall not have zeros, result = 0 means overflow happened; it also can't be npos as it is used to initialize size in get_ubjson_size_type() + { + return sax->parse_error(chars_read, get_token_string(), out_of_range::create(408, exception_message(input_format, "excessive ndarray size caused overflow", "size"), nullptr)); + } + if (JSON_HEDLEY_UNLIKELY(!sax->number_unsigned(static_cast(i)))) + { + return false; + } + } + is_ndarray = true; + return sax->end_array(); + } + result = 0; + return true; + } + + default: + break; + } + auto last_token = get_token_string(); + std::string message; + + if (input_format != input_format_t::bjdata) + { + message = "expected length type specification (U, i, I, l, L) after '#'; last byte: 0x" + last_token; + } + else + { + message = "expected length type specification (U, i, u, I, m, l, M, L) after '#'; last byte: 0x" + last_token; + } + return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, exception_message(input_format, message, "size"), nullptr)); + } + + /*! + @brief determine the type and size for a container + + In the optimized UBJSON format, a type and a size can be provided to allow + for a more compact representation. + + @param[out] result pair of the size and the type + @param[in] inside_ndarray whether the parser is parsing an ND array dimensional vector + + @return whether pair creation completed + */ + bool get_ubjson_size_type(std::pair& result, bool inside_ndarray = false) + { + result.first = npos; // size + result.second = 0; // type + bool is_ndarray = false; + + get_ignore_noop(); + + if (current == '$') + { + result.second = get(); // must not ignore 'N', because 'N' maybe the type + if (input_format == input_format_t::bjdata + && JSON_HEDLEY_UNLIKELY(std::binary_search(bjd_optimized_type_markers.begin(), bjd_optimized_type_markers.end(), result.second))) + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, + exception_message(input_format, concat("marker 0x", last_token, " is not a permitted optimized array type"), "type"), nullptr)); + } + + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format, "type"))) + { + return false; + } + + get_ignore_noop(); + if (JSON_HEDLEY_UNLIKELY(current != '#')) + { + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format, "value"))) + { + return false; + } + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, + exception_message(input_format, concat("expected '#' after type information; last byte: 0x", last_token), "size"), nullptr)); + } + + const bool is_error = get_ubjson_size_value(result.first, is_ndarray); + if (input_format == input_format_t::bjdata && is_ndarray) + { + if (inside_ndarray) + { + return sax->parse_error(chars_read, get_token_string(), parse_error::create(112, chars_read, + exception_message(input_format, "ndarray can not be recursive", "size"), nullptr)); + } + result.second |= (1 << 8); // use bit 8 to indicate ndarray, all UBJSON and BJData markers should be ASCII letters + } + return is_error; + } + + if (current == '#') + { + const bool is_error = get_ubjson_size_value(result.first, is_ndarray); + if (input_format == input_format_t::bjdata && is_ndarray) + { + return sax->parse_error(chars_read, get_token_string(), parse_error::create(112, chars_read, + exception_message(input_format, "ndarray requires both type and size", "size"), nullptr)); + } + return is_error; + } + + return true; + } + + /*! + @param prefix the previously read or set type prefix + @return whether value creation completed + */ + bool get_ubjson_value(const char_int_type prefix) + { + switch (prefix) + { + case std::char_traits::eof(): // EOF + return unexpect_eof(input_format, "value"); + + case 'T': // true + return sax->boolean(true); + case 'F': // false + return sax->boolean(false); + + case 'Z': // null + return sax->null(); + + case 'U': + { + std::uint8_t number{}; + return get_number(input_format, number) && sax->number_unsigned(number); + } + + case 'i': + { + std::int8_t number{}; + return get_number(input_format, number) && sax->number_integer(number); + } + + case 'I': + { + std::int16_t number{}; + return get_number(input_format, number) && sax->number_integer(number); + } + + case 'l': + { + std::int32_t number{}; + return get_number(input_format, number) && sax->number_integer(number); + } + + case 'L': + { + std::int64_t number{}; + return get_number(input_format, number) && sax->number_integer(number); + } + + case 'u': + { + if (input_format != input_format_t::bjdata) + { + break; + } + std::uint16_t number{}; + return get_number(input_format, number) && sax->number_unsigned(number); + } + + case 'm': + { + if (input_format != input_format_t::bjdata) + { + break; + } + std::uint32_t number{}; + return get_number(input_format, number) && sax->number_unsigned(number); + } + + case 'M': + { + if (input_format != input_format_t::bjdata) + { + break; + } + std::uint64_t number{}; + return get_number(input_format, number) && sax->number_unsigned(number); + } + + case 'h': + { + if (input_format != input_format_t::bjdata) + { + break; + } + const auto byte1_raw = get(); + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format, "number"))) + { + return false; + } + const auto byte2_raw = get(); + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format, "number"))) + { + return false; + } + + const auto byte1 = static_cast(byte1_raw); + const auto byte2 = static_cast(byte2_raw); + + // code from RFC 7049, Appendix D, Figure 3: + // As half-precision floating-point numbers were only added + // to IEEE 754 in 2008, today's programming platforms often + // still only have limited support for them. It is very + // easy to include at least decoding support for them even + // without such support. An example of a small decoder for + // half-precision floating-point numbers in the C language + // is shown in Fig. 3. + const auto half = static_cast((byte2 << 8u) + byte1); + const double val = [&half] + { + const int exp = (half >> 10u) & 0x1Fu; + const unsigned int mant = half & 0x3FFu; + JSON_ASSERT(0 <= exp&& exp <= 32); + JSON_ASSERT(mant <= 1024); + switch (exp) + { + case 0: + return std::ldexp(mant, -24); + case 31: + return (mant == 0) + ? std::numeric_limits::infinity() + : std::numeric_limits::quiet_NaN(); + default: + return std::ldexp(mant + 1024, exp - 25); + } + }(); + return sax->number_float((half & 0x8000u) != 0 + ? static_cast(-val) + : static_cast(val), ""); + } + + case 'd': + { + float number{}; + return get_number(input_format, number) && sax->number_float(static_cast(number), ""); + } + + case 'D': + { + double number{}; + return get_number(input_format, number) && sax->number_float(static_cast(number), ""); + } + + case 'H': + { + return get_ubjson_high_precision_number(); + } + + case 'C': // char + { + get(); + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format, "char"))) + { + return false; + } + if (JSON_HEDLEY_UNLIKELY(current > 127)) + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, + exception_message(input_format, concat("byte after 'C' must be in range 0x00..0x7F; last byte: 0x", last_token), "char"), nullptr)); + } + string_t s(1, static_cast(current)); + return sax->string(s); + } + + case 'S': // string + { + string_t s; + return get_ubjson_string(s) && sax->string(s); + } + + case '[': // array + return get_ubjson_array(); + + case '{': // object + return get_ubjson_object(); + + default: // anything else + break; + } + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, exception_message(input_format, "invalid byte: 0x" + last_token, "value"), nullptr)); + } + + /*! + @return whether array creation completed + */ + bool get_ubjson_array() + { + std::pair size_and_type; + if (JSON_HEDLEY_UNLIKELY(!get_ubjson_size_type(size_and_type))) + { + return false; + } + + // if bit-8 of size_and_type.second is set to 1, encode bjdata ndarray as an object in JData annotated array format (https://github.com/NeuroJSON/jdata): + // {"_ArrayType_" : "typeid", "_ArraySize_" : [n1, n2, ...], "_ArrayData_" : [v1, v2, ...]} + + if (input_format == input_format_t::bjdata && size_and_type.first != npos && (size_and_type.second & (1 << 8)) != 0) + { + size_and_type.second &= ~(static_cast(1) << 8); // use bit 8 to indicate ndarray, here we remove the bit to restore the type marker + auto it = std::lower_bound(bjd_types_map.begin(), bjd_types_map.end(), size_and_type.second, [](const bjd_type & p, char_int_type t) + { + return p.first < t; + }); + string_t key = "_ArrayType_"; + if (JSON_HEDLEY_UNLIKELY(it == bjd_types_map.end() || it->first != size_and_type.second)) + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, + exception_message(input_format, "invalid byte: 0x" + last_token, "type"), nullptr)); + } + + string_t type = it->second; // sax->string() takes a reference + if (JSON_HEDLEY_UNLIKELY(!sax->key(key) || !sax->string(type))) + { + return false; + } + + if (size_and_type.second == 'C') + { + size_and_type.second = 'U'; + } + + key = "_ArrayData_"; + if (JSON_HEDLEY_UNLIKELY(!sax->key(key) || !sax->start_array(size_and_type.first) )) + { + return false; + } + + for (std::size_t i = 0; i < size_and_type.first; ++i) + { + if (JSON_HEDLEY_UNLIKELY(!get_ubjson_value(size_and_type.second))) + { + return false; + } + } + + return (sax->end_array() && sax->end_object()); + } + + if (size_and_type.first != npos) + { + if (JSON_HEDLEY_UNLIKELY(!sax->start_array(size_and_type.first))) + { + return false; + } + + if (size_and_type.second != 0) + { + if (size_and_type.second != 'N') + { + for (std::size_t i = 0; i < size_and_type.first; ++i) + { + if (JSON_HEDLEY_UNLIKELY(!get_ubjson_value(size_and_type.second))) + { + return false; + } + } + } + } + else + { + for (std::size_t i = 0; i < size_and_type.first; ++i) + { + if (JSON_HEDLEY_UNLIKELY(!parse_ubjson_internal())) + { + return false; + } + } + } + } + else + { + if (JSON_HEDLEY_UNLIKELY(!sax->start_array(static_cast(-1)))) + { + return false; + } + + while (current != ']') + { + if (JSON_HEDLEY_UNLIKELY(!parse_ubjson_internal(false))) + { + return false; + } + get_ignore_noop(); + } + } + + return sax->end_array(); + } + + /*! + @return whether object creation completed + */ + bool get_ubjson_object() + { + std::pair size_and_type; + if (JSON_HEDLEY_UNLIKELY(!get_ubjson_size_type(size_and_type))) + { + return false; + } + + // do not accept ND-array size in objects in BJData + if (input_format == input_format_t::bjdata && size_and_type.first != npos && (size_and_type.second & (1 << 8)) != 0) + { + auto last_token = get_token_string(); + return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, + exception_message(input_format, "BJData object does not support ND-array size in optimized format", "object"), nullptr)); + } + + string_t key; + if (size_and_type.first != npos) + { + if (JSON_HEDLEY_UNLIKELY(!sax->start_object(size_and_type.first))) + { + return false; + } + + if (size_and_type.second != 0) + { + for (std::size_t i = 0; i < size_and_type.first; ++i) + { + if (JSON_HEDLEY_UNLIKELY(!get_ubjson_string(key) || !sax->key(key))) + { + return false; + } + if (JSON_HEDLEY_UNLIKELY(!get_ubjson_value(size_and_type.second))) + { + return false; + } + key.clear(); + } + } + else + { + for (std::size_t i = 0; i < size_and_type.first; ++i) + { + if (JSON_HEDLEY_UNLIKELY(!get_ubjson_string(key) || !sax->key(key))) + { + return false; + } + if (JSON_HEDLEY_UNLIKELY(!parse_ubjson_internal())) + { + return false; + } + key.clear(); + } + } + } + else + { + if (JSON_HEDLEY_UNLIKELY(!sax->start_object(static_cast(-1)))) + { + return false; + } + + while (current != '}') + { + if (JSON_HEDLEY_UNLIKELY(!get_ubjson_string(key, false) || !sax->key(key))) + { + return false; + } + if (JSON_HEDLEY_UNLIKELY(!parse_ubjson_internal())) + { + return false; + } + get_ignore_noop(); + key.clear(); + } + } + + return sax->end_object(); + } + + // Note, no reader for UBJSON binary types is implemented because they do + // not exist + + bool get_ubjson_high_precision_number() + { + // get size of following number string + std::size_t size{}; + bool no_ndarray = true; + auto res = get_ubjson_size_value(size, no_ndarray); + if (JSON_HEDLEY_UNLIKELY(!res)) + { + return res; + } + + // get number string + std::vector number_vector; + for (std::size_t i = 0; i < size; ++i) + { + get(); + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format, "number"))) + { + return false; + } + number_vector.push_back(static_cast(current)); + } + + // parse number string + using ia_type = decltype(detail::input_adapter(number_vector)); + auto number_lexer = detail::lexer(detail::input_adapter(number_vector), false); + const auto result_number = number_lexer.scan(); + const auto number_string = number_lexer.get_token_string(); + const auto result_remainder = number_lexer.scan(); + + using token_type = typename detail::lexer_base::token_type; + + if (JSON_HEDLEY_UNLIKELY(result_remainder != token_type::end_of_input)) + { + return sax->parse_error(chars_read, number_string, parse_error::create(115, chars_read, + exception_message(input_format, concat("invalid number text: ", number_lexer.get_token_string()), "high-precision number"), nullptr)); + } + + switch (result_number) + { + case token_type::value_integer: + return sax->number_integer(number_lexer.get_number_integer()); + case token_type::value_unsigned: + return sax->number_unsigned(number_lexer.get_number_unsigned()); + case token_type::value_float: + return sax->number_float(number_lexer.get_number_float(), std::move(number_string)); + case token_type::uninitialized: + case token_type::literal_true: + case token_type::literal_false: + case token_type::literal_null: + case token_type::value_string: + case token_type::begin_array: + case token_type::begin_object: + case token_type::end_array: + case token_type::end_object: + case token_type::name_separator: + case token_type::value_separator: + case token_type::parse_error: + case token_type::end_of_input: + case token_type::literal_or_value: + default: + return sax->parse_error(chars_read, number_string, parse_error::create(115, chars_read, + exception_message(input_format, concat("invalid number text: ", number_lexer.get_token_string()), "high-precision number"), nullptr)); + } + } + + /////////////////////// + // Utility functions // + /////////////////////// + + /*! + @brief get next character from the input + + This function provides the interface to the used input adapter. It does + not throw in case the input reached EOF, but returns a -'ve valued + `std::char_traits::eof()` in that case. + + @return character read from the input + */ + char_int_type get() + { + ++chars_read; + return current = ia.get_character(); + } + + /*! + @return character read from the input after ignoring all 'N' entries + */ + char_int_type get_ignore_noop() + { + do + { + get(); + } + while (current == 'N'); + + return current; + } + + /* + @brief read a number from the input + + @tparam NumberType the type of the number + @param[in] format the current format (for diagnostics) + @param[out] result number of type @a NumberType + + @return whether conversion completed + + @note This function needs to respect the system's endianness, because + bytes in CBOR, MessagePack, and UBJSON are stored in network order + (big endian) and therefore need reordering on little endian systems. + On the other hand, BSON and BJData use little endian and should reorder + on big endian systems. + */ + template + bool get_number(const input_format_t format, NumberType& result) + { + // step 1: read input into array with system's byte order + std::array vec{}; + for (std::size_t i = 0; i < sizeof(NumberType); ++i) + { + get(); + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(format, "number"))) + { + return false; + } + + // reverse byte order prior to conversion if necessary + if (is_little_endian != (InputIsLittleEndian || format == input_format_t::bjdata)) + { + vec[sizeof(NumberType) - i - 1] = static_cast(current); + } + else + { + vec[i] = static_cast(current); // LCOV_EXCL_LINE + } + } + + // step 2: convert array into number of type T and return + std::memcpy(&result, vec.data(), sizeof(NumberType)); + return true; + } + + /*! + @brief create a string by reading characters from the input + + @tparam NumberType the type of the number + @param[in] format the current format (for diagnostics) + @param[in] len number of characters to read + @param[out] result string created by reading @a len bytes + + @return whether string creation completed + + @note We can not reserve @a len bytes for the result, because @a len + may be too large. Usually, @ref unexpect_eof() detects the end of + the input before we run out of string memory. + */ + template + bool get_string(const input_format_t format, + const NumberType len, + string_t& result) + { + bool success = true; + for (NumberType i = 0; i < len; i++) + { + get(); + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(format, "string"))) + { + success = false; + break; + } + result.push_back(static_cast(current)); + } + return success; + } + + /*! + @brief create a byte array by reading bytes from the input + + @tparam NumberType the type of the number + @param[in] format the current format (for diagnostics) + @param[in] len number of bytes to read + @param[out] result byte array created by reading @a len bytes + + @return whether byte array creation completed + + @note We can not reserve @a len bytes for the result, because @a len + may be too large. Usually, @ref unexpect_eof() detects the end of + the input before we run out of memory. + */ + template + bool get_binary(const input_format_t format, + const NumberType len, + binary_t& result) + { + bool success = true; + for (NumberType i = 0; i < len; i++) + { + get(); + if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(format, "binary"))) + { + success = false; + break; + } + result.push_back(static_cast(current)); + } + return success; + } + + /*! + @param[in] format the current format (for diagnostics) + @param[in] context further context information (for diagnostics) + @return whether the last read character is not EOF + */ + JSON_HEDLEY_NON_NULL(3) + bool unexpect_eof(const input_format_t format, const char* context) const + { + if (JSON_HEDLEY_UNLIKELY(current == std::char_traits::eof())) + { + return sax->parse_error(chars_read, "", + parse_error::create(110, chars_read, exception_message(format, "unexpected end of input", context), nullptr)); + } + return true; + } + + /*! + @return a string representation of the last read byte + */ + std::string get_token_string() const + { + std::array cr{{}}; + static_cast((std::snprintf)(cr.data(), cr.size(), "%.2hhX", static_cast(current))); // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg) + return std::string{cr.data()}; + } + + /*! + @param[in] format the current format + @param[in] detail a detailed error message + @param[in] context further context information + @return a message string to use in the parse_error exceptions + */ + std::string exception_message(const input_format_t format, + const std::string& detail, + const std::string& context) const + { + std::string error_msg = "syntax error while parsing "; + + switch (format) + { + case input_format_t::cbor: + error_msg += "CBOR"; + break; + + case input_format_t::msgpack: + error_msg += "MessagePack"; + break; + + case input_format_t::ubjson: + error_msg += "UBJSON"; + break; + + case input_format_t::bson: + error_msg += "BSON"; + break; + + case input_format_t::bjdata: + error_msg += "BJData"; + break; + + case input_format_t::json: // LCOV_EXCL_LINE + default: // LCOV_EXCL_LINE + JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE + } + + return concat(error_msg, ' ', context, ": ", detail); + } + + private: + static JSON_INLINE_VARIABLE constexpr std::size_t npos = static_cast(-1); + + /// input adapter + InputAdapterType ia; + + /// the current character + char_int_type current = std::char_traits::eof(); + + /// the number of characters read + std::size_t chars_read = 0; + + /// whether we can assume little endianness + const bool is_little_endian = little_endianness(); + + /// input format + const input_format_t input_format = input_format_t::json; + + /// the SAX parser + json_sax_t* sax = nullptr; + + // excluded markers in bjdata optimized type +#define JSON_BINARY_READER_MAKE_BJD_OPTIMIZED_TYPE_MARKERS_ \ + make_array('F', 'H', 'N', 'S', 'T', 'Z', '[', '{') + +#define JSON_BINARY_READER_MAKE_BJD_TYPES_MAP_ \ + make_array( \ + bjd_type{'C', "char"}, \ + bjd_type{'D', "double"}, \ + bjd_type{'I', "int16"}, \ + bjd_type{'L', "int64"}, \ + bjd_type{'M', "uint64"}, \ + bjd_type{'U', "uint8"}, \ + bjd_type{'d', "single"}, \ + bjd_type{'i', "int8"}, \ + bjd_type{'l', "int32"}, \ + bjd_type{'m', "uint32"}, \ + bjd_type{'u', "uint16"}) + + JSON_PRIVATE_UNLESS_TESTED: + // lookup tables + // NOLINTNEXTLINE(cppcoreguidelines-non-private-member-variables-in-classes) + const decltype(JSON_BINARY_READER_MAKE_BJD_OPTIMIZED_TYPE_MARKERS_) bjd_optimized_type_markers = + JSON_BINARY_READER_MAKE_BJD_OPTIMIZED_TYPE_MARKERS_; + + using bjd_type = std::pair; + // NOLINTNEXTLINE(cppcoreguidelines-non-private-member-variables-in-classes) + const decltype(JSON_BINARY_READER_MAKE_BJD_TYPES_MAP_) bjd_types_map = + JSON_BINARY_READER_MAKE_BJD_TYPES_MAP_; + +#undef JSON_BINARY_READER_MAKE_BJD_OPTIMIZED_TYPE_MARKERS_ +#undef JSON_BINARY_READER_MAKE_BJD_TYPES_MAP_ +}; + +#ifndef JSON_HAS_CPP_17 + template + constexpr std::size_t binary_reader::npos; +#endif + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END diff --git a/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/input/input_adapters.hpp b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/input/input_adapters.hpp new file mode 100644 index 0000000..cf53b1d --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/input/input_adapters.hpp @@ -0,0 +1,494 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + +#pragma once + +#include // array +#include // size_t +#include // strlen +#include // begin, end, iterator_traits, random_access_iterator_tag, distance, next +#include // shared_ptr, make_shared, addressof +#include // accumulate +#include // string, char_traits +#include // enable_if, is_base_of, is_pointer, is_integral, remove_pointer +#include // pair, declval + +#ifndef JSON_NO_IO + #include // FILE * + #include // istream +#endif // JSON_NO_IO + +#include +#include + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +/// the supported input formats +enum class input_format_t { json, cbor, msgpack, ubjson, bson, bjdata }; + +//////////////////// +// input adapters // +//////////////////// + +#ifndef JSON_NO_IO +/*! +Input adapter for stdio file access. This adapter read only 1 byte and do not use any + buffer. This adapter is a very low level adapter. +*/ +class file_input_adapter +{ + public: + using char_type = char; + + JSON_HEDLEY_NON_NULL(2) + explicit file_input_adapter(std::FILE* f) noexcept + : m_file(f) + { + JSON_ASSERT(m_file != nullptr); + } + + // make class move-only + file_input_adapter(const file_input_adapter&) = delete; + file_input_adapter(file_input_adapter&&) noexcept = default; + file_input_adapter& operator=(const file_input_adapter&) = delete; + file_input_adapter& operator=(file_input_adapter&&) = delete; + ~file_input_adapter() = default; + + std::char_traits::int_type get_character() noexcept + { + return std::fgetc(m_file); + } + + private: + /// the file pointer to read from + std::FILE* m_file; +}; + + +/*! +Input adapter for a (caching) istream. Ignores a UFT Byte Order Mark at +beginning of input. Does not support changing the underlying std::streambuf +in mid-input. Maintains underlying std::istream and std::streambuf to support +subsequent use of standard std::istream operations to process any input +characters following those used in parsing the JSON input. Clears the +std::istream flags; any input errors (e.g., EOF) will be detected by the first +subsequent call for input from the std::istream. +*/ +class input_stream_adapter +{ + public: + using char_type = char; + + ~input_stream_adapter() + { + // clear stream flags; we use underlying streambuf I/O, do not + // maintain ifstream flags, except eof + if (is != nullptr) + { + is->clear(is->rdstate() & std::ios::eofbit); + } + } + + explicit input_stream_adapter(std::istream& i) + : is(&i), sb(i.rdbuf()) + {} + + // delete because of pointer members + input_stream_adapter(const input_stream_adapter&) = delete; + input_stream_adapter& operator=(input_stream_adapter&) = delete; + input_stream_adapter& operator=(input_stream_adapter&&) = delete; + + input_stream_adapter(input_stream_adapter&& rhs) noexcept + : is(rhs.is), sb(rhs.sb) + { + rhs.is = nullptr; + rhs.sb = nullptr; + } + + // std::istream/std::streambuf use std::char_traits::to_int_type, to + // ensure that std::char_traits::eof() and the character 0xFF do not + // end up as the same value, e.g. 0xFFFFFFFF. + std::char_traits::int_type get_character() + { + auto res = sb->sbumpc(); + // set eof manually, as we don't use the istream interface. + if (JSON_HEDLEY_UNLIKELY(res == std::char_traits::eof())) + { + is->clear(is->rdstate() | std::ios::eofbit); + } + return res; + } + + private: + /// the associated input stream + std::istream* is = nullptr; + std::streambuf* sb = nullptr; +}; +#endif // JSON_NO_IO + +// General-purpose iterator-based adapter. It might not be as fast as +// theoretically possible for some containers, but it is extremely versatile. +template +class iterator_input_adapter +{ + public: + using char_type = typename std::iterator_traits::value_type; + + iterator_input_adapter(IteratorType first, IteratorType last) + : current(std::move(first)), end(std::move(last)) + {} + + typename std::char_traits::int_type get_character() + { + if (JSON_HEDLEY_LIKELY(current != end)) + { + auto result = std::char_traits::to_int_type(*current); + std::advance(current, 1); + return result; + } + + return std::char_traits::eof(); + } + + private: + IteratorType current; + IteratorType end; + + template + friend struct wide_string_input_helper; + + bool empty() const + { + return current == end; + } +}; + + +template +struct wide_string_input_helper; + +template +struct wide_string_input_helper +{ + // UTF-32 + static void fill_buffer(BaseInputAdapter& input, + std::array::int_type, 4>& utf8_bytes, + size_t& utf8_bytes_index, + size_t& utf8_bytes_filled) + { + utf8_bytes_index = 0; + + if (JSON_HEDLEY_UNLIKELY(input.empty())) + { + utf8_bytes[0] = std::char_traits::eof(); + utf8_bytes_filled = 1; + } + else + { + // get the current character + const auto wc = input.get_character(); + + // UTF-32 to UTF-8 encoding + if (wc < 0x80) + { + utf8_bytes[0] = static_cast::int_type>(wc); + utf8_bytes_filled = 1; + } + else if (wc <= 0x7FF) + { + utf8_bytes[0] = static_cast::int_type>(0xC0u | ((static_cast(wc) >> 6u) & 0x1Fu)); + utf8_bytes[1] = static_cast::int_type>(0x80u | (static_cast(wc) & 0x3Fu)); + utf8_bytes_filled = 2; + } + else if (wc <= 0xFFFF) + { + utf8_bytes[0] = static_cast::int_type>(0xE0u | ((static_cast(wc) >> 12u) & 0x0Fu)); + utf8_bytes[1] = static_cast::int_type>(0x80u | ((static_cast(wc) >> 6u) & 0x3Fu)); + utf8_bytes[2] = static_cast::int_type>(0x80u | (static_cast(wc) & 0x3Fu)); + utf8_bytes_filled = 3; + } + else if (wc <= 0x10FFFF) + { + utf8_bytes[0] = static_cast::int_type>(0xF0u | ((static_cast(wc) >> 18u) & 0x07u)); + utf8_bytes[1] = static_cast::int_type>(0x80u | ((static_cast(wc) >> 12u) & 0x3Fu)); + utf8_bytes[2] = static_cast::int_type>(0x80u | ((static_cast(wc) >> 6u) & 0x3Fu)); + utf8_bytes[3] = static_cast::int_type>(0x80u | (static_cast(wc) & 0x3Fu)); + utf8_bytes_filled = 4; + } + else + { + // unknown character + utf8_bytes[0] = static_cast::int_type>(wc); + utf8_bytes_filled = 1; + } + } + } +}; + +template +struct wide_string_input_helper +{ + // UTF-16 + static void fill_buffer(BaseInputAdapter& input, + std::array::int_type, 4>& utf8_bytes, + size_t& utf8_bytes_index, + size_t& utf8_bytes_filled) + { + utf8_bytes_index = 0; + + if (JSON_HEDLEY_UNLIKELY(input.empty())) + { + utf8_bytes[0] = std::char_traits::eof(); + utf8_bytes_filled = 1; + } + else + { + // get the current character + const auto wc = input.get_character(); + + // UTF-16 to UTF-8 encoding + if (wc < 0x80) + { + utf8_bytes[0] = static_cast::int_type>(wc); + utf8_bytes_filled = 1; + } + else if (wc <= 0x7FF) + { + utf8_bytes[0] = static_cast::int_type>(0xC0u | ((static_cast(wc) >> 6u))); + utf8_bytes[1] = static_cast::int_type>(0x80u | (static_cast(wc) & 0x3Fu)); + utf8_bytes_filled = 2; + } + else if (0xD800 > wc || wc >= 0xE000) + { + utf8_bytes[0] = static_cast::int_type>(0xE0u | ((static_cast(wc) >> 12u))); + utf8_bytes[1] = static_cast::int_type>(0x80u | ((static_cast(wc) >> 6u) & 0x3Fu)); + utf8_bytes[2] = static_cast::int_type>(0x80u | (static_cast(wc) & 0x3Fu)); + utf8_bytes_filled = 3; + } + else + { + if (JSON_HEDLEY_UNLIKELY(!input.empty())) + { + const auto wc2 = static_cast(input.get_character()); + const auto charcode = 0x10000u + (((static_cast(wc) & 0x3FFu) << 10u) | (wc2 & 0x3FFu)); + utf8_bytes[0] = static_cast::int_type>(0xF0u | (charcode >> 18u)); + utf8_bytes[1] = static_cast::int_type>(0x80u | ((charcode >> 12u) & 0x3Fu)); + utf8_bytes[2] = static_cast::int_type>(0x80u | ((charcode >> 6u) & 0x3Fu)); + utf8_bytes[3] = static_cast::int_type>(0x80u | (charcode & 0x3Fu)); + utf8_bytes_filled = 4; + } + else + { + utf8_bytes[0] = static_cast::int_type>(wc); + utf8_bytes_filled = 1; + } + } + } + } +}; + +// Wraps another input apdater to convert wide character types into individual bytes. +template +class wide_string_input_adapter +{ + public: + using char_type = char; + + wide_string_input_adapter(BaseInputAdapter base) + : base_adapter(base) {} + + typename std::char_traits::int_type get_character() noexcept + { + // check if buffer needs to be filled + if (utf8_bytes_index == utf8_bytes_filled) + { + fill_buffer(); + + JSON_ASSERT(utf8_bytes_filled > 0); + JSON_ASSERT(utf8_bytes_index == 0); + } + + // use buffer + JSON_ASSERT(utf8_bytes_filled > 0); + JSON_ASSERT(utf8_bytes_index < utf8_bytes_filled); + return utf8_bytes[utf8_bytes_index++]; + } + + private: + BaseInputAdapter base_adapter; + + template + void fill_buffer() + { + wide_string_input_helper::fill_buffer(base_adapter, utf8_bytes, utf8_bytes_index, utf8_bytes_filled); + } + + /// a buffer for UTF-8 bytes + std::array::int_type, 4> utf8_bytes = {{0, 0, 0, 0}}; + + /// index to the utf8_codes array for the next valid byte + std::size_t utf8_bytes_index = 0; + /// number of valid bytes in the utf8_codes array + std::size_t utf8_bytes_filled = 0; +}; + + +template +struct iterator_input_adapter_factory +{ + using iterator_type = IteratorType; + using char_type = typename std::iterator_traits::value_type; + using adapter_type = iterator_input_adapter; + + static adapter_type create(IteratorType first, IteratorType last) + { + return adapter_type(std::move(first), std::move(last)); + } +}; + +template +struct is_iterator_of_multibyte +{ + using value_type = typename std::iterator_traits::value_type; + enum + { + value = sizeof(value_type) > 1 + }; +}; + +template +struct iterator_input_adapter_factory::value>> +{ + using iterator_type = IteratorType; + using char_type = typename std::iterator_traits::value_type; + using base_adapter_type = iterator_input_adapter; + using adapter_type = wide_string_input_adapter; + + static adapter_type create(IteratorType first, IteratorType last) + { + return adapter_type(base_adapter_type(std::move(first), std::move(last))); + } +}; + +// General purpose iterator-based input +template +typename iterator_input_adapter_factory::adapter_type input_adapter(IteratorType first, IteratorType last) +{ + using factory_type = iterator_input_adapter_factory; + return factory_type::create(first, last); +} + +// Convenience shorthand from container to iterator +// Enables ADL on begin(container) and end(container) +// Encloses the using declarations in namespace for not to leak them to outside scope + +namespace container_input_adapter_factory_impl +{ + +using std::begin; +using std::end; + +template +struct container_input_adapter_factory {}; + +template +struct container_input_adapter_factory< ContainerType, + void_t()), end(std::declval()))>> + { + using adapter_type = decltype(input_adapter(begin(std::declval()), end(std::declval()))); + + static adapter_type create(const ContainerType& container) +{ + return input_adapter(begin(container), end(container)); +} + }; + +} // namespace container_input_adapter_factory_impl + +template +typename container_input_adapter_factory_impl::container_input_adapter_factory::adapter_type input_adapter(const ContainerType& container) +{ + return container_input_adapter_factory_impl::container_input_adapter_factory::create(container); +} + +#ifndef JSON_NO_IO +// Special cases with fast paths +inline file_input_adapter input_adapter(std::FILE* file) +{ + return file_input_adapter(file); +} + +inline input_stream_adapter input_adapter(std::istream& stream) +{ + return input_stream_adapter(stream); +} + +inline input_stream_adapter input_adapter(std::istream&& stream) +{ + return input_stream_adapter(stream); +} +#endif // JSON_NO_IO + +using contiguous_bytes_input_adapter = decltype(input_adapter(std::declval(), std::declval())); + +// Null-delimited strings, and the like. +template < typename CharT, + typename std::enable_if < + std::is_pointer::value&& + !std::is_array::value&& + std::is_integral::type>::value&& + sizeof(typename std::remove_pointer::type) == 1, + int >::type = 0 > +contiguous_bytes_input_adapter input_adapter(CharT b) +{ + auto length = std::strlen(reinterpret_cast(b)); + const auto* ptr = reinterpret_cast(b); + return input_adapter(ptr, ptr + length); +} + +template +auto input_adapter(T (&array)[N]) -> decltype(input_adapter(array, array + N)) // NOLINT(cppcoreguidelines-avoid-c-arrays,hicpp-avoid-c-arrays,modernize-avoid-c-arrays) +{ + return input_adapter(array, array + N); +} + +// This class only handles inputs of input_buffer_adapter type. +// It's required so that expressions like {ptr, len} can be implicitly cast +// to the correct adapter. +class span_input_adapter +{ + public: + template < typename CharT, + typename std::enable_if < + std::is_pointer::value&& + std::is_integral::type>::value&& + sizeof(typename std::remove_pointer::type) == 1, + int >::type = 0 > + span_input_adapter(CharT b, std::size_t l) + : ia(reinterpret_cast(b), reinterpret_cast(b) + l) {} + + template::iterator_category, std::random_access_iterator_tag>::value, + int>::type = 0> + span_input_adapter(IteratorType first, IteratorType last) + : ia(input_adapter(first, last)) {} + + contiguous_bytes_input_adapter&& get() + { + return std::move(ia); // NOLINT(hicpp-move-const-arg,performance-move-const-arg) + } + + private: + contiguous_bytes_input_adapter ia; +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END diff --git a/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/input/json_sax.hpp b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/input/json_sax.hpp new file mode 100644 index 0000000..1bf46c2 --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/input/json_sax.hpp @@ -0,0 +1,728 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + +#pragma once + +#include +#include // string +#include // move +#include // vector + +#include +#include +#include + +NLOHMANN_JSON_NAMESPACE_BEGIN + +/*! +@brief SAX interface + +This class describes the SAX interface used by @ref nlohmann::json::sax_parse. +Each function is called in different situations while the input is parsed. The +boolean return value informs the parser whether to continue processing the +input. +*/ +template +struct json_sax +{ + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using binary_t = typename BasicJsonType::binary_t; + + /*! + @brief a null value was read + @return whether parsing should proceed + */ + virtual bool null() = 0; + + /*! + @brief a boolean value was read + @param[in] val boolean value + @return whether parsing should proceed + */ + virtual bool boolean(bool val) = 0; + + /*! + @brief an integer number was read + @param[in] val integer value + @return whether parsing should proceed + */ + virtual bool number_integer(number_integer_t val) = 0; + + /*! + @brief an unsigned integer number was read + @param[in] val unsigned integer value + @return whether parsing should proceed + */ + virtual bool number_unsigned(number_unsigned_t val) = 0; + + /*! + @brief a floating-point number was read + @param[in] val floating-point value + @param[in] s raw token value + @return whether parsing should proceed + */ + virtual bool number_float(number_float_t val, const string_t& s) = 0; + + /*! + @brief a string value was read + @param[in] val string value + @return whether parsing should proceed + @note It is safe to move the passed string value. + */ + virtual bool string(string_t& val) = 0; + + /*! + @brief a binary value was read + @param[in] val binary value + @return whether parsing should proceed + @note It is safe to move the passed binary value. + */ + virtual bool binary(binary_t& val) = 0; + + /*! + @brief the beginning of an object was read + @param[in] elements number of object elements or -1 if unknown + @return whether parsing should proceed + @note binary formats may report the number of elements + */ + virtual bool start_object(std::size_t elements) = 0; + + /*! + @brief an object key was read + @param[in] val object key + @return whether parsing should proceed + @note It is safe to move the passed string. + */ + virtual bool key(string_t& val) = 0; + + /*! + @brief the end of an object was read + @return whether parsing should proceed + */ + virtual bool end_object() = 0; + + /*! + @brief the beginning of an array was read + @param[in] elements number of array elements or -1 if unknown + @return whether parsing should proceed + @note binary formats may report the number of elements + */ + virtual bool start_array(std::size_t elements) = 0; + + /*! + @brief the end of an array was read + @return whether parsing should proceed + */ + virtual bool end_array() = 0; + + /*! + @brief a parse error occurred + @param[in] position the position in the input where the error occurs + @param[in] last_token the last read token + @param[in] ex an exception object describing the error + @return whether parsing should proceed (must return false) + */ + virtual bool parse_error(std::size_t position, + const std::string& last_token, + const detail::exception& ex) = 0; + + json_sax() = default; + json_sax(const json_sax&) = default; + json_sax(json_sax&&) noexcept = default; + json_sax& operator=(const json_sax&) = default; + json_sax& operator=(json_sax&&) noexcept = default; + virtual ~json_sax() = default; +}; + + +namespace detail +{ +/*! +@brief SAX implementation to create a JSON value from SAX events + +This class implements the @ref json_sax interface and processes the SAX events +to create a JSON value which makes it basically a DOM parser. The structure or +hierarchy of the JSON value is managed by the stack `ref_stack` which contains +a pointer to the respective array or object for each recursion depth. + +After successful parsing, the value that is passed by reference to the +constructor contains the parsed value. + +@tparam BasicJsonType the JSON type +*/ +template +class json_sax_dom_parser +{ + public: + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using binary_t = typename BasicJsonType::binary_t; + + /*! + @param[in,out] r reference to a JSON value that is manipulated while + parsing + @param[in] allow_exceptions_ whether parse errors yield exceptions + */ + explicit json_sax_dom_parser(BasicJsonType& r, const bool allow_exceptions_ = true) + : root(r), allow_exceptions(allow_exceptions_) + {} + + // make class move-only + json_sax_dom_parser(const json_sax_dom_parser&) = delete; + json_sax_dom_parser(json_sax_dom_parser&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) + json_sax_dom_parser& operator=(const json_sax_dom_parser&) = delete; + json_sax_dom_parser& operator=(json_sax_dom_parser&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) + ~json_sax_dom_parser() = default; + + bool null() + { + handle_value(nullptr); + return true; + } + + bool boolean(bool val) + { + handle_value(val); + return true; + } + + bool number_integer(number_integer_t val) + { + handle_value(val); + return true; + } + + bool number_unsigned(number_unsigned_t val) + { + handle_value(val); + return true; + } + + bool number_float(number_float_t val, const string_t& /*unused*/) + { + handle_value(val); + return true; + } + + bool string(string_t& val) + { + handle_value(val); + return true; + } + + bool binary(binary_t& val) + { + handle_value(std::move(val)); + return true; + } + + bool start_object(std::size_t len) + { + ref_stack.push_back(handle_value(BasicJsonType::value_t::object)); + + if (JSON_HEDLEY_UNLIKELY(len != static_cast(-1) && len > ref_stack.back()->max_size())) + { + JSON_THROW(out_of_range::create(408, concat("excessive object size: ", std::to_string(len)), ref_stack.back())); + } + + return true; + } + + bool key(string_t& val) + { + JSON_ASSERT(!ref_stack.empty()); + JSON_ASSERT(ref_stack.back()->is_object()); + + // add null at given key and store the reference for later + object_element = &(ref_stack.back()->m_data.m_value.object->operator[](val)); + return true; + } + + bool end_object() + { + JSON_ASSERT(!ref_stack.empty()); + JSON_ASSERT(ref_stack.back()->is_object()); + + ref_stack.back()->set_parents(); + ref_stack.pop_back(); + return true; + } + + bool start_array(std::size_t len) + { + ref_stack.push_back(handle_value(BasicJsonType::value_t::array)); + + if (JSON_HEDLEY_UNLIKELY(len != static_cast(-1) && len > ref_stack.back()->max_size())) + { + JSON_THROW(out_of_range::create(408, concat("excessive array size: ", std::to_string(len)), ref_stack.back())); + } + + return true; + } + + bool end_array() + { + JSON_ASSERT(!ref_stack.empty()); + JSON_ASSERT(ref_stack.back()->is_array()); + + ref_stack.back()->set_parents(); + ref_stack.pop_back(); + return true; + } + + template + bool parse_error(std::size_t /*unused*/, const std::string& /*unused*/, + const Exception& ex) + { + errored = true; + static_cast(ex); + if (allow_exceptions) + { + JSON_THROW(ex); + } + return false; + } + + constexpr bool is_errored() const + { + return errored; + } + + private: + /*! + @invariant If the ref stack is empty, then the passed value will be the new + root. + @invariant If the ref stack contains a value, then it is an array or an + object to which we can add elements + */ + template + JSON_HEDLEY_RETURNS_NON_NULL + BasicJsonType* handle_value(Value&& v) + { + if (ref_stack.empty()) + { + root = BasicJsonType(std::forward(v)); + return &root; + } + + JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object()); + + if (ref_stack.back()->is_array()) + { + ref_stack.back()->m_data.m_value.array->emplace_back(std::forward(v)); + return &(ref_stack.back()->m_data.m_value.array->back()); + } + + JSON_ASSERT(ref_stack.back()->is_object()); + JSON_ASSERT(object_element); + *object_element = BasicJsonType(std::forward(v)); + return object_element; + } + + /// the parsed JSON value + BasicJsonType& root; + /// stack to model hierarchy of values + std::vector ref_stack {}; + /// helper to hold the reference for the next object element + BasicJsonType* object_element = nullptr; + /// whether a syntax error occurred + bool errored = false; + /// whether to throw exceptions in case of errors + const bool allow_exceptions = true; +}; + +template +class json_sax_dom_callback_parser +{ + public: + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using binary_t = typename BasicJsonType::binary_t; + using parser_callback_t = typename BasicJsonType::parser_callback_t; + using parse_event_t = typename BasicJsonType::parse_event_t; + + json_sax_dom_callback_parser(BasicJsonType& r, + const parser_callback_t cb, + const bool allow_exceptions_ = true) + : root(r), callback(cb), allow_exceptions(allow_exceptions_) + { + keep_stack.push_back(true); + } + + // make class move-only + json_sax_dom_callback_parser(const json_sax_dom_callback_parser&) = delete; + json_sax_dom_callback_parser(json_sax_dom_callback_parser&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) + json_sax_dom_callback_parser& operator=(const json_sax_dom_callback_parser&) = delete; + json_sax_dom_callback_parser& operator=(json_sax_dom_callback_parser&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) + ~json_sax_dom_callback_parser() = default; + + bool null() + { + handle_value(nullptr); + return true; + } + + bool boolean(bool val) + { + handle_value(val); + return true; + } + + bool number_integer(number_integer_t val) + { + handle_value(val); + return true; + } + + bool number_unsigned(number_unsigned_t val) + { + handle_value(val); + return true; + } + + bool number_float(number_float_t val, const string_t& /*unused*/) + { + handle_value(val); + return true; + } + + bool string(string_t& val) + { + handle_value(val); + return true; + } + + bool binary(binary_t& val) + { + handle_value(std::move(val)); + return true; + } + + bool start_object(std::size_t len) + { + // check callback for object start + const bool keep = callback(static_cast(ref_stack.size()), parse_event_t::object_start, discarded); + keep_stack.push_back(keep); + + auto val = handle_value(BasicJsonType::value_t::object, true); + ref_stack.push_back(val.second); + + // check object limit + if (ref_stack.back() && JSON_HEDLEY_UNLIKELY(len != static_cast(-1) && len > ref_stack.back()->max_size())) + { + JSON_THROW(out_of_range::create(408, concat("excessive object size: ", std::to_string(len)), ref_stack.back())); + } + + return true; + } + + bool key(string_t& val) + { + BasicJsonType k = BasicJsonType(val); + + // check callback for key + const bool keep = callback(static_cast(ref_stack.size()), parse_event_t::key, k); + key_keep_stack.push_back(keep); + + // add discarded value at given key and store the reference for later + if (keep && ref_stack.back()) + { + object_element = &(ref_stack.back()->m_data.m_value.object->operator[](val) = discarded); + } + + return true; + } + + bool end_object() + { + if (ref_stack.back()) + { + if (!callback(static_cast(ref_stack.size()) - 1, parse_event_t::object_end, *ref_stack.back())) + { + // discard object + *ref_stack.back() = discarded; + } + else + { + ref_stack.back()->set_parents(); + } + } + + JSON_ASSERT(!ref_stack.empty()); + JSON_ASSERT(!keep_stack.empty()); + ref_stack.pop_back(); + keep_stack.pop_back(); + + if (!ref_stack.empty() && ref_stack.back() && ref_stack.back()->is_structured()) + { + // remove discarded value + for (auto it = ref_stack.back()->begin(); it != ref_stack.back()->end(); ++it) + { + if (it->is_discarded()) + { + ref_stack.back()->erase(it); + break; + } + } + } + + return true; + } + + bool start_array(std::size_t len) + { + const bool keep = callback(static_cast(ref_stack.size()), parse_event_t::array_start, discarded); + keep_stack.push_back(keep); + + auto val = handle_value(BasicJsonType::value_t::array, true); + ref_stack.push_back(val.second); + + // check array limit + if (ref_stack.back() && JSON_HEDLEY_UNLIKELY(len != static_cast(-1) && len > ref_stack.back()->max_size())) + { + JSON_THROW(out_of_range::create(408, concat("excessive array size: ", std::to_string(len)), ref_stack.back())); + } + + return true; + } + + bool end_array() + { + bool keep = true; + + if (ref_stack.back()) + { + keep = callback(static_cast(ref_stack.size()) - 1, parse_event_t::array_end, *ref_stack.back()); + if (keep) + { + ref_stack.back()->set_parents(); + } + else + { + // discard array + *ref_stack.back() = discarded; + } + } + + JSON_ASSERT(!ref_stack.empty()); + JSON_ASSERT(!keep_stack.empty()); + ref_stack.pop_back(); + keep_stack.pop_back(); + + // remove discarded value + if (!keep && !ref_stack.empty() && ref_stack.back()->is_array()) + { + ref_stack.back()->m_data.m_value.array->pop_back(); + } + + return true; + } + + template + bool parse_error(std::size_t /*unused*/, const std::string& /*unused*/, + const Exception& ex) + { + errored = true; + static_cast(ex); + if (allow_exceptions) + { + JSON_THROW(ex); + } + return false; + } + + constexpr bool is_errored() const + { + return errored; + } + + private: + /*! + @param[in] v value to add to the JSON value we build during parsing + @param[in] skip_callback whether we should skip calling the callback + function; this is required after start_array() and + start_object() SAX events, because otherwise we would call the + callback function with an empty array or object, respectively. + + @invariant If the ref stack is empty, then the passed value will be the new + root. + @invariant If the ref stack contains a value, then it is an array or an + object to which we can add elements + + @return pair of boolean (whether value should be kept) and pointer (to the + passed value in the ref_stack hierarchy; nullptr if not kept) + */ + template + std::pair handle_value(Value&& v, const bool skip_callback = false) + { + JSON_ASSERT(!keep_stack.empty()); + + // do not handle this value if we know it would be added to a discarded + // container + if (!keep_stack.back()) + { + return {false, nullptr}; + } + + // create value + auto value = BasicJsonType(std::forward(v)); + + // check callback + const bool keep = skip_callback || callback(static_cast(ref_stack.size()), parse_event_t::value, value); + + // do not handle this value if we just learnt it shall be discarded + if (!keep) + { + return {false, nullptr}; + } + + if (ref_stack.empty()) + { + root = std::move(value); + return {true, &root}; + } + + // skip this value if we already decided to skip the parent + // (https://github.com/nlohmann/json/issues/971#issuecomment-413678360) + if (!ref_stack.back()) + { + return {false, nullptr}; + } + + // we now only expect arrays and objects + JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object()); + + // array + if (ref_stack.back()->is_array()) + { + ref_stack.back()->m_data.m_value.array->emplace_back(std::move(value)); + return {true, &(ref_stack.back()->m_data.m_value.array->back())}; + } + + // object + JSON_ASSERT(ref_stack.back()->is_object()); + // check if we should store an element for the current key + JSON_ASSERT(!key_keep_stack.empty()); + const bool store_element = key_keep_stack.back(); + key_keep_stack.pop_back(); + + if (!store_element) + { + return {false, nullptr}; + } + + JSON_ASSERT(object_element); + *object_element = std::move(value); + return {true, object_element}; + } + + /// the parsed JSON value + BasicJsonType& root; + /// stack to model hierarchy of values + std::vector ref_stack {}; + /// stack to manage which values to keep + std::vector keep_stack {}; + /// stack to manage which object keys to keep + std::vector key_keep_stack {}; + /// helper to hold the reference for the next object element + BasicJsonType* object_element = nullptr; + /// whether a syntax error occurred + bool errored = false; + /// callback function + const parser_callback_t callback = nullptr; + /// whether to throw exceptions in case of errors + const bool allow_exceptions = true; + /// a discarded value for the callback + BasicJsonType discarded = BasicJsonType::value_t::discarded; +}; + +template +class json_sax_acceptor +{ + public: + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using binary_t = typename BasicJsonType::binary_t; + + bool null() + { + return true; + } + + bool boolean(bool /*unused*/) + { + return true; + } + + bool number_integer(number_integer_t /*unused*/) + { + return true; + } + + bool number_unsigned(number_unsigned_t /*unused*/) + { + return true; + } + + bool number_float(number_float_t /*unused*/, const string_t& /*unused*/) + { + return true; + } + + bool string(string_t& /*unused*/) + { + return true; + } + + bool binary(binary_t& /*unused*/) + { + return true; + } + + bool start_object(std::size_t /*unused*/ = static_cast(-1)) + { + return true; + } + + bool key(string_t& /*unused*/) + { + return true; + } + + bool end_object() + { + return true; + } + + bool start_array(std::size_t /*unused*/ = static_cast(-1)) + { + return true; + } + + bool end_array() + { + return true; + } + + bool parse_error(std::size_t /*unused*/, const std::string& /*unused*/, const detail::exception& /*unused*/) + { + return false; + } +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END diff --git a/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/input/lexer.hpp b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/input/lexer.hpp new file mode 100644 index 0000000..72e9951 --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/input/lexer.hpp @@ -0,0 +1,1632 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + +#pragma once + +#include // array +#include // localeconv +#include // size_t +#include // snprintf +#include // strtof, strtod, strtold, strtoll, strtoull +#include // initializer_list +#include // char_traits, string +#include // move +#include // vector + +#include +#include +#include + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +/////////// +// lexer // +/////////// + +template +class lexer_base +{ + public: + /// token types for the parser + enum class token_type + { + uninitialized, ///< indicating the scanner is uninitialized + literal_true, ///< the `true` literal + literal_false, ///< the `false` literal + literal_null, ///< the `null` literal + value_string, ///< a string -- use get_string() for actual value + value_unsigned, ///< an unsigned integer -- use get_number_unsigned() for actual value + value_integer, ///< a signed integer -- use get_number_integer() for actual value + value_float, ///< an floating point number -- use get_number_float() for actual value + begin_array, ///< the character for array begin `[` + begin_object, ///< the character for object begin `{` + end_array, ///< the character for array end `]` + end_object, ///< the character for object end `}` + name_separator, ///< the name separator `:` + value_separator, ///< the value separator `,` + parse_error, ///< indicating a parse error + end_of_input, ///< indicating the end of the input buffer + literal_or_value ///< a literal or the begin of a value (only for diagnostics) + }; + + /// return name of values of type token_type (only used for errors) + JSON_HEDLEY_RETURNS_NON_NULL + JSON_HEDLEY_CONST + static const char* token_type_name(const token_type t) noexcept + { + switch (t) + { + case token_type::uninitialized: + return ""; + case token_type::literal_true: + return "true literal"; + case token_type::literal_false: + return "false literal"; + case token_type::literal_null: + return "null literal"; + case token_type::value_string: + return "string literal"; + case token_type::value_unsigned: + case token_type::value_integer: + case token_type::value_float: + return "number literal"; + case token_type::begin_array: + return "'['"; + case token_type::begin_object: + return "'{'"; + case token_type::end_array: + return "']'"; + case token_type::end_object: + return "'}'"; + case token_type::name_separator: + return "':'"; + case token_type::value_separator: + return "','"; + case token_type::parse_error: + return ""; + case token_type::end_of_input: + return "end of input"; + case token_type::literal_or_value: + return "'[', '{', or a literal"; + // LCOV_EXCL_START + default: // catch non-enum values + return "unknown token"; + // LCOV_EXCL_STOP + } + } +}; +/*! +@brief lexical analysis + +This class organizes the lexical analysis during JSON deserialization. +*/ +template +class lexer : public lexer_base +{ + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using char_type = typename InputAdapterType::char_type; + using char_int_type = typename std::char_traits::int_type; + + public: + using token_type = typename lexer_base::token_type; + + explicit lexer(InputAdapterType&& adapter, bool ignore_comments_ = false) noexcept + : ia(std::move(adapter)) + , ignore_comments(ignore_comments_) + , decimal_point_char(static_cast(get_decimal_point())) + {} + + // delete because of pointer members + lexer(const lexer&) = delete; + lexer(lexer&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) + lexer& operator=(lexer&) = delete; + lexer& operator=(lexer&&) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) + ~lexer() = default; + + private: + ///////////////////// + // locales + ///////////////////// + + /// return the locale-dependent decimal point + JSON_HEDLEY_PURE + static char get_decimal_point() noexcept + { + const auto* loc = localeconv(); + JSON_ASSERT(loc != nullptr); + return (loc->decimal_point == nullptr) ? '.' : *(loc->decimal_point); + } + + ///////////////////// + // scan functions + ///////////////////// + + /*! + @brief get codepoint from 4 hex characters following `\u` + + For input "\u c1 c2 c3 c4" the codepoint is: + (c1 * 0x1000) + (c2 * 0x0100) + (c3 * 0x0010) + c4 + = (c1 << 12) + (c2 << 8) + (c3 << 4) + (c4 << 0) + + Furthermore, the possible characters '0'..'9', 'A'..'F', and 'a'..'f' + must be converted to the integers 0x0..0x9, 0xA..0xF, 0xA..0xF, resp. The + conversion is done by subtracting the offset (0x30, 0x37, and 0x57) + between the ASCII value of the character and the desired integer value. + + @return codepoint (0x0000..0xFFFF) or -1 in case of an error (e.g. EOF or + non-hex character) + */ + int get_codepoint() + { + // this function only makes sense after reading `\u` + JSON_ASSERT(current == 'u'); + int codepoint = 0; + + const auto factors = { 12u, 8u, 4u, 0u }; + for (const auto factor : factors) + { + get(); + + if (current >= '0' && current <= '9') + { + codepoint += static_cast((static_cast(current) - 0x30u) << factor); + } + else if (current >= 'A' && current <= 'F') + { + codepoint += static_cast((static_cast(current) - 0x37u) << factor); + } + else if (current >= 'a' && current <= 'f') + { + codepoint += static_cast((static_cast(current) - 0x57u) << factor); + } + else + { + return -1; + } + } + + JSON_ASSERT(0x0000 <= codepoint && codepoint <= 0xFFFF); + return codepoint; + } + + /*! + @brief check if the next byte(s) are inside a given range + + Adds the current byte and, for each passed range, reads a new byte and + checks if it is inside the range. If a violation was detected, set up an + error message and return false. Otherwise, return true. + + @param[in] ranges list of integers; interpreted as list of pairs of + inclusive lower and upper bound, respectively + + @pre The passed list @a ranges must have 2, 4, or 6 elements; that is, + 1, 2, or 3 pairs. This precondition is enforced by an assertion. + + @return true if and only if no range violation was detected + */ + bool next_byte_in_range(std::initializer_list ranges) + { + JSON_ASSERT(ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6); + add(current); + + for (auto range = ranges.begin(); range != ranges.end(); ++range) + { + get(); + if (JSON_HEDLEY_LIKELY(*range <= current && current <= *(++range))) + { + add(current); + } + else + { + error_message = "invalid string: ill-formed UTF-8 byte"; + return false; + } + } + + return true; + } + + /*! + @brief scan a string literal + + This function scans a string according to Sect. 7 of RFC 8259. While + scanning, bytes are escaped and copied into buffer token_buffer. Then the + function returns successfully, token_buffer is *not* null-terminated (as it + may contain \0 bytes), and token_buffer.size() is the number of bytes in the + string. + + @return token_type::value_string if string could be successfully scanned, + token_type::parse_error otherwise + + @note In case of errors, variable error_message contains a textual + description. + */ + token_type scan_string() + { + // reset token_buffer (ignore opening quote) + reset(); + + // we entered the function by reading an open quote + JSON_ASSERT(current == '\"'); + + while (true) + { + // get next character + switch (get()) + { + // end of file while parsing string + case std::char_traits::eof(): + { + error_message = "invalid string: missing closing quote"; + return token_type::parse_error; + } + + // closing quote + case '\"': + { + return token_type::value_string; + } + + // escapes + case '\\': + { + switch (get()) + { + // quotation mark + case '\"': + add('\"'); + break; + // reverse solidus + case '\\': + add('\\'); + break; + // solidus + case '/': + add('/'); + break; + // backspace + case 'b': + add('\b'); + break; + // form feed + case 'f': + add('\f'); + break; + // line feed + case 'n': + add('\n'); + break; + // carriage return + case 'r': + add('\r'); + break; + // tab + case 't': + add('\t'); + break; + + // unicode escapes + case 'u': + { + const int codepoint1 = get_codepoint(); + int codepoint = codepoint1; // start with codepoint1 + + if (JSON_HEDLEY_UNLIKELY(codepoint1 == -1)) + { + error_message = "invalid string: '\\u' must be followed by 4 hex digits"; + return token_type::parse_error; + } + + // check if code point is a high surrogate + if (0xD800 <= codepoint1 && codepoint1 <= 0xDBFF) + { + // expect next \uxxxx entry + if (JSON_HEDLEY_LIKELY(get() == '\\' && get() == 'u')) + { + const int codepoint2 = get_codepoint(); + + if (JSON_HEDLEY_UNLIKELY(codepoint2 == -1)) + { + error_message = "invalid string: '\\u' must be followed by 4 hex digits"; + return token_type::parse_error; + } + + // check if codepoint2 is a low surrogate + if (JSON_HEDLEY_LIKELY(0xDC00 <= codepoint2 && codepoint2 <= 0xDFFF)) + { + // overwrite codepoint + codepoint = static_cast( + // high surrogate occupies the most significant 22 bits + (static_cast(codepoint1) << 10u) + // low surrogate occupies the least significant 15 bits + + static_cast(codepoint2) + // there is still the 0xD800, 0xDC00 and 0x10000 noise + // in the result, so we have to subtract with: + // (0xD800 << 10) + DC00 - 0x10000 = 0x35FDC00 + - 0x35FDC00u); + } + else + { + error_message = "invalid string: surrogate U+D800..U+DBFF must be followed by U+DC00..U+DFFF"; + return token_type::parse_error; + } + } + else + { + error_message = "invalid string: surrogate U+D800..U+DBFF must be followed by U+DC00..U+DFFF"; + return token_type::parse_error; + } + } + else + { + if (JSON_HEDLEY_UNLIKELY(0xDC00 <= codepoint1 && codepoint1 <= 0xDFFF)) + { + error_message = "invalid string: surrogate U+DC00..U+DFFF must follow U+D800..U+DBFF"; + return token_type::parse_error; + } + } + + // result of the above calculation yields a proper codepoint + JSON_ASSERT(0x00 <= codepoint && codepoint <= 0x10FFFF); + + // translate codepoint into bytes + if (codepoint < 0x80) + { + // 1-byte characters: 0xxxxxxx (ASCII) + add(static_cast(codepoint)); + } + else if (codepoint <= 0x7FF) + { + // 2-byte characters: 110xxxxx 10xxxxxx + add(static_cast(0xC0u | (static_cast(codepoint) >> 6u))); + add(static_cast(0x80u | (static_cast(codepoint) & 0x3Fu))); + } + else if (codepoint <= 0xFFFF) + { + // 3-byte characters: 1110xxxx 10xxxxxx 10xxxxxx + add(static_cast(0xE0u | (static_cast(codepoint) >> 12u))); + add(static_cast(0x80u | ((static_cast(codepoint) >> 6u) & 0x3Fu))); + add(static_cast(0x80u | (static_cast(codepoint) & 0x3Fu))); + } + else + { + // 4-byte characters: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + add(static_cast(0xF0u | (static_cast(codepoint) >> 18u))); + add(static_cast(0x80u | ((static_cast(codepoint) >> 12u) & 0x3Fu))); + add(static_cast(0x80u | ((static_cast(codepoint) >> 6u) & 0x3Fu))); + add(static_cast(0x80u | (static_cast(codepoint) & 0x3Fu))); + } + + break; + } + + // other characters after escape + default: + error_message = "invalid string: forbidden character after backslash"; + return token_type::parse_error; + } + + break; + } + + // invalid control characters + case 0x00: + { + error_message = "invalid string: control character U+0000 (NUL) must be escaped to \\u0000"; + return token_type::parse_error; + } + + case 0x01: + { + error_message = "invalid string: control character U+0001 (SOH) must be escaped to \\u0001"; + return token_type::parse_error; + } + + case 0x02: + { + error_message = "invalid string: control character U+0002 (STX) must be escaped to \\u0002"; + return token_type::parse_error; + } + + case 0x03: + { + error_message = "invalid string: control character U+0003 (ETX) must be escaped to \\u0003"; + return token_type::parse_error; + } + + case 0x04: + { + error_message = "invalid string: control character U+0004 (EOT) must be escaped to \\u0004"; + return token_type::parse_error; + } + + case 0x05: + { + error_message = "invalid string: control character U+0005 (ENQ) must be escaped to \\u0005"; + return token_type::parse_error; + } + + case 0x06: + { + error_message = "invalid string: control character U+0006 (ACK) must be escaped to \\u0006"; + return token_type::parse_error; + } + + case 0x07: + { + error_message = "invalid string: control character U+0007 (BEL) must be escaped to \\u0007"; + return token_type::parse_error; + } + + case 0x08: + { + error_message = "invalid string: control character U+0008 (BS) must be escaped to \\u0008 or \\b"; + return token_type::parse_error; + } + + case 0x09: + { + error_message = "invalid string: control character U+0009 (HT) must be escaped to \\u0009 or \\t"; + return token_type::parse_error; + } + + case 0x0A: + { + error_message = "invalid string: control character U+000A (LF) must be escaped to \\u000A or \\n"; + return token_type::parse_error; + } + + case 0x0B: + { + error_message = "invalid string: control character U+000B (VT) must be escaped to \\u000B"; + return token_type::parse_error; + } + + case 0x0C: + { + error_message = "invalid string: control character U+000C (FF) must be escaped to \\u000C or \\f"; + return token_type::parse_error; + } + + case 0x0D: + { + error_message = "invalid string: control character U+000D (CR) must be escaped to \\u000D or \\r"; + return token_type::parse_error; + } + + case 0x0E: + { + error_message = "invalid string: control character U+000E (SO) must be escaped to \\u000E"; + return token_type::parse_error; + } + + case 0x0F: + { + error_message = "invalid string: control character U+000F (SI) must be escaped to \\u000F"; + return token_type::parse_error; + } + + case 0x10: + { + error_message = "invalid string: control character U+0010 (DLE) must be escaped to \\u0010"; + return token_type::parse_error; + } + + case 0x11: + { + error_message = "invalid string: control character U+0011 (DC1) must be escaped to \\u0011"; + return token_type::parse_error; + } + + case 0x12: + { + error_message = "invalid string: control character U+0012 (DC2) must be escaped to \\u0012"; + return token_type::parse_error; + } + + case 0x13: + { + error_message = "invalid string: control character U+0013 (DC3) must be escaped to \\u0013"; + return token_type::parse_error; + } + + case 0x14: + { + error_message = "invalid string: control character U+0014 (DC4) must be escaped to \\u0014"; + return token_type::parse_error; + } + + case 0x15: + { + error_message = "invalid string: control character U+0015 (NAK) must be escaped to \\u0015"; + return token_type::parse_error; + } + + case 0x16: + { + error_message = "invalid string: control character U+0016 (SYN) must be escaped to \\u0016"; + return token_type::parse_error; + } + + case 0x17: + { + error_message = "invalid string: control character U+0017 (ETB) must be escaped to \\u0017"; + return token_type::parse_error; + } + + case 0x18: + { + error_message = "invalid string: control character U+0018 (CAN) must be escaped to \\u0018"; + return token_type::parse_error; + } + + case 0x19: + { + error_message = "invalid string: control character U+0019 (EM) must be escaped to \\u0019"; + return token_type::parse_error; + } + + case 0x1A: + { + error_message = "invalid string: control character U+001A (SUB) must be escaped to \\u001A"; + return token_type::parse_error; + } + + case 0x1B: + { + error_message = "invalid string: control character U+001B (ESC) must be escaped to \\u001B"; + return token_type::parse_error; + } + + case 0x1C: + { + error_message = "invalid string: control character U+001C (FS) must be escaped to \\u001C"; + return token_type::parse_error; + } + + case 0x1D: + { + error_message = "invalid string: control character U+001D (GS) must be escaped to \\u001D"; + return token_type::parse_error; + } + + case 0x1E: + { + error_message = "invalid string: control character U+001E (RS) must be escaped to \\u001E"; + return token_type::parse_error; + } + + case 0x1F: + { + error_message = "invalid string: control character U+001F (US) must be escaped to \\u001F"; + return token_type::parse_error; + } + + // U+0020..U+007F (except U+0022 (quote) and U+005C (backspace)) + case 0x20: + case 0x21: + case 0x23: + case 0x24: + case 0x25: + case 0x26: + case 0x27: + case 0x28: + case 0x29: + case 0x2A: + case 0x2B: + case 0x2C: + case 0x2D: + case 0x2E: + case 0x2F: + case 0x30: + case 0x31: + case 0x32: + case 0x33: + case 0x34: + case 0x35: + case 0x36: + case 0x37: + case 0x38: + case 0x39: + case 0x3A: + case 0x3B: + case 0x3C: + case 0x3D: + case 0x3E: + case 0x3F: + case 0x40: + case 0x41: + case 0x42: + case 0x43: + case 0x44: + case 0x45: + case 0x46: + case 0x47: + case 0x48: + case 0x49: + case 0x4A: + case 0x4B: + case 0x4C: + case 0x4D: + case 0x4E: + case 0x4F: + case 0x50: + case 0x51: + case 0x52: + case 0x53: + case 0x54: + case 0x55: + case 0x56: + case 0x57: + case 0x58: + case 0x59: + case 0x5A: + case 0x5B: + case 0x5D: + case 0x5E: + case 0x5F: + case 0x60: + case 0x61: + case 0x62: + case 0x63: + case 0x64: + case 0x65: + case 0x66: + case 0x67: + case 0x68: + case 0x69: + case 0x6A: + case 0x6B: + case 0x6C: + case 0x6D: + case 0x6E: + case 0x6F: + case 0x70: + case 0x71: + case 0x72: + case 0x73: + case 0x74: + case 0x75: + case 0x76: + case 0x77: + case 0x78: + case 0x79: + case 0x7A: + case 0x7B: + case 0x7C: + case 0x7D: + case 0x7E: + case 0x7F: + { + add(current); + break; + } + + // U+0080..U+07FF: bytes C2..DF 80..BF + case 0xC2: + case 0xC3: + case 0xC4: + case 0xC5: + case 0xC6: + case 0xC7: + case 0xC8: + case 0xC9: + case 0xCA: + case 0xCB: + case 0xCC: + case 0xCD: + case 0xCE: + case 0xCF: + case 0xD0: + case 0xD1: + case 0xD2: + case 0xD3: + case 0xD4: + case 0xD5: + case 0xD6: + case 0xD7: + case 0xD8: + case 0xD9: + case 0xDA: + case 0xDB: + case 0xDC: + case 0xDD: + case 0xDE: + case 0xDF: + { + if (JSON_HEDLEY_UNLIKELY(!next_byte_in_range({0x80, 0xBF}))) + { + return token_type::parse_error; + } + break; + } + + // U+0800..U+0FFF: bytes E0 A0..BF 80..BF + case 0xE0: + { + if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0xA0, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+1000..U+CFFF: bytes E1..EC 80..BF 80..BF + // U+E000..U+FFFF: bytes EE..EF 80..BF 80..BF + case 0xE1: + case 0xE2: + case 0xE3: + case 0xE4: + case 0xE5: + case 0xE6: + case 0xE7: + case 0xE8: + case 0xE9: + case 0xEA: + case 0xEB: + case 0xEC: + case 0xEE: + case 0xEF: + { + if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+D000..U+D7FF: bytes ED 80..9F 80..BF + case 0xED: + { + if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80, 0x9F, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+10000..U+3FFFF F0 90..BF 80..BF 80..BF + case 0xF0: + { + if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x90, 0xBF, 0x80, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+40000..U+FFFFF F1..F3 80..BF 80..BF 80..BF + case 0xF1: + case 0xF2: + case 0xF3: + { + if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80, 0xBF, 0x80, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+100000..U+10FFFF F4 80..8F 80..BF 80..BF + case 0xF4: + { + if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80, 0x8F, 0x80, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // remaining bytes (80..C1 and F5..FF) are ill-formed + default: + { + error_message = "invalid string: ill-formed UTF-8 byte"; + return token_type::parse_error; + } + } + } + } + + /*! + * @brief scan a comment + * @return whether comment could be scanned successfully + */ + bool scan_comment() + { + switch (get()) + { + // single-line comments skip input until a newline or EOF is read + case '/': + { + while (true) + { + switch (get()) + { + case '\n': + case '\r': + case std::char_traits::eof(): + case '\0': + return true; + + default: + break; + } + } + } + + // multi-line comments skip input until */ is read + case '*': + { + while (true) + { + switch (get()) + { + case std::char_traits::eof(): + case '\0': + { + error_message = "invalid comment; missing closing '*/'"; + return false; + } + + case '*': + { + switch (get()) + { + case '/': + return true; + + default: + { + unget(); + continue; + } + } + } + + default: + continue; + } + } + } + + // unexpected character after reading '/' + default: + { + error_message = "invalid comment; expecting '/' or '*' after '/'"; + return false; + } + } + } + + JSON_HEDLEY_NON_NULL(2) + static void strtof(float& f, const char* str, char** endptr) noexcept + { + f = std::strtof(str, endptr); + } + + JSON_HEDLEY_NON_NULL(2) + static void strtof(double& f, const char* str, char** endptr) noexcept + { + f = std::strtod(str, endptr); + } + + JSON_HEDLEY_NON_NULL(2) + static void strtof(long double& f, const char* str, char** endptr) noexcept + { + f = std::strtold(str, endptr); + } + + /*! + @brief scan a number literal + + This function scans a string according to Sect. 6 of RFC 8259. + + The function is realized with a deterministic finite state machine derived + from the grammar described in RFC 8259. Starting in state "init", the + input is read and used to determined the next state. Only state "done" + accepts the number. State "error" is a trap state to model errors. In the + table below, "anything" means any character but the ones listed before. + + state | 0 | 1-9 | e E | + | - | . | anything + ---------|----------|----------|----------|---------|---------|----------|----------- + init | zero | any1 | [error] | [error] | minus | [error] | [error] + minus | zero | any1 | [error] | [error] | [error] | [error] | [error] + zero | done | done | exponent | done | done | decimal1 | done + any1 | any1 | any1 | exponent | done | done | decimal1 | done + decimal1 | decimal2 | decimal2 | [error] | [error] | [error] | [error] | [error] + decimal2 | decimal2 | decimal2 | exponent | done | done | done | done + exponent | any2 | any2 | [error] | sign | sign | [error] | [error] + sign | any2 | any2 | [error] | [error] | [error] | [error] | [error] + any2 | any2 | any2 | done | done | done | done | done + + The state machine is realized with one label per state (prefixed with + "scan_number_") and `goto` statements between them. The state machine + contains cycles, but any cycle can be left when EOF is read. Therefore, + the function is guaranteed to terminate. + + During scanning, the read bytes are stored in token_buffer. This string is + then converted to a signed integer, an unsigned integer, or a + floating-point number. + + @return token_type::value_unsigned, token_type::value_integer, or + token_type::value_float if number could be successfully scanned, + token_type::parse_error otherwise + + @note The scanner is independent of the current locale. Internally, the + locale's decimal point is used instead of `.` to work with the + locale-dependent converters. + */ + token_type scan_number() // lgtm [cpp/use-of-goto] + { + // reset token_buffer to store the number's bytes + reset(); + + // the type of the parsed number; initially set to unsigned; will be + // changed if minus sign, decimal point or exponent is read + token_type number_type = token_type::value_unsigned; + + // state (init): we just found out we need to scan a number + switch (current) + { + case '-': + { + add(current); + goto scan_number_minus; + } + + case '0': + { + add(current); + goto scan_number_zero; + } + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any1; + } + + // all other characters are rejected outside scan_number() + default: // LCOV_EXCL_LINE + JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE + } + +scan_number_minus: + // state: we just parsed a leading minus sign + number_type = token_type::value_integer; + switch (get()) + { + case '0': + { + add(current); + goto scan_number_zero; + } + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any1; + } + + default: + { + error_message = "invalid number; expected digit after '-'"; + return token_type::parse_error; + } + } + +scan_number_zero: + // state: we just parse a zero (maybe with a leading minus sign) + switch (get()) + { + case '.': + { + add(decimal_point_char); + goto scan_number_decimal1; + } + + case 'e': + case 'E': + { + add(current); + goto scan_number_exponent; + } + + default: + goto scan_number_done; + } + +scan_number_any1: + // state: we just parsed a number 0-9 (maybe with a leading minus sign) + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any1; + } + + case '.': + { + add(decimal_point_char); + goto scan_number_decimal1; + } + + case 'e': + case 'E': + { + add(current); + goto scan_number_exponent; + } + + default: + goto scan_number_done; + } + +scan_number_decimal1: + // state: we just parsed a decimal point + number_type = token_type::value_float; + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_decimal2; + } + + default: + { + error_message = "invalid number; expected digit after '.'"; + return token_type::parse_error; + } + } + +scan_number_decimal2: + // we just parsed at least one number after a decimal point + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_decimal2; + } + + case 'e': + case 'E': + { + add(current); + goto scan_number_exponent; + } + + default: + goto scan_number_done; + } + +scan_number_exponent: + // we just parsed an exponent + number_type = token_type::value_float; + switch (get()) + { + case '+': + case '-': + { + add(current); + goto scan_number_sign; + } + + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any2; + } + + default: + { + error_message = + "invalid number; expected '+', '-', or digit after exponent"; + return token_type::parse_error; + } + } + +scan_number_sign: + // we just parsed an exponent sign + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any2; + } + + default: + { + error_message = "invalid number; expected digit after exponent sign"; + return token_type::parse_error; + } + } + +scan_number_any2: + // we just parsed a number after the exponent or exponent sign + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any2; + } + + default: + goto scan_number_done; + } + +scan_number_done: + // unget the character after the number (we only read it to know that + // we are done scanning a number) + unget(); + + char* endptr = nullptr; // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg) + errno = 0; + + // try to parse integers first and fall back to floats + if (number_type == token_type::value_unsigned) + { + const auto x = std::strtoull(token_buffer.data(), &endptr, 10); + + // we checked the number format before + JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size()); + + if (errno == 0) + { + value_unsigned = static_cast(x); + if (value_unsigned == x) + { + return token_type::value_unsigned; + } + } + } + else if (number_type == token_type::value_integer) + { + const auto x = std::strtoll(token_buffer.data(), &endptr, 10); + + // we checked the number format before + JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size()); + + if (errno == 0) + { + value_integer = static_cast(x); + if (value_integer == x) + { + return token_type::value_integer; + } + } + } + + // this code is reached if we parse a floating-point number or if an + // integer conversion above failed + strtof(value_float, token_buffer.data(), &endptr); + + // we checked the number format before + JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size()); + + return token_type::value_float; + } + + /*! + @param[in] literal_text the literal text to expect + @param[in] length the length of the passed literal text + @param[in] return_type the token type to return on success + */ + JSON_HEDLEY_NON_NULL(2) + token_type scan_literal(const char_type* literal_text, const std::size_t length, + token_type return_type) + { + JSON_ASSERT(std::char_traits::to_char_type(current) == literal_text[0]); + for (std::size_t i = 1; i < length; ++i) + { + if (JSON_HEDLEY_UNLIKELY(std::char_traits::to_char_type(get()) != literal_text[i])) + { + error_message = "invalid literal"; + return token_type::parse_error; + } + } + return return_type; + } + + ///////////////////// + // input management + ///////////////////// + + /// reset token_buffer; current character is beginning of token + void reset() noexcept + { + token_buffer.clear(); + token_string.clear(); + token_string.push_back(std::char_traits::to_char_type(current)); + } + + /* + @brief get next character from the input + + This function provides the interface to the used input adapter. It does + not throw in case the input reached EOF, but returns a + `std::char_traits::eof()` in that case. Stores the scanned characters + for use in error messages. + + @return character read from the input + */ + char_int_type get() + { + ++position.chars_read_total; + ++position.chars_read_current_line; + + if (next_unget) + { + // just reset the next_unget variable and work with current + next_unget = false; + } + else + { + current = ia.get_character(); + } + + if (JSON_HEDLEY_LIKELY(current != std::char_traits::eof())) + { + token_string.push_back(std::char_traits::to_char_type(current)); + } + + if (current == '\n') + { + ++position.lines_read; + position.chars_read_current_line = 0; + } + + return current; + } + + /*! + @brief unget current character (read it again on next get) + + We implement unget by setting variable next_unget to true. The input is not + changed - we just simulate ungetting by modifying chars_read_total, + chars_read_current_line, and token_string. The next call to get() will + behave as if the unget character is read again. + */ + void unget() + { + next_unget = true; + + --position.chars_read_total; + + // in case we "unget" a newline, we have to also decrement the lines_read + if (position.chars_read_current_line == 0) + { + if (position.lines_read > 0) + { + --position.lines_read; + } + } + else + { + --position.chars_read_current_line; + } + + if (JSON_HEDLEY_LIKELY(current != std::char_traits::eof())) + { + JSON_ASSERT(!token_string.empty()); + token_string.pop_back(); + } + } + + /// add a character to token_buffer + void add(char_int_type c) + { + token_buffer.push_back(static_cast(c)); + } + + public: + ///////////////////// + // value getters + ///////////////////// + + /// return integer value + constexpr number_integer_t get_number_integer() const noexcept + { + return value_integer; + } + + /// return unsigned integer value + constexpr number_unsigned_t get_number_unsigned() const noexcept + { + return value_unsigned; + } + + /// return floating-point value + constexpr number_float_t get_number_float() const noexcept + { + return value_float; + } + + /// return current string value (implicitly resets the token; useful only once) + string_t& get_string() + { + return token_buffer; + } + + ///////////////////// + // diagnostics + ///////////////////// + + /// return position of last read token + constexpr position_t get_position() const noexcept + { + return position; + } + + /// return the last read token (for errors only). Will never contain EOF + /// (an arbitrary value that is not a valid char value, often -1), because + /// 255 may legitimately occur. May contain NUL, which should be escaped. + std::string get_token_string() const + { + // escape control characters + std::string result; + for (const auto c : token_string) + { + if (static_cast(c) <= '\x1F') + { + // escape control characters + std::array cs{{}}; + static_cast((std::snprintf)(cs.data(), cs.size(), "", static_cast(c))); // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg) + result += cs.data(); + } + else + { + // add character as is + result.push_back(static_cast(c)); + } + } + + return result; + } + + /// return syntax error message + JSON_HEDLEY_RETURNS_NON_NULL + constexpr const char* get_error_message() const noexcept + { + return error_message; + } + + ///////////////////// + // actual scanner + ///////////////////// + + /*! + @brief skip the UTF-8 byte order mark + @return true iff there is no BOM or the correct BOM has been skipped + */ + bool skip_bom() + { + if (get() == 0xEF) + { + // check if we completely parse the BOM + return get() == 0xBB && get() == 0xBF; + } + + // the first character is not the beginning of the BOM; unget it to + // process is later + unget(); + return true; + } + + void skip_whitespace() + { + do + { + get(); + } + while (current == ' ' || current == '\t' || current == '\n' || current == '\r'); + } + + token_type scan() + { + // initially, skip the BOM + if (position.chars_read_total == 0 && !skip_bom()) + { + error_message = "invalid BOM; must be 0xEF 0xBB 0xBF if given"; + return token_type::parse_error; + } + + // read next character and ignore whitespace + skip_whitespace(); + + // ignore comments + while (ignore_comments && current == '/') + { + if (!scan_comment()) + { + return token_type::parse_error; + } + + // skip following whitespace + skip_whitespace(); + } + + switch (current) + { + // structural characters + case '[': + return token_type::begin_array; + case ']': + return token_type::end_array; + case '{': + return token_type::begin_object; + case '}': + return token_type::end_object; + case ':': + return token_type::name_separator; + case ',': + return token_type::value_separator; + + // literals + case 't': + { + std::array true_literal = {{static_cast('t'), static_cast('r'), static_cast('u'), static_cast('e')}}; + return scan_literal(true_literal.data(), true_literal.size(), token_type::literal_true); + } + case 'f': + { + std::array false_literal = {{static_cast('f'), static_cast('a'), static_cast('l'), static_cast('s'), static_cast('e')}}; + return scan_literal(false_literal.data(), false_literal.size(), token_type::literal_false); + } + case 'n': + { + std::array null_literal = {{static_cast('n'), static_cast('u'), static_cast('l'), static_cast('l')}}; + return scan_literal(null_literal.data(), null_literal.size(), token_type::literal_null); + } + + // string + case '\"': + return scan_string(); + + // number + case '-': + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + return scan_number(); + + // end of input (the null byte is needed when parsing from + // string literals) + case '\0': + case std::char_traits::eof(): + return token_type::end_of_input; + + // error + default: + error_message = "invalid literal"; + return token_type::parse_error; + } + } + + private: + /// input adapter + InputAdapterType ia; + + /// whether comments should be ignored (true) or signaled as errors (false) + const bool ignore_comments = false; + + /// the current character + char_int_type current = std::char_traits::eof(); + + /// whether the next get() call should just return current + bool next_unget = false; + + /// the start position of the current token + position_t position {}; + + /// raw input token string (for error messages) + std::vector token_string {}; + + /// buffer for variable-length tokens (numbers, strings) + string_t token_buffer {}; + + /// a description of occurred lexer errors + const char* error_message = ""; + + // number values + number_integer_t value_integer = 0; + number_unsigned_t value_unsigned = 0; + number_float_t value_float = 0; + + /// the decimal point + const char_int_type decimal_point_char = '.'; +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END diff --git a/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/input/parser.hpp b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/input/parser.hpp new file mode 100644 index 0000000..8acbd4f --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/input/parser.hpp @@ -0,0 +1,507 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + +#pragma once + +#include // isfinite +#include // uint8_t +#include // function +#include // string +#include // move +#include // vector + +#include +#include +#include +#include +#include +#include +#include +#include + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ +//////////// +// parser // +//////////// + +enum class parse_event_t : std::uint8_t +{ + /// the parser read `{` and started to process a JSON object + object_start, + /// the parser read `}` and finished processing a JSON object + object_end, + /// the parser read `[` and started to process a JSON array + array_start, + /// the parser read `]` and finished processing a JSON array + array_end, + /// the parser read a key of a value in an object + key, + /// the parser finished reading a JSON value + value +}; + +template +using parser_callback_t = + std::function; + +/*! +@brief syntax analysis + +This class implements a recursive descent parser. +*/ +template +class parser +{ + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using lexer_t = lexer; + using token_type = typename lexer_t::token_type; + + public: + /// a parser reading from an input adapter + explicit parser(InputAdapterType&& adapter, + const parser_callback_t cb = nullptr, + const bool allow_exceptions_ = true, + const bool skip_comments = false) + : callback(cb) + , m_lexer(std::move(adapter), skip_comments) + , allow_exceptions(allow_exceptions_) + { + // read first token + get_token(); + } + + /*! + @brief public parser interface + + @param[in] strict whether to expect the last token to be EOF + @param[in,out] result parsed JSON value + + @throw parse_error.101 in case of an unexpected token + @throw parse_error.102 if to_unicode fails or surrogate error + @throw parse_error.103 if to_unicode fails + */ + void parse(const bool strict, BasicJsonType& result) + { + if (callback) + { + json_sax_dom_callback_parser sdp(result, callback, allow_exceptions); + sax_parse_internal(&sdp); + + // in strict mode, input must be completely read + if (strict && (get_token() != token_type::end_of_input)) + { + sdp.parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), + exception_message(token_type::end_of_input, "value"), nullptr)); + } + + // in case of an error, return discarded value + if (sdp.is_errored()) + { + result = value_t::discarded; + return; + } + + // set top-level value to null if it was discarded by the callback + // function + if (result.is_discarded()) + { + result = nullptr; + } + } + else + { + json_sax_dom_parser sdp(result, allow_exceptions); + sax_parse_internal(&sdp); + + // in strict mode, input must be completely read + if (strict && (get_token() != token_type::end_of_input)) + { + sdp.parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), exception_message(token_type::end_of_input, "value"), nullptr)); + } + + // in case of an error, return discarded value + if (sdp.is_errored()) + { + result = value_t::discarded; + return; + } + } + + result.assert_invariant(); + } + + /*! + @brief public accept interface + + @param[in] strict whether to expect the last token to be EOF + @return whether the input is a proper JSON text + */ + bool accept(const bool strict = true) + { + json_sax_acceptor sax_acceptor; + return sax_parse(&sax_acceptor, strict); + } + + template + JSON_HEDLEY_NON_NULL(2) + bool sax_parse(SAX* sax, const bool strict = true) + { + (void)detail::is_sax_static_asserts {}; + const bool result = sax_parse_internal(sax); + + // strict mode: next byte must be EOF + if (result && strict && (get_token() != token_type::end_of_input)) + { + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), exception_message(token_type::end_of_input, "value"), nullptr)); + } + + return result; + } + + private: + template + JSON_HEDLEY_NON_NULL(2) + bool sax_parse_internal(SAX* sax) + { + // stack to remember the hierarchy of structured values we are parsing + // true = array; false = object + std::vector states; + // value to avoid a goto (see comment where set to true) + bool skip_to_state_evaluation = false; + + while (true) + { + if (!skip_to_state_evaluation) + { + // invariant: get_token() was called before each iteration + switch (last_token) + { + case token_type::begin_object: + { + if (JSON_HEDLEY_UNLIKELY(!sax->start_object(static_cast(-1)))) + { + return false; + } + + // closing } -> we are done + if (get_token() == token_type::end_object) + { + if (JSON_HEDLEY_UNLIKELY(!sax->end_object())) + { + return false; + } + break; + } + + // parse key + if (JSON_HEDLEY_UNLIKELY(last_token != token_type::value_string)) + { + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), exception_message(token_type::value_string, "object key"), nullptr)); + } + if (JSON_HEDLEY_UNLIKELY(!sax->key(m_lexer.get_string()))) + { + return false; + } + + // parse separator (:) + if (JSON_HEDLEY_UNLIKELY(get_token() != token_type::name_separator)) + { + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), exception_message(token_type::name_separator, "object separator"), nullptr)); + } + + // remember we are now inside an object + states.push_back(false); + + // parse values + get_token(); + continue; + } + + case token_type::begin_array: + { + if (JSON_HEDLEY_UNLIKELY(!sax->start_array(static_cast(-1)))) + { + return false; + } + + // closing ] -> we are done + if (get_token() == token_type::end_array) + { + if (JSON_HEDLEY_UNLIKELY(!sax->end_array())) + { + return false; + } + break; + } + + // remember we are now inside an array + states.push_back(true); + + // parse values (no need to call get_token) + continue; + } + + case token_type::value_float: + { + const auto res = m_lexer.get_number_float(); + + if (JSON_HEDLEY_UNLIKELY(!std::isfinite(res))) + { + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + out_of_range::create(406, concat("number overflow parsing '", m_lexer.get_token_string(), '\''), nullptr)); + } + + if (JSON_HEDLEY_UNLIKELY(!sax->number_float(res, m_lexer.get_string()))) + { + return false; + } + + break; + } + + case token_type::literal_false: + { + if (JSON_HEDLEY_UNLIKELY(!sax->boolean(false))) + { + return false; + } + break; + } + + case token_type::literal_null: + { + if (JSON_HEDLEY_UNLIKELY(!sax->null())) + { + return false; + } + break; + } + + case token_type::literal_true: + { + if (JSON_HEDLEY_UNLIKELY(!sax->boolean(true))) + { + return false; + } + break; + } + + case token_type::value_integer: + { + if (JSON_HEDLEY_UNLIKELY(!sax->number_integer(m_lexer.get_number_integer()))) + { + return false; + } + break; + } + + case token_type::value_string: + { + if (JSON_HEDLEY_UNLIKELY(!sax->string(m_lexer.get_string()))) + { + return false; + } + break; + } + + case token_type::value_unsigned: + { + if (JSON_HEDLEY_UNLIKELY(!sax->number_unsigned(m_lexer.get_number_unsigned()))) + { + return false; + } + break; + } + + case token_type::parse_error: + { + // using "uninitialized" to avoid "expected" message + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), exception_message(token_type::uninitialized, "value"), nullptr)); + } + + case token_type::uninitialized: + case token_type::end_array: + case token_type::end_object: + case token_type::name_separator: + case token_type::value_separator: + case token_type::end_of_input: + case token_type::literal_or_value: + default: // the last token was unexpected + { + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), exception_message(token_type::literal_or_value, "value"), nullptr)); + } + } + } + else + { + skip_to_state_evaluation = false; + } + + // we reached this line after we successfully parsed a value + if (states.empty()) + { + // empty stack: we reached the end of the hierarchy: done + return true; + } + + if (states.back()) // array + { + // comma -> next value + if (get_token() == token_type::value_separator) + { + // parse a new value + get_token(); + continue; + } + + // closing ] + if (JSON_HEDLEY_LIKELY(last_token == token_type::end_array)) + { + if (JSON_HEDLEY_UNLIKELY(!sax->end_array())) + { + return false; + } + + // We are done with this array. Before we can parse a + // new value, we need to evaluate the new state first. + // By setting skip_to_state_evaluation to false, we + // are effectively jumping to the beginning of this if. + JSON_ASSERT(!states.empty()); + states.pop_back(); + skip_to_state_evaluation = true; + continue; + } + + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), exception_message(token_type::end_array, "array"), nullptr)); + } + + // states.back() is false -> object + + // comma -> next value + if (get_token() == token_type::value_separator) + { + // parse key + if (JSON_HEDLEY_UNLIKELY(get_token() != token_type::value_string)) + { + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), exception_message(token_type::value_string, "object key"), nullptr)); + } + + if (JSON_HEDLEY_UNLIKELY(!sax->key(m_lexer.get_string()))) + { + return false; + } + + // parse separator (:) + if (JSON_HEDLEY_UNLIKELY(get_token() != token_type::name_separator)) + { + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), exception_message(token_type::name_separator, "object separator"), nullptr)); + } + + // parse values + get_token(); + continue; + } + + // closing } + if (JSON_HEDLEY_LIKELY(last_token == token_type::end_object)) + { + if (JSON_HEDLEY_UNLIKELY(!sax->end_object())) + { + return false; + } + + // We are done with this object. Before we can parse a + // new value, we need to evaluate the new state first. + // By setting skip_to_state_evaluation to false, we + // are effectively jumping to the beginning of this if. + JSON_ASSERT(!states.empty()); + states.pop_back(); + skip_to_state_evaluation = true; + continue; + } + + return sax->parse_error(m_lexer.get_position(), + m_lexer.get_token_string(), + parse_error::create(101, m_lexer.get_position(), exception_message(token_type::end_object, "object"), nullptr)); + } + } + + /// get next token from lexer + token_type get_token() + { + return last_token = m_lexer.scan(); + } + + std::string exception_message(const token_type expected, const std::string& context) + { + std::string error_msg = "syntax error "; + + if (!context.empty()) + { + error_msg += concat("while parsing ", context, ' '); + } + + error_msg += "- "; + + if (last_token == token_type::parse_error) + { + error_msg += concat(m_lexer.get_error_message(), "; last read: '", + m_lexer.get_token_string(), '\''); + } + else + { + error_msg += concat("unexpected ", lexer_t::token_type_name(last_token)); + } + + if (expected != token_type::uninitialized) + { + error_msg += concat("; expected ", lexer_t::token_type_name(expected)); + } + + return error_msg; + } + + private: + /// callback function + const parser_callback_t callback = nullptr; + /// the type of the last read token + token_type last_token = token_type::uninitialized; + /// the lexer + lexer_t m_lexer; + /// whether to throw exceptions in case of errors + const bool allow_exceptions = true; +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END diff --git a/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/input/position_t.hpp b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/input/position_t.hpp new file mode 100644 index 0000000..396db0e --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/input/position_t.hpp @@ -0,0 +1,37 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + +#pragma once + +#include // size_t + +#include + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +/// struct to capture the start position of the current token +struct position_t +{ + /// the total number of characters read + std::size_t chars_read_total = 0; + /// the number of characters read in the current line + std::size_t chars_read_current_line = 0; + /// the number of lines read + std::size_t lines_read = 0; + + /// conversion to size_t to preserve SAX interface + constexpr operator size_t() const + { + return chars_read_total; + } +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END diff --git a/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/iterators/internal_iterator.hpp b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/iterators/internal_iterator.hpp new file mode 100644 index 0000000..13a212c --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/iterators/internal_iterator.hpp @@ -0,0 +1,35 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + +#pragma once + +#include +#include + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +/*! +@brief an iterator value + +@note This structure could easily be a union, but MSVC currently does not allow +unions members with complex constructors, see https://github.com/nlohmann/json/pull/105. +*/ +template struct internal_iterator +{ + /// iterator for JSON objects + typename BasicJsonType::object_t::iterator object_iterator {}; + /// iterator for JSON arrays + typename BasicJsonType::array_t::iterator array_iterator {}; + /// generic iterator for all other types + primitive_iterator_t primitive_iterator {}; +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END diff --git a/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/iterators/iter_impl.hpp b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/iterators/iter_impl.hpp new file mode 100644 index 0000000..028de6e --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/iterators/iter_impl.hpp @@ -0,0 +1,751 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + +#pragma once + +#include // iterator, random_access_iterator_tag, bidirectional_iterator_tag, advance, next +#include // conditional, is_const, remove_const + +#include +#include +#include +#include +#include +#include +#include + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +// forward declare, to be able to friend it later on +template class iteration_proxy; +template class iteration_proxy_value; + +/*! +@brief a template for a bidirectional iterator for the @ref basic_json class +This class implements a both iterators (iterator and const_iterator) for the +@ref basic_json class. +@note An iterator is called *initialized* when a pointer to a JSON value has + been set (e.g., by a constructor or a copy assignment). If the iterator is + default-constructed, it is *uninitialized* and most methods are undefined. + **The library uses assertions to detect calls on uninitialized iterators.** +@requirement The class satisfies the following concept requirements: +- +[BidirectionalIterator](https://en.cppreference.com/w/cpp/named_req/BidirectionalIterator): + The iterator that can be moved can be moved in both directions (i.e. + incremented and decremented). +@since version 1.0.0, simplified in version 2.0.9, change to bidirectional + iterators in version 3.0.0 (see https://github.com/nlohmann/json/issues/593) +*/ +template +class iter_impl // NOLINT(cppcoreguidelines-special-member-functions,hicpp-special-member-functions) +{ + /// the iterator with BasicJsonType of different const-ness + using other_iter_impl = iter_impl::value, typename std::remove_const::type, const BasicJsonType>::type>; + /// allow basic_json to access private members + friend other_iter_impl; + friend BasicJsonType; + friend iteration_proxy; + friend iteration_proxy_value; + + using object_t = typename BasicJsonType::object_t; + using array_t = typename BasicJsonType::array_t; + // make sure BasicJsonType is basic_json or const basic_json + static_assert(is_basic_json::type>::value, + "iter_impl only accepts (const) basic_json"); + // superficial check for the LegacyBidirectionalIterator named requirement + static_assert(std::is_base_of::value + && std::is_base_of::iterator_category>::value, + "basic_json iterator assumes array and object type iterators satisfy the LegacyBidirectionalIterator named requirement."); + + public: + /// The std::iterator class template (used as a base class to provide typedefs) is deprecated in C++17. + /// The C++ Standard has never required user-defined iterators to derive from std::iterator. + /// A user-defined iterator should provide publicly accessible typedefs named + /// iterator_category, value_type, difference_type, pointer, and reference. + /// Note that value_type is required to be non-const, even for constant iterators. + using iterator_category = std::bidirectional_iterator_tag; + + /// the type of the values when the iterator is dereferenced + using value_type = typename BasicJsonType::value_type; + /// a type to represent differences between iterators + using difference_type = typename BasicJsonType::difference_type; + /// defines a pointer to the type iterated over (value_type) + using pointer = typename std::conditional::value, + typename BasicJsonType::const_pointer, + typename BasicJsonType::pointer>::type; + /// defines a reference to the type iterated over (value_type) + using reference = + typename std::conditional::value, + typename BasicJsonType::const_reference, + typename BasicJsonType::reference>::type; + + iter_impl() = default; + ~iter_impl() = default; + iter_impl(iter_impl&&) noexcept = default; + iter_impl& operator=(iter_impl&&) noexcept = default; + + /*! + @brief constructor for a given JSON instance + @param[in] object pointer to a JSON object for this iterator + @pre object != nullptr + @post The iterator is initialized; i.e. `m_object != nullptr`. + */ + explicit iter_impl(pointer object) noexcept : m_object(object) + { + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_data.m_type) + { + case value_t::object: + { + m_it.object_iterator = typename object_t::iterator(); + break; + } + + case value_t::array: + { + m_it.array_iterator = typename array_t::iterator(); + break; + } + + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + m_it.primitive_iterator = primitive_iterator_t(); + break; + } + } + } + + /*! + @note The conventional copy constructor and copy assignment are implicitly + defined. Combined with the following converting constructor and + assignment, they support: (1) copy from iterator to iterator, (2) + copy from const iterator to const iterator, and (3) conversion from + iterator to const iterator. However conversion from const iterator + to iterator is not defined. + */ + + /*! + @brief const copy constructor + @param[in] other const iterator to copy from + @note This copy constructor had to be defined explicitly to circumvent a bug + occurring on msvc v19.0 compiler (VS 2015) debug build. For more + information refer to: https://github.com/nlohmann/json/issues/1608 + */ + iter_impl(const iter_impl& other) noexcept + : m_object(other.m_object), m_it(other.m_it) + {} + + /*! + @brief converting assignment + @param[in] other const iterator to copy from + @return const/non-const iterator + @note It is not checked whether @a other is initialized. + */ + iter_impl& operator=(const iter_impl& other) noexcept + { + if (&other != this) + { + m_object = other.m_object; + m_it = other.m_it; + } + return *this; + } + + /*! + @brief converting constructor + @param[in] other non-const iterator to copy from + @note It is not checked whether @a other is initialized. + */ + iter_impl(const iter_impl::type>& other) noexcept + : m_object(other.m_object), m_it(other.m_it) + {} + + /*! + @brief converting assignment + @param[in] other non-const iterator to copy from + @return const/non-const iterator + @note It is not checked whether @a other is initialized. + */ + iter_impl& operator=(const iter_impl::type>& other) noexcept // NOLINT(cert-oop54-cpp) + { + m_object = other.m_object; + m_it = other.m_it; + return *this; + } + + JSON_PRIVATE_UNLESS_TESTED: + /*! + @brief set the iterator to the first value + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + void set_begin() noexcept + { + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_data.m_type) + { + case value_t::object: + { + m_it.object_iterator = m_object->m_data.m_value.object->begin(); + break; + } + + case value_t::array: + { + m_it.array_iterator = m_object->m_data.m_value.array->begin(); + break; + } + + case value_t::null: + { + // set to end so begin()==end() is true: null is empty + m_it.primitive_iterator.set_end(); + break; + } + + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + m_it.primitive_iterator.set_begin(); + break; + } + } + } + + /*! + @brief set the iterator past the last value + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + void set_end() noexcept + { + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_data.m_type) + { + case value_t::object: + { + m_it.object_iterator = m_object->m_data.m_value.object->end(); + break; + } + + case value_t::array: + { + m_it.array_iterator = m_object->m_data.m_value.array->end(); + break; + } + + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + m_it.primitive_iterator.set_end(); + break; + } + } + } + + public: + /*! + @brief return a reference to the value pointed to by the iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + reference operator*() const + { + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_data.m_type) + { + case value_t::object: + { + JSON_ASSERT(m_it.object_iterator != m_object->m_data.m_value.object->end()); + return m_it.object_iterator->second; + } + + case value_t::array: + { + JSON_ASSERT(m_it.array_iterator != m_object->m_data.m_value.array->end()); + return *m_it.array_iterator; + } + + case value_t::null: + JSON_THROW(invalid_iterator::create(214, "cannot get value", m_object)); + + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + if (JSON_HEDLEY_LIKELY(m_it.primitive_iterator.is_begin())) + { + return *m_object; + } + + JSON_THROW(invalid_iterator::create(214, "cannot get value", m_object)); + } + } + } + + /*! + @brief dereference the iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + pointer operator->() const + { + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_data.m_type) + { + case value_t::object: + { + JSON_ASSERT(m_it.object_iterator != m_object->m_data.m_value.object->end()); + return &(m_it.object_iterator->second); + } + + case value_t::array: + { + JSON_ASSERT(m_it.array_iterator != m_object->m_data.m_value.array->end()); + return &*m_it.array_iterator; + } + + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + if (JSON_HEDLEY_LIKELY(m_it.primitive_iterator.is_begin())) + { + return m_object; + } + + JSON_THROW(invalid_iterator::create(214, "cannot get value", m_object)); + } + } + } + + /*! + @brief post-increment (it++) + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl operator++(int)& // NOLINT(cert-dcl21-cpp) + { + auto result = *this; + ++(*this); + return result; + } + + /*! + @brief pre-increment (++it) + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl& operator++() + { + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_data.m_type) + { + case value_t::object: + { + std::advance(m_it.object_iterator, 1); + break; + } + + case value_t::array: + { + std::advance(m_it.array_iterator, 1); + break; + } + + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + ++m_it.primitive_iterator; + break; + } + } + + return *this; + } + + /*! + @brief post-decrement (it--) + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl operator--(int)& // NOLINT(cert-dcl21-cpp) + { + auto result = *this; + --(*this); + return result; + } + + /*! + @brief pre-decrement (--it) + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl& operator--() + { + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_data.m_type) + { + case value_t::object: + { + std::advance(m_it.object_iterator, -1); + break; + } + + case value_t::array: + { + std::advance(m_it.array_iterator, -1); + break; + } + + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + --m_it.primitive_iterator; + break; + } + } + + return *this; + } + + /*! + @brief comparison: equal + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + template < typename IterImpl, detail::enable_if_t < (std::is_same::value || std::is_same::value), std::nullptr_t > = nullptr > + bool operator==(const IterImpl& other) const + { + // if objects are not the same, the comparison is undefined + if (JSON_HEDLEY_UNLIKELY(m_object != other.m_object)) + { + JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers", m_object)); + } + + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_data.m_type) + { + case value_t::object: + return (m_it.object_iterator == other.m_it.object_iterator); + + case value_t::array: + return (m_it.array_iterator == other.m_it.array_iterator); + + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + return (m_it.primitive_iterator == other.m_it.primitive_iterator); + } + } + + /*! + @brief comparison: not equal + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + template < typename IterImpl, detail::enable_if_t < (std::is_same::value || std::is_same::value), std::nullptr_t > = nullptr > + bool operator!=(const IterImpl& other) const + { + return !operator==(other); + } + + /*! + @brief comparison: smaller + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator<(const iter_impl& other) const + { + // if objects are not the same, the comparison is undefined + if (JSON_HEDLEY_UNLIKELY(m_object != other.m_object)) + { + JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers", m_object)); + } + + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_data.m_type) + { + case value_t::object: + JSON_THROW(invalid_iterator::create(213, "cannot compare order of object iterators", m_object)); + + case value_t::array: + return (m_it.array_iterator < other.m_it.array_iterator); + + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + return (m_it.primitive_iterator < other.m_it.primitive_iterator); + } + } + + /*! + @brief comparison: less than or equal + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator<=(const iter_impl& other) const + { + return !other.operator < (*this); + } + + /*! + @brief comparison: greater than + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator>(const iter_impl& other) const + { + return !operator<=(other); + } + + /*! + @brief comparison: greater than or equal + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator>=(const iter_impl& other) const + { + return !operator<(other); + } + + /*! + @brief add to iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl& operator+=(difference_type i) + { + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_data.m_type) + { + case value_t::object: + JSON_THROW(invalid_iterator::create(209, "cannot use offsets with object iterators", m_object)); + + case value_t::array: + { + std::advance(m_it.array_iterator, i); + break; + } + + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + m_it.primitive_iterator += i; + break; + } + } + + return *this; + } + + /*! + @brief subtract from iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl& operator-=(difference_type i) + { + return operator+=(-i); + } + + /*! + @brief add to iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl operator+(difference_type i) const + { + auto result = *this; + result += i; + return result; + } + + /*! + @brief addition of distance and iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + friend iter_impl operator+(difference_type i, const iter_impl& it) + { + auto result = it; + result += i; + return result; + } + + /*! + @brief subtract from iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl operator-(difference_type i) const + { + auto result = *this; + result -= i; + return result; + } + + /*! + @brief return difference + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + difference_type operator-(const iter_impl& other) const + { + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_data.m_type) + { + case value_t::object: + JSON_THROW(invalid_iterator::create(209, "cannot use offsets with object iterators", m_object)); + + case value_t::array: + return m_it.array_iterator - other.m_it.array_iterator; + + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + return m_it.primitive_iterator - other.m_it.primitive_iterator; + } + } + + /*! + @brief access to successor + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + reference operator[](difference_type n) const + { + JSON_ASSERT(m_object != nullptr); + + switch (m_object->m_data.m_type) + { + case value_t::object: + JSON_THROW(invalid_iterator::create(208, "cannot use operator[] for object iterators", m_object)); + + case value_t::array: + return *std::next(m_it.array_iterator, n); + + case value_t::null: + JSON_THROW(invalid_iterator::create(214, "cannot get value", m_object)); + + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + { + if (JSON_HEDLEY_LIKELY(m_it.primitive_iterator.get_value() == -n)) + { + return *m_object; + } + + JSON_THROW(invalid_iterator::create(214, "cannot get value", m_object)); + } + } + } + + /*! + @brief return the key of an object iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + const typename object_t::key_type& key() const + { + JSON_ASSERT(m_object != nullptr); + + if (JSON_HEDLEY_LIKELY(m_object->is_object())) + { + return m_it.object_iterator->first; + } + + JSON_THROW(invalid_iterator::create(207, "cannot use key() for non-object iterators", m_object)); + } + + /*! + @brief return the value of an iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + reference value() const + { + return operator*(); + } + + JSON_PRIVATE_UNLESS_TESTED: + /// associated JSON instance + pointer m_object = nullptr; + /// the actual iterator of the associated instance + internal_iterator::type> m_it {}; +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END diff --git a/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/iterators/iteration_proxy.hpp b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/iterators/iteration_proxy.hpp new file mode 100644 index 0000000..33bfc36 --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/iterators/iteration_proxy.hpp @@ -0,0 +1,242 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + +#pragma once + +#include // size_t +#include // input_iterator_tag +#include // string, to_string +#include // tuple_size, get, tuple_element +#include // move + +#if JSON_HAS_RANGES + #include // enable_borrowed_range +#endif + +#include +#include +#include + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +template +void int_to_string( string_type& target, std::size_t value ) +{ + // For ADL + using std::to_string; + target = to_string(value); +} +template class iteration_proxy_value +{ + public: + using difference_type = std::ptrdiff_t; + using value_type = iteration_proxy_value; + using pointer = value_type *; + using reference = value_type &; + using iterator_category = std::input_iterator_tag; + using string_type = typename std::remove_cv< typename std::remove_reference().key() ) >::type >::type; + + private: + /// the iterator + IteratorType anchor{}; + /// an index for arrays (used to create key names) + std::size_t array_index = 0; + /// last stringified array index + mutable std::size_t array_index_last = 0; + /// a string representation of the array index + mutable string_type array_index_str = "0"; + /// an empty string (to return a reference for primitive values) + string_type empty_str{}; + + public: + explicit iteration_proxy_value() = default; + explicit iteration_proxy_value(IteratorType it, std::size_t array_index_ = 0) + noexcept(std::is_nothrow_move_constructible::value + && std::is_nothrow_default_constructible::value) + : anchor(std::move(it)) + , array_index(array_index_) + {} + + iteration_proxy_value(iteration_proxy_value const&) = default; + iteration_proxy_value& operator=(iteration_proxy_value const&) = default; + // older GCCs are a bit fussy and require explicit noexcept specifiers on defaulted functions + iteration_proxy_value(iteration_proxy_value&&) + noexcept(std::is_nothrow_move_constructible::value + && std::is_nothrow_move_constructible::value) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) + iteration_proxy_value& operator=(iteration_proxy_value&&) + noexcept(std::is_nothrow_move_assignable::value + && std::is_nothrow_move_assignable::value) = default; // NOLINT(hicpp-noexcept-move,performance-noexcept-move-constructor) + ~iteration_proxy_value() = default; + + /// dereference operator (needed for range-based for) + const iteration_proxy_value& operator*() const + { + return *this; + } + + /// increment operator (needed for range-based for) + iteration_proxy_value& operator++() + { + ++anchor; + ++array_index; + + return *this; + } + + iteration_proxy_value operator++(int)& // NOLINT(cert-dcl21-cpp) + { + auto tmp = iteration_proxy_value(anchor, array_index); + ++anchor; + ++array_index; + return tmp; + } + + /// equality operator (needed for InputIterator) + bool operator==(const iteration_proxy_value& o) const + { + return anchor == o.anchor; + } + + /// inequality operator (needed for range-based for) + bool operator!=(const iteration_proxy_value& o) const + { + return anchor != o.anchor; + } + + /// return key of the iterator + const string_type& key() const + { + JSON_ASSERT(anchor.m_object != nullptr); + + switch (anchor.m_object->type()) + { + // use integer array index as key + case value_t::array: + { + if (array_index != array_index_last) + { + int_to_string( array_index_str, array_index ); + array_index_last = array_index; + } + return array_index_str; + } + + // use key from the object + case value_t::object: + return anchor.key(); + + // use an empty key for all primitive types + case value_t::null: + case value_t::string: + case value_t::boolean: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::number_float: + case value_t::binary: + case value_t::discarded: + default: + return empty_str; + } + } + + /// return value of the iterator + typename IteratorType::reference value() const + { + return anchor.value(); + } +}; + +/// proxy class for the items() function +template class iteration_proxy +{ + private: + /// the container to iterate + typename IteratorType::pointer container = nullptr; + + public: + explicit iteration_proxy() = default; + + /// construct iteration proxy from a container + explicit iteration_proxy(typename IteratorType::reference cont) noexcept + : container(&cont) {} + + iteration_proxy(iteration_proxy const&) = default; + iteration_proxy& operator=(iteration_proxy const&) = default; + iteration_proxy(iteration_proxy&&) noexcept = default; + iteration_proxy& operator=(iteration_proxy&&) noexcept = default; + ~iteration_proxy() = default; + + /// return iterator begin (needed for range-based for) + iteration_proxy_value begin() const noexcept + { + return iteration_proxy_value(container->begin()); + } + + /// return iterator end (needed for range-based for) + iteration_proxy_value end() const noexcept + { + return iteration_proxy_value(container->end()); + } +}; + +// Structured Bindings Support +// For further reference see https://blog.tartanllama.xyz/structured-bindings/ +// And see https://github.com/nlohmann/json/pull/1391 +template = 0> +auto get(const nlohmann::detail::iteration_proxy_value& i) -> decltype(i.key()) +{ + return i.key(); +} +// Structured Bindings Support +// For further reference see https://blog.tartanllama.xyz/structured-bindings/ +// And see https://github.com/nlohmann/json/pull/1391 +template = 0> +auto get(const nlohmann::detail::iteration_proxy_value& i) -> decltype(i.value()) +{ + return i.value(); +} + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// The Addition to the STD Namespace is required to add +// Structured Bindings Support to the iteration_proxy_value class +// For further reference see https://blog.tartanllama.xyz/structured-bindings/ +// And see https://github.com/nlohmann/json/pull/1391 +namespace std +{ + +#if defined(__clang__) + // Fix: https://github.com/nlohmann/json/issues/1401 + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wmismatched-tags" +#endif +template +class tuple_size<::nlohmann::detail::iteration_proxy_value> // NOLINT(cert-dcl58-cpp) + : public std::integral_constant {}; + +template +class tuple_element> // NOLINT(cert-dcl58-cpp) +{ + public: + using type = decltype( + get(std::declval < + ::nlohmann::detail::iteration_proxy_value> ())); +}; +#if defined(__clang__) + #pragma clang diagnostic pop +#endif + +} // namespace std + +#if JSON_HAS_RANGES + template + inline constexpr bool ::std::ranges::enable_borrowed_range<::nlohmann::detail::iteration_proxy> = true; +#endif diff --git a/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/iterators/iterator_traits.hpp b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/iterators/iterator_traits.hpp new file mode 100644 index 0000000..34a20ee --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/iterators/iterator_traits.hpp @@ -0,0 +1,61 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + +#pragma once + +#include // random_access_iterator_tag + +#include +#include +#include + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +template +struct iterator_types {}; + +template +struct iterator_types < + It, + void_t> +{ + using difference_type = typename It::difference_type; + using value_type = typename It::value_type; + using pointer = typename It::pointer; + using reference = typename It::reference; + using iterator_category = typename It::iterator_category; +}; + +// This is required as some compilers implement std::iterator_traits in a way that +// doesn't work with SFINAE. See https://github.com/nlohmann/json/issues/1341. +template +struct iterator_traits +{ +}; + +template +struct iterator_traits < T, enable_if_t < !std::is_pointer::value >> + : iterator_types +{ +}; + +template +struct iterator_traits::value>> +{ + using iterator_category = std::random_access_iterator_tag; + using value_type = T; + using difference_type = ptrdiff_t; + using pointer = T*; + using reference = T&; +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END diff --git a/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/iterators/json_reverse_iterator.hpp b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/iterators/json_reverse_iterator.hpp new file mode 100644 index 0000000..eb450e9 --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/iterators/json_reverse_iterator.hpp @@ -0,0 +1,130 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + +#pragma once + +#include // ptrdiff_t +#include // reverse_iterator +#include // declval + +#include + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +////////////////////// +// reverse_iterator // +////////////////////// + +/*! +@brief a template for a reverse iterator class + +@tparam Base the base iterator type to reverse. Valid types are @ref +iterator (to create @ref reverse_iterator) and @ref const_iterator (to +create @ref const_reverse_iterator). + +@requirement The class satisfies the following concept requirements: +- +[BidirectionalIterator](https://en.cppreference.com/w/cpp/named_req/BidirectionalIterator): + The iterator that can be moved can be moved in both directions (i.e. + incremented and decremented). +- [OutputIterator](https://en.cppreference.com/w/cpp/named_req/OutputIterator): + It is possible to write to the pointed-to element (only if @a Base is + @ref iterator). + +@since version 1.0.0 +*/ +template +class json_reverse_iterator : public std::reverse_iterator +{ + public: + using difference_type = std::ptrdiff_t; + /// shortcut to the reverse iterator adapter + using base_iterator = std::reverse_iterator; + /// the reference type for the pointed-to element + using reference = typename Base::reference; + + /// create reverse iterator from iterator + explicit json_reverse_iterator(const typename base_iterator::iterator_type& it) noexcept + : base_iterator(it) {} + + /// create reverse iterator from base class + explicit json_reverse_iterator(const base_iterator& it) noexcept : base_iterator(it) {} + + /// post-increment (it++) + json_reverse_iterator operator++(int)& // NOLINT(cert-dcl21-cpp) + { + return static_cast(base_iterator::operator++(1)); + } + + /// pre-increment (++it) + json_reverse_iterator& operator++() + { + return static_cast(base_iterator::operator++()); + } + + /// post-decrement (it--) + json_reverse_iterator operator--(int)& // NOLINT(cert-dcl21-cpp) + { + return static_cast(base_iterator::operator--(1)); + } + + /// pre-decrement (--it) + json_reverse_iterator& operator--() + { + return static_cast(base_iterator::operator--()); + } + + /// add to iterator + json_reverse_iterator& operator+=(difference_type i) + { + return static_cast(base_iterator::operator+=(i)); + } + + /// add to iterator + json_reverse_iterator operator+(difference_type i) const + { + return static_cast(base_iterator::operator+(i)); + } + + /// subtract from iterator + json_reverse_iterator operator-(difference_type i) const + { + return static_cast(base_iterator::operator-(i)); + } + + /// return difference + difference_type operator-(const json_reverse_iterator& other) const + { + return base_iterator(*this) - base_iterator(other); + } + + /// access to successor + reference operator[](difference_type n) const + { + return *(this->operator+(n)); + } + + /// return the key of an object iterator + auto key() const -> decltype(std::declval().key()) + { + auto it = --this->base(); + return it.key(); + } + + /// return the value of an iterator + reference value() const + { + auto it = --this->base(); + return it.operator * (); + } +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END diff --git a/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/iterators/primitive_iterator.hpp b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/iterators/primitive_iterator.hpp new file mode 100644 index 0000000..0bc3ca8 --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/iterators/primitive_iterator.hpp @@ -0,0 +1,132 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + +#pragma once + +#include // ptrdiff_t +#include // numeric_limits + +#include + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +/* +@brief an iterator for primitive JSON types + +This class models an iterator for primitive JSON types (boolean, number, +string). It's only purpose is to allow the iterator/const_iterator classes +to "iterate" over primitive values. Internally, the iterator is modeled by +a `difference_type` variable. Value begin_value (`0`) models the begin, +end_value (`1`) models past the end. +*/ +class primitive_iterator_t +{ + private: + using difference_type = std::ptrdiff_t; + static constexpr difference_type begin_value = 0; + static constexpr difference_type end_value = begin_value + 1; + + JSON_PRIVATE_UNLESS_TESTED: + /// iterator as signed integer type + difference_type m_it = (std::numeric_limits::min)(); + + public: + constexpr difference_type get_value() const noexcept + { + return m_it; + } + + /// set iterator to a defined beginning + void set_begin() noexcept + { + m_it = begin_value; + } + + /// set iterator to a defined past the end + void set_end() noexcept + { + m_it = end_value; + } + + /// return whether the iterator can be dereferenced + constexpr bool is_begin() const noexcept + { + return m_it == begin_value; + } + + /// return whether the iterator is at end + constexpr bool is_end() const noexcept + { + return m_it == end_value; + } + + friend constexpr bool operator==(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept + { + return lhs.m_it == rhs.m_it; + } + + friend constexpr bool operator<(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept + { + return lhs.m_it < rhs.m_it; + } + + primitive_iterator_t operator+(difference_type n) noexcept + { + auto result = *this; + result += n; + return result; + } + + friend constexpr difference_type operator-(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept + { + return lhs.m_it - rhs.m_it; + } + + primitive_iterator_t& operator++() noexcept + { + ++m_it; + return *this; + } + + primitive_iterator_t operator++(int)& noexcept // NOLINT(cert-dcl21-cpp) + { + auto result = *this; + ++m_it; + return result; + } + + primitive_iterator_t& operator--() noexcept + { + --m_it; + return *this; + } + + primitive_iterator_t operator--(int)& noexcept // NOLINT(cert-dcl21-cpp) + { + auto result = *this; + --m_it; + return result; + } + + primitive_iterator_t& operator+=(difference_type n) noexcept + { + m_it += n; + return *this; + } + + primitive_iterator_t& operator-=(difference_type n) noexcept + { + m_it -= n; + return *this; + } +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END diff --git a/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/json_custom_base_class.hpp b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/json_custom_base_class.hpp new file mode 100644 index 0000000..ff06653 --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/json_custom_base_class.hpp @@ -0,0 +1,31 @@ +#pragma once + +#include // conditional, is_same + +#include + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +/*! +@brief Default base class of the @ref basic_json class. + +So that the correct implementations of the copy / move ctors / assign operators +of @ref basic_json do not require complex case distinctions +(no base class / custom base class used as customization point), +@ref basic_json always has a base class. +By default, this class is used because it is empty and thus has no effect +on the behavior of @ref basic_json. +*/ +struct json_default_base {}; + +template +using json_base_class = typename std::conditional < + std::is_same::value, + json_default_base, + T + >::type; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END diff --git a/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/json_pointer.hpp b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/json_pointer.hpp new file mode 100644 index 0000000..eb712ed --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/json_pointer.hpp @@ -0,0 +1,988 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + +#pragma once + +#include // all_of +#include // isdigit +#include // errno, ERANGE +#include // strtoull +#ifndef JSON_NO_IO + #include // ostream +#endif // JSON_NO_IO +#include // max +#include // accumulate +#include // string +#include // move +#include // vector + +#include +#include +#include +#include +#include + +NLOHMANN_JSON_NAMESPACE_BEGIN + +/// @brief JSON Pointer defines a string syntax for identifying a specific value within a JSON document +/// @sa https://json.nlohmann.me/api/json_pointer/ +template +class json_pointer +{ + // allow basic_json to access private members + NLOHMANN_BASIC_JSON_TPL_DECLARATION + friend class basic_json; + + template + friend class json_pointer; + + template + struct string_t_helper + { + using type = T; + }; + + NLOHMANN_BASIC_JSON_TPL_DECLARATION + struct string_t_helper + { + using type = StringType; + }; + + public: + // for backwards compatibility accept BasicJsonType + using string_t = typename string_t_helper::type; + + /// @brief create JSON pointer + /// @sa https://json.nlohmann.me/api/json_pointer/json_pointer/ + explicit json_pointer(const string_t& s = "") + : reference_tokens(split(s)) + {} + + /// @brief return a string representation of the JSON pointer + /// @sa https://json.nlohmann.me/api/json_pointer/to_string/ + string_t to_string() const + { + return std::accumulate(reference_tokens.begin(), reference_tokens.end(), + string_t{}, + [](const string_t& a, const string_t& b) + { + return detail::concat(a, '/', detail::escape(b)); + }); + } + + /// @brief return a string representation of the JSON pointer + /// @sa https://json.nlohmann.me/api/json_pointer/operator_string/ + JSON_HEDLEY_DEPRECATED_FOR(3.11.0, to_string()) + operator string_t() const + { + return to_string(); + } + +#ifndef JSON_NO_IO + /// @brief write string representation of the JSON pointer to stream + /// @sa https://json.nlohmann.me/api/basic_json/operator_ltlt/ + friend std::ostream& operator<<(std::ostream& o, const json_pointer& ptr) + { + o << ptr.to_string(); + return o; + } +#endif + + /// @brief append another JSON pointer at the end of this JSON pointer + /// @sa https://json.nlohmann.me/api/json_pointer/operator_slasheq/ + json_pointer& operator/=(const json_pointer& ptr) + { + reference_tokens.insert(reference_tokens.end(), + ptr.reference_tokens.begin(), + ptr.reference_tokens.end()); + return *this; + } + + /// @brief append an unescaped reference token at the end of this JSON pointer + /// @sa https://json.nlohmann.me/api/json_pointer/operator_slasheq/ + json_pointer& operator/=(string_t token) + { + push_back(std::move(token)); + return *this; + } + + /// @brief append an array index at the end of this JSON pointer + /// @sa https://json.nlohmann.me/api/json_pointer/operator_slasheq/ + json_pointer& operator/=(std::size_t array_idx) + { + return *this /= std::to_string(array_idx); + } + + /// @brief create a new JSON pointer by appending the right JSON pointer at the end of the left JSON pointer + /// @sa https://json.nlohmann.me/api/json_pointer/operator_slash/ + friend json_pointer operator/(const json_pointer& lhs, + const json_pointer& rhs) + { + return json_pointer(lhs) /= rhs; + } + + /// @brief create a new JSON pointer by appending the unescaped token at the end of the JSON pointer + /// @sa https://json.nlohmann.me/api/json_pointer/operator_slash/ + friend json_pointer operator/(const json_pointer& lhs, string_t token) // NOLINT(performance-unnecessary-value-param) + { + return json_pointer(lhs) /= std::move(token); + } + + /// @brief create a new JSON pointer by appending the array-index-token at the end of the JSON pointer + /// @sa https://json.nlohmann.me/api/json_pointer/operator_slash/ + friend json_pointer operator/(const json_pointer& lhs, std::size_t array_idx) + { + return json_pointer(lhs) /= array_idx; + } + + /// @brief returns the parent of this JSON pointer + /// @sa https://json.nlohmann.me/api/json_pointer/parent_pointer/ + json_pointer parent_pointer() const + { + if (empty()) + { + return *this; + } + + json_pointer res = *this; + res.pop_back(); + return res; + } + + /// @brief remove last reference token + /// @sa https://json.nlohmann.me/api/json_pointer/pop_back/ + void pop_back() + { + if (JSON_HEDLEY_UNLIKELY(empty())) + { + JSON_THROW(detail::out_of_range::create(405, "JSON pointer has no parent", nullptr)); + } + + reference_tokens.pop_back(); + } + + /// @brief return last reference token + /// @sa https://json.nlohmann.me/api/json_pointer/back/ + const string_t& back() const + { + if (JSON_HEDLEY_UNLIKELY(empty())) + { + JSON_THROW(detail::out_of_range::create(405, "JSON pointer has no parent", nullptr)); + } + + return reference_tokens.back(); + } + + /// @brief append an unescaped token at the end of the reference pointer + /// @sa https://json.nlohmann.me/api/json_pointer/push_back/ + void push_back(const string_t& token) + { + reference_tokens.push_back(token); + } + + /// @brief append an unescaped token at the end of the reference pointer + /// @sa https://json.nlohmann.me/api/json_pointer/push_back/ + void push_back(string_t&& token) + { + reference_tokens.push_back(std::move(token)); + } + + /// @brief return whether pointer points to the root document + /// @sa https://json.nlohmann.me/api/json_pointer/empty/ + bool empty() const noexcept + { + return reference_tokens.empty(); + } + + private: + /*! + @param[in] s reference token to be converted into an array index + + @return integer representation of @a s + + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index begins not with a digit + @throw out_of_range.404 if string @a s could not be converted to an integer + @throw out_of_range.410 if an array index exceeds size_type + */ + template + static typename BasicJsonType::size_type array_index(const string_t& s) + { + using size_type = typename BasicJsonType::size_type; + + // error condition (cf. RFC 6901, Sect. 4) + if (JSON_HEDLEY_UNLIKELY(s.size() > 1 && s[0] == '0')) + { + JSON_THROW(detail::parse_error::create(106, 0, detail::concat("array index '", s, "' must not begin with '0'"), nullptr)); + } + + // error condition (cf. RFC 6901, Sect. 4) + if (JSON_HEDLEY_UNLIKELY(s.size() > 1 && !(s[0] >= '1' && s[0] <= '9'))) + { + JSON_THROW(detail::parse_error::create(109, 0, detail::concat("array index '", s, "' is not a number"), nullptr)); + } + + const char* p = s.c_str(); + char* p_end = nullptr; + errno = 0; // strtoull doesn't reset errno + const unsigned long long res = std::strtoull(p, &p_end, 10); // NOLINT(runtime/int) + if (p == p_end // invalid input or empty string + || errno == ERANGE // out of range + || JSON_HEDLEY_UNLIKELY(static_cast(p_end - p) != s.size())) // incomplete read + { + JSON_THROW(detail::out_of_range::create(404, detail::concat("unresolved reference token '", s, "'"), nullptr)); + } + + // only triggered on special platforms (like 32bit), see also + // https://github.com/nlohmann/json/pull/2203 + if (res >= static_cast((std::numeric_limits::max)())) // NOLINT(runtime/int) + { + JSON_THROW(detail::out_of_range::create(410, detail::concat("array index ", s, " exceeds size_type"), nullptr)); // LCOV_EXCL_LINE + } + + return static_cast(res); + } + + JSON_PRIVATE_UNLESS_TESTED: + json_pointer top() const + { + if (JSON_HEDLEY_UNLIKELY(empty())) + { + JSON_THROW(detail::out_of_range::create(405, "JSON pointer has no parent", nullptr)); + } + + json_pointer result = *this; + result.reference_tokens = {reference_tokens[0]}; + return result; + } + + private: + /*! + @brief create and return a reference to the pointed to value + + @complexity Linear in the number of reference tokens. + + @throw parse_error.109 if array index is not a number + @throw type_error.313 if value cannot be unflattened + */ + template + BasicJsonType& get_and_create(BasicJsonType& j) const + { + auto* result = &j; + + // in case no reference tokens exist, return a reference to the JSON value + // j which will be overwritten by a primitive value + for (const auto& reference_token : reference_tokens) + { + switch (result->type()) + { + case detail::value_t::null: + { + if (reference_token == "0") + { + // start a new array if reference token is 0 + result = &result->operator[](0); + } + else + { + // start a new object otherwise + result = &result->operator[](reference_token); + } + break; + } + + case detail::value_t::object: + { + // create an entry in the object + result = &result->operator[](reference_token); + break; + } + + case detail::value_t::array: + { + // create an entry in the array + result = &result->operator[](array_index(reference_token)); + break; + } + + /* + The following code is only reached if there exists a reference + token _and_ the current value is primitive. In this case, we have + an error situation, because primitive values may only occur as + single value; that is, with an empty list of reference tokens. + */ + case detail::value_t::string: + case detail::value_t::boolean: + case detail::value_t::number_integer: + case detail::value_t::number_unsigned: + case detail::value_t::number_float: + case detail::value_t::binary: + case detail::value_t::discarded: + default: + JSON_THROW(detail::type_error::create(313, "invalid value to unflatten", &j)); + } + } + + return *result; + } + + /*! + @brief return a reference to the pointed to value + + @note This version does not throw if a value is not present, but tries to + create nested values instead. For instance, calling this function + with pointer `"/this/that"` on a null value is equivalent to calling + `operator[]("this").operator[]("that")` on that value, effectively + changing the null value to an object. + + @param[in] ptr a JSON value + + @return reference to the JSON value pointed to by the JSON pointer + + @complexity Linear in the length of the JSON pointer. + + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.404 if the JSON pointer can not be resolved + */ + template + BasicJsonType& get_unchecked(BasicJsonType* ptr) const + { + for (const auto& reference_token : reference_tokens) + { + // convert null values to arrays or objects before continuing + if (ptr->is_null()) + { + // check if reference token is a number + const bool nums = + std::all_of(reference_token.begin(), reference_token.end(), + [](const unsigned char x) + { + return std::isdigit(x); + }); + + // change value to array for numbers or "-" or to object otherwise + *ptr = (nums || reference_token == "-") + ? detail::value_t::array + : detail::value_t::object; + } + + switch (ptr->type()) + { + case detail::value_t::object: + { + // use unchecked object access + ptr = &ptr->operator[](reference_token); + break; + } + + case detail::value_t::array: + { + if (reference_token == "-") + { + // explicitly treat "-" as index beyond the end + ptr = &ptr->operator[](ptr->m_data.m_value.array->size()); + } + else + { + // convert array index to number; unchecked access + ptr = &ptr->operator[](array_index(reference_token)); + } + break; + } + + case detail::value_t::null: + case detail::value_t::string: + case detail::value_t::boolean: + case detail::value_t::number_integer: + case detail::value_t::number_unsigned: + case detail::value_t::number_float: + case detail::value_t::binary: + case detail::value_t::discarded: + default: + JSON_THROW(detail::out_of_range::create(404, detail::concat("unresolved reference token '", reference_token, "'"), ptr)); + } + } + + return *ptr; + } + + /*! + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.402 if the array index '-' is used + @throw out_of_range.404 if the JSON pointer can not be resolved + */ + template + BasicJsonType& get_checked(BasicJsonType* ptr) const + { + for (const auto& reference_token : reference_tokens) + { + switch (ptr->type()) + { + case detail::value_t::object: + { + // note: at performs range check + ptr = &ptr->at(reference_token); + break; + } + + case detail::value_t::array: + { + if (JSON_HEDLEY_UNLIKELY(reference_token == "-")) + { + // "-" always fails the range check + JSON_THROW(detail::out_of_range::create(402, detail::concat( + "array index '-' (", std::to_string(ptr->m_data.m_value.array->size()), + ") is out of range"), ptr)); + } + + // note: at performs range check + ptr = &ptr->at(array_index(reference_token)); + break; + } + + case detail::value_t::null: + case detail::value_t::string: + case detail::value_t::boolean: + case detail::value_t::number_integer: + case detail::value_t::number_unsigned: + case detail::value_t::number_float: + case detail::value_t::binary: + case detail::value_t::discarded: + default: + JSON_THROW(detail::out_of_range::create(404, detail::concat("unresolved reference token '", reference_token, "'"), ptr)); + } + } + + return *ptr; + } + + /*! + @brief return a const reference to the pointed to value + + @param[in] ptr a JSON value + + @return const reference to the JSON value pointed to by the JSON + pointer + + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.402 if the array index '-' is used + @throw out_of_range.404 if the JSON pointer can not be resolved + */ + template + const BasicJsonType& get_unchecked(const BasicJsonType* ptr) const + { + for (const auto& reference_token : reference_tokens) + { + switch (ptr->type()) + { + case detail::value_t::object: + { + // use unchecked object access + ptr = &ptr->operator[](reference_token); + break; + } + + case detail::value_t::array: + { + if (JSON_HEDLEY_UNLIKELY(reference_token == "-")) + { + // "-" cannot be used for const access + JSON_THROW(detail::out_of_range::create(402, detail::concat("array index '-' (", std::to_string(ptr->m_data.m_value.array->size()), ") is out of range"), ptr)); + } + + // use unchecked array access + ptr = &ptr->operator[](array_index(reference_token)); + break; + } + + case detail::value_t::null: + case detail::value_t::string: + case detail::value_t::boolean: + case detail::value_t::number_integer: + case detail::value_t::number_unsigned: + case detail::value_t::number_float: + case detail::value_t::binary: + case detail::value_t::discarded: + default: + JSON_THROW(detail::out_of_range::create(404, detail::concat("unresolved reference token '", reference_token, "'"), ptr)); + } + } + + return *ptr; + } + + /*! + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.402 if the array index '-' is used + @throw out_of_range.404 if the JSON pointer can not be resolved + */ + template + const BasicJsonType& get_checked(const BasicJsonType* ptr) const + { + for (const auto& reference_token : reference_tokens) + { + switch (ptr->type()) + { + case detail::value_t::object: + { + // note: at performs range check + ptr = &ptr->at(reference_token); + break; + } + + case detail::value_t::array: + { + if (JSON_HEDLEY_UNLIKELY(reference_token == "-")) + { + // "-" always fails the range check + JSON_THROW(detail::out_of_range::create(402, detail::concat( + "array index '-' (", std::to_string(ptr->m_data.m_value.array->size()), + ") is out of range"), ptr)); + } + + // note: at performs range check + ptr = &ptr->at(array_index(reference_token)); + break; + } + + case detail::value_t::null: + case detail::value_t::string: + case detail::value_t::boolean: + case detail::value_t::number_integer: + case detail::value_t::number_unsigned: + case detail::value_t::number_float: + case detail::value_t::binary: + case detail::value_t::discarded: + default: + JSON_THROW(detail::out_of_range::create(404, detail::concat("unresolved reference token '", reference_token, "'"), ptr)); + } + } + + return *ptr; + } + + /*! + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + */ + template + bool contains(const BasicJsonType* ptr) const + { + for (const auto& reference_token : reference_tokens) + { + switch (ptr->type()) + { + case detail::value_t::object: + { + if (!ptr->contains(reference_token)) + { + // we did not find the key in the object + return false; + } + + ptr = &ptr->operator[](reference_token); + break; + } + + case detail::value_t::array: + { + if (JSON_HEDLEY_UNLIKELY(reference_token == "-")) + { + // "-" always fails the range check + return false; + } + if (JSON_HEDLEY_UNLIKELY(reference_token.size() == 1 && !("0" <= reference_token && reference_token <= "9"))) + { + // invalid char + return false; + } + if (JSON_HEDLEY_UNLIKELY(reference_token.size() > 1)) + { + if (JSON_HEDLEY_UNLIKELY(!('1' <= reference_token[0] && reference_token[0] <= '9'))) + { + // first char should be between '1' and '9' + return false; + } + for (std::size_t i = 1; i < reference_token.size(); i++) + { + if (JSON_HEDLEY_UNLIKELY(!('0' <= reference_token[i] && reference_token[i] <= '9'))) + { + // other char should be between '0' and '9' + return false; + } + } + } + + const auto idx = array_index(reference_token); + if (idx >= ptr->size()) + { + // index out of range + return false; + } + + ptr = &ptr->operator[](idx); + break; + } + + case detail::value_t::null: + case detail::value_t::string: + case detail::value_t::boolean: + case detail::value_t::number_integer: + case detail::value_t::number_unsigned: + case detail::value_t::number_float: + case detail::value_t::binary: + case detail::value_t::discarded: + default: + { + // we do not expect primitive values if there is still a + // reference token to process + return false; + } + } + } + + // no reference token left means we found a primitive value + return true; + } + + /*! + @brief split the string input to reference tokens + + @note This function is only called by the json_pointer constructor. + All exceptions below are documented there. + + @throw parse_error.107 if the pointer is not empty or begins with '/' + @throw parse_error.108 if character '~' is not followed by '0' or '1' + */ + static std::vector split(const string_t& reference_string) + { + std::vector result; + + // special case: empty reference string -> no reference tokens + if (reference_string.empty()) + { + return result; + } + + // check if nonempty reference string begins with slash + if (JSON_HEDLEY_UNLIKELY(reference_string[0] != '/')) + { + JSON_THROW(detail::parse_error::create(107, 1, detail::concat("JSON pointer must be empty or begin with '/' - was: '", reference_string, "'"), nullptr)); + } + + // extract the reference tokens: + // - slash: position of the last read slash (or end of string) + // - start: position after the previous slash + for ( + // search for the first slash after the first character + std::size_t slash = reference_string.find_first_of('/', 1), + // set the beginning of the first reference token + start = 1; + // we can stop if start == 0 (if slash == string_t::npos) + start != 0; + // set the beginning of the next reference token + // (will eventually be 0 if slash == string_t::npos) + start = (slash == string_t::npos) ? 0 : slash + 1, + // find next slash + slash = reference_string.find_first_of('/', start)) + { + // use the text between the beginning of the reference token + // (start) and the last slash (slash). + auto reference_token = reference_string.substr(start, slash - start); + + // check reference tokens are properly escaped + for (std::size_t pos = reference_token.find_first_of('~'); + pos != string_t::npos; + pos = reference_token.find_first_of('~', pos + 1)) + { + JSON_ASSERT(reference_token[pos] == '~'); + + // ~ must be followed by 0 or 1 + if (JSON_HEDLEY_UNLIKELY(pos == reference_token.size() - 1 || + (reference_token[pos + 1] != '0' && + reference_token[pos + 1] != '1'))) + { + JSON_THROW(detail::parse_error::create(108, 0, "escape character '~' must be followed with '0' or '1'", nullptr)); + } + } + + // finally, store the reference token + detail::unescape(reference_token); + result.push_back(reference_token); + } + + return result; + } + + private: + /*! + @param[in] reference_string the reference string to the current value + @param[in] value the value to consider + @param[in,out] result the result object to insert values to + + @note Empty objects or arrays are flattened to `null`. + */ + template + static void flatten(const string_t& reference_string, + const BasicJsonType& value, + BasicJsonType& result) + { + switch (value.type()) + { + case detail::value_t::array: + { + if (value.m_data.m_value.array->empty()) + { + // flatten empty array as null + result[reference_string] = nullptr; + } + else + { + // iterate array and use index as reference string + for (std::size_t i = 0; i < value.m_data.m_value.array->size(); ++i) + { + flatten(detail::concat(reference_string, '/', std::to_string(i)), + value.m_data.m_value.array->operator[](i), result); + } + } + break; + } + + case detail::value_t::object: + { + if (value.m_data.m_value.object->empty()) + { + // flatten empty object as null + result[reference_string] = nullptr; + } + else + { + // iterate object and use keys as reference string + for (const auto& element : *value.m_data.m_value.object) + { + flatten(detail::concat(reference_string, '/', detail::escape(element.first)), element.second, result); + } + } + break; + } + + case detail::value_t::null: + case detail::value_t::string: + case detail::value_t::boolean: + case detail::value_t::number_integer: + case detail::value_t::number_unsigned: + case detail::value_t::number_float: + case detail::value_t::binary: + case detail::value_t::discarded: + default: + { + // add primitive value with its reference string + result[reference_string] = value; + break; + } + } + } + + /*! + @param[in] value flattened JSON + + @return unflattened JSON + + @throw parse_error.109 if array index is not a number + @throw type_error.314 if value is not an object + @throw type_error.315 if object values are not primitive + @throw type_error.313 if value cannot be unflattened + */ + template + static BasicJsonType + unflatten(const BasicJsonType& value) + { + if (JSON_HEDLEY_UNLIKELY(!value.is_object())) + { + JSON_THROW(detail::type_error::create(314, "only objects can be unflattened", &value)); + } + + BasicJsonType result; + + // iterate the JSON object values + for (const auto& element : *value.m_data.m_value.object) + { + if (JSON_HEDLEY_UNLIKELY(!element.second.is_primitive())) + { + JSON_THROW(detail::type_error::create(315, "values in object must be primitive", &element.second)); + } + + // assign value to reference pointed to by JSON pointer; Note that if + // the JSON pointer is "" (i.e., points to the whole value), function + // get_and_create returns a reference to result itself. An assignment + // will then create a primitive value. + json_pointer(element.first).get_and_create(result) = element.second; + } + + return result; + } + + // can't use conversion operator because of ambiguity + json_pointer convert() const& + { + json_pointer result; + result.reference_tokens = reference_tokens; + return result; + } + + json_pointer convert()&& + { + json_pointer result; + result.reference_tokens = std::move(reference_tokens); + return result; + } + + public: +#if JSON_HAS_THREE_WAY_COMPARISON + /// @brief compares two JSON pointers for equality + /// @sa https://json.nlohmann.me/api/json_pointer/operator_eq/ + template + bool operator==(const json_pointer& rhs) const noexcept + { + return reference_tokens == rhs.reference_tokens; + } + + /// @brief compares JSON pointer and string for equality + /// @sa https://json.nlohmann.me/api/json_pointer/operator_eq/ + JSON_HEDLEY_DEPRECATED_FOR(3.11.2, operator==(json_pointer)) + bool operator==(const string_t& rhs) const + { + return *this == json_pointer(rhs); + } + + /// @brief 3-way compares two JSON pointers + template + std::strong_ordering operator<=>(const json_pointer& rhs) const noexcept // *NOPAD* + { + return reference_tokens <=> rhs.reference_tokens; // *NOPAD* + } +#else + /// @brief compares two JSON pointers for equality + /// @sa https://json.nlohmann.me/api/json_pointer/operator_eq/ + template + // NOLINTNEXTLINE(readability-redundant-declaration) + friend bool operator==(const json_pointer& lhs, + const json_pointer& rhs) noexcept; + + /// @brief compares JSON pointer and string for equality + /// @sa https://json.nlohmann.me/api/json_pointer/operator_eq/ + template + // NOLINTNEXTLINE(readability-redundant-declaration) + friend bool operator==(const json_pointer& lhs, + const StringType& rhs); + + /// @brief compares string and JSON pointer for equality + /// @sa https://json.nlohmann.me/api/json_pointer/operator_eq/ + template + // NOLINTNEXTLINE(readability-redundant-declaration) + friend bool operator==(const StringType& lhs, + const json_pointer& rhs); + + /// @brief compares two JSON pointers for inequality + /// @sa https://json.nlohmann.me/api/json_pointer/operator_ne/ + template + // NOLINTNEXTLINE(readability-redundant-declaration) + friend bool operator!=(const json_pointer& lhs, + const json_pointer& rhs) noexcept; + + /// @brief compares JSON pointer and string for inequality + /// @sa https://json.nlohmann.me/api/json_pointer/operator_ne/ + template + // NOLINTNEXTLINE(readability-redundant-declaration) + friend bool operator!=(const json_pointer& lhs, + const StringType& rhs); + + /// @brief compares string and JSON pointer for inequality + /// @sa https://json.nlohmann.me/api/json_pointer/operator_ne/ + template + // NOLINTNEXTLINE(readability-redundant-declaration) + friend bool operator!=(const StringType& lhs, + const json_pointer& rhs); + + /// @brief compares two JSON pointer for less-than + template + // NOLINTNEXTLINE(readability-redundant-declaration) + friend bool operator<(const json_pointer& lhs, + const json_pointer& rhs) noexcept; +#endif + + private: + /// the reference tokens + std::vector reference_tokens; +}; + +#if !JSON_HAS_THREE_WAY_COMPARISON +// functions cannot be defined inside class due to ODR violations +template +inline bool operator==(const json_pointer& lhs, + const json_pointer& rhs) noexcept +{ + return lhs.reference_tokens == rhs.reference_tokens; +} + +template::string_t> +JSON_HEDLEY_DEPRECATED_FOR(3.11.2, operator==(json_pointer, json_pointer)) +inline bool operator==(const json_pointer& lhs, + const StringType& rhs) +{ + return lhs == json_pointer(rhs); +} + +template::string_t> +JSON_HEDLEY_DEPRECATED_FOR(3.11.2, operator==(json_pointer, json_pointer)) +inline bool operator==(const StringType& lhs, + const json_pointer& rhs) +{ + return json_pointer(lhs) == rhs; +} + +template +inline bool operator!=(const json_pointer& lhs, + const json_pointer& rhs) noexcept +{ + return !(lhs == rhs); +} + +template::string_t> +JSON_HEDLEY_DEPRECATED_FOR(3.11.2, operator!=(json_pointer, json_pointer)) +inline bool operator!=(const json_pointer& lhs, + const StringType& rhs) +{ + return !(lhs == rhs); +} + +template::string_t> +JSON_HEDLEY_DEPRECATED_FOR(3.11.2, operator!=(json_pointer, json_pointer)) +inline bool operator!=(const StringType& lhs, + const json_pointer& rhs) +{ + return !(lhs == rhs); +} + +template +inline bool operator<(const json_pointer& lhs, + const json_pointer& rhs) noexcept +{ + return lhs.reference_tokens < rhs.reference_tokens; +} +#endif + +NLOHMANN_JSON_NAMESPACE_END diff --git a/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/json_ref.hpp b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/json_ref.hpp new file mode 100644 index 0000000..47911fb --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/json_ref.hpp @@ -0,0 +1,78 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + +#pragma once + +#include +#include + +#include +#include + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +template +class json_ref +{ + public: + using value_type = BasicJsonType; + + json_ref(value_type&& value) + : owned_value(std::move(value)) + {} + + json_ref(const value_type& value) + : value_ref(&value) + {} + + json_ref(std::initializer_list init) + : owned_value(init) + {} + + template < + class... Args, + enable_if_t::value, int> = 0 > + json_ref(Args && ... args) + : owned_value(std::forward(args)...) + {} + + // class should be movable only + json_ref(json_ref&&) noexcept = default; + json_ref(const json_ref&) = delete; + json_ref& operator=(const json_ref&) = delete; + json_ref& operator=(json_ref&&) = delete; + ~json_ref() = default; + + value_type moved_or_copied() const + { + if (value_ref == nullptr) + { + return std::move(owned_value); + } + return *value_ref; + } + + value_type const& operator*() const + { + return value_ref ? *value_ref : owned_value; + } + + value_type const* operator->() const + { + return &** this; + } + + private: + mutable value_type owned_value = nullptr; + value_type const* value_ref = nullptr; +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END diff --git a/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/macro_scope.hpp b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/macro_scope.hpp new file mode 100644 index 0000000..2870a4f --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/macro_scope.hpp @@ -0,0 +1,469 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + +#pragma once + +#include // declval, pair +#include +#include + +// This file contains all internal macro definitions (except those affecting ABI) +// You MUST include macro_unscope.hpp at the end of json.hpp to undef all of them + +#include + +// exclude unsupported compilers +#if !defined(JSON_SKIP_UNSUPPORTED_COMPILER_CHECK) + #if defined(__clang__) + #if (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) < 30400 + #error "unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers" + #endif + #elif defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER)) + #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40800 + #error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers" + #endif + #endif +#endif + +// C++ language standard detection +// if the user manually specified the used c++ version this is skipped +#if !defined(JSON_HAS_CPP_20) && !defined(JSON_HAS_CPP_17) && !defined(JSON_HAS_CPP_14) && !defined(JSON_HAS_CPP_11) + #if (defined(__cplusplus) && __cplusplus >= 202002L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L) + #define JSON_HAS_CPP_20 + #define JSON_HAS_CPP_17 + #define JSON_HAS_CPP_14 + #elif (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_HAS_CXX17) && _HAS_CXX17 == 1) // fix for issue #464 + #define JSON_HAS_CPP_17 + #define JSON_HAS_CPP_14 + #elif (defined(__cplusplus) && __cplusplus >= 201402L) || (defined(_HAS_CXX14) && _HAS_CXX14 == 1) + #define JSON_HAS_CPP_14 + #endif + // the cpp 11 flag is always specified because it is the minimal required version + #define JSON_HAS_CPP_11 +#endif + +#ifdef __has_include + #if __has_include() + #include + #endif +#endif + +#if !defined(JSON_HAS_FILESYSTEM) && !defined(JSON_HAS_EXPERIMENTAL_FILESYSTEM) + #ifdef JSON_HAS_CPP_17 + #if defined(__cpp_lib_filesystem) + #define JSON_HAS_FILESYSTEM 1 + #elif defined(__cpp_lib_experimental_filesystem) + #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 1 + #elif !defined(__has_include) + #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 1 + #elif __has_include() + #define JSON_HAS_FILESYSTEM 1 + #elif __has_include() + #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 1 + #endif + + // std::filesystem does not work on MinGW GCC 8: https://sourceforge.net/p/mingw-w64/bugs/737/ + #if defined(__MINGW32__) && defined(__GNUC__) && __GNUC__ == 8 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + + // no filesystem support before GCC 8: https://en.cppreference.com/w/cpp/compiler_support + #if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 8 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + + // no filesystem support before Clang 7: https://en.cppreference.com/w/cpp/compiler_support + #if defined(__clang_major__) && __clang_major__ < 7 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + + // no filesystem support before MSVC 19.14: https://en.cppreference.com/w/cpp/compiler_support + #if defined(_MSC_VER) && _MSC_VER < 1914 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + + // no filesystem support before iOS 13 + #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < 130000 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + + // no filesystem support before macOS Catalina + #if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101500 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + #endif +#endif + +#ifndef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 0 +#endif + +#ifndef JSON_HAS_FILESYSTEM + #define JSON_HAS_FILESYSTEM 0 +#endif + +#ifndef JSON_HAS_THREE_WAY_COMPARISON + #if defined(__cpp_impl_three_way_comparison) && __cpp_impl_three_way_comparison >= 201907L \ + && defined(__cpp_lib_three_way_comparison) && __cpp_lib_three_way_comparison >= 201907L + #define JSON_HAS_THREE_WAY_COMPARISON 1 + #else + #define JSON_HAS_THREE_WAY_COMPARISON 0 + #endif +#endif + +#ifndef JSON_HAS_RANGES + // ranges header shipping in GCC 11.1.0 (released 2021-04-27) has syntax error + #if defined(__GLIBCXX__) && __GLIBCXX__ == 20210427 + #define JSON_HAS_RANGES 0 + #elif defined(__cpp_lib_ranges) + #define JSON_HAS_RANGES 1 + #else + #define JSON_HAS_RANGES 0 + #endif +#endif + +#ifdef JSON_HAS_CPP_17 + #define JSON_INLINE_VARIABLE inline +#else + #define JSON_INLINE_VARIABLE +#endif + +#if JSON_HEDLEY_HAS_ATTRIBUTE(no_unique_address) + #define JSON_NO_UNIQUE_ADDRESS [[no_unique_address]] +#else + #define JSON_NO_UNIQUE_ADDRESS +#endif + +// disable documentation warnings on clang +#if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wdocumentation" + #pragma clang diagnostic ignored "-Wdocumentation-unknown-command" +#endif + +// allow disabling exceptions +#if (defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)) && !defined(JSON_NOEXCEPTION) + #define JSON_THROW(exception) throw exception + #define JSON_TRY try + #define JSON_CATCH(exception) catch(exception) + #define JSON_INTERNAL_CATCH(exception) catch(exception) +#else + #include + #define JSON_THROW(exception) std::abort() + #define JSON_TRY if(true) + #define JSON_CATCH(exception) if(false) + #define JSON_INTERNAL_CATCH(exception) if(false) +#endif + +// override exception macros +#if defined(JSON_THROW_USER) + #undef JSON_THROW + #define JSON_THROW JSON_THROW_USER +#endif +#if defined(JSON_TRY_USER) + #undef JSON_TRY + #define JSON_TRY JSON_TRY_USER +#endif +#if defined(JSON_CATCH_USER) + #undef JSON_CATCH + #define JSON_CATCH JSON_CATCH_USER + #undef JSON_INTERNAL_CATCH + #define JSON_INTERNAL_CATCH JSON_CATCH_USER +#endif +#if defined(JSON_INTERNAL_CATCH_USER) + #undef JSON_INTERNAL_CATCH + #define JSON_INTERNAL_CATCH JSON_INTERNAL_CATCH_USER +#endif + +// allow overriding assert +#if !defined(JSON_ASSERT) + #include // assert + #define JSON_ASSERT(x) assert(x) +#endif + +// allow to access some private functions (needed by the test suite) +#if defined(JSON_TESTS_PRIVATE) + #define JSON_PRIVATE_UNLESS_TESTED public +#else + #define JSON_PRIVATE_UNLESS_TESTED private +#endif + +/*! +@brief macro to briefly define a mapping between an enum and JSON +@def NLOHMANN_JSON_SERIALIZE_ENUM +@since version 3.4.0 +*/ +#define NLOHMANN_JSON_SERIALIZE_ENUM(ENUM_TYPE, ...) \ + template \ + inline void to_json(BasicJsonType& j, const ENUM_TYPE& e) \ + { \ + static_assert(std::is_enum::value, #ENUM_TYPE " must be an enum!"); \ + static const std::pair m[] = __VA_ARGS__; \ + auto it = std::find_if(std::begin(m), std::end(m), \ + [e](const std::pair& ej_pair) -> bool \ + { \ + return ej_pair.first == e; \ + }); \ + j = ((it != std::end(m)) ? it : std::begin(m))->second; \ + } \ + template \ + inline void from_json(const BasicJsonType& j, ENUM_TYPE& e) \ + { \ + static_assert(std::is_enum::value, #ENUM_TYPE " must be an enum!"); \ + static const std::pair m[] = __VA_ARGS__; \ + auto it = std::find_if(std::begin(m), std::end(m), \ + [&j](const std::pair& ej_pair) -> bool \ + { \ + return ej_pair.second == j; \ + }); \ + e = ((it != std::end(m)) ? it : std::begin(m))->first; \ + } + +// Ugly macros to avoid uglier copy-paste when specializing basic_json. They +// may be removed in the future once the class is split. + +#define NLOHMANN_BASIC_JSON_TPL_DECLARATION \ + template class ObjectType, \ + template class ArrayType, \ + class StringType, class BooleanType, class NumberIntegerType, \ + class NumberUnsignedType, class NumberFloatType, \ + template class AllocatorType, \ + template class JSONSerializer, \ + class BinaryType, \ + class CustomBaseClass> + +#define NLOHMANN_BASIC_JSON_TPL \ + basic_json + +// Macros to simplify conversion from/to types + +#define NLOHMANN_JSON_EXPAND( x ) x +#define NLOHMANN_JSON_GET_MACRO(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, NAME,...) NAME +#define NLOHMANN_JSON_PASTE(...) NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_GET_MACRO(__VA_ARGS__, \ + NLOHMANN_JSON_PASTE64, \ + NLOHMANN_JSON_PASTE63, \ + NLOHMANN_JSON_PASTE62, \ + NLOHMANN_JSON_PASTE61, \ + NLOHMANN_JSON_PASTE60, \ + NLOHMANN_JSON_PASTE59, \ + NLOHMANN_JSON_PASTE58, \ + NLOHMANN_JSON_PASTE57, \ + NLOHMANN_JSON_PASTE56, \ + NLOHMANN_JSON_PASTE55, \ + NLOHMANN_JSON_PASTE54, \ + NLOHMANN_JSON_PASTE53, \ + NLOHMANN_JSON_PASTE52, \ + NLOHMANN_JSON_PASTE51, \ + NLOHMANN_JSON_PASTE50, \ + NLOHMANN_JSON_PASTE49, \ + NLOHMANN_JSON_PASTE48, \ + NLOHMANN_JSON_PASTE47, \ + NLOHMANN_JSON_PASTE46, \ + NLOHMANN_JSON_PASTE45, \ + NLOHMANN_JSON_PASTE44, \ + NLOHMANN_JSON_PASTE43, \ + NLOHMANN_JSON_PASTE42, \ + NLOHMANN_JSON_PASTE41, \ + NLOHMANN_JSON_PASTE40, \ + NLOHMANN_JSON_PASTE39, \ + NLOHMANN_JSON_PASTE38, \ + NLOHMANN_JSON_PASTE37, \ + NLOHMANN_JSON_PASTE36, \ + NLOHMANN_JSON_PASTE35, \ + NLOHMANN_JSON_PASTE34, \ + NLOHMANN_JSON_PASTE33, \ + NLOHMANN_JSON_PASTE32, \ + NLOHMANN_JSON_PASTE31, \ + NLOHMANN_JSON_PASTE30, \ + NLOHMANN_JSON_PASTE29, \ + NLOHMANN_JSON_PASTE28, \ + NLOHMANN_JSON_PASTE27, \ + NLOHMANN_JSON_PASTE26, \ + NLOHMANN_JSON_PASTE25, \ + NLOHMANN_JSON_PASTE24, \ + NLOHMANN_JSON_PASTE23, \ + NLOHMANN_JSON_PASTE22, \ + NLOHMANN_JSON_PASTE21, \ + NLOHMANN_JSON_PASTE20, \ + NLOHMANN_JSON_PASTE19, \ + NLOHMANN_JSON_PASTE18, \ + NLOHMANN_JSON_PASTE17, \ + NLOHMANN_JSON_PASTE16, \ + NLOHMANN_JSON_PASTE15, \ + NLOHMANN_JSON_PASTE14, \ + NLOHMANN_JSON_PASTE13, \ + NLOHMANN_JSON_PASTE12, \ + NLOHMANN_JSON_PASTE11, \ + NLOHMANN_JSON_PASTE10, \ + NLOHMANN_JSON_PASTE9, \ + NLOHMANN_JSON_PASTE8, \ + NLOHMANN_JSON_PASTE7, \ + NLOHMANN_JSON_PASTE6, \ + NLOHMANN_JSON_PASTE5, \ + NLOHMANN_JSON_PASTE4, \ + NLOHMANN_JSON_PASTE3, \ + NLOHMANN_JSON_PASTE2, \ + NLOHMANN_JSON_PASTE1)(__VA_ARGS__)) +#define NLOHMANN_JSON_PASTE2(func, v1) func(v1) +#define NLOHMANN_JSON_PASTE3(func, v1, v2) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE2(func, v2) +#define NLOHMANN_JSON_PASTE4(func, v1, v2, v3) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE3(func, v2, v3) +#define NLOHMANN_JSON_PASTE5(func, v1, v2, v3, v4) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE4(func, v2, v3, v4) +#define NLOHMANN_JSON_PASTE6(func, v1, v2, v3, v4, v5) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE5(func, v2, v3, v4, v5) +#define NLOHMANN_JSON_PASTE7(func, v1, v2, v3, v4, v5, v6) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE6(func, v2, v3, v4, v5, v6) +#define NLOHMANN_JSON_PASTE8(func, v1, v2, v3, v4, v5, v6, v7) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE7(func, v2, v3, v4, v5, v6, v7) +#define NLOHMANN_JSON_PASTE9(func, v1, v2, v3, v4, v5, v6, v7, v8) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE8(func, v2, v3, v4, v5, v6, v7, v8) +#define NLOHMANN_JSON_PASTE10(func, v1, v2, v3, v4, v5, v6, v7, v8, v9) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE9(func, v2, v3, v4, v5, v6, v7, v8, v9) +#define NLOHMANN_JSON_PASTE11(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE10(func, v2, v3, v4, v5, v6, v7, v8, v9, v10) +#define NLOHMANN_JSON_PASTE12(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE11(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) +#define NLOHMANN_JSON_PASTE13(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE12(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) +#define NLOHMANN_JSON_PASTE14(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE13(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) +#define NLOHMANN_JSON_PASTE15(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE14(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) +#define NLOHMANN_JSON_PASTE16(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE15(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) +#define NLOHMANN_JSON_PASTE17(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE16(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) +#define NLOHMANN_JSON_PASTE18(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE17(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17) +#define NLOHMANN_JSON_PASTE19(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE18(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18) +#define NLOHMANN_JSON_PASTE20(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE19(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19) +#define NLOHMANN_JSON_PASTE21(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE20(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20) +#define NLOHMANN_JSON_PASTE22(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE21(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21) +#define NLOHMANN_JSON_PASTE23(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE22(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22) +#define NLOHMANN_JSON_PASTE24(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE23(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23) +#define NLOHMANN_JSON_PASTE25(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE24(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24) +#define NLOHMANN_JSON_PASTE26(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE25(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25) +#define NLOHMANN_JSON_PASTE27(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE26(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26) +#define NLOHMANN_JSON_PASTE28(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE27(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27) +#define NLOHMANN_JSON_PASTE29(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE28(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28) +#define NLOHMANN_JSON_PASTE30(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE29(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29) +#define NLOHMANN_JSON_PASTE31(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE30(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30) +#define NLOHMANN_JSON_PASTE32(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE31(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31) +#define NLOHMANN_JSON_PASTE33(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE32(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32) +#define NLOHMANN_JSON_PASTE34(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE33(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33) +#define NLOHMANN_JSON_PASTE35(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE34(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34) +#define NLOHMANN_JSON_PASTE36(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE35(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35) +#define NLOHMANN_JSON_PASTE37(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE36(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36) +#define NLOHMANN_JSON_PASTE38(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE37(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37) +#define NLOHMANN_JSON_PASTE39(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE38(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38) +#define NLOHMANN_JSON_PASTE40(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE39(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39) +#define NLOHMANN_JSON_PASTE41(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE40(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40) +#define NLOHMANN_JSON_PASTE42(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE41(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41) +#define NLOHMANN_JSON_PASTE43(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE42(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42) +#define NLOHMANN_JSON_PASTE44(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE43(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43) +#define NLOHMANN_JSON_PASTE45(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE44(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44) +#define NLOHMANN_JSON_PASTE46(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE45(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45) +#define NLOHMANN_JSON_PASTE47(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE46(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46) +#define NLOHMANN_JSON_PASTE48(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE47(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47) +#define NLOHMANN_JSON_PASTE49(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE48(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48) +#define NLOHMANN_JSON_PASTE50(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE49(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49) +#define NLOHMANN_JSON_PASTE51(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE50(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50) +#define NLOHMANN_JSON_PASTE52(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE51(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51) +#define NLOHMANN_JSON_PASTE53(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE52(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52) +#define NLOHMANN_JSON_PASTE54(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE53(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53) +#define NLOHMANN_JSON_PASTE55(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE54(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54) +#define NLOHMANN_JSON_PASTE56(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE55(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55) +#define NLOHMANN_JSON_PASTE57(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE56(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56) +#define NLOHMANN_JSON_PASTE58(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE57(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57) +#define NLOHMANN_JSON_PASTE59(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE58(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58) +#define NLOHMANN_JSON_PASTE60(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE59(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59) +#define NLOHMANN_JSON_PASTE61(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE60(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60) +#define NLOHMANN_JSON_PASTE62(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE61(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61) +#define NLOHMANN_JSON_PASTE63(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE62(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62) +#define NLOHMANN_JSON_PASTE64(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62, v63) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE63(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62, v63) + +#define NLOHMANN_JSON_TO(v1) nlohmann_json_j[#v1] = nlohmann_json_t.v1; +#define NLOHMANN_JSON_FROM(v1) nlohmann_json_j.at(#v1).get_to(nlohmann_json_t.v1); +#define NLOHMANN_JSON_FROM_WITH_DEFAULT(v1) nlohmann_json_t.v1 = nlohmann_json_j.value(#v1, nlohmann_json_default_obj.v1); + +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_INTRUSIVE +@since version 3.9.0 +*/ +#define NLOHMANN_DEFINE_TYPE_INTRUSIVE(Type, ...) \ + friend void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + friend void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } + +#define NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT(Type, ...) \ + friend void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + friend void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { const Type nlohmann_json_default_obj{}; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE +@since version 3.9.0 +*/ +#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Type, ...) \ + inline void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + inline void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } + +#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(Type, ...) \ + inline void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + inline void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { const Type nlohmann_json_default_obj{}; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__)) } + + +// inspired from https://stackoverflow.com/a/26745591 +// allows to call any std function as if (e.g. with begin): +// using std::begin; begin(x); +// +// it allows using the detected idiom to retrieve the return type +// of such an expression +#define NLOHMANN_CAN_CALL_STD_FUNC_IMPL(std_name) \ + namespace detail { \ + using std::std_name; \ + \ + template \ + using result_of_##std_name = decltype(std_name(std::declval()...)); \ + } \ + \ + namespace detail2 { \ + struct std_name##_tag \ + { \ + }; \ + \ + template \ + std_name##_tag std_name(T&&...); \ + \ + template \ + using result_of_##std_name = decltype(std_name(std::declval()...)); \ + \ + template \ + struct would_call_std_##std_name \ + { \ + static constexpr auto const value = ::nlohmann::detail:: \ + is_detected_exact::value; \ + }; \ + } /* namespace detail2 */ \ + \ + template \ + struct would_call_std_##std_name : detail2::would_call_std_##std_name \ + { \ + } + +#ifndef JSON_USE_IMPLICIT_CONVERSIONS + #define JSON_USE_IMPLICIT_CONVERSIONS 1 +#endif + +#if JSON_USE_IMPLICIT_CONVERSIONS + #define JSON_EXPLICIT +#else + #define JSON_EXPLICIT explicit +#endif + +#ifndef JSON_DISABLE_ENUM_SERIALIZATION + #define JSON_DISABLE_ENUM_SERIALIZATION 0 +#endif + +#ifndef JSON_USE_GLOBAL_UDLS + #define JSON_USE_GLOBAL_UDLS 1 +#endif diff --git a/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/macro_unscope.hpp b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/macro_unscope.hpp new file mode 100644 index 0000000..4a871f0 --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/macro_unscope.hpp @@ -0,0 +1,44 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + +#pragma once + +// restore clang diagnostic settings +#if defined(__clang__) + #pragma clang diagnostic pop +#endif + +// clean up +#undef JSON_ASSERT +#undef JSON_INTERNAL_CATCH +#undef JSON_THROW +#undef JSON_PRIVATE_UNLESS_TESTED +#undef NLOHMANN_BASIC_JSON_TPL_DECLARATION +#undef NLOHMANN_BASIC_JSON_TPL +#undef JSON_EXPLICIT +#undef NLOHMANN_CAN_CALL_STD_FUNC_IMPL +#undef JSON_INLINE_VARIABLE +#undef JSON_NO_UNIQUE_ADDRESS +#undef JSON_DISABLE_ENUM_SERIALIZATION +#undef JSON_USE_GLOBAL_UDLS + +#ifndef JSON_TEST_KEEP_MACROS + #undef JSON_CATCH + #undef JSON_TRY + #undef JSON_HAS_CPP_11 + #undef JSON_HAS_CPP_14 + #undef JSON_HAS_CPP_17 + #undef JSON_HAS_CPP_20 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #undef JSON_HAS_THREE_WAY_COMPARISON + #undef JSON_HAS_RANGES + #undef JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON +#endif + +#include diff --git a/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/meta/call_std/begin.hpp b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/meta/call_std/begin.hpp new file mode 100644 index 0000000..27d36c6 --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/meta/call_std/begin.hpp @@ -0,0 +1,17 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + +#pragma once + +#include + +NLOHMANN_JSON_NAMESPACE_BEGIN + +NLOHMANN_CAN_CALL_STD_FUNC_IMPL(begin); + +NLOHMANN_JSON_NAMESPACE_END diff --git a/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/meta/call_std/end.hpp b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/meta/call_std/end.hpp new file mode 100644 index 0000000..d10bf83 --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/meta/call_std/end.hpp @@ -0,0 +1,17 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + +#pragma once + +#include + +NLOHMANN_JSON_NAMESPACE_BEGIN + +NLOHMANN_CAN_CALL_STD_FUNC_IMPL(end); + +NLOHMANN_JSON_NAMESPACE_END diff --git a/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/meta/cpp_future.hpp b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/meta/cpp_future.hpp new file mode 100644 index 0000000..22f2514 --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/meta/cpp_future.hpp @@ -0,0 +1,171 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-FileCopyrightText: 2018 The Abseil Authors +// SPDX-License-Identifier: MIT + +#pragma once + +#include // array +#include // size_t +#include // conditional, enable_if, false_type, integral_constant, is_constructible, is_integral, is_same, remove_cv, remove_reference, true_type +#include // index_sequence, make_index_sequence, index_sequence_for + +#include + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +template +using uncvref_t = typename std::remove_cv::type>::type; + +#ifdef JSON_HAS_CPP_14 + +// the following utilities are natively available in C++14 +using std::enable_if_t; +using std::index_sequence; +using std::make_index_sequence; +using std::index_sequence_for; + +#else + +// alias templates to reduce boilerplate +template +using enable_if_t = typename std::enable_if::type; + +// The following code is taken from https://github.com/abseil/abseil-cpp/blob/10cb35e459f5ecca5b2ff107635da0bfa41011b4/absl/utility/utility.h +// which is part of Google Abseil (https://github.com/abseil/abseil-cpp), licensed under the Apache License 2.0. + +//// START OF CODE FROM GOOGLE ABSEIL + +// integer_sequence +// +// Class template representing a compile-time integer sequence. An instantiation +// of `integer_sequence` has a sequence of integers encoded in its +// type through its template arguments (which is a common need when +// working with C++11 variadic templates). `absl::integer_sequence` is designed +// to be a drop-in replacement for C++14's `std::integer_sequence`. +// +// Example: +// +// template< class T, T... Ints > +// void user_function(integer_sequence); +// +// int main() +// { +// // user_function's `T` will be deduced to `int` and `Ints...` +// // will be deduced to `0, 1, 2, 3, 4`. +// user_function(make_integer_sequence()); +// } +template +struct integer_sequence +{ + using value_type = T; + static constexpr std::size_t size() noexcept + { + return sizeof...(Ints); + } +}; + +// index_sequence +// +// A helper template for an `integer_sequence` of `size_t`, +// `absl::index_sequence` is designed to be a drop-in replacement for C++14's +// `std::index_sequence`. +template +using index_sequence = integer_sequence; + +namespace utility_internal +{ + +template +struct Extend; + +// Note that SeqSize == sizeof...(Ints). It's passed explicitly for efficiency. +template +struct Extend, SeqSize, 0> +{ + using type = integer_sequence < T, Ints..., (Ints + SeqSize)... >; +}; + +template +struct Extend, SeqSize, 1> +{ + using type = integer_sequence < T, Ints..., (Ints + SeqSize)..., 2 * SeqSize >; +}; + +// Recursion helper for 'make_integer_sequence'. +// 'Gen::type' is an alias for 'integer_sequence'. +template +struct Gen +{ + using type = + typename Extend < typename Gen < T, N / 2 >::type, N / 2, N % 2 >::type; +}; + +template +struct Gen +{ + using type = integer_sequence; +}; + +} // namespace utility_internal + +// Compile-time sequences of integers + +// make_integer_sequence +// +// This template alias is equivalent to +// `integer_sequence`, and is designed to be a drop-in +// replacement for C++14's `std::make_integer_sequence`. +template +using make_integer_sequence = typename utility_internal::Gen::type; + +// make_index_sequence +// +// This template alias is equivalent to `index_sequence<0, 1, ..., N-1>`, +// and is designed to be a drop-in replacement for C++14's +// `std::make_index_sequence`. +template +using make_index_sequence = make_integer_sequence; + +// index_sequence_for +// +// Converts a typename pack into an index sequence of the same length, and +// is designed to be a drop-in replacement for C++14's +// `std::index_sequence_for()` +template +using index_sequence_for = make_index_sequence; + +//// END OF CODE FROM GOOGLE ABSEIL + +#endif + +// dispatch utility (taken from ranges-v3) +template struct priority_tag : priority_tag < N - 1 > {}; +template<> struct priority_tag<0> {}; + +// taken from ranges-v3 +template +struct static_const +{ + static JSON_INLINE_VARIABLE constexpr T value{}; +}; + +#ifndef JSON_HAS_CPP_17 + template + constexpr T static_const::value; +#endif + +template +inline constexpr std::array make_array(Args&& ... args) +{ + return std::array {{static_cast(std::forward(args))...}}; +} + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END diff --git a/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/meta/detected.hpp b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/meta/detected.hpp new file mode 100644 index 0000000..b2f6db9 --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/meta/detected.hpp @@ -0,0 +1,70 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + +#pragma once + +#include + +#include + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +// https://en.cppreference.com/w/cpp/experimental/is_detected +struct nonesuch +{ + nonesuch() = delete; + ~nonesuch() = delete; + nonesuch(nonesuch const&) = delete; + nonesuch(nonesuch const&&) = delete; + void operator=(nonesuch const&) = delete; + void operator=(nonesuch&&) = delete; +}; + +template class Op, + class... Args> +struct detector +{ + using value_t = std::false_type; + using type = Default; +}; + +template class Op, class... Args> +struct detector>, Op, Args...> +{ + using value_t = std::true_type; + using type = Op; +}; + +template class Op, class... Args> +using is_detected = typename detector::value_t; + +template class Op, class... Args> +struct is_detected_lazy : is_detected { }; + +template class Op, class... Args> +using detected_t = typename detector::type; + +template class Op, class... Args> +using detected_or = detector; + +template class Op, class... Args> +using detected_or_t = typename detected_or::type; + +template class Op, class... Args> +using is_detected_exact = std::is_same>; + +template class Op, class... Args> +using is_detected_convertible = + std::is_convertible, To>; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END diff --git a/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/meta/identity_tag.hpp b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/meta/identity_tag.hpp new file mode 100644 index 0000000..71164f2 --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/meta/identity_tag.hpp @@ -0,0 +1,21 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + +#pragma once + +#include + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +// dispatching helper struct +template struct identity_tag {}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END diff --git a/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/meta/is_sax.hpp b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/meta/is_sax.hpp new file mode 100644 index 0000000..2150089 --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/meta/is_sax.hpp @@ -0,0 +1,159 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + +#pragma once + +#include // size_t +#include // declval +#include // string + +#include +#include +#include + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +template +using null_function_t = decltype(std::declval().null()); + +template +using boolean_function_t = + decltype(std::declval().boolean(std::declval())); + +template +using number_integer_function_t = + decltype(std::declval().number_integer(std::declval())); + +template +using number_unsigned_function_t = + decltype(std::declval().number_unsigned(std::declval())); + +template +using number_float_function_t = decltype(std::declval().number_float( + std::declval(), std::declval())); + +template +using string_function_t = + decltype(std::declval().string(std::declval())); + +template +using binary_function_t = + decltype(std::declval().binary(std::declval())); + +template +using start_object_function_t = + decltype(std::declval().start_object(std::declval())); + +template +using key_function_t = + decltype(std::declval().key(std::declval())); + +template +using end_object_function_t = decltype(std::declval().end_object()); + +template +using start_array_function_t = + decltype(std::declval().start_array(std::declval())); + +template +using end_array_function_t = decltype(std::declval().end_array()); + +template +using parse_error_function_t = decltype(std::declval().parse_error( + std::declval(), std::declval(), + std::declval())); + +template +struct is_sax +{ + private: + static_assert(is_basic_json::value, + "BasicJsonType must be of type basic_json<...>"); + + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using binary_t = typename BasicJsonType::binary_t; + using exception_t = typename BasicJsonType::exception; + + public: + static constexpr bool value = + is_detected_exact::value && + is_detected_exact::value && + is_detected_exact::value && + is_detected_exact::value && + is_detected_exact::value && + is_detected_exact::value && + is_detected_exact::value && + is_detected_exact::value && + is_detected_exact::value && + is_detected_exact::value && + is_detected_exact::value && + is_detected_exact::value && + is_detected_exact::value; +}; + +template +struct is_sax_static_asserts +{ + private: + static_assert(is_basic_json::value, + "BasicJsonType must be of type basic_json<...>"); + + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using string_t = typename BasicJsonType::string_t; + using binary_t = typename BasicJsonType::binary_t; + using exception_t = typename BasicJsonType::exception; + + public: + static_assert(is_detected_exact::value, + "Missing/invalid function: bool null()"); + static_assert(is_detected_exact::value, + "Missing/invalid function: bool boolean(bool)"); + static_assert(is_detected_exact::value, + "Missing/invalid function: bool boolean(bool)"); + static_assert( + is_detected_exact::value, + "Missing/invalid function: bool number_integer(number_integer_t)"); + static_assert( + is_detected_exact::value, + "Missing/invalid function: bool number_unsigned(number_unsigned_t)"); + static_assert(is_detected_exact::value, + "Missing/invalid function: bool number_float(number_float_t, const string_t&)"); + static_assert( + is_detected_exact::value, + "Missing/invalid function: bool string(string_t&)"); + static_assert( + is_detected_exact::value, + "Missing/invalid function: bool binary(binary_t&)"); + static_assert(is_detected_exact::value, + "Missing/invalid function: bool start_object(std::size_t)"); + static_assert(is_detected_exact::value, + "Missing/invalid function: bool key(string_t&)"); + static_assert(is_detected_exact::value, + "Missing/invalid function: bool end_object()"); + static_assert(is_detected_exact::value, + "Missing/invalid function: bool start_array(std::size_t)"); + static_assert(is_detected_exact::value, + "Missing/invalid function: bool end_array()"); + static_assert( + is_detected_exact::value, + "Missing/invalid function: bool parse_error(std::size_t, const " + "std::string&, const exception&)"); +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END diff --git a/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/meta/std_fs.hpp b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/meta/std_fs.hpp new file mode 100644 index 0000000..c096158 --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/meta/std_fs.hpp @@ -0,0 +1,29 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + +#pragma once + +#include + +#if JSON_HAS_EXPERIMENTAL_FILESYSTEM +#include +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ +namespace std_fs = std::experimental::filesystem; +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END +#elif JSON_HAS_FILESYSTEM +#include +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ +namespace std_fs = std::filesystem; +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END +#endif diff --git a/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/meta/type_traits.hpp b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/meta/type_traits.hpp new file mode 100644 index 0000000..cfc7e5a --- /dev/null +++ b/deploy/robot_ws/src/go2py_node/include/nlohmann/detail/meta/type_traits.hpp @@ -0,0 +1,740 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.11.2 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann +// SPDX-License-Identifier: MIT + +#pragma once + +#include // numeric_limits +#include // false_type, is_constructible, is_integral, is_same, true_type +#include // declval +#include // tuple + +#include +#include +#include +#include +#include +#include +#include + +NLOHMANN_JSON_NAMESPACE_BEGIN +/*! +@brief detail namespace with internal helper functions + +This namespace collects functions that should not be exposed, +implementations of some @ref basic_json methods, and meta-programming helpers. + +@since version 2.1.0 +*/ +namespace detail +{ + +///////////// +// helpers // +///////////// + +// Note to maintainers: +// +// Every trait in this file expects a non CV-qualified type. +// The only exceptions are in the 'aliases for detected' section +// (i.e. those of the form: decltype(T::member_function(std::declval()))) +// +// In this case, T has to be properly CV-qualified to constraint the function arguments +// (e.g. to_json(BasicJsonType&, const T&)) + +template struct is_basic_json : std::false_type {}; + +NLOHMANN_BASIC_JSON_TPL_DECLARATION +struct is_basic_json : std::true_type {}; + +// used by exceptions create() member functions +// true_type for pointer to possibly cv-qualified basic_json or std::nullptr_t +// false_type otherwise +template +struct is_basic_json_context : + std::integral_constant < bool, + is_basic_json::type>::type>::value + || std::is_same::value > +{}; + +////////////////////// +// json_ref helpers // +////////////////////// + +template +class json_ref; + +template +struct is_json_ref : std::false_type {}; + +template +struct is_json_ref> : std::true_type {}; + +////////////////////////// +// aliases for detected // +////////////////////////// + +template +using mapped_type_t = typename T::mapped_type; + +template +using key_type_t = typename T::key_type; + +template +using value_type_t = typename T::value_type; + +template +using difference_type_t = typename T::difference_type; + +template +using pointer_t = typename T::pointer; + +template +using reference_t = typename T::reference; + +template +using iterator_category_t = typename T::iterator_category; + +template +using to_json_function = decltype(T::to_json(std::declval()...)); + +template +using from_json_function = decltype(T::from_json(std::declval()...)); + +template +using get_template_function = decltype(std::declval().template get()); + +// trait checking if JSONSerializer::from_json(json const&, udt&) exists +template +struct has_from_json : std::false_type {}; + +// trait checking if j.get is valid +// use this trait instead of std::is_constructible or std::is_convertible, +// both rely on, or make use of implicit conversions, and thus fail when T +// has several constructors/operator= (see https://github.com/nlohmann/json/issues/958) +template +struct is_getable +{ + static constexpr bool value = is_detected::value; +}; + +template +struct has_from_json < BasicJsonType, T, enable_if_t < !is_basic_json::value >> +{ + using serializer = typename BasicJsonType::template json_serializer; + + static constexpr bool value = + is_detected_exact::value; +}; + +// This trait checks if JSONSerializer::from_json(json const&) exists +// this overload is used for non-default-constructible user-defined-types +template +struct has_non_default_from_json : std::false_type {}; + +template +struct has_non_default_from_json < BasicJsonType, T, enable_if_t < !is_basic_json::value >> +{ + using serializer = typename BasicJsonType::template json_serializer; + + static constexpr bool value = + is_detected_exact::value; +}; + +// This trait checks if BasicJsonType::json_serializer::to_json exists +// Do not evaluate the trait when T is a basic_json type, to avoid template instantiation infinite recursion. +template +struct has_to_json : std::false_type {}; + +template +struct has_to_json < BasicJsonType, T, enable_if_t < !is_basic_json::value >> +{ + using serializer = typename BasicJsonType::template json_serializer; + + static constexpr bool value = + is_detected_exact::value; +}; + +template +using detect_key_compare = typename T::key_compare; + +template +struct has_key_compare : std::integral_constant::value> {}; + +// obtains the actual object key comparator +template +struct actual_object_comparator +{ + using object_t = typename BasicJsonType::object_t; + using object_comparator_t = typename BasicJsonType::default_object_comparator_t; + using type = typename std::conditional < has_key_compare::value, + typename object_t::key_compare, object_comparator_t>::type; +}; + +template +using actual_object_comparator_t = typename actual_object_comparator::type; + +/////////////////// +// is_ functions // +/////////////////// + +// https://en.cppreference.com/w/cpp/types/conjunction +template struct conjunction : std::true_type { }; +template struct conjunction : B { }; +template +struct conjunction +: std::conditional(B::value), conjunction, B>::type {}; + +// https://en.cppreference.com/w/cpp/types/negation +template struct negation : std::integral_constant < bool, !B::value > { }; + +// Reimplementation of is_constructible and is_default_constructible, due to them being broken for +// std::pair and std::tuple until LWG 2367 fix (see https://cplusplus.github.io/LWG/lwg-defects.html#2367). +// This causes compile errors in e.g. clang 3.5 or gcc 4.9. +template +struct is_default_constructible : std::is_default_constructible {}; + +template +struct is_default_constructible> + : conjunction, is_default_constructible> {}; + +template +struct is_default_constructible> + : conjunction, is_default_constructible> {}; + +template +struct is_default_constructible> + : conjunction...> {}; + +template +struct is_default_constructible> + : conjunction...> {}; + + +template +struct is_constructible : std::is_constructible {}; + +template +struct is_constructible> : is_default_constructible> {}; + +template +struct is_constructible> : is_default_constructible> {}; + +template +struct is_constructible> : is_default_constructible> {}; + +template +struct is_constructible> : is_default_constructible> {}; + + +template +struct is_iterator_traits : std::false_type {}; + +template +struct is_iterator_traits> +{ + private: + using traits = iterator_traits; + + public: + static constexpr auto value = + is_detected::value && + is_detected::value && + is_detected::value && + is_detected::value && + is_detected::value; +}; + +template +struct is_range +{ + private: + using t_ref = typename std::add_lvalue_reference::type; + + using iterator = detected_t; + using sentinel = detected_t; + + // to be 100% correct, it should use https://en.cppreference.com/w/cpp/iterator/input_or_output_iterator + // and https://en.cppreference.com/w/cpp/iterator/sentinel_for + // but reimplementing these would be too much work, as a lot of other concepts are used underneath + static constexpr auto is_iterator_begin = + is_iterator_traits>::value; + + public: + static constexpr bool value = !std::is_same::value && !std::is_same::value && is_iterator_begin; +}; + +template +using iterator_t = enable_if_t::value, result_of_begin())>>; + +template +using range_value_t = value_type_t>>; + +// The following implementation of is_complete_type is taken from +// https://blogs.msdn.microsoft.com/vcblog/2015/12/02/partial-support-for-expression-sfinae-in-vs-2015-update-1/ +// and is written by Xiang Fan who agreed to using it in this library. + +template +struct is_complete_type : std::false_type {}; + +template +struct is_complete_type : std::true_type {}; + +template +struct is_compatible_object_type_impl : std::false_type {}; + +template +struct is_compatible_object_type_impl < + BasicJsonType, CompatibleObjectType, + enable_if_t < is_detected::value&& + is_detected::value >> +{ + using object_t = typename BasicJsonType::object_t; + + // macOS's is_constructible does not play well with nonesuch... + static constexpr bool value = + is_constructible::value && + is_constructible::value; +}; + +template +struct is_compatible_object_type + : is_compatible_object_type_impl {}; + +template +struct is_constructible_object_type_impl : std::false_type {}; + +template +struct is_constructible_object_type_impl < + BasicJsonType, ConstructibleObjectType, + enable_if_t < is_detected::value&& + is_detected::value >> +{ + using object_t = typename BasicJsonType::object_t; + + static constexpr bool value = + (is_default_constructible::value && + (std::is_move_assignable::value || + std::is_copy_assignable::value) && + (is_constructible::value && + std::is_same < + typename object_t::mapped_type, + typename ConstructibleObjectType::mapped_type >::value)) || + (has_from_json::value || + has_non_default_from_json < + BasicJsonType, + typename ConstructibleObjectType::mapped_type >::value); +}; + +template +struct is_constructible_object_type + : is_constructible_object_type_impl {}; + +template +struct is_compatible_string_type +{ + static constexpr auto value = + is_constructible::value; +}; + +template +struct is_constructible_string_type +{ + // launder type through decltype() to fix compilation failure on ICPC +#ifdef __INTEL_COMPILER + using laundered_type = decltype(std::declval()); +#else + using laundered_type = ConstructibleStringType; +#endif + + static constexpr auto value = + conjunction < + is_constructible, + is_detected_exact>::value; +}; + +template +struct is_compatible_array_type_impl : std::false_type {}; + +template +struct is_compatible_array_type_impl < + BasicJsonType, CompatibleArrayType, + enable_if_t < + is_detected::value&& + is_iterator_traits>>::value&& +// special case for types like std::filesystem::path whose iterator's value_type are themselves +// c.f. https://github.com/nlohmann/json/pull/3073 + !std::is_same>::value >> +{ + static constexpr bool value = + is_constructible>::value; +}; + +template +struct is_compatible_array_type + : is_compatible_array_type_impl {}; + +template +struct is_constructible_array_type_impl : std::false_type {}; + +template +struct is_constructible_array_type_impl < + BasicJsonType, ConstructibleArrayType, + enable_if_t::value >> + : std::true_type {}; + +template +struct is_constructible_array_type_impl < + BasicJsonType, ConstructibleArrayType, + enable_if_t < !std::is_same::value&& + !is_compatible_string_type::value&& + is_default_constructible::value&& +(std::is_move_assignable::value || + std::is_copy_assignable::value)&& +is_detected::value&& +is_iterator_traits>>::value&& +is_detected::value&& +// special case for types like std::filesystem::path whose iterator's value_type are themselves +// c.f. https://github.com/nlohmann/json/pull/3073 +!std::is_same>::value&& + is_complete_type < + detected_t>::value >> +{ + using value_type = range_value_t; + + static constexpr bool value = + std::is_same::value || + has_from_json::value || + has_non_default_from_json < + BasicJsonType, + value_type >::value; +}; + +template +struct is_constructible_array_type + : is_constructible_array_type_impl {}; + +template +struct is_compatible_integer_type_impl : std::false_type {}; + +template +struct is_compatible_integer_type_impl < + RealIntegerType, CompatibleNumberIntegerType, + enable_if_t < std::is_integral::value&& + std::is_integral::value&& + !std::is_same::value >> +{ + // is there an assert somewhere on overflows? + using RealLimits = std::numeric_limits; + using CompatibleLimits = std::numeric_limits; + + static constexpr auto value = + is_constructible::value && + CompatibleLimits::is_integer && + RealLimits::is_signed == CompatibleLimits::is_signed; +}; + +template +struct is_compatible_integer_type + : is_compatible_integer_type_impl {}; + +template +struct is_compatible_type_impl: std::false_type {}; + +template +struct is_compatible_type_impl < + BasicJsonType, CompatibleType, + enable_if_t::value >> +{ + static constexpr bool value = + has_to_json::value; +}; + +template +struct is_compatible_type + : is_compatible_type_impl {}; + +template +struct is_constructible_tuple : std::false_type {}; + +template +struct is_constructible_tuple> : conjunction...> {}; + +template +struct is_json_iterator_of : std::false_type {}; + +template +struct is_json_iterator_of : std::true_type {}; + +template +struct is_json_iterator_of : std::true_type +{}; + +// checks if a given type T is a template specialization of Primary +template