Skip to content

Commit 67b0620

Browse files
Merge pull request #100 from Unity-Technologies/origin/dev
Release 0.1.2
2 parents d14d5b7 + ab6ad65 commit 67b0620

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+15017
-14342
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ For any questions or feedback, connect directly with the Robotics team at [unity
1616

1717
| Tutorial | Description |
1818
|---|---|
19+
| [Quick Installation Instructions](tutorials/quick_setup.md) | Brief steps on installing the Unity Robotics packages |
1920
| [Pick-and-Place Demo](tutorials/pick_and_place/README.md) | A complete end-to-end demonstration, including how to set up the Unity environment, how to import a robot from URDF, and how to set up two-way communication with ROS for control |
2021
| [ROS–Unity Integration](tutorials/ros_unity_integration/README.md) | A set of component-level tutorials showing how to set up communication between ROS and Unity |
2122
| [URDF Importer](tutorials/urdf_importer/urdf_tutorial.md) | Steps on using the Unity package for loading [URDF](http://wiki.ros.org/urdf) files (Unified Robot Description Format) |
@@ -50,5 +51,8 @@ In addition to robot simulation, here are some additional, relevant Unity simula
5051
- Training a performant object detection ML model on synthetic data using Unity Perception tools [blog post](https://blogs.unity3d.com/2020/09/17/training-a-performant-object-detection-ml-model-on-synthetic-data-using-unity-perception-tools/)
5152
- Unity Perception [repository](https://github.com/Unity-Technologies/com.unity.perception)
5253

54+
## FAQs
55+
- [FAQs](faq.md)
56+
5357
## License
5458
[Apache License 2.0](LICENSE)

faq.md

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,44 @@
1-
# Frequently Asked Questions
1+
# Frequently Asked Questions & Troubleshooting
2+
3+
- [Frequently Asked Questions & Troubleshooting](#frequently-asked-questions--troubleshooting)
4+
- [General Questions](#general-questions)
5+
- [Is ROS 2 support planned?](#is-ros-2-support-planned)
6+
- [How does your Unity integration compare to ROS#?](#how-does-your-unity-integration-compare-to-ros)
7+
- [How can I install the Unity Packages without starting from a template project?](#how-can-i-install-the-unity-packages-without-starting-from-a-template-project)
8+
- [ROS-TCP Endpoint/Connector](#ros-tcp-endpointconnector)
9+
- [How does the TCP Endpoint compare to Rosbridge Server?](#how-does-the-tcp-endpoint-compare-to-rosbridge-server)
10+
- [I receive a `Starting server on ...` message in my ROS terminal, but see a `SocketException: A connection attempt failed because the connected party did not respond after a period of time, or established connection failed because connected host has failed to respond.` in my Unity console.](#i-receive-a-starting-server-on--message-in-my-ros-terminal-but-see-a-socketexception-a-connection-attempt-failed-because-the-connected-party-did-not-respond-after-a-period-of-time-or-established-connection-failed-because-connected-host-has-failed-to-respond-in-my-unity-console)
11+
- [I'm getting the error: `...failed because unknown error handler name 'rosmsg'`.](#im-getting-the-error-failed-because-unknown-error-handler-name-rosmsg)
12+
- [Unity can't connect to ROS!](#unity-cant-connect-to-ros)
13+
- [URDF-Importer](#urdf-importer)
14+
- [I don't see an option to Import Robot from URDF, or I have compile errors upon importing the URDF-Importer.](#i-dont-see-an-option-to-import-robot-from-urdf-or-i-have-compile-errors-upon-importing-the-urdf-importer)
15+
- [Can't find what you're looking for?](#cant-find-what-youre-looking-for)
16+
17+
# General Questions
18+
Is ROS 2 support planned?
19+
---
20+
We definitely plan to support ROS 2 in the future. Let us know more about your use case in order to prioritize our work by reaching out to us at [unity-robotics@unity3d.com](mailto:unity-robotics@unity3d.com).
221

322
How does your Unity integration compare to [ROS#](https://github.com/siemens/ros-sharp)?
423
---
524
Two of the Unity Robotics repos (URDF Importer and TCP Connector) have been forked from the Siemens ROS# repo.
625

7-
In the URDF Importer we have added the functionality to instantiate a robot from URDF into a Unity scene with [Articulation Body](https://docs.unity3d.com/2020.1/Documentation/ScriptReference/ArticulationBody.html) components on their corresponding joints.
26+
In the URDF Importer we have added the functionality to instantiate a robot from URDF into a Unity scene with [Articulation Body](https://docs.unity3d.com/2020.2/Documentation/Manual/class-ArticulationBody.html) components on their corresponding joints.
827

928
Aside from facilitating communication with the TCP Endpoint, the TCP Connector contains the `MessageGeneration` code from ROS#. We added the extra functionality that when generating a C# class from a ROS message, functions are also generated that will serialize and deserialize the messages as ROS would internally.
1029

30+
How can I install the Unity Packages without starting from a template project?
31+
---
32+
Refer to the [Quick Start](tutorials/quick_setup.md) instructions on how to import these packages.
33+
34+
35+
# ROS-TCP Endpoint/Connector
36+
1137
How does the TCP Endpoint compare to [Rosbridge Server](http://wiki.ros.org/rosbridge_server)?
1238
---
1339
To put it simply, the TCP Endpoint does not have the extra overhead of having to serialize and deserialize from JSON as its only function is to pass 'ROS serialized' messages between Unity and ROS. That being said the TCP Endpoint is not as general as ROS Bridge and has the strict requirement that all messages be serialized by the TCP Connector code.
1440

15-
Here are some prelminary numbers from a few initial tests done during the discovery stage of this project. We will publish more test results publicly after we go through more rigorous testing but these results should be generally close enough for those curious about performance improvements.
41+
Here are some preliminary numbers from a few initial tests done during the discovery stage of this project. We will publish more test results publicly after we go through more rigorous testing but these results should be generally close enough for those curious about performance improvements.
1642

1743
**Note:** These tests were run on a single machine that was only running ROS and a Unity executable.
1844

@@ -29,3 +55,24 @@ The time was logged when the message was sent from Unity before being serialized
2955

3056
- ROS# with ROS Bridge Suite took ~2 seconds
3157
- TCP Connector with TCP Endpoint took ~0.17 seconds
58+
59+
I receive a `Starting server on ...` message in my ROS terminal, but see a `SocketException: A connection attempt failed because the connected party did not respond after a period of time, or established connection failed because connected host has failed to respond.` in my Unity console.
60+
---
61+
This is likely an issue with how your network adapters are set up if you are using a virtual machine. You may need to do some troubleshooting to ensure that your guest OS can talk to your host OS and vice versa. One simple way to do this is to set up a "Host-Only" style network, but this varies based on what virtualization software you're using. Try to ensure that you can `ping` your host OS's IP from inside the guest, and can `ping` the guest from the host, then try this last step again.
62+
63+
I'm getting the error: `...failed because unknown error handler name 'rosmsg'`.
64+
---
65+
This is due to a bug in an outdated package version. Try running `sudo apt-get update && sudo apt-get upgrade` to upgrade.
66+
67+
Unity can't connect to ROS!
68+
---
69+
Ensure that the ROS IP address is entered correctly as the `Host Name` in the RosConnect component in Unity, and if you are using a `params.yaml` file, that the appropriate IP addresses are filled in.
70+
71+
# URDF-Importer
72+
73+
I don't see an option to Import Robot from URDF, or I have compile errors upon importing the URDF-Importer.
74+
---
75+
The [ArticulationBody](https://docs.unity3d.com/2020.2/Documentation/Manual/class-ArticulationBody.html) has dependencies on Unity Editor versions [2020.2.0](https://unity3d.com/unity/whats-new/2020.2.0)+. Try updating your project to the latest 2020.2 release.
76+
77+
# Can't find what you're looking for?
78+
Connect directly with the Robotics team at [unity-robotics@unity3d.com](mailto:unity-robotics@unity3d.com)!

images/packman.png

30.1 KB
Loading
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
# Pick-and-Place Tutorial: Part 0
2+
3+
This part provides two options for setting up your ROS workspace: using Docker, or manually setting up a catkin workspace.
4+
5+
**Table of Contents**
6+
- [Option A: Use Docker](#option-a-use-docker)
7+
- [Option B: Manual Setup](#option-b-manual-setup)
8+
- [Troubleshooting](#troubleshooting)
9+
- [Resources](#resources)
10+
- [Proceed to Part 1](#proceed-to-part-1)
11+
12+
---
13+
14+
If you have not already cloned this project to your local machine, do so now:
15+
16+
```bash
17+
git clone --recurse-submodules https://github.com/Unity-Technologies/Unity-Robotics-Hub.git
18+
```
19+
20+
## Option A: Use Docker
21+
22+
> The Docker-related files (Dockerfile, setup scripts) are located in the [`docker/`](docker/) directory.
23+
24+
1. Follow the steps to install [Docker Engine](https://docs.docker.com/engine/install/) for your platform if it is not already installed.
25+
26+
1. Start the Docker daemon.
27+
> Note: The system-independent `docker info` command can verify whether or not Docker is running. This command will throw a `Server: ERROR` if the Docker daemon is not currently running, and will print the appropriate [system-wide information](https://docs.docker.com/engine/reference/commandline/info/) otherwise.
28+
29+
1. Build the provided ROS Docker image:
30+
31+
```bash
32+
cd /PATH/TO/Unity-Robotics-Hub/tutorials/pick_and_place &&
33+
git submodule update --init --recursive &&
34+
docker build -t unity-robotics:pick-and-place -f docker/Dockerfile .
35+
```
36+
37+
> Note: The provided Dockerfile uses the [ROS Melodic base Image](https://hub.docker.com/_/ros/). Building the image will install the necessary packages, copy the [provided ROS packages and submodules](ROS/) to the container, and build the catkin workspace.
38+
39+
1. Start the newly built Docker container:
40+
41+
```docker
42+
docker run -it --rm -p 10000:10000 -p 5005:5005 unity-robotics:pick-and-place /bin/bash
43+
```
44+
45+
When this is complete, it will print: `Successfully tagged unity-robotics:pick-and-place`. This console should open into a bash shell at the ROS workspace root, e.g. `root@8d88ed579657:/catkin_ws#`.
46+
47+
The ROS workspace is now ready to accept commands!
48+
49+
---
50+
51+
## Option B: Manual Setup
52+
53+
1. Navigate to the `/PATH/TO/Unity-Robotics-Hub/tutorials/pick_and_place/ROS` directory of this downloaded repo.
54+
- This directory will be used as the [ROS catkin workspace](http://wiki.ros.org/catkin/Tutorials/using_a_workspace).
55+
- If you cloned the project and forgot to use `--recurse-submodules`, or if any submodule in this directory doesn't have content, you can run the command `git submodule update --init --recursive` to download packages for Git submodules.
56+
- Copy or download this directory to your ROS operating system if you are doing ROS operations in another machine, VM, or container.
57+
> Note: This contains the ROS packages for the pick-and-place task, including [ROS TCP Endpoint](https://github.com/Unity-Technologies/ROS-TCP-Endpoint), [Niryo One ROS stack](https://github.com/NiryoRobotics/niryo_one_ros), [MoveIt Msgs](https://github.com/ros-planning/moveit_msgs), `niryo_moveit`, and `niryo_one_urdf`.
58+
59+
1. The provided files require the following packages to be installed. ROS Melodic users should run the following commands if the packages are not already present:
60+
61+
```bash
62+
sudo apt-get update && sudo apt-get upgrade
63+
sudo apt-get install python-pip ros-melodic-robot-state-publisher ros-melodic-moveit ros-melodic-rosbridge-suite ros-melodic-joy ros-melodic-ros-control ros-melodic-ros-controllers ros-melodic-tf2-web-republisher
64+
sudo -H pip install rospkg jsonpickle
65+
```
66+
67+
ROS Noetic users should run:
68+
69+
```bash
70+
sudo apt-get update && sudo apt-get upgrade
71+
sudo apt-get install python3-pip ros-noetic-robot-state-publisher ros-noetic-moveit ros-noetic-rosbridge-suite ros-noetic-joy ros-noetic-ros-control ros-noetic-ros-controllers
72+
sudo -H pip3 install rospkg jsonpickle
73+
```
74+
75+
1. If you have not already built and sourced the ROS workspace since importing the new ROS packages, navigate to your ROS workplace, and run `catkin_make && source devel/setup.bash`. Ensure there are no errors.
76+
77+
1. The ROS parameters will need to be set to your configuration in order to allow the server endpoint to fetch values for the TCP connection, stored in `src/niryo_moveit/config/params.yaml`. From your ROS workspace, assign the ROS IP in this `yaml` file:
78+
79+
```bash
80+
echo "ROS_IP: $(hostname -I)" > src/niryo_moveit/config/params.yaml
81+
```
82+
83+
> Note: You can also manually assign this value by navigating to the `params.yaml` file and opening it for editing.
84+
85+
```yaml
86+
ROS_IP: <your ROS IP>
87+
```
88+
89+
e.g.
90+
91+
```yaml
92+
ROS_IP: 192.168.50.149
93+
```
94+
95+
The ROS workspace is now ready to accept commands!
96+
97+
---
98+
99+
## Troubleshooting
100+
- Building the Docker image may throw an `Could not find a package configuration file provided by...` exception if one or more of the directories in ROS/ appears empty. Try downloading the submodules again via `git submodule update --init --recursive`.
101+
102+
- `...failed because unknown error handler name 'rosmsg'` This is due to a bug in an outdated package version. Try running `sudo apt-get update && sudo apt-get upgrade` to upgrade packages.
103+
104+
- If the ROS TCP handshake fails (e.g. `ROS-Unity server listening...` printed on the Unity side but no `ROS-Unity Handshake received` on the ROS side), the ROS IP may not have been set correctly in the params.yaml file. Try running `echo "ROS_IP: $(hostname -I)" > src/niryo_moveit/config/params.yaml` in a terminal from your ROS workspace.
105+
106+
---
107+
108+
## Resources
109+
- [Getting started with Docker](https://docs.docker.com/get-started/)
110+
- Setting up a ROS workspace:
111+
112+
> Note: this tutorial has been tested with ROS Melodic as well as ROS Noetic.
113+
- http://wiki.ros.org/ROS/Installation
114+
- http://wiki.ros.org/ROS/Tutorials/InstallingandConfiguringROSEnvironment
115+
- http://wiki.ros.org/catkin/Tutorials/create_a_workspace
116+
117+
---
118+
119+
120+
### Proceed to [Part 1](1_urdf.md).

0 commit comments

Comments
 (0)