This ROS package contains all custom ROS 2 interfaces used in all workspaces
First have a look in the common_interfaces repository to find out if any of the message and service types included in ROS 2 works for you.
New message definitions are added to msg.
Add the new message in the CMakeLists.txt file.
set(msg_files
... # other messages
"msg/YourNewMessage.msg"
)
For services and actions it is the same way. Service definitions are added to srv, and to the CMakeLists.txt like
set(srv_files
... # other services
"srv/YourNewService.srv"
)
Action definitions are added to action, and to the CMakeLists.txt like
set(action_files
... # other actions
"action/YourNewAction.action"
)
In your package.xml
, add this dependency
<depend>vortex_msgs</depend>
Add it to your CMakeLists.txt
find_package(vortex_msgs REQUIRED)
If your package includes C++ code which depend on vortex_msgs you also need to add the following to the CMakeLists.txt
ament_taget_dependencies(<your_executable>
... # other dependencies
vortex_msgs
)
For C++
// message
#include <vortex_msgs/msg/your_new_message.hpp>
// service
#include <vortex_msgs/srv/your_new_service.hpp>
// action
#include <vortex_msgs/action/your_new_action.hpp>
For Python
# message
from vortex_msgs.msg import YourNewMessage
# service
from vortex_msgs.srv import YourNewService
# action
from vortex_msgs.action import YourNewAction