rosidl
rosidl copied to clipboard
Generate typesupport declarations for actions, messages and services
As discussed in ros2/rosidl_typesupport#114, this PR adds the generation of typesupport getter declarations that is currently missing.
For this, I have also added package-specific visibility control analogous to rosidl_generator_c
.
Here's an example of the generated fibonacci__type_support.hpp
from the action_tutorials_interfaces
package:
// generated from rosidl_generator_cpp/resource/idl__type_support.hpp.em
// with input from action_tutorials_interfaces:action/Fibonacci.idl
// generated code does not contain a copyright notice
#ifndef ACTION_TUTORIALS_INTERFACES__ACTION__DETAIL__FIBONACCI__TYPE_SUPPORT_HPP_
#define ACTION_TUTORIALS_INTERFACES__ACTION__DETAIL__FIBONACCI__TYPE_SUPPORT_HPP_
#include "rosidl_typesupport_interface/macros.h"
#include "action_tutorials_interfaces/msg/rosidl_generator_cpp__visibility_control.hpp"
#include "rosidl_typesupport_cpp/action_type_support.hpp"
#ifdef __cplusplus
extern "C"
{
#endif
// Forward declare the get type support functions for this type.
ROSIDL_GENERATOR_CPP_PUBLIC_action_tutorials_interfaces
const rosidl_action_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__ACTION_SYMBOL_NAME(
rosidl_typesupport_cpp,
action_tutorials_interfaces,
action,
Fibonacci
)();
#ifdef __cplusplus
}
#endif
#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_action_tutorials_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(
rosidl_typesupport_cpp,
action_tutorials_interfaces,
action,
Fibonacci_Goal
)();
#ifdef __cplusplus
}
#endif
// already included above
// #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_action_tutorials_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(
rosidl_typesupport_cpp,
action_tutorials_interfaces,
action,
Fibonacci_Result
)();
#ifdef __cplusplus
}
#endif
// already included above
// #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_action_tutorials_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(
rosidl_typesupport_cpp,
action_tutorials_interfaces,
action,
Fibonacci_Feedback
)();
#ifdef __cplusplus
}
#endif
#include "rosidl_typesupport_cpp/service_type_support.hpp"
#ifdef __cplusplus
extern "C"
{
#endif
// Forward declare the get type support functions for this type.
ROSIDL_GENERATOR_CPP_PUBLIC_action_tutorials_interfaces
const rosidl_service_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(
rosidl_typesupport_cpp,
action_tutorials_interfaces,
action,
Fibonacci_SendGoal
)();
#ifdef __cplusplus
}
#endif
// already included above
// #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_action_tutorials_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(
rosidl_typesupport_cpp,
action_tutorials_interfaces,
action,
Fibonacci_SendGoal_Request
)();
#ifdef __cplusplus
}
#endif
// already included above
// #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_action_tutorials_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(
rosidl_typesupport_cpp,
action_tutorials_interfaces,
action,
Fibonacci_SendGoal_Response
)();
#ifdef __cplusplus
}
#endif
// already included above
// #include "rosidl_typesupport_cpp/service_type_support.hpp"
#ifdef __cplusplus
extern "C"
{
#endif
// Forward declare the get type support functions for this type.
ROSIDL_GENERATOR_CPP_PUBLIC_action_tutorials_interfaces
const rosidl_service_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(
rosidl_typesupport_cpp,
action_tutorials_interfaces,
action,
Fibonacci_GetResult
)();
#ifdef __cplusplus
}
#endif
// already included above
// #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_action_tutorials_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(
rosidl_typesupport_cpp,
action_tutorials_interfaces,
action,
Fibonacci_GetResult_Request
)();
#ifdef __cplusplus
}
#endif
// already included above
// #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_action_tutorials_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(
rosidl_typesupport_cpp,
action_tutorials_interfaces,
action,
Fibonacci_GetResult_Response
)();
#ifdef __cplusplus
}
#endif
// already included above
// #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_action_tutorials_interfaces
const rosidl_message_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(
rosidl_typesupport_cpp,
action_tutorials_interfaces,
action,
Fibonacci_FeedbackMessage
)();
#ifdef __cplusplus
}
#endif
#endif // ACTION_TUTORIALS_INTERFACES__ACTION__DETAIL__FIBONACCI__TYPE_SUPPORT_HPP_
Can't reproduce the uncrustify test failing on the ros:rolling-ros-core
docker container.
All tests are passing for me.
This pull request has been mentioned on ROS Discourse. There might be relevant details there:
https://discourse.ros.org/t/preparing-for-foxy-fitzroy-end-of-life/31470/2
@mergifyio backport humble
(Probably won't work for me, can one of the contributors trigger that?)
backport humble
❌ Command disallowed due to command restrictions in the Mergify configuration.
- [ ]
sender-permission>=write
I have created backports for humble (ros2/rosidl#778 and ros2/rosidl_typesupport#149) and verified that they work and pass all tests on my machine. Would be much appreciated if they could get merged so I don't have to wait until Ubuntu 24.04 is released for an LTS version where my ui module works. @clalancette @quarkytale