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

add array support #119

Merged
merged 2 commits into from
May 6, 2016
Merged

add array support #119

merged 2 commits into from
May 6, 2016

Conversation

mikaelarguedas
Copy link
Member

Connects to #114
Relies on #113

@mikaelarguedas mikaelarguedas added the in progress Actively being worked on (Kanban column) label Apr 19, 2016
foreach(_pkg_name ${rosidl_generate_interfaces_DEPENDENCY_PACKAGE_NAMES})
ament_target_dependencies(${_target_name}
${_pkg_name}
"_${_pkg_name}__${_typesupport_impl}${PythonExtra_EXTENSION_SUFFIX}"
Copy link
Member

Choose a reason for hiding this comment

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

Unless I'm mistaken the arguments to ament_target_dependencies must be a package (which has been find_package'ed): https://github.com/ament/ament_cmake/blob/c1d3004db7cb33ded7aed38e00c9a9d888986309/ament_cmake_target_dependencies/cmake/ament_target_dependencies.cmake#L15-L29

So putting what I believe is a library name here doesn't make sense to me. Maybe you meant to pass this library name to target_link_libraries for _target_name?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for noticing it! I think it's actually an artefact from when I was trying to link the generated libraries together I must have forgotten to remove it.
Surprisingly I didnt have an error when running cmake.

To avoid duplicating work on your side, could you comment on this PR #113 ?
All the cmake stuff has been changed there and the current PR is just rebased on top of #113.
So once #113 is reviewed, reviewing #119 is going to be much more straight forward.

Copy link
Member

Choose a reason for hiding this comment

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

Please try to add debug message in there to check why you don't get an error message. It would be good to ensure that the API works as intended even if you don't need it for this change.

@mikaelarguedas mikaelarguedas force-pushed the array_support branch 2 times, most recently from 42166e3 to cacb782 Compare April 20, 2016 23:57
@mikaelarguedas
Copy link
Member Author

Now compiles on windows but rclpy tests are failing. http://ci.ros2.org/job/ci_windows/1263/

@mikaelarguedas mikaelarguedas force-pushed the array_support branch 3 times, most recently from ec3a3f9 to 49d1a12 Compare April 26, 2016 16:31
@mikaelarguedas
Copy link
Member Author

http://ci.ros2.org/job/ci_osx/986/
http://ci.ros2.org/job/ci_linux/1221/
http://ci.ros2.org/job/ci_windows/1268/
rclpy original tests not failing anymore, but seems like new tests are failing on windows only.

@mikaelarguedas mikaelarguedas force-pushed the array_support branch 2 times, most recently from c2e4337 to 76e8396 Compare May 4, 2016 00:26
@esteve esteve mentioned this pull request May 4, 2016
5 tasks
@mikaelarguedas mikaelarguedas added in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels May 4, 2016
@dirk-thomas
Copy link
Member

The type handling code is pretty tough to read but it looks good to me.

}
@[ if field.type.array_size is None]@
if (!@(nested_type)__Array__init(&(ros_message->@(field.name)), size@(field.name))) {
assert(false && "unable to create array ros_message");
Copy link
Member

Choose a reason for hiding this comment

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

This probably shouldn't use an assert, since it will not be checked in Release mode.

@wjwwood
Copy link
Member

wjwwood commented May 6, 2016

Other than auditing your use of assert (replace if it should check in both release and debug) the changes lgtm.

What's the test coverage like on these new changes? Do we have test messages in place for this and are we exercising them on this code?

@wjwwood
Copy link
Member

wjwwood commented May 6, 2016

I guess ros2/rclpy#23 adds testing of this.

@mikaelarguedas
Copy link
Member Author

Done, now raising RuntimeError if arrays can't be initialized.
And yes the associated tests are in ros2/rclpy#23

@wjwwood
Copy link
Member

wjwwood commented May 6, 2016

lgtm

@mikaelarguedas mikaelarguedas merged commit f677499 into master May 6, 2016
@mikaelarguedas mikaelarguedas deleted the array_support branch May 6, 2016 19:45
@mikaelarguedas mikaelarguedas removed the in review Waiting for review (Kanban column) label May 6, 2016
@gerkey gerkey mentioned this pull request May 7, 2016
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants