Skip to content

Commit

Permalink
PR #13702 from Eran: align ROS2 topics with Humble IDLs
Browse files Browse the repository at this point in the history
  • Loading branch information
maloel authored Jan 26, 2025
2 parents c0b18f2 + 32e0f3c commit b95f813
Show file tree
Hide file tree
Showing 43 changed files with 1,358 additions and 271 deletions.
4 changes: 2 additions & 2 deletions third-party/realdds/include/realdds/topics/image-msg.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// License: Apache 2.0. See LICENSE file in root directory.
// Copyright(c) 2022-4 Intel Corporation. All Rights Reserved.
// Copyright(c) 2022-5 Intel Corporation. All Rights Reserved.
#pragma once

#include <realdds/dds-defines.h>
#include <fastdds/rtps/common/Time_t.h>

#include <realdds/topics/ros2/ros2image.h>
#include <realdds/topics/ros2/sensor_msgs/msg/Image.h>

#include <string>
#include <memory>
Expand Down
4 changes: 2 additions & 2 deletions third-party/realdds/include/realdds/topics/imu-msg.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// License: Apache 2.0. See LICENSE file in root directory.
// Copyright(c) 2023-4 Intel Corporation. All Rights Reserved.
// Copyright(c) 2023-5 Intel Corporation. All Rights Reserved.
#pragma once

#include <realdds/dds-defines.h>
#include <fastdds/rtps/common/Time_t.h>

#include <realdds/topics/ros2/ros2imu.h>
#include <realdds/topics/ros2/sensor_msgs/msg/Imu.h>

#include <string>
#include <memory>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// License: Apache 2.0. See LICENSE file in root directory.
// Copyright(c) 2023 Intel Corporation. All Rights Reserved.
// Copyright(c) 2023-5 Intel Corporation. All Rights Reserved.

/*!
* @file Time.h
Expand All @@ -8,8 +8,8 @@
* This file was generated by the tool gen.
*/

#ifndef _FAST_DDS_GENERATED_STD_MSGS_MSG_TIME_H_
#define _FAST_DDS_GENERATED_STD_MSGS_MSG_TIME_H_
#ifndef _FAST_DDS_GENERATED_BUILTIN_INTERFACES_MSG_TIME_H_
#define _FAST_DDS_GENERATED_BUILTIN_INTERFACES_MSG_TIME_H_


//#include <fastrtps/utils/fixed_size_string.hpp>
Expand Down Expand Up @@ -52,7 +52,7 @@ class Cdr;
} // namespace eprosima


