My man I watched all the playlist 3 month ago to work on my graduation project, I only skipped this video and had to always type colcon build during these 3 months 😆, I even tried searching for a solution online but none actually helped. Your content is really simple and straight forward
I have been reading articles, docs and watching other tutorials for three days. This series got me up and going in a few minutes. I just wanted to add if the a KeyboardInterrupt error bothers you you can use "ctrl+z" || new output => [1]+ Stopped ros2 run my_robot_controller test_node
i think that will just suspend the process to the background, not actually shut it down. you can bring it back with "fg" (foreground) and view all background processes with "jobs". If the KeyboardInterrupt bothers you, catch the error and print a nicer message.
At 10:13, how did you execute a python file using "./" ? I tried the cmd "./my_first_node.py" but it didn't work. It only works if I do "python3 my_first_node.py". Please explain, thank you!
@@2anta Yes, I did "chmod +x my_first_node.py", but when I then do "./ my_first_node.py", it just outputs "bash: ./: Is a directory" and the code doesn't execute.
Im also stuck here , I have checked the items in the directory and ran '.my_first_node_.py' but shows an erroe bad interprector no such file or directory
Merhaba ; Ben ilk ROS neotikle başladım ve eksiksiz öğrettiklerinizi tamamladım. Şimdide ROS2 başladım ve beşinci derse kadar eksiksiz devam ediyorum .Eğitimin için sana cok teşekkür ederim . python yeni öğrenen biriyim ama buna rağmen tüm derslerini eksiksiz yerine getirebiliyorum . Ama herşeyi bakarak yapıyorum ilerde tek başımada yapabilirmiyim bilmiyorum.
Hi, thanks for the excellent tutorial! I am a newer of the terminal. And when I run 'ros2 run my_robot_controller test_node' it says 'Package 'my_robot_controller' not found'. I don't know if it is related that I used zsh and run 'source ~/.zshrc' rather than 'source ~/.bashrc'. Or it is about 'colcon build' (no error appeared from this command)? thanks!
Hard to tell, and as for zsh: I haven't tried yet (only using bash), but will have a look. From what I quickly found it seems that zsh could have some issues with ROS2: answers.ros.org/question/394021/no-completion-for-ros2-run-in-zsh/ But the error could also be because you have forgotten a step when building the node, a typo somewhere, etc. So I'd say, first redo all the steps one by one, then try with bash if possible, and if it works then troubleshoot with zsh.
Good Day, firstly great video series. I, however got stuck on 9:54, I run the my_first_node.py but the terminal does not print anything. would you be able to assist Thank you
Hi, what happens If I use colcon build inside the src directory ? I was mistakenly doing this and I was so anxious that the updated code was not being tracked. Later on carefully watching the blue text, I realized you were doing it inside ros2_ws and not inside src. It fixed the problem of updates. But, what are the consequences ?
If you use colcon build in the wrong directory, then it will add an install/, build/ and log/ folder there. Just remove those folders and you will be fine. If you keep different install/ folders in different places this is when you can get some weird errors and package collisions.
Try to deactivate Conda, that was my issue, ros2 doesnt work with Conda and maybe with other enviroments. After that use "pip list" and see if you have rclpy in it.
i have a problem at 3:54 bcs rclpy is still not found in my code even though i installed the extention and checked the python version as well as if rclpy is correctly installed :/
22:15 suppose you want to automatically exit the Python program after receiving 10 counts, how can you do that? Basically break out the rclpy.spin? What’s the best solution for that? rclpy.shutdown() doesn’t work for me as the “context is not initiated”
Hey! Great tutorial for newboo like me, though I’m running into a slight problem at 17:42 where after running colcon build - -symlink install, It starts and finishes but when I execute the ros2 run my_robot_controller test_node, it doesn’t update automatically the new code (changing it from printing “ROS2” to “ROS”) and I have to press save every time. Is that how it’s supposed to work? Since I understood that the colcon build - -symlink install is so the you wouldn’t have to manually save it each time.
Maybe I see where the confusion is here: - with symlink-install you don't have to build again - but you have to save the file. If you don't save the file then of course the new version is not used.
First of all thank you for the wonderful explanation. I have an error when I am trying to run node as ros2 functionality(ros2 run) as per video time line 15.25. Th error saying that "Package 'my_robot_controller' not found". Can you please help me? NB: 1). Usually the auto completion is available in my terminal, but not during this terminal session. 2). I am able to run the same node as python script from the same terminal.
Both courses are teaching in a different way, and if you understood more here, maybe it's because you finally "got it" here after having watched the other course. Happens all the time to me, I read from different sources and finally I get it, but it's because the brain actually combines the knowledge from all learning material :) so the tutorial that made you understand is probably not the only one that was important.
Just like others, I am also having the same error at 1520: usage: ros2 run [-h] [--prefix PREFIX] package_name executable_name ... ros2 run: error: the following arguments are required: executable_name, argv I have looked my code in setup.py and my_first_node, they both are fine. Plus, I deleted the folders build&install and run colcon build again in the workspace. Later run the bashrc in the terminal and colcon build in the workspace, the folders are back however when I run the ros2 run my_robot_controller, it shows the same error. Anyone has solution?
In the video I don't run this command, I press TAB for autocompletion (please first watch a tutorial on autocompletion) The full command is ros2 run my_robot_controller + executable name
Probably, your timer_callback function is inside of the constructor(__init__). Just put it outside to the constructor. In short, get your cursor on head of def time_callback function and push the "backspace" in the keyboard. Also, same for self.get_logger()... I hope that will work.
heyy thats a good tutorial for a newbie like me , thnaks for making these videos though I’m running into a slight problem at 15:12 ,ros2 run my_robot_cotroller , this aint working for me , it says the following arguements require executable_name , though i have give the executable _name which is test_node , executable name and the package_name put togather it is ros2 run my_robot_controller test_name as youve shown in the video ,still it says error and package my_robot_controller not found can you pls help me with this
Could you please make more complicated projects ? These are way too simple. For example: UR5 robot manipulator that uses lidar to see and moves around using local planner using dijsktras algorithm/RRT ?
Hi! I'm running into a problem at 15:26 where after having source ~/.bashrc, I could not run the command ros2 run because it reported an error because it oculd not find any executable. Does anyone know why? I have been trying to find searching it but I havent been successful at all.
Double check the setup.py of your python package, and make sure you've specificed an executable here. Probably an error here, or in your code. When everything is good, go to your ~/ros2_ws folder, remove install/ and build/, and run "colcon build" again
@RoboticsBackEnd Traceback (most recent call last): File "/home/rocky/ros2_ws/src/my_robot/my_robot/./my_node.py", line 3, in from rclpy import Node ImportError: cannot import name 'Node' from 'rclpy' (/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/__init__.py) I am getting this error :( someone pls help me
Try to deactivate Conda, that was my issue, ros2 doesnt work with Conda and maybe with other enviroments. After that use "pip list" and see if you have rclpy in it.
Thank you for watching!
🔥 To go further with ROS2, check out this complete and step-by-step ROS2 course
👉 rbcknd.com/ros2-for-beginners
the -able suffixes at the end of the nouns are not pronounced /eibl/ as in table /teibl/
but like /əbl/ or /ibl/ as in executable /egzekutəbl/
My man I watched all the playlist 3 month ago to work on my graduation project, I only skipped this video and had to always type colcon build during these 3 months 😆, I even tried searching for a solution online but none actually helped. Your content is really simple and straight forward
the rclpy is not working for me. I downloaded the extentsion and there is an error in the code
I have been reading articles, docs and watching other tutorials for three days. This series got me up and going in a few minutes. I just wanted to add if the a KeyboardInterrupt error bothers you you can use "ctrl+z" || new output => [1]+ Stopped ros2 run my_robot_controller test_node
i think that will just suspend the process to the background, not actually shut it down. you can bring it back with "fg" (foreground) and view all background processes with "jobs". If the KeyboardInterrupt bothers you, catch the error and print a nicer message.
At 10:13, how did you execute a python file using "./" ?
I tried the cmd "./my_first_node.py" but it didn't work.
It only works if I do "python3 my_first_node.py".
Please explain, thank you!
If i'm not mistaken it's the command on the left screen : "chmod +x my_first_node.py" that make the file executable. Happy coding
@@2anta Yes, I did "chmod +x my_first_node.py", but when I then do "./ my_first_node.py", it just outputs "bash: ./: Is a directory" and the code doesn't execute.
Ok I figured it out. It should be "./my_first_node.py" (without the space between / and m).
Im also stuck here , I have checked the items in the directory and ran '.my_first_node_.py' but shows an erroe bad interprector no such file or directory
@@jeriljudes7822 have you found a way to fix it??
Love this! For a ROS beginner like myself it’s been very helpful
I am learning ROS2 for a project and this video really helped me! Thank you!
Merhaba ; Ben ilk ROS neotikle başladım ve eksiksiz öğrettiklerinizi tamamladım. Şimdide ROS2 başladım ve beşinci derse kadar eksiksiz devam ediyorum .Eğitimin için sana cok teşekkür ederim . python yeni öğrenen biriyim ama buna rağmen tüm derslerini eksiksiz yerine getirebiliyorum . Ama herşeyi bakarak yapıyorum ilerde tek başımada yapabilirmiyim bilmiyorum.
Hi thank you very much for the video. I can run the program on VsCode and command line. I build it. I see "Finished
Hi, thanks for the excellent tutorial! I am a newer of the terminal. And when I run 'ros2 run my_robot_controller test_node' it says 'Package 'my_robot_controller' not found'. I don't know if it is related that I used zsh and run 'source ~/.zshrc' rather than 'source ~/.bashrc'. Or it is about 'colcon build' (no error appeared from this command)? thanks!
Hard to tell, and as for zsh: I haven't tried yet (only using bash), but will have a look. From what I quickly found it seems that zsh could have some issues with ROS2: answers.ros.org/question/394021/no-completion-for-ros2-run-in-zsh/
But the error could also be because you have forgotten a step when building the node, a typo somewhere, etc. So I'd say, first redo all the steps one by one, then try with bash if possible, and if it works then troubleshoot with zsh.
All you need is just run instead of .bash 🙂
@@urbanspoken i have the same problem. BUt I do not run .bash because my source ./bash not work
Good Day, firstly great video series. I, however got stuck on 9:54, I run the my_first_node.py but the terminal does not print anything. would you be able to assist
Thank you
Have you been able to resolve this yet? Maybe you made an error in your main function
good course, one note though: the dark blue path part of the prompt in bash is not readable, so it makes it harder to follow.
thanks! Yes I noticed that a bit too late. It's been fixed for future tutorial though :)
Hi, what happens If I use colcon build inside the src directory ? I was mistakenly doing this and I was so anxious that the updated code was not being tracked. Later on carefully watching the blue text, I realized you were doing it inside ros2_ws and not inside src. It fixed the problem of updates. But, what are the consequences ?
If you use colcon build in the wrong directory, then it will add an install/, build/ and log/ folder there. Just remove those folders and you will be fine.
If you keep different install/ folders in different places this is when you can get some weird errors and package collisions.
Okay, Thank you for the clarification !! @@RoboticsBackEnd
you are a real hero, thank you for the content
Hey When i am running the my_frist_node ,
i found an error : No module Named " rclpy._rclpy_pybind11"
Try to deactivate Conda, that was my issue, ros2 doesnt work with Conda and maybe with other enviroments.
After that use "pip list" and see if you have rclpy in it.
i have a problem at 3:54 bcs rclpy is still not found in my code even though i installed the extention and checked the python version as well as if rclpy is correctly installed :/
did it get resolved?
cause i'm facing same issue
2:11
*♪Союз нерушимый республик свободных♪*
So this tutorial is how Atomic Heart started 🤣
22:15 suppose you want to automatically exit the Python program after receiving 10 counts, how can you do that? Basically break out the rclpy.spin? What’s the best solution for that? rclpy.shutdown() doesn’t work for me as the “context is not initiated”
Then I would suggest to stop the timer with smth like "timer.cancel()", but not shutting down the node from the inside.
Use a while or for loop around the timer
10:18 I have done the same exact thing but I am not getting any output at all no matter what I do
Thanks!
Thank you!
Hey! Great tutorial for newboo like me, though I’m running into a slight problem at 17:42 where after running colcon build - -symlink install, It starts and finishes but when I execute the ros2 run my_robot_controller test_node, it doesn’t update automatically the new code (changing it from printing “ROS2” to “ROS”) and I have to press save every time. Is that how it’s supposed to work? Since I understood that the colcon build - -symlink install is so the you wouldn’t have to manually save it each time.
Maybe I see where the confusion is here:
- with symlink-install you don't have to build again
- but you have to save the file. If you don't save the file then of course the new version is not used.
@@RoboticsBackEnd thank you so much! For the clarification! Your videos has helped me a lot!
Blue 🟦 colour text in terminal should be banned.
I know, just found out after I published the tutorial :/
Fixed in other tutorials
why should be banned?
this is immensely helpful, thank you
First of all thank you for the wonderful explanation.
I have an error when I am trying to run node as ros2 functionality(ros2 run) as per video time line 15.25. Th error saying that "Package 'my_robot_controller' not found". Can you please help me?
NB: 1). Usually the auto completion is available in my terminal, but not during this terminal session.
2). I am able to run the same node as python script from the same terminal.
Probably you didn't source your ROS2 workspace in this terminal. You need to source the workspace so that you can find the packages with ros2 run
Thanks....
This is heavenly tutorial
I understood more from this crash course than the udemy course...
Both courses are teaching in a different way, and if you understood more here, maybe it's because you finally "got it" here after having watched the other course. Happens all the time to me, I read from different sources and finally I get it, but it's because the brain actually combines the knowledge from all learning material :) so the tutorial that made you understand is probably not the only one that was important.
@@RoboticsBackEnd I needed a concise recap.
Just like others, I am also having the same error at 1520:
usage: ros2 run [-h] [--prefix PREFIX] package_name executable_name ...
ros2 run: error: the following arguments are required: executable_name, argv
I have looked my code in setup.py and my_first_node, they both are fine. Plus, I deleted the folders build&install and run colcon build again in the workspace. Later run the bashrc in the terminal and colcon build in the workspace, the folders are back however when I run the ros2 run my_robot_controller, it shows the same error. Anyone has solution?
In the video I don't run this command, I press TAB for autocompletion (please first watch a tutorial on autocompletion)
The full command is ros2 run my_robot_controller + executable name
21:13
i always get this messege (( AttributeError: 'MyNode' object has no attribute 'Timer_callback' ))
what is the problem and how to solve it?
Probably, your timer_callback function is inside of the constructor(__init__). Just put it outside to the constructor. In short, get your cursor on head of def time_callback function and push the "backspace" in the keyboard. Also, same for self.get_logger()...
I hope that will work.
please my code says node is not accessed by pylance, what do i do?/?
THANK YOU!
thanks for making this
thank you brother keep it move on .
you are a genuis, thx
amazing tutorial
heyy thats a good tutorial for a newbie like me , thnaks for making these videos
though I’m running into a slight problem at 15:12 ,ros2 run my_robot_cotroller , this aint working for me , it says the following arguements require executable_name , though i have give the executable _name which is test_node , executable name and the package_name put togather it is ros2 run my_robot_controller test_name as youve shown in the video ,still it says error and package my_robot_controller not found
can you pls help me with this
probably because your my_first_node.py isn't is the good folder. It Should be under the 2nd folder my_robot_controller next to the __init__.py
Hi! Nothing happens when I run node in the terminal. Not even an error
Have you initialized the node in main() function?
Could you please make more complicated projects ? These are way too simple. For example: UR5 robot manipulator that uses lidar to see and moves around using local planner using dijsktras algorithm/RRT ?
it will be soo good
Hi! I'm running into a problem at 15:26 where after having source ~/.bashrc, I could not run the command ros2 run because it reported an error because it oculd not find any executable. Does anyone know why?
I have been trying to find searching it but I havent been successful at all.
Double check the setup.py of your python package, and make sure you've specificed an executable here. Probably an error here, or in your code. When everything is good, go to your ~/ros2_ws folder, remove install/ and build/, and run "colcon build" again
Can I install ros2 in lunar lobster?
Amazing1 thank you very much
--symlink-install for automating the code is not working. Manual build is working fine.
If source ~/.bashrc doesn't work, use source install/setup.bash instead
Moi je dis cocorico
@RoboticsBackEnd
Traceback (most recent call last):
File "/home/rocky/ros2_ws/src/my_robot/my_robot/./my_node.py", line 3, in
from rclpy import Node
ImportError: cannot import name 'Node' from 'rclpy' (/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/__init__.py)
I am getting this error :(
someone pls help me
Did you find any solution
I am too facing this problem
Try to deactivate Conda, that was my issue, ros2 doesnt work with Conda and maybe with other enviroments.
After that use "pip list" and see if you have rclpy in it.