[Discourse.ros.org] [Next Generation ROS] ROS2 on Gentoo

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [Next Generation ROS] ROS2 on Gentoo

William Woodall via ros-users



Hey, all!

I'm documenting what I did to get ROS2 to cooperate on Gentoo. As problems come up/fixes are created/I learn more, I'll update!

This was actually not that difficult (though I imagine that, as ROS2 gets bigger, so will the amount of effort). I was able to follow the normal source install, for the most part.

I could not, however, get the vcs to work. Instead, I simply wrote a script to do it.

    #!/bin/bash

    repositories=$(cat ../ros2.repos | grep url | awk '{print $2}' | grep https)

    for url in $repositories; do
    git clone $url
    done

The build then failed, as the branch I checked out was not the correct one. So I cd'd into the src directory, and rand the following:

    for i in $(ls); do
        cd $i
        git checkout -b release-beta1 release-beta1
        git reset --hard
        cd ../
done

Then was able to just follow the normal instructions (There was a [patch](https://github.com/ros2/rcl/commit/5f74a081e10fd00d00f84f6f9e657e213854e011) that has been merged already into master).

Then you can just run ament like it states in the tutorial. I had to comment out the tutorial repo in the script, but this is clearly not that essential.

If you have any questions, feel free to post back!






---
[Visit Topic](https://discourse.ros.org/t/ros2-on-gentoo/1434/1) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [Next Generation ROS] ROS2 on Gentoo

William Woodall via ros-users



Great! Glad it was pretty straight forward!

Out of curiosity, what `ros2.repos` file are you using ? The tutorials repository is commented on the ros2.repos files since release-beta1[1]. I would have expected this repository not to show up in the resulting `repositories` variable.

[1]https://github.com/ros2/ros2/blob/release-beta1/ros2.repos






---
[Visit Topic](https://discourse.ros.org/t/ros2-on-gentoo/1434/2) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [Next Generation ROS] ROS2 on Gentoo

William Woodall via ros-users
In reply to this post by William Woodall via ros-users



I believe I was using that one, right down to the commented out bit.






---
[Visit Topic](https://discourse.ros.org/t/ros2-on-gentoo/1434/3) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [Next Generation ROS] ROS2 on Gentoo

William Woodall via ros-users
In reply to this post by William Woodall via ros-users



Cool thanks for the update. Then I think that your script should work out-of-the-box without having to comment out any repo.

Thanks for investigating that. If you have any idea of why vcstool could not be ran on Gentoo, please post here I'd be curious to know more about why.






---
[Visit Topic](https://discourse.ros.org/t/ros2-on-gentoo/1434/4) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [Next Generation ROS] ROS2 on Gentoo

William Woodall via ros-users
In reply to this post by William Woodall via ros-users



I believe we can run it, I just could not find the right one and didn't want to guess...

@tfoote do you know which one to pip install?






---
[Visit Topic](https://discourse.ros.org/t/ros2-on-gentoo/1434/5) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [Next Generation ROS] ROS2 on Gentoo

William Woodall via ros-users
In reply to this post by William Woodall via ros-users



We usually use the python3 version of vcstool for our development. So if you something like `python3 -m pip install vcstool` should get you the right one. I'm currently using version `0.1.23-1`






---
[Visit Topic](https://discourse.ros.org/t/ros2-on-gentoo/1434/6) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [Next Generation ROS] ROS2 on Gentoo

William Woodall via ros-users
In reply to this post by William Woodall via ros-users


With the release of ROS 2 Beta 2, I figured it'd be wise to update this!

First, you need to have GCC 5.x installed, as there are some C++14 features that GCC 4 lacks that are used in some places.

Additionally, you need to invoke the build system slightly differently.

    PYTHONPATH="/opt/ros/lunar/lib64/python3.5/site-packages:/home/${USER}/ros2_ws/install/lib/python3.5/site-packages:${PYTHON_PATH}" src/ament/ament_tools/scripts/ament.py build --symlink-install --cmake-args -DPYTHON_INSTALL_DIR=install/lib/python3.5/site-packages

After that, everything should build just fine (you might need to change the python 3 version in the above line, depending on what python you have installed, and you might also need to change the rosdistro you have if you want the ros1 bridge).





---
[Visit Topic](https://discourse.ros.org/t/ros2-on-gentoo/1434/7) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>