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

Error associated with graphrhc.cpp #538

Closed
dodsonmg opened this issue Jun 6, 2020 · 3 comments
Closed

Error associated with graphrhc.cpp #538

dodsonmg opened this issue Jun 6, 2020 · 3 comments

Comments

@dodsonmg
Copy link
Contributor

dodsonmg commented Jun 6, 2020

I'm cross-compiling ROS2 dashing for FreeBSD.

When compiling rmw_cyclonedds_cpp, I get the following errors:

Starting >>> rmw_cyclonedds_cpp                                                                                                                                                                             
--- stderr: rmw_cyclonedds_cpp                                                                                                                                                                              
/home/broomstick/cheri/ros2/src/ros2/rmw_cyclonedds/rmw_cyclonedds_cpp/src/graphrhc.cpp:169:3: error: cannot initialize a member subobject of type 'dds_rhc_read_take_cdr_t' (aka 'int (*)(dds_rhc *, bool, 
ddsi_serdata **, dds_sample_info *, unsigned int, unsigned int, unsigned int, unsigned int, unsigned long)') with an lvalue of type 'bool (struct dds_rhc *, struct dds_readcond *)': different number of p$
rameters (9 vs 2)                                                                                                                                                                                           
  graphrhc_add_readcondition,                                                                                                                                                                               
  ^~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                                                                                                                
/home/broomstick/cheri/ros2/src/ros2/rmw_cyclonedds/rmw_cyclonedds_cpp/src/graphrhc.cpp:170:3: error: cannot initialize a member subobject of type 'dds_rhc_add_readcondition_t' (aka 'bool (*)(struct dds_$
hc *, struct dds_readcond *)') with an lvalue of type 'void (struct dds_rhc *, struct dds_readcond *)': different return type ('bool' vs 'void')                                                            
  graphrhc_remove_readcondition,
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/broomstick/cheri/ros2/src/ros2/rmw_cyclonedds/rmw_cyclonedds_cpp/src/graphrhc.cpp:171:3: error: cannot initialize a member subobject of type 'dds_rhc_remove_readcondition_t' (aka 'void (*)(struct dd
s_rhc *, struct dds_readcond *)') with an lvalue of type 'uint32_t (struct dds_rhc *)' (aka 'unsigned int (dds_rhc *)'): different number of parameters (2 vs 1)
  graphrhc_lock_samples,
  ^~~~~~~~~~~~~~~~~~~~~
/home/broomstick/cheri/ros2/src/ros2/rmw_cyclonedds/rmw_cyclonedds_cpp/src/graphrhc.cpp:172:3: error: cannot initialize a member subobject of type 'dds_rhc_lock_samples_t' (aka 'unsigned int (*)(dds_rhc *
)') with an lvalue of type 'dds_return_t (struct dds_rhc *, struct dds_reader *, const struct ddsi_sertopic *, struct ddsi_tkmap *)' (aka 'int (dds_rhc *, dds_reader *, const ddsi_sertopic *, ddsi_tkmap $
)'): different number of parameters (1 vs 4)
  graphrhc_associate

I was previously building cyclonedds from commit 0b50928. I think commits 9aef055 and 0006e09 made some changes associated with dds_rhc (that I don't really understand... sorry) that might be related to my problems above.

Should I be able to continue building ROS2 dashing using the the cyclonedds master branch?

It looks like the repos file for ROS2 dashing pulls all the way back from releases/0.5.x (269f18e), but I wanted to check.

Thanks!

@eboasson
Copy link
Contributor

eboasson commented Jun 8, 2020

Hi @dodsonmg, your analysis is entirely correct. The thing is that the Cyclone DDS RMW layer depends on some "evolving" interfaces — a nice word for "haven't had a chance to do it properly yet" — to be precise:

  1. It uses a custom implementation of samples so it can do (de)serialization straight from ROS2 to CDR and back;
  2. In Dashing and Eloquent, it implements a custom "reader history cache" (hence the "rhc") for getting notifications of changes to the ROS2 graph without incurring the memory usage you would otherwise have (as I was aware of some small device where memory use really mattered). In Foxy, a lot of major changes occurred that made this one superfluous.

The branching is to prevent regressions on released, but it doesn't mean I have completely given up on the ability to build Dashing with the current version of Cyclone (that'd be stupid). What you have run into is more like the forgetting of merging a PR on the Cyclone RMW implementation (ros2/rmw_cyclonedds#169) in the flurry of activity with Foxy and Cyclone releases. As you can see from the PR, it is trivial. It simply extends the range of Cyclone versions it works with, it doesn't break anything for older versions.

Please give it a try. I did try it before doing the PR, but if you could confirm it works, that'd a much nicer endorsement for merging it.

@dodsonmg
Copy link
Contributor Author

dodsonmg commented Jun 8, 2020

Thanks @eboasson. I appreciate both the quick confirmation and the additional information.

I can successfully build cyclonedds from master (currently 84abf48) and rmw_cyclonedds from dashing-eloquent with your patch from ros2/rmw_cyclonedds#169.

@dodsonmg dodsonmg closed this as completed Jun 8, 2020
@eboasson
Copy link
Contributor

eboasson commented Jun 8, 2020

Thanks!

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

No branches or pull requests

2 participants