TurtleBot2 on ROS2 Humble
Hello, I am fairly new to ROS and currently trying to use ROS2 Humble on a TurtleBot2. I am using Ubuntu 22.04 and built Humble from source and also cloned https://github.com/igrak34/TurtleBot2... in cd ~/tb2_ros2_nav2/src. Afterwards I have used @ljaniec setup but have some questions and problems I would like to ask/share.
ROS 2 setup after installation (https://docs.ros.org/en/galactic/Inst...)
echo "source/opt/ros/humble/setup.bash" >> ~/.bashrc
sudo apt install python3-colcon-common-extensions
echo "source/usr/share/colcon_cd/function/colcon_cd.sh">> ~/.bashrc
echo "export _colcon_cd_root=/opt/ros/humble/" >> ~/.bashrc
echo "source/usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash">> ~/.bashrc
So my first question is, how is it possible to use the debian galactic installation which is supported by Ubuntu 20.04 but source with humble? How can you link those two distributions?
sudo apt install ros-galactic-navigation2
sudo apt install ros-galactic-nav2-bringup
sudo apt install ros-galactic-turtlebot3*
sudo apt install ros-humble-turtle*
export TURTLEBOT3_MODEL=waffle
export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:/opt/ros/humble/share/turtlebot3_gazebo/models
I have installed these binaries using the same command line except that I have exchanged the distribution to humble in every command. Using
ros2 launch nav2_bringup tb3_simulation_launch.py
to test also worked. Is it necessary to export the model and gazebo model path since I am working with a TurtleBot2 and not a TurleBot3.
cd ~/tb2_ros2_nav2/ros2_ws/
sudo rosdep install -i --from-path src --rosdistro galactic -y
sudo rosdep install (with distro change to humble) wasn't working and it kept telling me "ERROR: your rosdep installation has not been initialized yet. Please run:
rosdep update
so I used rosdep update but still was not able to use sudo rosdep install afterwards.
colcon build --symlink-install
I tried to build the kobuki packages but got the problem that ecl_command_line is missing which is a part of ecl_core and thus not supported by humble. How can I bypass this problem?
Thank you in advance and if someone has a different setup which works for Humble and the TurtleBot2 please share it.
At
sudo apt install ros-galactic-..........
you should try changing galactic to humble because you are using that version if it's compatible then the install should go fine. I ever tried turtlebot3 by replacing foxy with humble and it worked, hope it helps you some.Thank you for your answer! I‘ve already changed the distribution to humble for every sudo apt ros-galactic so it seems like that wasn’t the problem.
I made a mistake with Ctr+C & Ctrl+V in my instructions (I had two versions, for
galactic
andhumble
). It should behumble
everywhere. Please update the commands in the question. From the errors you got - you have to haverosdep init
before therosdep update
, I forgot about it, because I had it initialized before.I already used
rosdep init
before whenever I typerosdep init
this comes:I also tried using
rosdep install -i --from-path src --rosdistro humble -y
instead ofsudo rosdep install -i --from-path src --rosdistro humble -y
which led to this warning:So I have checked here whether those are available for humble and they were not. How do you get those packages for humble?
Is it possible that its not working because I built from source and not with debian?
Did you clone the Kobuki packages? I built them from sources. Please refer to this GitHub issue regarding the ECL and Sophus problems: https://github.com/kobuki-base/kobuki... I don't exactly remember what was needed, but it is possible for sure.
Yes, I have followed your setup step by step (cloned them into cd ~/tb2_ros2_nav2/ros2_ws/src). I tried cloning this humble-test fork of ecl_core into cd ~/tb2_ros2_nav2/ros2_ws/src where the kobuki packages are but the following error appeared:
Hi! I've been trying to get this all running in a docker container, and am experiencing the same issue as Djinn.
https://gist.github.com/Victor4X/3478b7d51b6b8c5b15d66e8d2357a757
The only thing I've changed from your original instructions is on line 19 in the Dockerfile. Installing everything related to "turtle*" felt excessive, and took a very long time.
Either way, the error I am getting is the same as Djinn:
updated cache in /root/.ros/rosdep/sources.cache
ERROR: the following packages/stacks could not have their rosdep keys resolved to system dependencies:
kobuki_auto_docking: Cannot locate rosdep definition for [ecl_linear_algebra]
kobuki_core: Cannot locate rosdep definition for [ecl_time]
kobuki_node: Cannot locate rosdep definition for [ecl_sigslots]
I have cloned all necessary packages and
rosdep install -i --from-path src --rosdistro humble -y
was successful butcolcon build --symlink-install
revealed that the sophus package had some errors so I have opened an issue and hope that after the problems are solved the colcon build will be successfull. I will keep you updated. Thank you very much for your help!