Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(vda5050_msgs): mapping rules for Action & InstantActions #36

Open
wants to merge 1 commit into
base: ros2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions vda5050_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,7 @@ rosidl_generate_interfaces(${PROJECT_NAME}

ament_export_dependencies(rosidl_default_runtime)
ament_package()

install(
FILES vda5050_msgs_mapping_rules.yaml
DESTINATION share/${PROJECT_NAME})
1 change: 1 addition & 0 deletions vda5050_msgs/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

<export>
<build_type>ament_cmake</build_type>
<ros1_bridge mapping_rules="vda5050_msgs_mapping_rules.yaml"/>
</export>

</package>
27 changes: 27 additions & 0 deletions vda5050_msgs/vda5050_msgs_mapping_rules.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-
ros1_package_name: 'vda5050_msgs'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are incomplete though aren't they?
if we want to add those we probably would want it for all the messages types in here.
The advantage of https://github.com/ipa320/vda5050_msgs/tree/ros2/vda5050_serializer/vda5050_serializer is that it's not hardcoded and therefore actually more resistent to change in the message definitions here. I'm not sure if something like that is supported in ros1 ros2 bridge, otherwise I probably would keep these mapping files in your specific repo or at least autogenerate them in ci in here.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just added those message types that I wanted the ros1_bridge to be able to bridge for a specific customer. This is the way that Kemal suggested me to do. I have no clue how the ros1_bridge could use our serializer to automatically translate dromedarCase messages to snake_case messages. IMO it is necessary to either add the mapping rules to

  • our ros1_bridge repo (which might not be the nicest thing)
  • or here
    AFAIK it's rather complicated to add the mapping rules directly to our customer repo given the fact that we cannot easily add the mapping rules simply as an argument but need to rebuild the ros1_bridge docker image image with the mapping rules.

ros1_message_name: 'InstantActions'
ros2_package_name: 'vda5050_msgs'
ros2_message_name: 'msg/InstantActions'
fields_1_to_2:
headerId: 'header_id'
timestamp: 'timestamp'
version: 'version'
manufacturer: 'manufacturer'
serialNumber: 'serial_number'
instantActions: 'instant_actions'
-
ros1_package_name: 'vda5050_msgs'
ros1_message_name: 'Action'
ros2_package_name: 'vda5050_msgs'
ros2_message_name: 'msg/Action'
fields_1_to_2:
actionType: 'action_type'
actionId: 'action_id'
actionDescription: 'action_description'
blockingType: 'blocking_type'
actionParameters: 'action_parameters'
NONE: 'NONE'
SOFT: 'SOFT'
HARD: 'HARD'