You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -64,7 +68,7 @@ The simulation is based on the open source robot simulator *Webots*. The applica
64
68
65
69
### How to start?
66
70
67
-
After you built the application, you will find in in ```.pio/build/<APPLICATION-NAME>/program.exe```. It provides several command line arguments to configure certain features. Use -h or --help to get a short user friendly overview about them.
71
+
After you built the application, you will find it in ```.pio/build/<APPLICATION-NAME>/program[.exe]```. It provides several command line arguments to configure certain features. Use -h or --help to get a short user friendly overview about them.
68
72
69
73
The applications are using a configuration file in JSON format to retrieve certain settings. In the very first run, such a configuration file will be automatically be created. If there exists already one, it will be loaded without modifications (regardless of any other program arguments).
In order to simplify this process, the [Launcher](https://github.com/gabryelreyes/Launcher) project is under active development.
80
84
85
+
### Run
86
+
87
+
There are 3 ways how to run now the application. Choose according to your needs.
88
+
89
+
#### Run with Webots launcher (recommended)
90
+
91
+
The Webots launcher is recommended to connect to the simulation.
92
+
93
+
It is mandatory if the simulation contains more than one robot. The robot is identified by its name. Adapt the robot name in the [platformio_override.ini](./platformio_override.ini), see *webots_robot_name*.
94
+
95
+
The Webots documentation has more details about [Single Simulation and Multiple Local Extern Robot Controllers](https://cyberbotics.com/doc/guide/running-extern-robot-controllers?tab-os=windows#single-simulation-and-multiple-local-extern-robot-controllers).
96
+
97
+
It is mandatory too if the simulation does not run locally (e.g. Webots runs on windows host and RadonUlzer in WSL).
98
+
Set the IP address and the port in [platformio_override.ini](./platformio_override.ini), see *webots_ip_address* and *webots_protocol*.
99
+
100
+
Use *ipc* as *webots_protocol* for local connections and *tcp* for remote connections.
101
+
102
+
| Key | Description |
103
+
| --- | ----------- |
104
+
| webots\_ip\_address | The IP address of the Webots simulation, which is used for TCP communication. |
105
+
| webots\_protocol |\[ipc\|tcp\] - ipc is faster but only works on the same machine, tcp works also over network. |
106
+
| webots\_robot\_name | The robot name used to identify the robot in the Webots world. See Webots world robot prototype. |
This can be choosen in case the simulation waits just for one robot.
113
+
114
+
PlatformIO project tasks --> <APP-NAME> --> General --> Upload
115
+
116
+
#### Run via terminal
117
+
118
+
1. Open a command line (shell) and change to the folder with the built executable in ```.pio/build/<APP-NAME>```. This folder contains all necessary shared libraries as well.
119
+
2. Start the executable.
120
+
81
121
## The target
82
122
83
123
The main target of the firmware is the [ZumoComSystem](https://github.com/NewTec-GmbH/ZumoComSystem) from NewTec GmbH, which is a shield for the [Pololu 32U4 Zumo](https://www.pololu.com/product/2510) robot.
*[Using the agent with the serial interface](#using-the-agent-with-the-serial-interface)
8
-
*[Using the agent with the UDP interface](#using-the-agent-with-the-udp-interface)
9
-
*[Using the agent with the TCP interface](#using-the-agent-with-the-tcp-interface)
10
-
*[Troubleshooting on WSL environment](#troubleshooting-on-wsl-environment)
11
-
*[Testing the node](#testing-the-node)
5
+
-[Micro XRCE-DDS Agent](#micro-xrce-dds-agent)
6
+
-[Installation](#installation)
7
+
-[Using the agent with the serial interface](#using-the-agent-with-the-serial-interface)
8
+
-[Using the agent with the TCP interface (recommended)](#using-the-agent-with-the-tcp-interface-recommended)
9
+
-[Using the agent with the UDP interface](#using-the-agent-with-the-udp-interface)
10
+
-[Troubleshooting on WSL environment](#troubleshooting-on-wsl-environment)
11
+
-[Testing the node](#testing-the-node)
12
12
13
13
## Installation
14
14
15
-
Follow the instructions detailed [here](https://micro-xrce-dds.docs.eprosima.com/en/latest/installation.html). It has only been tested as standalone executable (without Docker neither using Snap).
15
+
Follow the instructions detailed in [eProsima Micro XRCE-DDS documentation](https://micro-xrce-dds.docs.eprosima.com/en/latest/installation.html). It has only been tested as standalone executable (without Docker neither using Snap).
16
16
`cmake` and `make` are required to build the Agent.
17
17
18
18
## Using the agent with the serial interface
@@ -38,7 +38,7 @@ Once the Agent and the Client are connected, the terminal should show something
38
38
[1723186868.574254] info | ProxyClient.cpp | create_datawriter | datawriter created | client_key: 0x64C59DFF, datawriter_id: 0x000(5), publisher_id: 0x000(3)
39
39
```
40
40
41
-
## Using the agent with the TCP interface
41
+
## Using the agent with the TCP interface (recommended)
42
42
43
43
Start the MicroXRCEAgent binary to listen to **TCP** connections:
44
44
@@ -60,7 +60,7 @@ Start the MicroXRCEAgent binary to listen to **TCP** connections:
60
60
> [!WARNING]
61
61
> Note: UDP ports on WSL are not working properly if you need to access them outside of the WSL VM (Status 2024-10-31). Use TCP with WSL instead.
62
62
> See [https://github.com/micro-ROS/micro-ROS-Agent/issues/194](https://github.com/micro-ROS/micro-ROS-Agent/issues/194) for further details.
63
-
> The mentioned ```netsh`` tool for port proxy forwarding only supports TCP.
63
+
> The mentioned ```netsh``` tool for port proxy forwarding only supports TCP.
64
64
65
65
Start the MicroXRCEAgent binary to listen to UDP connections:
66
66
@@ -87,6 +87,7 @@ Update: 2024-10-30: TCP transport is available in DroidControlShip, making UDP u
87
87
In order to test your node, you can use `ros2 topic list` to list all topics used, or `ros2 topic echo <topic_name>` to listen to incoming data in a specific topic.
Follow the official installation guide for Webots on Windows in the [Webots User Guide Installation Procedure](https://cyberbotics.com/doc/guide/installation-procedure#installation-on-windows).
17
+
18
+
ROS2 requires Linux, therefore in this setup RadonUlzer and DroidControlShip are running inside the WSL. They will connect via TCP to Webots running on the host system.
19
+
20
+
### Webots ROS2 Package (Webots on Windows)
21
+
22
+
The setup procedure is described on [this page](https://docs.ros.org/en/jazzy/Tutorials/Advanced/Simulators/Webots/Installation-Windows.html) from the Jazzy documentation. If the listed package is not found by apt, you will need to install it by building from source.
23
+
24
+
### Running Webots ROS2 Universal Robot (on Windows)
25
+
26
+
See Task 2 from this [Jazzy documentaion page](https://docs.ros.org/en/jazzy/Tutorials/Advanced/Simulators/Webots/Installation-Ubuntu.html#launch-the-webots-ros2-universal-robot-example)
27
+
28
+
Replace ```<DRIVE>/<WEBOTS-INSTALLATION_DIRECTORY>``` in the following terminal commands:
Follow the official installation guide for Webots on Linux with APT in the [Webots User Guide Installation Procedure](https://cyberbotics.com/doc/guide/installation-procedure#installing-the-debian-package-with-the-advanced-packaging-tool-apt).
7
50
8
51
> **_NOTE:_**
9
52
Some of the steps result in larger package downloads.
@@ -17,7 +60,7 @@ Set environment variables for Webots home directory, the Webots controller libra
17
60
source$HOME/.bashrc
18
61
```
19
62
20
-
## Launching Webots
63
+
###Launching Webots
21
64
22
65
Try
23
66
@@ -36,31 +79,25 @@ If you get an error like "cannot open Display", try the following:
36
79
37
80
- try running Webots again
38
81
39
-
## Webots ROS2 Package
40
-
41
-
The setup procedure is described on [this page](https://docs.ros.org/en/jazzy/Tutorials/Advanced/Simulators/Webots/Installation-Ubuntu.html)
42
-
from the Jazzy documentation. The listed package is not found by apt, so
43
-
install it using building from source.
82
+
### Webots ROS2 Package (Webots in WSL)
44
83
45
-
Note: For the time being, we need to install a patched version from https://github.com/nhjschulz/webots_ros2.git.
46
-
The official one doesn't seem to support webots running inside WSL, but expects msys2/mingw.
84
+
The setup procedure is described on [this page](https://docs.ros.org/en/jazzy/Tutorials/Advanced/Simulators/Webots/Installation-Ubuntu.html) from the Jazzy documentation. If the listed package is not found by apt, you will need to install it by building from source.
47
85
48
-
transcript:
86
+
Because of [Webots Issue 6570 in webots-ros2-driver](https://github.com/cyberbotics/webots/issues/6570), running Webots inside the WSL requires a small local change. If it detects that the system is a WSL system, it will try to run ```webots.exe``` instead of ```webots```.
See Task 2 from this [Jazzy documentaion page](https://docs.ros.org/en/jazzy/Tutorials/Advanced/Simulators/Webots/Installation-Ubuntu.html#launch-the-webots-ros2-universal-robot-example)
0 commit comments