ros / ros-overlay

Gentoo Overlay for ROS packages
33 stars 30 forks source link

ROS2 (Ardent) instructions #537

Open olofk opened 6 years ago

olofk commented 6 years ago

Started out with the binary ROS2 release, but it seems like the lib/lib64 confusion in Gentoo makes it a bit cumbersome so I thought I'd switch to your overlay instead. I see there's a bunch of ros-ardent packages available. Very cool. I'm not sure however what to install as there is no ros_base equivalent for ardent.

Do you have any quick instructions for getting ardent going on Gentoo?

allenh1 commented 6 years ago

I see there's a bunch of ros-ardent packages available

This is true (as of ros-infrastructure/superflore#135), but the ebuilds are not quite functioning. I have not been super successful in convincing distutils to behave. The adjustments to be made, however, are only to the two eclasses (should you want to play around with them). I plan on working on this more this week.

I actually used Gentoo for my ROS 2 work, so you can definitely get it going! For ament build, just make sure you do the following.

$ mkdir -p ${HOME}/ros2_ws/install/lib/python3.5/site-packages

Then I usually just use this.

$ PYTHONPATH=${HOME}/ros2_ws/install/lib/python3.5/site-packages src/ament/ament_tools/scripts/ament.py build --symlink-install --cmake-args -DPYTHON_INSTALL_DIR=install/lib/python3.5/site-packages

Also, I wouldn't be too worried about which packages you install, as there less than 200 total packages for ardent right now, which is still smaller than ros_base. There's really just the mission critical repos in the ros2.repos file here.

Let me know if you hit any walls! Hopefully the eclasses will be fixed soon!

olofk commented 6 years ago

Thanks for the quick reply. I got a bit further with the binary release by installing libpcre-debian and applying this dirty hack to lib/python3.5/site-packages/ament_tools/build_types/ament_python.py

     def _get_python_lib(self, context):
         path = get_python_lib(prefix=context.install_space)
+        idx = path.find('64')
+        if idx > 0:
+            s = path
+            path = s[0:idx]+s[idx+2:]
         return os.path.relpath(path, start=context.install_space)

I suspect once https://bugs.gentoo.org/show_bug.cgi?id=506276 is fixed, things will be easier.

Still I got stuck with the binary release since rviz2 was linked against ibtinyxml.so.2.6.2. I suspect building from ebuilds will save me some headaches so I'll dig into that soon, but at least I can send some messages back and forth between nodes now

olofk commented 6 years ago

So, before I install the ebuilds from your overlay, what do you mean with the ebuilds not being quite functioning? Do they work, if I just use your mkdir hack and special ament invocation. Also, from your command-line it looks like you have put a copy of amen_tools in your workspace directory. Are we supposed to do that instead of calling the system-installed version? Brand new to ROS so perhaps some of these questions are more ROS in general than ROS on Gentoo