Skip to content

Commit efb5b11

Browse files
authored
ROS-Unity tutorial fixes (#286)
* Initial launch and link fixes * Updated Changelog * ROS Settings screenshot update * Changelog, typo fix
1 parent 4c81463 commit efb5b11

File tree

6 files changed

+10
-22
lines changed

6 files changed

+10
-22
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
66

77
## Unreleased
88

9+
Fixed the ROS-Unity Integration tutorial `robo_demo.launch` to be up-to-date with file paths, and updated Pick-and-Place Part 2 ROS Settings screenshot.
10+
911
### Upgrade Notes
1012

1113
### Known Issues

tutorials/pick_and_place/2_ros_tcp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,11 @@ To enable communication between Unity and ROS, a TCP endpoint running as a ROS n
142142

143143
- If you are **not** running ROS services in a Docker container, replace the `ROS IP Address` value with the IP address of your ROS machine. Ensure that the `Host Port` is set to `10000`.
144144

145-
- If you **are** running ROS services in a Docker container, fill `ROS IP Address` with the loopback IP address `127.0.0.1` and the `Override Unity IP Address` as your local machine's IP address. Otherwise, leave the `Override Unity IP Address` field empty.
145+
- If you **are** running ROS services in a Docker container, fill `ROS IP Address` with the loopback IP address `127.0.0.1`.
146146

147147
![](img/2_settings.png)
148148

149-
Opening the ROS Settings has created a ROSConnectionPrefab in `Assets/Resources` with the user-input settings. When the static `ROSConnection.instance` is referenced in a script, if a `ROSConnection` instance is not already present, the prefab will be instantiated in the Unity scene, and the connection will begin.
149+
The other settings can be left as their defaults. Opening the ROS Settings has created a ROSConnectionPrefab in `Assets/Resources` with the user-input settings. When the static `ROSConnection.instance` is referenced in a script, if a `ROSConnection` instance is not already present, the prefab will be instantiated in the Unity scene, and the connection will begin.
150150

151151
> Note: While using the ROS Settings menu is the suggested workflow as of this version, you may still manually create a GameObject with an attached ROSConnection component.
152152
-123 KB
Loading

tutorials/ros_unity_integration/network.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616

1717
> It is possible to set both of these variables on the machines running Unity and ROS. The specifics of where and why each of these settings will be described below.
1818
19-
On the ROS machine these settings are set as a rosparam and will typically be set in a launch file like [this](https://github.com/Unity-Technologies/Unity-Robotics-Hub/blob/main/tutorials/ros_packages/robotics_demo/launch/robo_demo.launch) or in a [param file](https://github.com/Unity-Technologies/Unity-Robotics-Hub/blob/main/tutorials/pick_and_place/ROS/src/niryo_moveit/config/params.yaml) loaded by a launch file like [this](https://github.com/Unity-Technologies/Unity-Robotics-Hub/blob/main/tutorials/pick_and_place/ROS/src/niryo_moveit/launch/part_3.launch#L2). The param file can also be loaded manually by running the `rosparam load params.yaml` command.
19+
On the ROS machine, these settings are set as a rosparam and will typically be set in a launch file like [this](ros_packages/unity_robotics_demo/launch/robo_demo.launch) or in a [param file](https://github.com/Unity-Technologies/Unity-Robotics-Hub/blob/main/tutorials/pick_and_place/ROS/src/niryo_moveit/config/params.yaml) loaded by a launch file like [this](https://github.com/Unity-Technologies/Unity-Robotics-Hub/blob/main/tutorials/pick_and_place/ROS/src/niryo_moveit/launch/part_3.launch#L2). The param file can also be loaded manually by running the `rosparam load params.yaml` command.
2020

21-
On the Unity machine these settings are set from the menu by going to `Robotics` -> `ROS Settings`
21+
On the Unity machine, these settings are set from the menu by going to `Robotics` -> `ROS Settings`
2222

2323

2424
# Communication Minimum Requirements
Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,5 @@
11
<launch>
2-
3-
<env name="ROS_IP" value="192.168.1.116"/>
4-
<env name="ROS_HOSTNAME" value="$(env ROS_IP)"/>
5-
6-
<param name="ROS_IP" type="str" value="$(env ROS_IP)" />
7-
<param name="ROS_TCP_PORT" type="int" value="10000" />
8-
<param name="TCP_NODE_NAME" type="str" value="TCPServer" />
9-
<param name="TCP_BUFFER_SIZE" type="int" value="1024" />
10-
<param name="TCP_CONNECTIONS" type="int" value="10" />
11-
12-
<param name="UNITY_IP" type="str" value="192.168.1.105" />
13-
<param name="UNITY_SERVER_PORT" type="int" value="5005" />
14-
15-
<group ns="position_service_and_endpoint">
16-
<node pkg="robotics_demo" name="position_service" type="position_service.py"/>
17-
<node pkg="robotics_demo" name="server_endpoint" type="server_endpoint.py"/>
18-
</group>
2+
<param name="ROS_IP" value="127.0.0.1" />
3+
<node name="position_service" pkg="unity_robotics_demo" type="position_service.py" args="--wait" output="screen" respawn="true" />
4+
<node name="server_endpoint" pkg="ros_tcp_endpoint" type="default_server_endpoint.py" args="--wait" output="screen" respawn="true" />
195
</launch>

tutorials/ros_unity_integration/setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ROS–Unity Demo Setup
22

3-
This document is in two parts - part 1 covers the minimum requirements for a ROS–Unity integration. Part 2 sets up the Unity Robotics Demo package, which you will need if you're following the ROS–Unity Integration tutorials.
3+
This document is in two parts - [Part 1](#-ros-environment) covers the minimum requirements for a ROS–Unity integration. [Part 2](#install-unity-robotics-demo) sets up the Unity Robotics Demo package, which you will need if you're following the ROS–Unity Integration tutorials.
44

55
These instructions cover both ROS1 and ROS2. The symbols <img src="images/ros1_icon.png" alt="ros1" width="14" height="14"/> and <img src="images/ros2_icon.png" alt="ros2" width="23" height="14"/> indicate instructions for ROS1 and ROS2 users, respectively. If using ROS2, start with [ROS2 Environment](setup.md#-ros2-environment).
66

0 commit comments

Comments
 (0)