Skip to content

Commit 82e565b

Browse files
authored
AIRO-1071 Update network guide in ROS-Unity integration (#283)
* AIRO-1071 Update network guide in ROS-Unity integration * AIRO-1071 Add Changelog * Fix formatting
1 parent f9ac5f4 commit 82e565b

File tree

4 files changed

+17
-11
lines changed

4 files changed

+17
-11
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,5 @@ Changed the Pick and Place Demo's topic from SourceDestination to SourceDestinat
2525
Fixed the ROS-Unity Integration tutorial to use the correct link to install ROS-TCP-Connector package
2626

2727
Fixed the Pick and Place Tutorial to use ArticulationBody jointPositions, rather than the xDrive.target, for updating the current joint angle positions
28+
29+
Fixed network.md in ROS-Unity Integration tutorial by removing the obsolete UNITY_IP
Binary file not shown.
57.6 KB
Loading

tutorials/ros_unity_integration/network.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
- [Definitions](#definitions)
55
- [Communicaton Minimum Requirements](#communication-minimum-requirements)
66
- [If Using Docker](#if-using-docker)
7-
- [Explicitly Setting UNITY_IP](#explicitly-setting-unity_ip)
87
- [Troubleshoooting](#troubleshooting)
98
- [Where Does Communication Break Down](#where-does-communication-break-down)
109
- [1. Can Unity send messages to ROS?](#1-can-unity-send-messages-to-ros)
@@ -34,26 +33,32 @@ The container will need to be started with the following arguments to forward th
3433

3534

3635
- On the ROS side, set `ROS_IP` to `0.0.0.0`.
36+
```bash
37+
rosparam set ROS_IP 0.0.0.0
38+
```
3739

3840
- On the Unity side, set `ROS_IP` to `127.0.0.1`.
3941

40-
![](images/troubleshoot-docker-unity.png)
42+
![](images/settings_ros_ip.png)
4143

4244
# Troubleshooting
4345

4446
## Where Does Communication Break Down
4547

4648
### 1. Can Unity send messages to ROS?
4749

48-
When play is pressed in the Editor, a handshake message is sent from Unity to ROS.
50+
When play is pressed in the Editor, Unity will establish the connection to ROS using the ROS_IP.
4951

50-
If Unity can communicate with ROS, the following message should be printed to the console screen running the `server_endpoint.py` script.
52+
If Unity can communicate with ROS, you should see a heads-up display showing the connection in Unity Editor.
5153

52-
```[UnityTcpSender]: ROS-Unity Handshake received, will connect to UNITY_IP_ADDRESS:5005```
54+
![](images/troubleshoot_hud_success.png)
5355

54-
With the corresponding response message printed to the Unity console,
56+
The icon in front of ROS IP should be blue indicating the connection between Unity and ROS is successful.
5557

56-
```ROS-Unity server listening on UNITY_IP_ADDRESS:5005```
58+
59+
On ROS side, you should see a message printed to the console screen running the `server_endpoint.py` script, something similar to the following:
60+
61+
```Connection from 172.17.0.1```
5762

5863

5964
If the previous message is not shown and either of the following errors are thrown instead:
@@ -68,25 +73,24 @@ SocketException: Connection refused
6873

6974
Confirm that:
7075

71-
- `server_endpoint` is running
76+
- `server_endpoint` is running. On ROS side, you can run ```rosrun ros_tcp_endpoint default_server_endpoint.py```
7277
- You can ping ROS machine from Unity machine
7378
- From a terminal on the Unity machine, run the following command to confirm whether the ROS machine is reachable over the network. ```ping ROS_IP```
7479

7580
If issue still persists:
7681

77-
- Confirm your IP addresses
7882
- If on Windows you may need to [open ports for the firewall](#open-port-on-windows-firewall).
7983

8084
### 2. Can ROS send messages to Unity?
8185

8286
After it is confirmed that Unity can communicate with ROS, publish a message to a ROS topic to which Unity has instantiated a subscriber.
8387

88+
You can confirm the connection status by checking the heads-up display in your Unity Scene after entering the Play mode.
89+
8490
If an error is thrown in the `server_endpoint` console then ROS cannot connect to Unity.
8591

8692
If issue still persists:
8793

88-
- Confirm your IP addresses
89-
- Explicitly set the `UNITY_IP`
9094
- If on Windows you may need to [open ports for the firewall](#open-port-on-windows-firewall).
9195

9296
## Open port on Windows Firewall

0 commit comments

Comments
 (0)