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

action_msgs is a magic dependency for new action interfaces #75

Closed
stonier opened this issue Apr 26, 2019 · 2 comments · Fixed by ros2/rosidl#369
Closed

action_msgs is a magic dependency for new action interfaces #75

stonier opened this issue Apr 26, 2019 · 2 comments · Fixed by ros2/rosidl#369
Assignees
Labels
bug Something isn't working in review Waiting for review (Kanban column)

Comments

@stonier
Copy link

stonier commented Apr 26, 2019

Bug report

This is not a bug in the sense that it is broken, rather it is a very awkward thing to debug because it is surprising behaviour with very difficult to grokk error messages when the behaviour isn't followed.

  • Operating System:
    • Ubuntu 18.04
  • Installation type:
    • Binaries
  • Version or commit hash:
    • crystal
  • DDS implementation:
    • Default
  • Client library (if applicable):
    • N/A

Steps to reproduce issue & Actual Behaviour

  • Create your first action in a typical ros interfaces package
  • Compile
[ 11%] Generating C introspection for ROS interfaces
/usr/bin/python3 /opt/ros/crystal/lib/rosidl_typesupport_introspection_c/rosidl_typesupport_introspection_c --generator-arguments-file /mnt/mervin/workspaces/crystal/muppet/build/muppet_msgs/rosidl_typesupport_introspection_c__arguments.json
Service interface 'unique_identifier_msgs/UUID' contains an unknown field type: unique_identifier_msgs/UUID action_goal_id
CMakeFiles/muppet_msgs__rosidl_typesupport_introspection_c.dir/build.make:150: recipe for target 'rosidl_typesupport_introspection_c/muppet_msgs/msg/can_frame__rosidl_typesupport_introspection_c.h' failed
make[2]: *** [rosidl_typesupport_introspection_c/muppet_msgs/msg/can_frame__rosidl_typesupport_introspection_c.h] Error 1
make[2]: Leaving directory '/mnt/mervin/workspaces/crystal/muppet/build/muppet_msgs'
make[2]: *** Deleting file 'rosidl_typesupport_introspection_c/muppet_msgs/msg/can_frame__rosidl_typesupport_introspection_c.h'
CMakeFiles/Makefile2:1689: recipe for target 'CMakeFiles/muppet_msgs__rosidl_typesupport_introspection_c.dir/all' failed
make[1]: Leaving directory '/mnt/mervin/workspaces/crystal/muppet/build/muppet_msgs'
Makefile:140: recipe for target 'all' failed
make[1]: *** [CMakeFiles/muppet_msgs__rosidl_typesupport_introspection_c.dir/all] Error 2
make: Leaving directory '/mnt/mervin/workspaces/crystal/muppet/build/muppet_msgs'
make: *** [all] Error 2
  • Be baffled
  • After much digging, guess that action_msgs is needed in the DEPENDENCIES of the rosidl_generate_interfaces call after seeing the official example (thanks for that!).

Expected behavior

The solution described above is surprising - typically only direct dependencies of variables in messages or services need to be described there. Two ideas:

  1. Find a way to bring in action_msgs automatically if any actions are to be compiled (if possible)
  2. Find a way to provide an error message that recognises the problem and can give a hint of what to do in this situation.
@jacobperron jacobperron added bug Something isn't working ready Work is about to start (Kanban column) labels Apr 27, 2019
@jacobperron jacobperron self-assigned this Apr 27, 2019
@jacobperron jacobperron added in progress Actively being worked on (Kanban column) and removed ready Work is about to start (Kanban column) labels Apr 27, 2019
@jacobperron
Copy link
Member

It's possible it was automatic at some point, but regressed? In any case, I think it makes sense for rosidl_generate_interfaces() to be aware of the action_msgs dependency for action interfaces.

Proposed fix ros2/rosidl#369

@jacobperron jacobperron added in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels Apr 27, 2019
@jacobperron
Copy link
Member

ros2/rosidl#369 Now makes it possible to omit find_package(action_msgs) and passing it as a dependency to rosidl_generate_interfaces. We still require the user to add <depend>action_msgs</depend> to their package.xml. Failing to do so will result in an explicit error message telling you to add it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working in review Waiting for review (Kanban column)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants