UnityRos2
UnityRos2 copied to clipboard
Building machine from scratch...
Hi I am new to docker and docker compose. I would like to build the whole thing on my local machine. It is not clear what there is on the image dynorobotics/turtlebot3_unity:dashing and somehow, I don't know how to connect with shell to it so that I can examine it. I am going to try to guess:
- clone and install everything that is defined in the file ~/UnityRos2/docker/turtlebot3_navigation/ros2_dependencies.repos
- go to UnityRos2/docker
- colcon build
- source what is defined in ros_entrypoint.sh
- ros2 launch according what is defined in ~/UnityRos2/docker/turtlebot3_navigation/docker-compose.yaml
Any help would be more than appreciated.... And by the way, bravo for this great framework of yours!
Thanks!
You should be able to attach a terminal to the running container with the following command: docker exec -it turtlebot3_unity bash
There is also a plugin for VS Code called "Remote - Containers" that lets you look around in running containers.
As far as I remember, all dependencies in the .repos file are for https://github.com/ros-planning/navigation2/tree/dashing-devel
If you manage to install navigation2 locally, you can source that install and build UnityRos2/docker as an overlay workspace using colcon build
.
It could be possible to install navigation2 using apt, but have not tried that myself:
sudo apt install ros-dashing-navigation2
sudo apt install ros-dashing-nav2-bringup
Building navigation2 from source is a bit messy in my experience, so I would not recommend that.
We recently tutored a bunch master students for a university project where they changed the global planner in navigation2 and built that locally using docker. https://github.com/niklastallund/UnityRos2/tree/coverage-planning-linux/docker/dredging_robot_navigation
If you tell me more about what you want to do, I may be able to help you set something up with docker that suits your use-case :)
Hi Samuel Thank you for all your support.
You should be able to attach a terminal to the running container with the following command:
docker exec -it turtlebot3_unity bash
Indeed, that works. Thank you!!
There is also a plugin for VS Code called "Remote - Containers" that lets you look around in running containers.
As far as I remember, all dependencies in the .repos file are for https://github.com/ros-planning/navigation2/tree/dashing-devel If you manage to install navigation2 locally, you can source that install and build UnityRos2/docker as an overlay workspace using
colcon build
. It could be possible to install navigation2 using apt, but have not tried that myself:sudo apt install ros-dashing-navigation2 sudo apt install ros-dashing-nav2-bringup
I installed that way, then colcon build, then source install/setup.bash
Building navigation2 from source is a bit messy in my experience, so I would not recommend that.
We recently tutored a bunch master students for a university project where they changed the global planner in navigation2 and built that locally using docker. https://github.com/niklastallund/UnityRos2/tree/coverage-planning-linux/docker/dredging_robot_navigation
If you tell me more about what you want to do, I may be able to help you set something up with docker that suits your use-case :)
My work is experimental only. We have a robot supporting ROS-1 and simulated in Unity... I used the infrastructure of Siemens and it works. We are considering to move to ROS-2 so I am trying to use your infrastructure to work with Unity... A good starting point would be if I could run the whole thing on my machine and then to try to modify code to check that I understand what is going on.
So I tried to "simulate" the docker by running:
ros2 launch turtlebot3_unity_bringup nav2_bringup_launch.py
Alas, I have difficulties with the lifecycle_manager... After checking version of ros package, I upgraded locally all the ros-dashing but ... no potatoes....
I have the same problem if I run (and play) Unity (python3 start_editor.py) or not...
If Unity is not running then I have the following errors:
[lifecycle_manager-2] [ERROR] [lifecycle_manager]: Failed to change state for node: map_server [lifecycle_manager-2] [ERROR] [lifecycle_manager]: Failed to bring up node: map_server, aborting bringup
If Unity is running then, it gets stuck here: `ros2 launch turtlebot3_unity_bringup nav2_bringup_launch.py
[INFO] [launch]: All log files can be found below /home/robil/.ros/log/2019-12-24-12-03-44-765620-lavi-25856 [INFO] [launch]: Default logging verbosity is set to INFO [INFO] [robot_state_publisher-1]: process started with pid [25867] [INFO] [lifecycle_manager-2]: process started with pid [25868] [INFO] [map_server-3]: process started with pid [25869] [INFO] [amcl-4]: process started with pid [25870] [INFO] [world_model-5]: process started with pid [25871] [INFO] [dwb_controller-6]: process started with pid [25872] [INFO] [navfn_planner-7]: process started with pid [25879] [INFO] [recoveries_node-8]: process started with pid [25886] [INFO] [bt_navigator-9]: process started with pid [25894] [robot_state_publisher-1] Initialize urdf model from file: /home/robil/test/UnityRos2/docker/install/turtlebot3_description/share/turtlebot3_description/urdf/turtlebot3_burger.urdf [robot_state_publisher-1] Parsing robot urdf xml string. [robot_state_publisher-1] Link base_link had 5 children [robot_state_publisher-1] Link caster_back_link had 0 children [robot_state_publisher-1] Link imu_link had 0 children [robot_state_publisher-1] Link base_scan had 0 children [robot_state_publisher-1] Link wheel_left_link had 0 children [robot_state_publisher-1] Link wheel_right_link had 0 children [robot_state_publisher-1] got segment base_footprint [robot_state_publisher-1] got segment base_link [robot_state_publisher-1] got segment base_scan [robot_state_publisher-1] got segment caster_back_link [robot_state_publisher-1] got segment imu_link [robot_state_publisher-1] got segment wheel_left_link [robot_state_publisher-1] got segment wheel_right_link [lifecycle_manager-2] [INFO] [lifecycle_manager]: Creating [robot_state_publisher-1] Adding fixed segment from base_footprint to base_link [robot_state_publisher-1] Adding fixed segment from base_link to caster_back_link [robot_state_publisher-1] Adding fixed segment from base_link to imu_link [robot_state_publisher-1] Adding fixed segment from base_link to base_scan [robot_state_publisher-1] Adding moving segment from base_link to wheel_left_link [robot_state_publisher-1] Adding moving segment from base_link to wheel_right_link [map_server-3] [INFO] [map_server]: Creating [recoveries_node-8] [WARN] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic. [lifecycle_manager-2] [INFO] [lifecycle_manager]: Starting the system bringup... [lifecycle_manager-2] [INFO] [lifecycle_manager]: Creating and initializing lifecycle service clients [world_model-5] [INFO] [world_model]: Creating World Model [amcl-4] [INFO] [amcl]: Creating [dwb_controller-6] [INFO] [dwb_controller]: Creating [recoveries_node-8] [INFO] [recoveries]: Configuring Spin [bt_navigator-9] [INFO] [bt_navigator]: Creating [navfn_planner-7] [INFO] [navfn_planner]: Creating [lifecycle_manager-2] [INFO] [lifecycle_manager]: Configuring and activating map_server [recoveries_node-8] [INFO] [recoveries]: Configuring BackUp [navfn_planner-7] [WARN] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic. [world_model-5] [INFO] [global_costmap.global_costmap]: Creating Costmap [dwb_controller-6] [INFO] [local_costmap.local_costmap]: Creating Costmap ` But I suspect that my crash happens before it starts to communicate with Unity. So I guess my problem is in my environment and might not have anything to do with UnityRos2. However, I could not resist to the drive to share the output with you, just in case....
Thank you for your help