namespace std_msgs {
namespace builtin_interfaces {
namespace msg {
/*!
* @brief This class represents the structure Time defined by the user in the IDL file.
Expand All @@ -74,42 +74,42 @@ namespace std_msgs {

/*!
* @brief Copy constructor.
* @param x Reference to the object std_msgs::msg::Time that will be copied.
* @param x Reference to the object builtin_interfaces::msg::Time that will be copied.
*/
eProsima_user_DllExport Time(
const Time& x);

/*!
* @brief Move constructor.
* @param x Reference to the object std_msgs::msg::Time that will be copied.
* @param x Reference to the object builtin_interfaces::msg::Time that will be copied.
*/
eProsima_user_DllExport Time(
Time&& x) noexcept;

/*!
* @brief Copy assignment.
* @param x Reference to the object std_msgs::msg::Time that will be copied.
* @param x Reference to the object builtin_interfaces::msg::Time that will be copied.
*/
eProsima_user_DllExport Time& operator =(
const Time& x);

/*!
* @brief Move assignment.
* @param x Reference to the object std_msgs::msg::Time that will be copied.
* @param x Reference to the object builtin_interfaces::msg::Time that will be copied.
*/
eProsima_user_DllExport Time& operator =(
Time&& x) noexcept;

/*!
* @brief Comparison operator.
* @param x std_msgs::msg::Time object to compare.
* @param x builtin_interfaces::msg::Time object to compare.
*/
eProsima_user_DllExport bool operator ==(
const Time& x) const;

/*!
* @brief Comparison operator.
* @param x std_msgs::msg::Time object to compare.
* @param x builtin_interfaces::msg::Time object to compare.
*/
eProsima_user_DllExport bool operator !=(
const Time& x) const;
Expand Down Expand Up @@ -169,7 +169,7 @@ namespace std_msgs {
* @return Serialized size.
*/
eProsima_user_DllExport static size_t getCdrSerializedSize(
const std_msgs::msg::Time& data,
const builtin_interfaces::msg::Time& data,
size_t current_alignment = 0);


Expand Down Expand Up @@ -216,6 +216,6 @@ namespace std_msgs {
uint32_t m_nanosec;
};
} // namespace msg
} // namespace std_msgs
} // namespace builtin_interfaces

#endif // _FAST_DDS_GENERATED_STD_MSGS_MSG_TIME_H_
#endif // _FAST_DDS_GENERATED_BUILTIN_INTERFACES_MSG_TIME_H_
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// License: Apache 2.0. See LICENSE file in root directory.
// Copyright(c) 2023 Intel Corporation. All Rights Reserved.
// Copyright(c) 2023-5 Intel Corporation. All Rights Reserved.

/*!
* @file TimePubSubTypes.h
Expand All @@ -9,20 +9,20 @@
*/


#ifndef _FAST_DDS_GENERATED_STD_MSGS_MSG_TIME_PUBSUBTYPES_H_
#define _FAST_DDS_GENERATED_STD_MSGS_MSG_TIME_PUBSUBTYPES_H_
#ifndef _FAST_DDS_GENERATED_BUILTIN_INTERFACES_MSG_TIME_PUBSUBTYPES_H_
#define _FAST_DDS_GENERATED_BUILTIN_INTERFACES_MSG_TIME_PUBSUBTYPES_H_

#include <fastdds/dds/topic/TopicDataType.hpp>
#include <fastrtps/utils/md5.h>

#include "ros2time.h"
#include "Time.h"

#if !defined(GEN_API_VER) || (GEN_API_VER != 1)
#error \
Generated Time is not compatible with current installed Fast DDS. Please, regenerate it with fastddsgen.
#endif // GEN_API_VER

namespace std_msgs
namespace builtin_interfaces
{
namespace msg
{
Expand Down Expand Up @@ -93,4 +93,4 @@ namespace std_msgs
}
}

#endif // _FAST_DDS_GENERATED_STD_MSGS_MSG_TIME_PUBSUBTYPES_H_
#endif // _FAST_DDS_GENERATED_BUILTIN_INTERFACES_MSG_TIME_PUBSUBTYPES_H_
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// License: Apache 2.0. See LICENSE file in root directory.
// Copyright(c) 2023 Intel Corporation. All Rights Reserved.
// Copyright(c) 2023-5 Intel Corporation. All Rights Reserved.

/*!
* @file QuaternionPubSubTypes.h
Expand All @@ -15,7 +15,7 @@
#include <fastdds/dds/topic/TopicDataType.hpp>
#include <fastrtps/utils/md5.h>

#include <realdds/topics/ros2/ros2quaternion.h>
#include "Quaternion.h"

#if !defined(GEN_API_VER) || (GEN_API_VER != 1)
#error \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// License: Apache 2.0. See LICENSE file in root directory.
// Copyright(c) 2023 Intel Corporation. All Rights Reserved.
// Copyright(c) 2023-5 Intel Corporation. All Rights Reserved.

/*!
* @file Vector3PubSubTypes.h
Expand All @@ -15,7 +15,7 @@
#include <fastdds/dds/topic/TopicDataType.hpp>
#include <fastrtps/utils/md5.h>

#include "ros2vector3.h"
#include "Vector3.h"

#if !defined(GEN_API_VER) || (GEN_API_VER != 1)
#error \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// License: Apache 2.0. See LICENSE file in root directory.
// Copyright(c) 2023 Intel Corporation. All Rights Reserved.
// Copyright(c) 2023-5 Intel Corporation. All Rights Reserved.

/*!
* @file Image.h
Expand All @@ -11,7 +11,7 @@
#ifndef _FAST_DDS_GENERATED_SENSOR_MSGS_MSG_IMAGE_H_
#define _FAST_DDS_GENERATED_SENSOR_MSGS_MSG_IMAGE_H_

#include "ros2header.h"
#include "../../std_msgs/msg/Header.h"

//#include <fastrtps/utils/fixed_size_string.hpp>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// License: Apache 2.0. See LICENSE file in root directory.
// Copyright(c) 2023 Intel Corporation. All Rights Reserved.
// Copyright(c) 2023-5 Intel Corporation. All Rights Reserved.

/*!
* @file ImagePubSubTypes.h
Expand All @@ -15,7 +15,7 @@
#include <fastdds/dds/topic/TopicDataType.hpp>
#include <fastrtps/utils/md5.h>

#include "ros2image.h"
#include "Image.h"

#if !defined(GEN_API_VER) || (GEN_API_VER != 1)
#error \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// License: Apache 2.0. See LICENSE file in root directory.
// Copyright(c) 2023 Intel Corporation. All Rights Reserved.
// Copyright(c) 2023-5 Intel Corporation. All Rights Reserved.

/*!
* @file Imu.h
Expand All @@ -11,9 +11,9 @@
#ifndef _FAST_DDS_GENERATED_SENSOR_MSGS_MSG_IMU_H_
#define _FAST_DDS_GENERATED_SENSOR_MSGS_MSG_IMU_H_

#include <realdds/topics/ros2/ros2vector3.h>
#include <realdds/topics/ros2/ros2quaternion.h>
#include <realdds/topics/ros2/ros2header.h>
#include "../../geometry_msgs/msg/Vector3.h"
#include "../../geometry_msgs/msg/Quaternion.h"
#include "../../std_msgs/msg/Header.h"

#include <fastrtps/utils/fixed_size_string.hpp>

Expand Down Expand Up @@ -57,7 +57,7 @@ class Cdr;

namespace sensor_msgs {
namespace msg {
typedef std::array<double, 9> sensor_msgs__Imu__double_array_9;
typedef std::array<double, 9> double__9;
/*!
* @brief This class represents the structure Imu defined by the user in the IDL file.
* @ingroup IMU
Expand Down Expand Up @@ -173,26 +173,26 @@ namespace sensor_msgs {
* @param _orientation_covariance New value to be copied in member orientation_covariance
*/
eProsima_user_DllExport void orientation_covariance(
const sensor_msgs::msg::sensor_msgs__Imu__double_array_9& _orientation_covariance);
const sensor_msgs::msg::double__9& _orientation_covariance);

