Skip to content

Commit

Permalink
Merge pull request #24 from OCRTOC/release_v1.3
Browse files Browse the repository at this point in the history
Release v1.3
  • Loading branch information
rar-lw authored Sep 11, 2020
2 parents 7caa80c + 5e1314d commit e43e771
Show file tree
Hide file tree
Showing 8 changed files with 119 additions and 9 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## [V1.3] release date: 2020-09-11
**Changes in v1.3**
- Added Dockerfile and build script (/docker). You can rebuild the docker image as you wish using the Dockerfile.
- Upgraded docker image. Follow the instructions in the readme file to download the new docker image. However this is not a MUST, if the previous docker image already fulfiled your development requirement.
- Replaced cuda-runtime with cuda-devel.
- Added models and scenes released in v1.1.
- Fixed the Sapien controller issue (https://github.com/OCRTOC/OCRTOC_software_package/issues/10)
- Fixed the Sapien camera_info timestamp issue (https://github.com/OCRTOC/OCRTOC_software_package/issues/14)
- For those of you who want to do some fixings (such as gripper or urdf models) on your own, we allow the modifiction in the following folders "/description", "/gazebo_simulator", "/sapien_simluator".

## [V1.2] release date: 2020-09-03
**Changes in v1.2**
- Updated the method for task evaluation. For each task we calculate the average distance error of all objects instead of their sum.
Expand Down
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ The docker image is not part of the OCRTOC software package and needs be downloa

```bash
# Mirror address of China (ShangHai)
sudo docker pull registry.cn-shanghai.aliyuncs.com/tcc-public/ocrtoc:release1.0
sudo docker pull registry.cn-shanghai.aliyuncs.com/tcc-public/ocrtoc:release1.3
# Mirror address of the United States (Silicon Valley)
sudo docker pull registry.us-west-1.aliyuncs.com/tcc-public/ocrtoc:release1.0
sudo docker pull registry.us-west-1.aliyuncs.com/tcc-public/ocrtoc:release1.3
```

The content of the docker image is as follows:
Expand All @@ -45,9 +45,10 @@ The content of the docker image is as follows:

## File Structure of the OCRTOC software package

- **description**: The description files for hardware simulation. (**No modifiction allowed**)
- **gazebo_simulator**: Setups and scripts for the Gazebo simluator. (**No modifiction allowed**)
- **sapien_simluator**: Setups and scripts for the Sapien simluator. (**No modifiction allowed**)
- **description**: The description files for hardware simulation.
- **docker**: The Dockerfile and build script. You can modify the Dockerfile and rebuild your docker image.
- **gazebo_simulator**: Setups and scripts for the Gazebo simluator.
- **sapien_simluator**: Setups and scripts for the Sapien simluator.
- **ocrtoc_task**: Scripts for task execution and evaluation. (**No modifiction allowed**)
- **ocrtoc_solution**: Setups and scripts for building the solution. Sample code is given in ocrtoc_solution/scripts/commit_solution.py (**Do not change the file name!**). You can modify this file to develop your own solution. In addition you can also add any new software modules to this folder. Make sure that your commit_solution.py serves as the main function of your solution and it incorporates all the needed software modules to do the task. After your solution is uploaded to the competition platform, we will run your solution by ocrtoc_solution/launch/commit_solution.launch (**Do not change the file name!**).

Expand Down Expand Up @@ -108,7 +109,8 @@ After you obtained the task information, you need to implement the core function

**Evaluation**

After you finished the task, you need to publish the actionlib result topic. The format of this result is a string. We do not parse the content of this string. Instead, it is only used to activate our callback function for evaluation. So you can write anything reasonable into this string, such as "done", "finished" and so on. If you do not publish the actionlib result at all, your solution will be terminated after a predefined timeout (e.g. 10 minutes), and then the evaluation will start automatically. We highly recommend you to publish the actionlib result topic, once your solution has finished the execution. This helps us compute the execution time of your solution. If two teams have the same performance, the team consuming less execution time will be ranked higher.
After you finished the task, you need to publish the actionlib result topic. The format of this result is a string. We do not parse the content of this string. Instead, it is only used to activate our callback function for evaluation. So you can write anything reasonable into this string, such as "done", "finished" and so on. If you do not publish the actionlib result at all, your solution will be terminated after a predefined timeout (e.g. 10 minutes), and then the evaluation will start automatically. We highly recommend you to publish the actionlib result topic, once your solution has finished the execution. This helps us compute the execution time of your solution. For each object in the target configuration, a distance error will be calculated based on its actual pose and its target pose. There will be an upper bound for the distance error of a single object. For each task, distance errors of all the objects are summed up. The performance of the solution is ranked according to the summed distance error of all tasks. If two teams have the same performance, the team consuming less execution time will be ranked higher.



## Use the OCRTOC software package on your local machine
Expand All @@ -126,7 +128,7 @@ sudo docker run -i -d --gpus all --name ocrtoc_container \
-e DISPLAY=$DISPLAY -e QT_X11_NO_MITSHM=1 \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v $HOME/OCRTOC_software_package:/root/ocrtoc_ws/src \
registry.cn-shanghai.aliyuncs.com/tcc-public/ocrtoc:release1.0
registry.cn-shanghai.aliyuncs.com/tcc-public/ocrtoc:release1.3
sudo xhost +local:`sudo docker inspect --format='{{ .Config.Hostname }}' ocrtoc_container`
```

Expand Down
71 changes: 71 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
from nvidia/cudagl:10.2-devel-ubuntu18.04

ENV TZ=Asia/Shanghai
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES graphics,utility,compute

# Install Ubuntu tools.
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \
&& rm /etc/apt/sources.list.d/cuda.list \
&& rm /etc/apt/sources.list.d/nvidia-ml.list \
&& apt-get update \
&& apt-get install -y lsb-release psmisc tree vim net-tools iputils-ping wget git python3-pip libglm-dev \
# Install gl/x package for visualization inside docker
&& apt-get install -y libglvnd0 libgl1 libglx0 libegl1 libxext6 libx11-6

# Install ROS.
SHELL ["/bin/bash", "-c"]
RUN sh -c '. /etc/lsb-release && echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ `lsb_release -cs` main" > /etc/apt/sources.list.d/ros-latest.list' \
&& apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 \
&& apt update \
&& apt install -y ros-melodic-desktop-full \
&& echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc \
&& source ~/.bashrc \
&& apt install -y python-rosdep \
&& echo "151.101.84.133 raw.githubusercontent.com" >> /etc/hosts \
&& rosdep init \
&& rosdep update

# Upgrade Gazebo.
RUN sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list' \
&& wget https://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add - \
&& apt-get update \
&& apt-get install -y gazebo9 \
&& apt upgrade -y libignition-math4

# Install ROS dependencies.
RUN pip3 install catkin_pkg numpy transforms3d rospkg \
&& apt-get install -y ros-melodic-ddynamic-reconfigure \
ros-melodic-gripper-action-controller \
ros-melodic-joint-trajectory-controller \
ros-melodic-industrial-robot-status-interface \
ros-melodic-moveit \
ros-melodic-ros-control \
ros-melodic-ros-controllers \
ros-melodic-ur-msgs

# Copy files.
COPY ocrtoc_materials /root/ocrtoc_materials
COPY workspace /workspace

# Install Sapien.
RUN wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | apt-key add - \
&& wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.2.148-bionic.list https://packages.lunarg.com/vulkan/1.2.148/lunarg-vulkan-1.2.148-bionic.list \
&& apt update \
&& apt install -y vulkan-sdk libglew-dev \
&& cd /workspace/glfw \
&& mkdir build && cd build && cmake .. && make install \
&& cd /workspace/spdlog \
&& mkdir build && cd build && cmake .. && make install \
&& cd /workspace/sapien \
&& source /opt/ros/melodic/setup.bash \
&& mkdir build && cd build && cmake .. && make pysapien_ros1

# Others.
RUN cd /root \
&& mkdir -p ocrtoc_ws/src \
&& cd ocrtoc_ws \
&& source /opt/ros/melodic/setup.bash \
&& catkin_make \
&& echo "source /root/ocrtoc_ws/devel/setup.bash" >> ~/.bashrc \
&& rm -rf /var/lib/apt/lists/*
27 changes: 27 additions & 0 deletions docker/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

OSS_BUCKET_DOMAIN="https://ocrtoc-public.oss-cn-hangzhou.aliyuncs.com"
# Other option.
# OSS_BUCKET_DOMAIN="https://ocrtoc-public.oss-accelerate.aliyuncs.com"

echo "Downloading ocrtoc_materials..."
mkdir -p ocrtoc_materials
cd ocrtoc_materials
wget ${OSS_BUCKET_DOMAIN}/ocrtoc_materials/models.tar.gz
tar -zxvf models.tar.gz
rm -rf models.tar.gz
wget ${OSS_BUCKET_DOMAIN}/ocrtoc_materials/scenes.tar.gz
tar -zxvf scenes.tar.gz
rm -rf scenes.tar.gz
wget ${OSS_BUCKET_DOMAIN}/ocrtoc_materials/objects.csv

echo "Downloading sapien files..."
cd ..
wget ${OSS_BUCKET_DOMAIN}/sapien.tar.gz
tar -zxvf sapien.tar.gz
rm -rf sapien.tar.gz

echo "Build image."
docker build -t you_docker_image:tag_name .

echo "Done."
1 change: 0 additions & 1 deletion ocrtoc_task/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ catkin_package(
install(DIRECTORY
action
launch
urdf
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
install(PROGRAMS
Expand Down
1 change: 1 addition & 0 deletions sapien_simulator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ install(DIRECTORY
glsl_shader
launch
rviz
urdf
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
install(PROGRAMS
Expand Down
2 changes: 1 addition & 1 deletion sapien_simulator/launch/ur5e_upload.launch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<launch>
<param name="robot_description"
command="$(find xacro)/xacro --inorder '$(find ocrtoc_task)/urdf/ur5e.urdf'"/>
command="$(find xacro)/xacro --inorder '$(find sapien_simulator)/urdf/ur5e.urdf'"/>
<param name="robot_description_semantic"
textfile="$(find sapien_simulator)/config/ur5e.srdf"/>
<param name="joint_limits"
Expand Down
File renamed without changes.

0 comments on commit e43e771

Please sign in to comment.