Skip to content
This repository was archived by the owner on Jan 14, 2023. It is now read-only.

Generating code for ros action files #68

Merged
merged 1 commit into from
Aug 27, 2018

Conversation

exo-core
Copy link
Contributor

with this changes the message generation also creates files for ROS action files.
This should also resolve this issue.

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

@exo-core
Copy link
Contributor Author

I sold my sou... eh, signed it.

@googlebot
Copy link

CLAs look good, thanks!

@jubeira
Copy link

jubeira commented Aug 24, 2018

Thanks for this wonderful contribution @exo-core!

I took a quick look and codewise it looks good. I'll give it a shot when I have some time and I will approve it if everything goes well.

@jubeira
Copy link

jubeira commented Aug 27, 2018

@exo-core I tried the changes and they seem to work well.

I only have one observation: this will generate the action message artifacts when add_message_files + generate_messages macros are present in CMakeLists; is that right or am I missing something? In other words, you wouldn't need to add add_action_files macro to CMakeLists.

While I think that it's better to have this than not to have it, this is a small difference wrt. the regular action message generation in roscpp and rospy that is worth pointing out.

@exo-core
Copy link
Contributor Author

exo-core commented Aug 27, 2018

@jubeira you're completely right with your oberservation.

There is a comment in enjava/src/genjava/templates/genjava_project/build.gradle.in about the message generator:

/* Damon's message generator doesn't catch every message. It expects everything to be nicely under 'msg'
 * and that directory to be under the package root. It also expects every msg it finds should be buildable.
 * It kinda works until now because it ignores any package which doesn't conform to this and those are just
 * test packages (we hope).

from what I saw in the code rosjava bootstrap simply crawls the msg directory and compiles everything that hast a *.msg file type. They same happens for services. Basically all I did was copying the ServiceFileProvider and refactor it to do the same for the action directory.

So, yes, the current generator ignores all the add_message_files, add_service_files and add_action_files macros in CMakeLists.txt and just builds everything it finds in the according folders.

Changing the behaviour to be the same as for C++ or Python would probably require to rewrite the whole message discovery procedure.

@jubeira jubeira merged commit f5f3ea9 into rosjava:kinetic Aug 27, 2018
@jubeira
Copy link

jubeira commented Aug 27, 2018

Thanks for the changes and the observations @exo-core! PR merged :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Genjava not processing action messages
3 participants