/*!
* @brief This function moves the value in member orientation_covariance
* @param _orientation_covariance New value to be moved in member orientation_covariance
*/
eProsima_user_DllExport void orientation_covariance(
sensor_msgs::msg::sensor_msgs__Imu__double_array_9&& _orientation_covariance);
sensor_msgs::msg::double__9&& _orientation_covariance);

/*!
* @brief This function returns a constant reference to member orientation_covariance
* @return Constant reference to member orientation_covariance
*/
eProsima_user_DllExport const sensor_msgs::msg::sensor_msgs__Imu__double_array_9& orientation_covariance() const;
eProsima_user_DllExport const sensor_msgs::msg::double__9& orientation_covariance() const;

/*!
* @brief This function returns a reference to member orientation_covariance
* @return Reference to member orientation_covariance
*/
eProsima_user_DllExport sensor_msgs::msg::sensor_msgs__Imu__double_array_9& orientation_covariance();
eProsima_user_DllExport sensor_msgs::msg::double__9& orientation_covariance();
/*!
* @brief This function copies the value in member angular_velocity
* @param _angular_velocity New value to be copied in member angular_velocity
Expand Down Expand Up @@ -223,26 +223,26 @@ namespace sensor_msgs {
* @param _angular_velocity_covariance New value to be copied in member angular_velocity_covariance
*/
eProsima_user_DllExport void angular_velocity_covariance(
const sensor_msgs::msg::sensor_msgs__Imu__double_array_9& _angular_velocity_covariance);
const sensor_msgs::msg::double__9& _angular_velocity_covariance);

/*!
* @brief This function moves the value in member angular_velocity_covariance
* @param _angular_velocity_covariance New value to be moved in member angular_velocity_covariance
*/
eProsima_user_DllExport void angular_velocity_covariance(
sensor_msgs::msg::sensor_msgs__Imu__double_array_9&& _angular_velocity_covariance);
sensor_msgs::msg::double__9&& _angular_velocity_covariance);

