浏览代码

Update tutorial text (#148)

/laurie-MessageVisualizers
GitHub 4 年前
当前提交
a968c677
共有 4 个文件被更改,包括 6 次插入6 次删除
  1. 6
      tutorials/ros_unity_integration/publisher.md
  2. 3
      tutorials/ros_unity_integration/service.md
  3. 2
      tutorials/ros_unity_integration/setup.md
  4. 1
      tutorials/ros_unity_integration/subscriber.md

6
tutorials/ros_unity_integration/publisher.md


```csharp
using RosMessageTypes.RoboticsDemo;
using UnityEngine;
using Random = UnityEngine.Random;
using Unity.Robotics.ROSTCPConnector;
/// <summary>
///

ROSConnection ros;
public string topicName = "pos_rot";
// The GameObject
// The game object
public GameObject cube;
// Publish the cube's position and rotation every N seconds
public float publishMessageFrequency = 0.5f;

void Start()
{
// start the ROS connection

3
tutorials/ros_unity_integration/service.md


- **Note:** This script can be found at `tutorials/ros_unity_integration/unity_scripts`.
```csharp
using System;
using Debug = UnityEngine.Debug;
using Unity.Robotics.ROSTCPConnector;
public class RosServiceExample : MonoBehaviour
{

2
tutorials/ros_unity_integration/setup.md


## Unity Scene
1. Launch Unity and create a new scene.
2. Open Package Manager and click the + button at the top left corner. Select "add package from git URL" and enter "https://github.com/Unity-Technologies/ROS-TCP-Connector.git" to install the [ROS TCP Connector](https://github.com/Unity-Technologies/ROS-TCP-Connector) package.
2. Open Package Manager and click the + button at the top left corner. Select "add package from git URL" and enter "https://github.com/Unity-Technologies/ROS-TCP-Connector.git?path=/com.unity.robotics.ros-tcp-connector" to install the [ROS TCP Connector](https://github.com/Unity-Technologies/ROS-TCP-Connector) package.
![](images/add_package.png)

1
tutorials/ros_unity_integration/subscriber.md


```csharp
using UnityEngine;
using Unity.Robotics.ROSTCPConnector;
using RosColor = RosMessageTypes.RoboticsDemo.UnityColor;
public class RosSubscriberExample : MonoBehaviour

正在加载...
取消
保存