Closed wasowski closed 5 years ago
Or do I misinterpret the error message @gavanderhoorn ?
No, you're correct.
The brickpi3
package has a build_depend
on tf
. It also correctly states that here.
What I'm missing in your console output is a rosdep check ..
or rosdep install ..
step, which would've made sure that the tf
package is installed.
I am thinking that it would be nice to factor out the examples to a separate package ...
I am thinking that it would be nice to factor out the examples to a separate package ...
you mean a separate repository? They already are in separate packages.
oh right. of course, my knowledge is short as usual :)
We can only install the entire stack into a workspace, right? Then probably a separate repo. But I could do turtlesim, or, even a simpler, a publisher/subscriber example, to minimize deps for packages included in the repo; How this is normally done in ROS?
Examples are certainly always in a separate package. Sometimes in a separate repository.
A good example of this is the ros_tutorials repository. It contains demo packages for a nr of client libraries and other ROS related infrastructure. We could create something similar.
The teleop
example seems relatively stand-alone though. That could probably be kept with the package in this repository.
Related: #5.
The rxros library is very thin, and it just relates to how roscore api is presented, so I think it would be beneficial to minimize the dependencies on the stack altogether. People may want to use it on some minimal ros systems.
The teleop
example only depends on: roscpp
, rxros
, std_msgs
, teleop_msgs
, message_generation
, message_runtime
and catkin
.
That is pretty minimal, and most of those will be part of a minimal ROS installation already.
But I'm fine with moving the examples out of this repository.
It would just require an extra line in the .rosinstall
file to check it out in case a user wants a batteries-included experience.
Hi Andrzej and Gijs
Oh my what have I done now. I am on my way home from work. I shall l look at it as soon as I come home.
Regards . Henrik
Don't worry Henrik. We are just trying to help. First look at the PR that @gavanderhoorn has sent you.
@gavanderhoorn , I think teleop should stay in here, but the brick stuff is way too heavy for the standard distribution.
I just tested that the version without any examples succeeds with catkin_make. But I made this branch too early, before we agreed that teleop will stay. So I will try to make another one, with teleop.
I think teleop should stay in here, but the brick stuff is way too heavy for the standard distribution.
agreed.
My joy was premature. The core file rxros.h has a direct dependency on tf. See:
The build without examples succeeds, because bare bones header files always compile :). It is nice to have at least one example in the same repo as we force compilation and detect dependency bugs.
Since it is the core thing that depends on tf, I think we should maintain the dependency first. And once the release is tiedied up, we can refactor rxros_tf from rxros. Is this the right course of action @gavanderhoorn or am I being paranoid?
The build without examples succeeds, because bare bones header files always compile :). It is nice to have at least one example in the same repo as we force compilation and detect dependency bugs.
Agreed.
Since it is the core thing that depends on tf, I think we should maintain the dependency first. And once the release is tiedied up, we can refactor rxros_tf from rxros. Is this the right course of action @gavanderhoorn or am I being paranoid?
No, your concern is very much justified.
I would go even further and say that we should create a rxros_tf
immediately and just factor it out before even releasing rxros
. One additional package takes only a small amount of time and it would very cleanly split dependencies in a sensible way.
Hi Andrzej and Gijs,
I remembered similar problems from the past. There are as I remember it three ways to install ROS Melodic:
ros-melodic-desktop-full ros-melodic-desktop ros-melodic-ros-base
I have always used the "ros-melodic-desktop-full” installation to avoid these dependencies problems. Especially the examples sources requires both messages and tf from the desktop-full installation
I don’t know if it is to much to require?
Hi Gijs and Andrzej,
I am actually a bit sorry for moving the examples. They do provide different examples of how RxROS can be applied to solve more complex problems. I would actually like to end up with a full example of a LEGO robot that is based on RxROS.
I agree that it is not especially nice that they can not compile without the ros-melodic-desktop-full installation. Is your expectation that rx_ros can be build using only ros-melodic-ros-base ?
What do you intend to put in the rxros_tf package? I am not sure if I can follow you here?
/Henrik
@henrik7264: the package.xml
file supports specifying the dependencies of a package very precisely. The rxros
package manifest should simply state it depends on tf
. Any user building from source could then use rosdep
to install all required dependencies automatically. The buildfarm would be able to automatically figure out which packages are needed to properly build the package as well.
We must do this, as otherwise a release would be impossible (the buildfarm is automated, it does not read your readme).
I have always used the "ros-melodic-desktop-full” installation to avoid these dependencies problems. Especially the examples sources requires both messages and tf from the desktop-full installation
I don’t know if it is to much to require?
a ros-melodic-desktop-full
install is gigabytes in size (and includes things such as Gazebo). Besides installing many unneeded packages, it's also rather wasteful, when a simple dependency on tf
would completely solve all the problems.
Personally, I would say "yes, installing all of ros-melodic-desktop-full
just to be able to depend on tf
is too much".
I am actually a bit sorry for moving the examples. They do provide different examples of how RxROS can be applied to solve more complex problems. I would actually like to end up with a full example of a LEGO robot that is based on RxROS.
Putting packages in a separate repository does not mean that they disappear. In fact, the exact location of packages doesn't really matter: wstool
will happily clone
repositories from wherever you desire, and this is all opaque to the user.
We're not deleting or destroying the examples, but are trying to make it easier to depend on rxros
when users don't want or need the examples. Storing them in a separate repository makes this somewhat easier to achieve.
I agree that it is not especially nice that they can not compile without the ros-melodic-desktop-full installation. Is your expectation that rx_ros can be build using only ros-melodic-ros-base ? What do you intend to put in the rxros_tf package? I am not sure if I can follow you here?
rxros_tf
would probably contain a single header that contains the from_transform(..)
function.
Users not interested in TF could ignore that package and would only need roscpp
installed. Users that are interested in TF would have both rxros
and rxros_tf
installed (the latter depending on the former). This is a very common pattern in ROS used to avoid introducing unnecessary or unwanted dependencies and is relatively low-overhead.
Hi Gijs & Andrzej,
Thanks Gijs for the excelent explanation - it helped me a lot. I must admit I am very happy with the contents of current workspace/project, but OK it gives good meaning to separate the examples from the library. It will be a clean separation. I will not leave any examples in rx_ros. I will however update the README.md file and explain how to install a build the examples. You are welcome to create a rx_ros_examples project or something similar (you are also welcome to remove the rx_ros-release project - I don’t think we will need that any more)
I will play a bit with the rxros_tf. I am not entirely happy about the solution as I think we are on the road too complicated setup/installation. What would you instead say to a
I will try to get the separation finished tomorrow and include your comments.
/Henrik
My suggestions:
rx_ros_examples
repository (I will do this)rx_ros_examples
rx_ros_examples
repository from the rx_ros
readmethat way the base library in rx_ros
is very simple to setup, setup/installation is very easy to grok and the release process of rxros
is also straightforward.
I will play a bit with the rxros_tf. I am not entirely happy about the solution as I think we are on the road too complicated setup/installation.
I realise it may seem that way, but consider this:
.rosinstall
files can point to multiple repositories easily, while it's still a single command to clone everything (the same wstool merge ..
)tf2
, tf2_ros
, tf2_py
, tf2_eigen
, etc). Users will be accustomed to this.you are also welcome to remove the rx_ros-release project - I don’t think we will need that any more)
I believe we do: rx_ros
(without the examples) should be releasable through the buildfarm. I'm currently working on packaging RxCpp
itself as a ROS package (very thin wrapper) which would remove the need to copy the headers here in this repository (easier tracking of upstream changes, easier licensing, etc) and allows us to depend on it from rxros
.
I will try to get the separation finished tomorrow and include your comments.
Could you please first look at #7?
And #13.
Here is another proposal to the tf problem. My biggest concern about splitting the rxros library is:
So here is another proposal. It is not completely implemented, but the basic features are working. The proposal is not without problems, but lets look at them later. Here is the proposal:
#ifndef RXROS_CONFIG
#define RXROS_CONFIG
#define ROS_TF_VERSION 1.12.0
#endif
The rxros_config.h file will allow us to control what should be enabled or not in the rxros.h file.
The bad thing about this solution is the rxros workspace will have to be rebuild each time the user changes his ROS installation. The other bad thing is the code will contain several conditional statements like #ifdef ROS_TF_VERSION - I personally hate this kind of code, but I think I can organize the code so it will look nice and easy to maintain.
Can you follow me and what do you think about the idea?
If I understand you correctly, you'd like to:
and not made explicit but:
rxros
, andThe alternative that was discussed earlier in this thread (and in #8):
rxros_tf
), whichrxros_tf.h
), which#include <rxros_tf/rxros_tf.h>
or not, withoutrxros
packages, only their own code/packageCan you follow me and what do you think about the idea?
regardless of my personal opinion, I believe that there are some downsides to your proposal, some of which you've already identified yourself:
rxros
)rxros
as a binary through the ROS buildfarm, as that would mean releasing a package where we've already made the choice for them (or actually: the buildfarm)rxros
would need to become proficient in building rxros
from source, as opposed to just using it as a binary dependency#ifdef
s into otherwise relatively straightforward codeThe library files get scattered/spread to different packages. I like the idea that they are contained in one directory. Future development of the library will profit from this.
To be fair, the idea in #8 does split up rxros
in two parts: one part with and one without tf
support. The tf
addon cannot be used without the base package.
However, I believe and expect ROS users to be able to deal with this: it's used in other parts of ROS (roscpp
and tf
are split along similar lines)and it's used in non-ROS situations as well (in the end it's essentially the plugin/extension idea, but with packages).
The end user will have to make a decision whether he wants the tf or just the core version. Over time this concept will just be more and more complicated. The end user should not need to take such decisions.
Doesn't the alternative proposal do exactly the same thing (ie: make the user responsible for this configuration choice)? It's just a header with some #ifdef
s now, but that's the same as changing your CMakeLists.txt
to add another dependency that brings in TF support and adding an #include
. But in #8, the changes are only in user code. In this alternative, the user would be changing their own code (using the APIs that use TF) as well as changing (y)our code (== bad, for reasons stated above).
One additional comment on the buildfarm aspect: the alternative makes it rather difficult to release rxros
as a binary package. We'd have two choices:
But in reality, we'd only have a single option: release with TF support, as we cannot release the same package twice and in order for everything to keep working, a user must have TF already installed on his system to be able to even have the option to choose to enable it in rxros
.
For that we need to add the build
and run
depend on tf
to rxros
, otherwise we cannot make sure TF is present on the user's system.
And with that we're back to the initial problem that we started out to solve: avoid installing unnecessary dependencies on the user's system.
Thanks Gijs for all the information. Yes, I agree that my proposed solution by far is optimal. I will let your experience and argumentation in this area come the benefit of the project - so lets go for the rxros_tf package and split the rxros.h file up accordingly. I may not like it, but I may get a pleasant surprise. Please let me know if I can support you in any way.
Thanks Gijs for all the information. Yes, I agree that my proposed solution by far is optimal. I will let your experience and argumentation in this area come the benefit of the project - so lets go for the rxros_tf package and split the rxros.h file up accordingly.
Ok. If it really doesn't work for you, or others, we can always reintegrate everything.
I may not like it, but I may get a pleasant surprise.
Let's hope so.
Please let me know if I can support you in any way.
If you could take a look at #14 and rosin-project/rxros_examples#1 and tell me whether things build and run for you that would be great. We can then proceed to merge it and would have a good basis for further changes.
rxros
such that the TF dependency is pushed into a separate package, together with all TF related functionality.@wasowski: if you could take a look.
Just tested installing rxros
and rxros_tf
in a clean Melodic Docker container.
I believe the following provides a good justification for why we split the TF support out of the base rxros
package.
installing just rxros
:
root@16da4763121c:/# apt install ros-melodic-rxros
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
ros-melodic-rxcpp-vendor
The following NEW packages will be installed:
ros-melodic-rxcpp-vendor ros-melodic-rxros
0 upgraded, 2 newly installed, 0 to remove and 91 not upgraded.
Need to get 94.3 kB of archives.
After this operation, 998 kB of additional disk space will be used.
installing rxros_tf
(after having installed rxros
itself previously):
root@94eb33a6df9d:/# apt install ros-melodic-rxros-tf
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
fonts-liberation graphviz libann0 libcdt5 libcgraph6 libgd3 libgts-0.7-5 libgts-bin libgvc6 libgvpr2 liblab-gamut1
libpathplan4 libwebp6 libxaw7 libxmu6 libxpm4 libxt6 ros-melodic-tf ros-melodic-tf2 ros-melodic-tf2-msgs
ros-melodic-tf2-py ros-melodic-tf2-ros
Suggested packages:
gsfonts graphviz-doc libgd-tools
The following NEW packages will be installed:
fonts-liberation graphviz libann0 libcdt5 libcgraph6 libgd3 libgts-0.7-5 libgts-bin libgvc6 libgvpr2 liblab-gamut1
libpathplan4 libwebp6 libxaw7 libxmu6 libxpm4 libxt6 ros-melodic-rxros-tf ros-melodic-tf ros-melodic-tf2
ros-melodic-tf2-msgs ros-melodic-tf2-py ros-melodic-tf2-ros
0 upgraded, 23 newly installed, 0 to remove and 91 not upgraded.
Need to get 4007 kB of archives.
After this operation, 16.6 MB of additional disk space will be used.
Note the 16MB vs ~1MB installation size difference.
I am trying to follow the installation instructions and I fail on the catkin_call. It appears that we have a dependency on tf, but I don't know exactly where. I think this dependency should not be there, but @henrik7264 try to convince me (then we should put it in package.xml).
Or do I misinterpret the error message @gavanderhoorn ?