Skip to content

Commit d46a2ab

Browse files
authored
Modified ROS2UnityComponent recommended use
1 parent be93fa6 commit d46a2ab

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,10 @@ Please see OS-specific instructions:
4848
3. Go to Assets in the menu bar (at the top of the Unity Window).
4949
4. Select `Import Package``Custom Package`.
5050
5. In the file browser, select the .unitypackage file built by `create_unity_asset` script (by default located in `install/unity_package`) and follow the instructions on the screen.
51-
6. In the project tab, navigate to `Assets/Ros2ForUnity/Scripts`, select any object in the hierarchy tab, and add a script component by dragging `ROS2TalkerExample.cs` to the inspector tab. ROS2UnityComponent dependency will be added automatically (see the screenshot below).
52-
7. Select another object in the hierarchy tab and add repeat the previous step using `ROS2ListenerExample.cs`.
53-
8. Once you start the project in Unity, you should be able to see two nodes talking with each other in Unity Editor's console or use `ros2 node list` and `ros2 topic echo /chatter` to verify ros2 communication.
51+
6. Create a top-level object containing ROS2UnityComponent.cs. This is the central Monobehavior for ROS2ForUnity that manages all the nodes. Refer to class documentation for details.
52+
7. Add example script to any object in the hierarchy tab, e.g. by dragging `ROS2TalkerExample.cs` to the object in the inspector tab.
53+
8. Select another object in the hierarchy tab and add repeat the previous step using `ROS2ListenerExample.cs`.
54+
9. Once you start the project in Unity, you should be able to see two nodes talking with each other in Unity Editor's console or use `ros2 node list` and `ros2 topic echo /chatter` to verify ros2 communication.
5455

5556
![usage.png](usage.png)
5657

0 commit comments

Comments
 (0)