I have a question, if i were to follow the website tutorial, they told me to also change the bash file with echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc. But i am assuming that if i were to delete the container, I would have to source ros2 again anyway? I have a container running right now but i forgot to set the display environment, so should i delete the container and do all the steps again properly? or is there a way to edit the environment later in docker?
@@navkaranhanda yeah, but you could in fact in the dockerfile add source command in a bashrc through a bash command. But as I create the workspace after the container creation, I'll have to source the workspace anyway so I did not add this command. So yes you would have to resource everything. But you can avoid it by adding the bash command (that writr the source command in the bashrc) directly in the dockerfile. Hope that answer your question :)
@@R1leMargoulin Ok so what i am understanding is that I would have to source ros everytime i make a new container anyway. Another question, I created my container using this command - "docker run -it osrf/ros:humble-desktop", and then on another command line window I sourced it usign "docker exec -it bash" and i created the rqt environment using "export DISPLAY=host.docker.internal:0" but when i use turtlesim_teleop_key on my second window, it doesnt control the turtle at all, it just doesnt move?
@@navkaranhanda no, you can add a lines in the dockerfile that will add the sourcing in your bashrc file. It will work with the ROS soursing itself but it wont work with your workspace in case you name it differently. So you eventually could add those lines in the dockerfile, but if you name your workspace differently you'll have to resource it. With ros itself it would work tho
Great tutorial! Can I install ros2 jazzy on docker with this method?
@@JiJitsu-hd7tb you should be able to do it 😀
I have a question, if i were to follow the website tutorial, they told me to also change the bash file with echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc.
But i am assuming that if i were to delete the container, I would have to source ros2 again anyway? I have a container running right now but i forgot to set the display environment, so should i delete the container and do all the steps again properly? or is there a way to edit the environment later in docker?
@@navkaranhanda yeah, but you could in fact in the dockerfile add source command in a bashrc through a bash command.
But as I create the workspace after the container creation, I'll have to source the workspace anyway so I did not add this command.
So yes you would have to resource everything. But you can avoid it by adding the bash command (that writr the source command in the bashrc) directly in the dockerfile.
Hope that answer your question :)
@@R1leMargoulin Ok so what i am understanding is that I would have to source ros everytime i make a new container anyway.
Another question, I created my container using this command - "docker run -it osrf/ros:humble-desktop", and then on another command line window I sourced it usign "docker exec -it bash" and i created the rqt environment using "export DISPLAY=host.docker.internal:0"
but when i use turtlesim_teleop_key on my second window, it doesnt control the turtle at all, it just doesnt move?
@@navkaranhanda no, you can add a lines in the dockerfile that will add the sourcing in your bashrc file.
It will work with the ROS soursing itself but it wont work with your workspace in case you name it differently.
So you eventually could add those lines in the dockerfile, but if you name your workspace differently you'll have to resource it.
With ros itself it would work tho
@@R1leMargoulin Ok, so i've killed the container and i'll try making it properly again, i'll ask if any more questions ever come up, thanks a lot!
Great tutorial! Thanks a lot.
Thanks for this feedback!
very helpful. thank you :)
Thanks! This means a lot!