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

ros2 support #9

Open
awesomebytes opened this issue Sep 4, 2020 · 9 comments
Open

ros2 support #9

awesomebytes opened this issue Sep 4, 2020 · 9 comments

Comments

@awesomebytes
Copy link
Owner

Reposting this as a public issue so others may help or be interested:

Hello! I am @alex-kozinov
We've met before, when I asked you about some issues with ROS overlays over gentoo prefix. And you've been very helpful! Only with your support and your knowledge our team got an opportunity to work under Nao robots, thank you a lot (:
But recently we found out about ros2 and its advantages. But we don't know how to install it on Nao robot. Can you help us to do it? Maybe we will together implement it in repo https://github.com/awesomebytes/ros_overlay_on_gentoo_prefix

You can certainly use my bootstrapping method via ros_overlay_on_gentoo_prefix to get ros2 running. You'll need to fix up some issues as they come, most probably, but itshould be okay.
ROS2 offers a lot of cool things, but, also note that it may be missing packages to be ported that you may want to use. This has been the case for some friends last year, things may have improved meanwhile though (they didn't use Nao/Pepper). Most probably, the naoqi_driver will not be ready for ROS2. However, you may also run ROS1 and ROS2 software at the same time thanks to a bridge, I think.
Some work was done in a different project by a friend, @esteve, to build ROS1 and ROS2 for Pepper: https://github.com/esteve/ros2_pepper Note that it compiles 'by hand' all dependencies and ROS itself instead of leveraging the OS package manager to do that for you. I think my approach with Gentoo Prefix is better because of that. But it may be useful to have as a reference.
You may want to start your journey by trying to follow the instructions in: https://index.ros.org/doc/ros2/Installation/Foxy/Linux-Install-Debians/ But installing the ros2 packages as:

emerge ros-foxy/ros_base

I would start by using docker containers to make testing easier:

# Get the latest successful docker image
docker pull awesomebytes/roogp_ros_melodic_ros_base
# Get a shell inside of it
docker run -it --name=ros2 awesomebytes/roogp_ros_melodic_ros_base /bin/bash
./gentoo/startprefix
export EPREFIX=/tmp/gentoo
# Update our portage package manager (like doing apt-get update)
cd $EPREFIX/usr/local/portage && git clean -f && git reset --hard
emaint sync -a
# Try to emerge ros-foxy
emerge ros-foxy/ros_base

Note that you can get additional shells in that docker container by doing docker exec -it ros2 /bin/bash.

You can check the names of packages from the ros-overlay repo: https://github.com/ros/ros-overlay/tree/main/ros-foxy

Let me know how you go.

@awesomebytes
Copy link
Owner Author

awesomebytes commented Oct 10, 2020 via email

@alex-kozinov
Copy link

Hi!
I decided to run it at the docker container. But command emerge ros-foxy/ros_base failed with error

emerge: there are no ebuilds to satisfy "ros-foxy/rosidl_typesupport_connext_cpp".
(dependency required by "ros-foxy/rosidl_typesupport_cpp-1.0.0-r1::ros-overlay" [ebuild])
(dependency required by "ros-foxy/rosidl_default_runtime-1.0.0-r1::ros-overlay" [ebuild])
(dependency required by "ros-foxy/statistics_msgs-1.0.0-r1::ros-overlay" [ebuild])
(dependency required by "ros-foxy/rclcpp-2.0.2-r1::ros-overlay" [ebuild])
(dependency required by "ros-foxy/rosbag2_transport-0.3.3-r1::ros-overlay" [ebuild])
(dependency required by "ros-foxy/rosbag2-0.3.3-r1::ros-overlay" [ebuild])
(dependency required by "ros-foxy/ros_base-0.9.2-r1::ros-overlay" [ebuild])
(dependency required by "ros-foxy/ros_base" [argument])

I've checked https://github.com/ros/ros-overlay/tree/main/ros-foxy and i can't find ros-foxy/rosidl_typesupport_connext_cpp
Do you know how to handle such emerge errors? :)

@awesomebytes
Copy link
Owner Author

awesomebytes commented Nov 12, 2020 via email

@alex-kozinov
Copy link

I've tried two ways:

  • Generate rosidl_typesupport_connext_cpp inside gentoo prefix in image awesomebytes/roogp_ros_melodic_ros_base
docker run -it -u 0  awesomebytes/roogp_ros_melodic_ros_base
./gentoo/startprefix
export SUPERFLORE_GITHUB_TOKEN="..."
git clone https://github.com/ros-infrastructure/superflore
sudo apt-get install python3-setuptools
python3 ./setup.py install
sudo rosdep update
superflore-gen-ebuilds --ros-distro foxy --only rosidl_typesupport_connext_cpp

and after this got an error

>>>> Regenerating package 'rosidl_typesupport_connext_cpp'...
!!!! Failed to resoebuilds --ros-distro foxy --only rosidl_typesupport_connext_cpp
```lve required dependencies for package rosidl_typesupport_connext_cpp!
!!!!  unresolved: "rti-connext-dds-5.3.1"
!!!! No packages generated successfully, exiting.
>>>> Cleaning up temporary directory /tmp/tmpfi5s_br9
  • Then i switched to my own workspace
-||-
sudo rosdep update
sudo apt install -q -y rti-connext-dds-5.3.1
sudo -E superflore-gen-ebuilds --ros-distro foxy --only rosidl_typesupport_connext_cpp

and again got an error

>>>> Regenerating package 'rosidl_typesupport_connext_cpp'...
!!!! Failed to resolve required dependencies for package rosidl_typesupport_connext_cpp!
!!!!  unresolved: "rti-connext-dds-5.3.1"
!!!! No packages generated successfully, exiting.

I don't know what to do know, can you give me a hint please. Thank you a lot for your guidance

@awesomebytes
Copy link
Owner Author

awesomebytes commented Nov 12, 2020 via email

@allenh1
Copy link

allenh1 commented Nov 12, 2020

You'll need to submit a pull request there to add it for the
superflore tool to work. I encourage you to open an issue explaining
what you are trying to do and the exact errors you are getting in the
ros-overlay repo.

Yep -- this is exactly what needs to be done. There's more to do with the ROS 2 stuff, but satisfying the dependencies is a first. Please file an issue on ros-overlay and we can track things there without making too much noise for @awesomebytes.

@awesomebytes
Copy link
Owner Author

awesomebytes commented Nov 12, 2020 via email

@allenh1
Copy link

allenh1 commented Nov 14, 2020

Don't get me wrong! I'm happy to help!

@awesomebytes sorry, I didn't mean to make it sound like you didn't! I was trying to articulate that Gentoo noise should be on my repo instead of this one.

Lots of things to do there, but I'm finally back on Gentoo as I am typing, so I hope to get some of this worked out in the very near future.

@alex-kozinov
Copy link

alex-kozinov commented Feb 21, 2021

Reposting this as a public issue so others may help or be interested:

Hello! I am @alex-kozinov
We've met before, when I asked you about some issues with ROS overlays over gentoo prefix. And you've been very helpful! Only with your support and your knowledge our team got an opportunity to work under Nao robots, thank you a lot (:
But recently we found out about ros2 and its advantages. But we don't know how to install it on Nao robot. Can you help us to do it? Maybe we will together implement it in repo https://github.com/awesomebytes/ros_overlay_on_gentoo_prefix

You can certainly use my bootstrapping method via ros_overlay_on_gentoo_prefix to get ros2 running. You'll need to fix up some issues as they come, most probably, but itshould be okay.
ROS2 offers a lot of cool things, but, also note that it may be missing packages to be ported that you may want to use. This has been the case for some friends last year, things may have improved meanwhile though (they didn't use Nao/Pepper). Most probably, the naoqi_driver will not be ready for ROS2. However, you may also run ROS1 and ROS2 software at the same time thanks to a bridge, I think.
Some work was done in a different project by a friend, @esteve, to build ROS1 and ROS2 for Pepper: https://github.com/esteve/ros2_pepper Note that it compiles 'by hand' all dependencies and ROS itself instead of leveraging the OS package manager to do that for you. I think my approach with Gentoo Prefix is better because of that. But it may be useful to have as a reference.
You may want to start your journey by trying to follow the instructions in: https://index.ros.org/doc/ros2/Installation/Foxy/Linux-Install-Debians/ But installing the ros2 packages as:

emerge ros-foxy/ros_base

I would start by using docker containers to make testing easier:

# Get the latest successful docker image
docker pull awesomebytes/roogp_ros_melodic_ros_base
# Get a shell inside of it
docker run -it --name=ros2 awesomebytes/roogp_ros_melodic_ros_base /bin/bash
./gentoo/startprefix
export EPREFIX=/tmp/gentoo
# Update our portage package manager (like doing apt-get update)
cd $EPREFIX/usr/local/portage && git clean -f && git reset --hard
emaint sync -a
# Try to emerge ros-foxy
emerge ros-foxy/ros_base

Note that you can get additional shells in that docker container by doing docker exec -it ros2 /bin/bash.

You can check the names of packages from the ros-overlay repo: https://github.com/ros/ros-overlay/tree/main/ros-foxy

Let me know how you go.

Hi, @awesomebytes!
I've repeated this commands, but when I run emerge ros-foxy/ros_base I get error that "ros-foxy/ros_base" have been masked:
log.txt

Can you help with this issue please? :)
Or maybe provide some advice how to fix this, and I'll do so

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

3 participants