/*!
* @brief This function returns a constant reference to member angular_velocity_covariance
* @return Constant reference to member angular_velocity_covariance
*/
eProsima_user_DllExport const sensor_msgs::msg::sensor_msgs__Imu__double_array_9& angular_velocity_covariance() const;
eProsima_user_DllExport const sensor_msgs::msg::double__9& angular_velocity_covariance() const;

/*!
* @brief This function returns a reference to member angular_velocity_covariance
* @return Reference to member angular_velocity_covariance
*/
eProsima_user_DllExport sensor_msgs::msg::sensor_msgs__Imu__double_array_9& angular_velocity_covariance();
eProsima_user_DllExport sensor_msgs::msg::double__9& angular_velocity_covariance();
/*!
* @brief This function copies the value in member linear_acceleration
* @param _linear_acceleration New value to be copied in member linear_acceleration
Expand Down Expand Up @@ -273,26 +273,26 @@ namespace sensor_msgs {
* @param _linear_acceleration_covariance New value to be copied in member linear_acceleration_covariance
*/
eProsima_user_DllExport void linear_acceleration_covariance(
const sensor_msgs::msg::sensor_msgs__Imu__double_array_9& _linear_acceleration_covariance);
const sensor_msgs::msg::double__9& _linear_acceleration_covariance);

/*!
* @brief This function moves the value in member linear_acceleration_covariance
* @param _linear_acceleration_covariance New value to be moved in member linear_acceleration_covariance
*/
eProsima_user_DllExport void linear_acceleration_covariance(
sensor_msgs::msg::sensor_msgs__Imu__double_array_9&& _linear_acceleration_covariance);
sensor_msgs::msg::double__9&& _linear_acceleration_covariance);

/*!
* @brief This function returns a constant reference to member linear_acceleration_covariance
* @return Constant reference to member linear_acceleration_covariance
*/
eProsima_user_DllExport const sensor_msgs::msg::sensor_msgs__Imu__double_array_9& linear_acceleration_covariance() const;
eProsima_user_DllExport const sensor_msgs::msg::double__9& linear_acceleration_covariance() const;

/*!
* @brief This function returns a reference to member linear_acceleration_covariance
* @return Reference to member linear_acceleration_covariance
*/
eProsima_user_DllExport sensor_msgs::msg::sensor_msgs__Imu__double_array_9& linear_acceleration_covariance();
eProsima_user_DllExport sensor_msgs::msg::double__9& linear_acceleration_covariance();

/*!
* @brief This function returns the maximum serialized size of an object
Expand Down Expand Up @@ -355,11 +355,11 @@ namespace sensor_msgs {

std_msgs::msg::Header m_header;
geometry_msgs::msg::Quaternion m_orientation;
sensor_msgs::msg::sensor_msgs__Imu__double_array_9 m_orientation_covariance;
sensor_msgs::msg::double__9 m_orientation_covariance;
geometry_msgs::msg::Vector3 m_angular_velocity;
sensor_msgs::msg::sensor_msgs__Imu__double_array_9 m_angular_velocity_covariance;
sensor_msgs::msg::double__9 m_angular_velocity_covariance;
geometry_msgs::msg::Vector3 m_linear_acceleration;
sensor_msgs::msg::sensor_msgs__Imu__double_array_9 m_linear_acceleration_covariance;
sensor_msgs::msg::double__9 m_linear_acceleration_covariance;
};
} // namespace msg
} // namespace sensor_msgs
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// License: Apache 2.0. See LICENSE file in root directory.
// Copyright(c) 2023 Intel Corporation. All Rights Reserved.
// Copyright(c) 2023-5 Intel Corporation. All Rights Reserved.

/*!
* @file ImuPubSubTypes.h
Expand All @@ -15,7 +15,7 @@
#include <fastdds/dds/topic/TopicDataType.hpp>
#include <fastrtps/utils/md5.h>

#include <realdds/topics/ros2/ros2imu.h>
#include "Imu.h"

#if !defined(GEN_API_VER) || (GEN_API_VER != 1)
#error \
Expand All @@ -26,7 +26,7 @@ namespace sensor_msgs
{
namespace msg
{
typedef std::array<double, 9> sensor_msgs__Imu__double_array_9;
typedef std::array<double, 9> double__9;
/*!
* @brief This class represents the TopicDataType of the type Imu defined by the user in the IDL file.
* @ingroup IMU
Expand Down
Loading

0 comments on commit b95f813

Please sign in to comment.