awesomebytes / ros_overlay_on_gentoo_prefix

ros-overlay built on Gentoo Prefix ready to use
BSD 3-Clause "New" or "Revised" License
2 stars 3 forks source link

ros2 support #9

Open awesomebytes opened 3 years ago

awesomebytes commented 3 years ago

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 commented 3 years ago

Hey Nikita, I made this project cause Pepper did not have (and still doesn't AFAIK) root access.

Furthermore, this allows to deploy ROS in any device that can't have its software updated (for example old robots that are unsupported). You don't risk breaking the installation at all.

If the Nao can have packages installed natively with emerge, you can try that. But you may break the installation (to avoid that I'd also use the approach I used of extracting the system image and making a Docker image from it, then you work in it. It's easy to deploy also).

On Sat, Oct 10, 2020, 09:18 Nikita Mikhaylov notifications@github.com wrote:

Hello! I am from @alex-kozinov https://github.com/alex-kozinov 's team :) Just for better understanding the whole situation... Gentoo Prefix is used only because we have no write (and root) privileges on pure Nao system except home directory? But do you know about release 2.8.5 with open root? link https://softbankroboticseurope.sharefile.eu/share/view/s82eebe563ec404d8/fod14534-269f-4682-a77b-b82debb096f2

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/awesomebytes/ros_overlay_on_gentoo_prefix/issues/9#issuecomment-706416071, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANEK5CD3VQL4KCKRNHRILLSJ6D5DANCNFSM4QXJE2WQ .

alex-kozinov commented 3 years ago

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 commented 3 years ago

Hey,

First option: Just open an issue in ros-overlay! If @allenh1 has time he may run the command to try to create that. I would do it anyway and you can update the issue with a PR or comments when you try the next option.

Second option: Read how to generate the ebuilds from the docs (using superflore) in ros-overlay and run it locally. Add the ebuilds to your container and see how you go.

On Wed, 11 Nov 2020 at 20:55, Aleksey Kozinov notifications@github.com wrote:

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? :)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/awesomebytes/ros_overlay_on_gentoo_prefix/issues/9#issuecomment-725324816, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANEK5BKHHE6PRPLXEEXJGDSPJNQDANCNFSM4QXJE2WQ .

--

Sammy Pfeiffer PhD Candidate at The Magic Lab within UTS (thesis under examination). Senior Robotics Software Architect.

alex-kozinov commented 3 years ago

I've tried two ways:

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
-||-
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 commented 3 years ago

Hey,

I recommend you to open an issue in ros-overlay first, as you may get better feedback.

About your error:

unresolved: "rti-connext-dds-5.3.1"

Means, well, that that key can't be found. It may be missing in:

https://github.com/ros/rosdistro/blob/master/rosdep/base.yaml

Which I can see that it's missing for gentoo:

https://github.com/ros/rosdistro/blob/1956e3e36783704e4ad527ae589e0aeb159cf540/rosdep/base.yaml#L5678

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.

As a workaround meanwhile you wait for that merged, you can install that dependency manually and edit the ebuild that depends on it, and remove the dependency... It's a bit cumbersome though. Maybe in ros-overlay they have a better workaround. (Sorry I'm writing quite late and I may be forgetting some other way).

On Thu, Nov 12, 2020, 17:58 Aleksey Kozinov notifications@github.com wrote:

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


!!!!  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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/awesomebytes/ros_overlay_on_gentoo_prefix/issues/9#issuecomment-725881051, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANEK5BGUGIB36C25FCS2RLSPOBRJANCNFSM4QXJE2WQ .

allenh1 commented 3 years ago

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 commented 3 years ago

Don't get me wrong! I'm happy to help! It's just that the problems arising at this step are of a nature that Allen can help in a more timely manner I think. Tag me in the issue in ros-overlay so I'm in the loop :)

Hopefully we'll have ROS2 ready to use soon in Gentoo/Gentoo Prefix!

On Fri, Nov 13, 2020, 05:18 Hunter L. Allen notifications@github.com wrote:

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 https://github.com/awesomebytes.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/awesomebytes/ros_overlay_on_gentoo_prefix/issues/9#issuecomment-726252109, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANEK5BH4BMOHVND2Z32XADSPQRH5ANCNFSM4QXJE2WQ .

allenh1 commented 3 years ago

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 commented 3 years ago

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