浏览代码
AIRO-355: Tutorial reorganization (#87)
AIRO-355: Tutorial reorganization (#87)
* AIRO-356: Tutorial Updates (#88) * Update tutorial to Robotics menu option, ROSConnect instructions * PR feedback: IP troubleshooting, gripper value swap * Reimported niryo for completed scene * PR feedback: bring TCP-connector up to dev/devin-main-fix
GitHub
4 年前
当前提交
9acb79c0
共有 34 个文件被更改,包括 7352 次插入 和 4257 次删除
-
30tutorials/pick_and_place/1_urdf.md
-
185tutorials/pick_and_place/2_ros_tcp.md
-
48tutorials/pick_and_place/3_pick_and_place.md
-
2tutorials/pick_and_place/PickAndPlaceProject/Assets/Prefabs/Target.prefab
-
2tutorials/pick_and_place/PickAndPlaceProject/Assets/Prefabs/TargetPlacement.prefab
-
696tutorials/pick_and_place/PickAndPlaceProject/Assets/Scenes/Part1DoneScene.unity
-
72tutorials/pick_and_place/PickAndPlaceProject/Assets/Scenes/TutorialScene.unity
-
2tutorials/pick_and_place/PickAndPlaceProject/Packages/manifest.json
-
30tutorials/pick_and_place/README.md
-
7tutorials/pick_and_place/Scripts/SourceDestinationPublisher.cs
-
15tutorials/pick_and_place/Scripts/TrajectoryPlanner.cs
-
7tutorials/pick_and_place/docker/Dockerfile
-
3tutorials/pick_and_place/docker/set-up-workspace
-
196tutorials/pick_and_place/img/1_base.png
-
163tutorials/pick_and_place/img/1_controller.png
-
999tutorials/pick_and_place/img/1_cube.png
-
298tutorials/pick_and_place/img/1_physics.png
-
1001tutorials/pick_and_place/img/2_sourcedest.gif
-
1001tutorials/pick_and_place/img/2_target.gif
-
1001tutorials/pick_and_place/img/3_target.gif
-
423tutorials/pick_and_place/img/2_srv.png
-
126tutorials/pick_and_place/0_ros_setup.md
-
1001tutorials/pick_and_place/img/0_docker.png
-
1001tutorials/pick_and_place/img/0_unity.png
-
139tutorials/pick_and_place/img/1_camera.png
-
522tutorials/pick_and_place/img/2_browser.png
-
92tutorials/pick_and_place/img/2_menu.png
-
181tutorials/pick_and_place/img/2_msg.png
-
545tutorials/pick_and_place/img/2_robottraj.png
-
581tutorials/pick_and_place/img/2_settings.png
-
18tutorials/pick_and_place/docker/tutorial
-
1001tutorials/pick_and_place/img/2_component.gif
-
221tutorials/pick_and_place/img/2_single.png
-
0/tutorials/pick_and_place/img/2_srv.png
696
tutorials/pick_and_place/PickAndPlaceProject/Assets/Scenes/Part1DoneScene.unity
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
#!/bin/bash |
|||
|
|||
source /opt/ros/melodic/setup.bash |
|||
echo "ROS_IP: $(hostname -i)" > $ROS_WORKSPACE/src/niryo_moveit/config/params.yaml |
|||
catkin_make |
|||
catkin_make |
999
tutorials/pick_and_place/img/1_cube.png
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
1001
tutorials/pick_and_place/img/2_sourcedest.gif
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
1001
tutorials/pick_and_place/img/2_target.gif
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
1001
tutorials/pick_and_place/img/3_target.gif
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
# Pick-and-Place Tutorial: Part 0 |
|||
|
|||
This part provides two options for setting up your ROS workspace: using Docker, or manually setting up a catkin workspace. |
|||
|
|||
**Table of Contents** |
|||
- [Option A: Use Docker](#option-a-use-docker) |
|||
- [Option B: Manual Setup](#option-b-manual-setup) |
|||
- [Troubleshooting](#troubleshooting) |
|||
- [Resources](#resources) |
|||
- [Proceed to Part 1](#proceed-to-part-1) |
|||
|
|||
--- |
|||
|
|||
If you have not already cloned this project to your local machine, do so now: |
|||
|
|||
```bash |
|||
git clone --recurse-submodules https://github.com/Unity-Technologies/Unity-Robotics-Hub.git |
|||
``` |
|||
|
|||
## Option A: Use Docker |
|||
|
|||
> The Docker-related files (Dockerfile, setup scripts) are located in the [`docker/`](docker/) directory. |
|||
|
|||
1. Follow the steps to install [Docker Engine](https://docs.docker.com/engine/install/) for your platform if it is not already installed. |
|||
|
|||
1. Start the Docker daemon. |
|||
> 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. |
|||
|
|||
1. Build the provided ROS Docker image: |
|||
|
|||
```bash |
|||
cd /PATH/TO/Unity-Robotics-Hub/tutorials/pick_and_place && |
|||
git submodule update --init --recursive && |
|||
docker build -t unity-robotics:pick-and-place -f docker/Dockerfile . |
|||
``` |
|||
|
|||
> 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. |
|||
|
|||
1. Start the newly built Docker container: |
|||
|
|||
```docker |
|||
docker run -it --rm -p 10000:10000 -p 5005:5005 unity-robotics:pick-and-place |
|||
``` |
|||
|
|||
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#`. |
|||
|
|||
1. Source your ROS workspace: |
|||
|
|||
```bash |
|||
source devel/setup.bash |
|||
``` |
|||
|
|||
The ROS workspace is now ready to accept commands! |
|||
|
|||
--- |
|||
|
|||
## Option B: Manual Setup |
|||
|
|||
1. Navigate to the `/PATH/TO/Unity-Robotics-Hub/tutorials/pick_and_place/ROS` directory of this downloaded repo. |
|||
- This directory will be used as the [ROS catkin workspace](http://wiki.ros.org/catkin/Tutorials/using_a_workspace). |
|||
- 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. |
|||
- Copy or download this directory to your ROS operating system if you are doing ROS operations in another machine, VM, or container. |
|||
> 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`. |
|||
|
|||
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: |
|||
|
|||
```bash |
|||
sudo apt-get update && sudo apt-get upgrade |
|||
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 |
|||
sudo -H pip install rospkg jsonpickle |
|||
``` |
|||
|
|||
ROS Noetic users should run: |
|||
|
|||
```bash |
|||
sudo apt-get update && sudo apt-get upgrade |
|||
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 |
|||
sudo -H pip3 install rospkg jsonpickle |
|||
``` |
|||
|
|||
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. |
|||
|
|||
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: |
|||
|
|||
```bash |
|||
echo "ROS_IP: $(hostname -I)" > src/niryo_moveit/config/params.yaml |
|||
``` |
|||
|
|||
> Note: You can also manually assign this value by navigating to the `params.yaml` file and opening it for editing. |
|||
|
|||
```yaml |
|||
ROS_IP: <your ROS IP> |
|||
``` |
|||
|
|||
e.g. |
|||
|
|||
```yaml |
|||
ROS_IP: 192.168.50.149 |
|||
``` |
|||
|
|||
The ROS workspace is now ready to accept commands! |
|||
|
|||
--- |
|||
|
|||
## Troubleshooting |
|||
- 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`. |
|||
|
|||
- `...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. |
|||
|
|||
- 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. |
|||
|
|||
--- |
|||
|
|||
## Resources |
|||
- [Getting started with Docker](https://docs.docker.com/get-started/) |
|||
- Setting up a ROS workspace: |
|||
|
|||
> Note: this tutorial has been tested with ROS Melodic as well as ROS Noetic. |
|||
- http://wiki.ros.org/ROS/Installation |
|||
- http://wiki.ros.org/ROS/Tutorials/InstallingandConfiguringROSEnvironment |
|||
- http://wiki.ros.org/catkin/Tutorials/create_a_workspace |
|||
|
|||
--- |
|||
|
|||
|
|||
### Proceed to [Part 1](1_urdf.md). |
1001
tutorials/pick_and_place/img/0_docker.png
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
1001
tutorials/pick_and_place/img/0_unity.png
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
#!/bin/bash |
|||
|
|||
help() |
|||
{ |
|||
echo "Syntax: $0 [part_2|part_3]" |
|||
} |
|||
|
|||
source $ROS_WORKSPACE/devel/setup.bash |
|||
|
|||
echo "ROS_IP: $(hostname -i)" > $ROS_WORKSPACE/src/niryo_moveit/config/params.yaml |
|||
|
|||
if [ $1 == "part_2" ]; then |
|||
roslaunch niryo_moveit part_2.launch |
|||
elif [ $1 == "part_3" ]; then |
|||
roslaunch niryo_moveit part_3.launch |
|||
else |
|||
help |
|||
fi |
1001
tutorials/pick_and_place/img/2_component.gif
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
撰写
预览
正在加载...
取消
保存
Reference in new issue