fix carla collision event name

This commit is contained in:
LuisPoveda 2023-11-07 11:49:25 +01:00 committed by bernat
parent 4ee75c4bc0
commit 8fc7af31fe
4 changed files with 85 additions and 85 deletions

View File

@ -13,7 +13,7 @@
// limitations under the License.
/*!
* @file CarlaCollisionEvent.cpp
* @file CarlaCarlaCollisionEvent.cpp
* This source file contains the definition of the described types in the IDL file.
*
* This file was generated by the tool gen.
@ -36,14 +36,14 @@ using namespace eprosima::fastcdr::exception;
#define carla_msgs_msg_geometry_msgs_msg_Vector3_max_cdr_typesize 24ULL;
#define carla_msgs_msg_std_msgs_msg_Header_max_cdr_typesize 268ULL;
#define carla_msgs_msg_CollisionEvent_max_cdr_typesize 296ULL;
#define carla_msgs_msg_CarlaCollisionEvent_max_cdr_typesize 296ULL;
#define carla_msgs_msg_std_msgs_msg_Time_max_cdr_typesize 8ULL;
#define carla_msgs_msg_geometry_msgs_msg_Vector3_max_key_cdr_typesize 0ULL;
#define carla_msgs_msg_std_msgs_msg_Header_max_key_cdr_typesize 0ULL;
#define carla_msgs_msg_CollisionEvent_max_key_cdr_typesize 0ULL;
#define carla_msgs_msg_CarlaCollisionEvent_max_key_cdr_typesize 0ULL;
#define carla_msgs_msg_std_msgs_msg_Time_max_key_cdr_typesize 0ULL;
carla_msgs::msg::CollisionEvent::CollisionEvent()
carla_msgs::msg::CarlaCollisionEvent::CarlaCollisionEvent()
{
// std_msgs::msg::Header m_header
// unsigned long m_other_actor_id
@ -51,28 +51,28 @@ carla_msgs::msg::CollisionEvent::CollisionEvent()
// geometry_msgs::msg::Vector3 m_normal_impulse
}
carla_msgs::msg::CollisionEvent::~CollisionEvent()
carla_msgs::msg::CarlaCollisionEvent::~CarlaCollisionEvent()
{
}
carla_msgs::msg::CollisionEvent::CollisionEvent(
const CollisionEvent& x)
carla_msgs::msg::CarlaCollisionEvent::CarlaCollisionEvent(
const CarlaCollisionEvent& x)
{
m_header = x.m_header;
m_other_actor_id = x.m_other_actor_id;
m_normal_impulse = x.m_normal_impulse;
}
carla_msgs::msg::CollisionEvent::CollisionEvent(
CollisionEvent&& x) noexcept
carla_msgs::msg::CarlaCollisionEvent::CarlaCollisionEvent(
CarlaCollisionEvent&& x) noexcept
{
m_header = std::move(x.m_header);
m_other_actor_id = x.m_other_actor_id;
m_normal_impulse = std::move(x.m_normal_impulse);
}
carla_msgs::msg::CollisionEvent& carla_msgs::msg::CollisionEvent::operator =(
const CollisionEvent& x)
carla_msgs::msg::CarlaCollisionEvent& carla_msgs::msg::CarlaCollisionEvent::operator =(
const CarlaCollisionEvent& x)
{
m_header = x.m_header;
m_other_actor_id = x.m_other_actor_id;
@ -81,8 +81,8 @@ carla_msgs::msg::CollisionEvent& carla_msgs::msg::CollisionEvent::operator =(
return *this;
}
carla_msgs::msg::CollisionEvent& carla_msgs::msg::CollisionEvent::operator =(
CollisionEvent&& x) noexcept
carla_msgs::msg::CarlaCollisionEvent& carla_msgs::msg::CarlaCollisionEvent::operator =(
CarlaCollisionEvent&& x) noexcept
{
m_header = std::move(x.m_header);
m_other_actor_id = x.m_other_actor_id;
@ -91,27 +91,27 @@ carla_msgs::msg::CollisionEvent& carla_msgs::msg::CollisionEvent::operator =(
return *this;
}
bool carla_msgs::msg::CollisionEvent::operator ==(
const CollisionEvent& x) const
bool carla_msgs::msg::CarlaCollisionEvent::operator ==(
const CarlaCollisionEvent& x) const
{
return (m_header == x.m_header && m_other_actor_id == x.m_other_actor_id && m_normal_impulse == x.m_normal_impulse);
}
bool carla_msgs::msg::CollisionEvent::operator !=(
const CollisionEvent& x) const
bool carla_msgs::msg::CarlaCollisionEvent::operator !=(
const CarlaCollisionEvent& x) const
{
return !(*this == x);
}
size_t carla_msgs::msg::CollisionEvent::getMaxCdrSerializedSize(
size_t carla_msgs::msg::CarlaCollisionEvent::getMaxCdrSerializedSize(
size_t current_alignment)
{
static_cast<void>(current_alignment);
return carla_msgs_msg_CollisionEvent_max_cdr_typesize;
return carla_msgs_msg_CarlaCollisionEvent_max_cdr_typesize;
}
size_t carla_msgs::msg::CollisionEvent::getCdrSerializedSize(
const carla_msgs::msg::CollisionEvent& data,
size_t carla_msgs::msg::CarlaCollisionEvent::getCdrSerializedSize(
const carla_msgs::msg::CarlaCollisionEvent& data,
size_t current_alignment)
{
(void)data;
@ -122,7 +122,7 @@ size_t carla_msgs::msg::CollisionEvent::getCdrSerializedSize(
return current_alignment - initial_alignment;
}
void carla_msgs::msg::CollisionEvent::serialize(
void carla_msgs::msg::CarlaCollisionEvent::serialize(
eprosima::fastcdr::Cdr& scdr) const
{
scdr << m_header;
@ -130,7 +130,7 @@ void carla_msgs::msg::CollisionEvent::serialize(
scdr << m_normal_impulse;
}
void carla_msgs::msg::CollisionEvent::deserialize(
void carla_msgs::msg::CarlaCollisionEvent::deserialize(
eprosima::fastcdr::Cdr& dcdr)
{
dcdr >> m_header;
@ -142,7 +142,7 @@ void carla_msgs::msg::CollisionEvent::deserialize(
* @brief This function copies the value in member header
* @param _header New value to be copied in member header
*/
void carla_msgs::msg::CollisionEvent::header(
void carla_msgs::msg::CarlaCollisionEvent::header(
const std_msgs::msg::Header& _header)
{
m_header = _header;
@ -152,7 +152,7 @@ void carla_msgs::msg::CollisionEvent::header(
* @brief This function moves the value in member header
* @param _header New value to be moved in member header
*/
void carla_msgs::msg::CollisionEvent::header(
void carla_msgs::msg::CarlaCollisionEvent::header(
std_msgs::msg::Header&& _header)
{
m_header = std::move(_header);
@ -162,7 +162,7 @@ void carla_msgs::msg::CollisionEvent::header(
* @brief This function returns a constant reference to member header
* @return Constant reference to member header
*/
const std_msgs::msg::Header& carla_msgs::msg::CollisionEvent::header() const
const std_msgs::msg::Header& carla_msgs::msg::CarlaCollisionEvent::header() const
{
return m_header;
}
@ -171,7 +171,7 @@ const std_msgs::msg::Header& carla_msgs::msg::CollisionEvent::header() const
* @brief This function returns a reference to member header
* @return Reference to member header
*/
std_msgs::msg::Header& carla_msgs::msg::CollisionEvent::header()
std_msgs::msg::Header& carla_msgs::msg::CarlaCollisionEvent::header()
{
return m_header;
}
@ -180,7 +180,7 @@ std_msgs::msg::Header& carla_msgs::msg::CollisionEvent::header()
* @brief This function sets a value in member other_actor_id
* @param _other_actor_id New value for member other_actor_id
*/
void carla_msgs::msg::CollisionEvent::other_actor_id(
void carla_msgs::msg::CarlaCollisionEvent::other_actor_id(
uint32_t _other_actor_id)
{
m_other_actor_id = _other_actor_id;
@ -190,7 +190,7 @@ void carla_msgs::msg::CollisionEvent::other_actor_id(
* @brief This function returns the value of member other_actor_id
* @return Value of member other_actor_id
*/
uint32_t carla_msgs::msg::CollisionEvent::other_actor_id() const
uint32_t carla_msgs::msg::CarlaCollisionEvent::other_actor_id() const
{
return m_other_actor_id;
}
@ -199,7 +199,7 @@ uint32_t carla_msgs::msg::CollisionEvent::other_actor_id() const
* @brief This function returns a reference to member other_actor_id
* @return Reference to member other_actor_id
*/
uint32_t& carla_msgs::msg::CollisionEvent::other_actor_id()
uint32_t& carla_msgs::msg::CarlaCollisionEvent::other_actor_id()
{
return m_other_actor_id;
}
@ -208,7 +208,7 @@ uint32_t& carla_msgs::msg::CollisionEvent::other_actor_id()
* @brief This function copies the value in member normal_impulse
* @param _normal_impulse New value to be copied in member normal_impulse
*/
void carla_msgs::msg::CollisionEvent::normal_impulse(
void carla_msgs::msg::CarlaCollisionEvent::normal_impulse(
const geometry_msgs::msg::Vector3& _normal_impulse)
{
m_normal_impulse = _normal_impulse;
@ -218,7 +218,7 @@ void carla_msgs::msg::CollisionEvent::normal_impulse(
* @brief This function moves the value in member normal_impulse
* @param _normal_impulse New value to be moved in member normal_impulse
*/
void carla_msgs::msg::CollisionEvent::normal_impulse(
void carla_msgs::msg::CarlaCollisionEvent::normal_impulse(
geometry_msgs::msg::Vector3&& _normal_impulse)
{
m_normal_impulse = std::move(_normal_impulse);
@ -228,7 +228,7 @@ void carla_msgs::msg::CollisionEvent::normal_impulse(
* @brief This function returns a constant reference to member normal_impulse
* @return Constant reference to member normal_impulse
*/
const geometry_msgs::msg::Vector3& carla_msgs::msg::CollisionEvent::normal_impulse() const
const geometry_msgs::msg::Vector3& carla_msgs::msg::CarlaCollisionEvent::normal_impulse() const
{
return m_normal_impulse;
}
@ -237,24 +237,24 @@ const geometry_msgs::msg::Vector3& carla_msgs::msg::CollisionEvent::normal_impul
* @brief This function returns a reference to member normal_impulse
* @return Reference to member normal_impulse
*/
geometry_msgs::msg::Vector3& carla_msgs::msg::CollisionEvent::normal_impulse()
geometry_msgs::msg::Vector3& carla_msgs::msg::CarlaCollisionEvent::normal_impulse()
{
return m_normal_impulse;
}
size_t carla_msgs::msg::CollisionEvent::getKeyMaxCdrSerializedSize(
size_t carla_msgs::msg::CarlaCollisionEvent::getKeyMaxCdrSerializedSize(
size_t current_alignment)
{
static_cast<void>(current_alignment);
return carla_msgs_msg_CollisionEvent_max_key_cdr_typesize;
return carla_msgs_msg_CarlaCollisionEvent_max_key_cdr_typesize;
}
bool carla_msgs::msg::CollisionEvent::isKeyDefined()
bool carla_msgs::msg::CarlaCollisionEvent::isKeyDefined()
{
return false;
}
void carla_msgs::msg::CollisionEvent::serializeKey(
void carla_msgs::msg::CarlaCollisionEvent::serializeKey(
eprosima::fastcdr::Cdr& scdr) const
{
(void) scdr;

View File

@ -68,64 +68,64 @@ class Cdr;
namespace carla_msgs {
namespace msg {
/*!
* @brief This class represents the structure CollisionEvent defined by the user in the IDL file.
* @brief This class represents the structure CarlaCollisionEvent defined by the user in the IDL file.
* @ingroup CARLACOLLISIONEVENT
*/
class CollisionEvent
class CarlaCollisionEvent
{
public:
/*!
* @brief Default constructor.
*/
eProsima_user_DllExport CollisionEvent();
eProsima_user_DllExport CarlaCollisionEvent();
/*!
* @brief Default destructor.
*/
eProsima_user_DllExport ~CollisionEvent();
eProsima_user_DllExport ~CarlaCollisionEvent();
/*!
* @brief Copy constructor.
* @param x Reference to the object carla_msgs::msg::CollisionEvent that will be copied.
* @param x Reference to the object carla_msgs::msg::CarlaCollisionEvent that will be copied.
*/
eProsima_user_DllExport CollisionEvent(
const CollisionEvent& x);
eProsima_user_DllExport CarlaCollisionEvent(
const CarlaCollisionEvent& x);
/*!
* @brief Move constructor.
* @param x Reference to the object carla_msgs::msg::CollisionEvent that will be copied.
* @param x Reference to the object carla_msgs::msg::CarlaCollisionEvent that will be copied.
*/
eProsima_user_DllExport CollisionEvent(
CollisionEvent&& x) noexcept;
eProsima_user_DllExport CarlaCollisionEvent(
CarlaCollisionEvent&& x) noexcept;
/*!
* @brief Copy assignment.
* @param x Reference to the object carla_msgs::msg::CollisionEvent that will be copied.
* @param x Reference to the object carla_msgs::msg::CarlaCollisionEvent that will be copied.
*/
eProsima_user_DllExport CollisionEvent& operator =(
const CollisionEvent& x);
eProsima_user_DllExport CarlaCollisionEvent& operator =(
const CarlaCollisionEvent& x);
/*!
* @brief Move assignment.
* @param x Reference to the object carla_msgs::msg::CollisionEvent that will be copied.
* @param x Reference to the object carla_msgs::msg::CarlaCollisionEvent that will be copied.
*/
eProsima_user_DllExport CollisionEvent& operator =(
CollisionEvent&& x) noexcept;
eProsima_user_DllExport CarlaCollisionEvent& operator =(
CarlaCollisionEvent&& x) noexcept;
/*!
* @brief Comparison operator.
* @param x carla_msgs::msg::CollisionEvent object to compare.
* @param x carla_msgs::msg::CarlaCollisionEvent object to compare.
*/
eProsima_user_DllExport bool operator ==(
const CollisionEvent& x) const;
const CarlaCollisionEvent& x) const;
/*!
* @brief Comparison operator.
* @param x carla_msgs::msg::CollisionEvent object to compare.
* @param x carla_msgs::msg::CarlaCollisionEvent object to compare.
*/
eProsima_user_DllExport bool operator !=(
const CollisionEvent& x) const;
const CarlaCollisionEvent& x) const;
/*!
* @brief This function copies the value in member header
@ -213,7 +213,7 @@ namespace carla_msgs {
* @return Serialized size.
*/
eProsima_user_DllExport static size_t getCdrSerializedSize(
const carla_msgs::msg::CollisionEvent& data,
const carla_msgs::msg::CarlaCollisionEvent& data,
size_t current_alignment = 0);
/*!

View File

@ -29,20 +29,20 @@ using InstanceHandle_t = eprosima::fastrtps::rtps::InstanceHandle_t;
namespace carla_msgs {
namespace msg {
CollisionEventPubSubType::CollisionEventPubSubType()
CarlaCollisionEventPubSubType::CarlaCollisionEventPubSubType()
{
setName("carla_msgs::msg::dds_::CollisionEvent_");
auto type_size = CollisionEvent::getMaxCdrSerializedSize();
setName("carla_msgs::msg::dds_::CarlaCollisionEvent_");
auto type_size = CarlaCollisionEvent::getMaxCdrSerializedSize();
type_size += eprosima::fastcdr::Cdr::alignment(type_size, 4); /* possible submessage alignment */
m_typeSize = static_cast<uint32_t>(type_size) + 4; /*encapsulation*/
m_isGetKeyDefined = CollisionEvent::isKeyDefined();
size_t keyLength = CollisionEvent::getKeyMaxCdrSerializedSize() > 16 ?
CollisionEvent::getKeyMaxCdrSerializedSize() : 16;
m_isGetKeyDefined = CarlaCollisionEvent::isKeyDefined();
size_t keyLength = CarlaCollisionEvent::getKeyMaxCdrSerializedSize() > 16 ?
CarlaCollisionEvent::getKeyMaxCdrSerializedSize() : 16;
m_keyBuffer = reinterpret_cast<unsigned char*>(malloc(keyLength));
memset(m_keyBuffer, 0, keyLength);
}
CollisionEventPubSubType::~CollisionEventPubSubType()
CarlaCollisionEventPubSubType::~CarlaCollisionEventPubSubType()
{
if (m_keyBuffer != nullptr)
{
@ -50,11 +50,11 @@ namespace carla_msgs {
}
}
bool CollisionEventPubSubType::serialize(
bool CarlaCollisionEventPubSubType::serialize(
void* data,
SerializedPayload_t* payload)
{
CollisionEvent* p_type = static_cast<CollisionEvent*>(data);
CarlaCollisionEvent* p_type = static_cast<CarlaCollisionEvent*>(data);
// Object that manages the raw buffer.
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char*>(payload->data), payload->max_size);
@ -79,14 +79,14 @@ namespace carla_msgs {
return true;
}
bool CollisionEventPubSubType::deserialize(
bool CarlaCollisionEventPubSubType::deserialize(
SerializedPayload_t* payload,
void* data)
{
try
{
//Convert DATA to pointer of your type
CollisionEvent* p_type = static_cast<CollisionEvent*>(data);
CarlaCollisionEvent* p_type = static_cast<CarlaCollisionEvent*>(data);
// Object that manages the raw buffer.
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char*>(payload->data), payload->length);
@ -109,28 +109,28 @@ namespace carla_msgs {
return true;
}
std::function<uint32_t()> CollisionEventPubSubType::getSerializedSizeProvider(
std::function<uint32_t()> CarlaCollisionEventPubSubType::getSerializedSizeProvider(
void* data)
{
return [data]() -> uint32_t
{
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<CollisionEvent*>(data))) +
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<CarlaCollisionEvent*>(data))) +
4u /*encapsulation*/;
};
}
void* CollisionEventPubSubType::createData()
void* CarlaCollisionEventPubSubType::createData()
{
return reinterpret_cast<void*>(new CollisionEvent());
return reinterpret_cast<void*>(new CarlaCollisionEvent());
}
void CollisionEventPubSubType::deleteData(
void CarlaCollisionEventPubSubType::deleteData(
void* data)
{
delete(reinterpret_cast<CollisionEvent*>(data));
delete(reinterpret_cast<CarlaCollisionEvent*>(data));
}
bool CollisionEventPubSubType::getKey(
bool CarlaCollisionEventPubSubType::getKey(
void* data,
InstanceHandle_t* handle,
bool force_md5)
@ -140,16 +140,16 @@ namespace carla_msgs {
return false;
}
CollisionEvent* p_type = static_cast<CollisionEvent*>(data);
CarlaCollisionEvent* p_type = static_cast<CarlaCollisionEvent*>(data);
// Object that manages the raw buffer.
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char*>(m_keyBuffer),
CollisionEvent::getKeyMaxCdrSerializedSize());
CarlaCollisionEvent::getKeyMaxCdrSerializedSize());
// Object that serializes the data.
eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::BIG_ENDIANNESS);
p_type->serializeKey(ser);
if (force_md5 || CollisionEvent::getKeyMaxCdrSerializedSize() > 16)
if (force_md5 || CarlaCollisionEvent::getKeyMaxCdrSerializedSize() > 16)
{
m_md5.init();
m_md5.update(m_keyBuffer, static_cast<unsigned int>(ser.getSerializedDataLength()));

View File

@ -41,18 +41,18 @@ namespace carla_msgs
{
/*!
* @brief This class represents the TopicDataType of the type CollisionEvent defined by the user in the IDL file.
* @brief This class represents the TopicDataType of the type CarlaCollisionEvent defined by the user in the IDL file.
* @ingroup CARLACOLLISIONEVENT
*/
class CollisionEventPubSubType : public eprosima::fastdds::dds::TopicDataType
class CarlaCollisionEventPubSubType : public eprosima::fastdds::dds::TopicDataType
{
public:
typedef CollisionEvent type;
typedef CarlaCollisionEvent type;
eProsima_user_DllExport CollisionEventPubSubType();
eProsima_user_DllExport CarlaCollisionEventPubSubType();
eProsima_user_DllExport virtual ~CollisionEventPubSubType() override;
eProsima_user_DllExport virtual ~CarlaCollisionEventPubSubType() override;
eProsima_user_DllExport virtual bool serialize(
void* data,