Skip to content

Commit 1aae7e5

Browse files
committed
Initial commit
0 parents  commit 1aae7e5

File tree

151 files changed

+22896
-0
lines changed

Some content is hidden

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

151 files changed

+22896
-0
lines changed

Dockerfile

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
FROM gazebo:libgazebo9-xenial
2+
3+
MAINTAINER Lander Usategui <lander@aliasrobotics.com>
4+
5+
# setup keys
6+
RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 421C365BD9FF1F717815A3895523BAEEB01FA116
7+
8+
# setup sources.list
9+
RUN echo "deb http://packages.ros.org/ros/ubuntu xenial main" > /etc/apt/sources.list.d/ros-latest.list
10+
11+
EXPOSE 8080
12+
13+
# install bootstrap tools
14+
RUN apt-get update && apt-get install --no-install-recommends -y \
15+
libassimp-dev \
16+
python-rosdep \
17+
python-rosinstall \
18+
python-vcstools \
19+
python-pyassimp \
20+
ros-kinetic-robot ros-kinetic-perception \
21+
ros-kinetic-control-toolbox \
22+
ros-kinetic-controller-manager\
23+
ros-kinetic-transmission-interface\
24+
ros-kinetic-joint-limits-interface\
25+
ros-kinetic-moveit\
26+
ros-kinetic-joint-state-controller\
27+
ros-kinetic-position-controllers \
28+
ros-kinetic-joint-trajectory-controller \
29+
ros-kinetic-trac-ik* \
30+
ros-kinetic-gazebo9* \
31+
xvfb \
32+
libjansson-dev imagemagick \
33+
&& rm -rf /var/lib/apt/lists/*
34+
#Download the necessary nodjs and npm version
35+
RUN curl -sL https://deb.nodesource.com/setup_4.x | bash -
36+
RUN apt-get install -y nodejs && rm -rf /var/lib/apt/lists/*
37+
38+
# bootstrap rosdep
39+
RUN rosdep init \
40+
&& rosdep update
41+
42+
# install ros packages
43+
ENV ROS_DISTRO kinetic
44+
45+
RUN /bin/bash -c "mkdir -p /root/ros_catkin_ws/src && cd /root/ros_catkin_ws/src \
46+
&& git clone https://github.com/ros-industrial/universal_robot \
47+
&& cd /root/ros_catkin_ws/ \
48+
&& source /opt/ros/kinetic/setup.bash \
49+
&& catkin_make_isolated --install --install-space /opt/ros/kinetic \
50+
&& cd && rm -r /root/ros_catkin_ws"
51+
52+
RUN /bin/bash -c "cd /root \
53+
&& hg clone https://bitbucket.org/osrf/gzweb"
54+
55+
RUN /bin/bash -c "cd /root/gzweb && hg up gzweb_1.4.0 \
56+
&& source /usr/share/gazebo/setup.sh \
57+
&& npm run deploy \
58+
&& rm -r /root/gzweb/http/client/assets \
59+
&& ln -s /root/.gazebo/models/ /root/gzweb/http/client/assets"
60+
61+
RUN sed -i 's/kdl_kinematics_plugin/trac_ik_kinematics_plugin/g' /opt/ros/kinetic/share/ur10_moveit_config/config/kinematics.yaml \
62+
&& sed -i 's/KDLKinematicsPlugin/TRAC_IKKinematicsPlugin/g' /opt/ros/kinetic/share/ur10_moveit_config/config/kinematics.yaml \
63+
&& sed -i 's/load_robot_description\" default=\"false\"/load_robot_description\" default=\"true\"/g' /opt/ros/kinetic/share/ur10_moveit_config/launch/planning_context.launch \
64+
&& sed -i 's/ur_description/robotctf_scenario4/g' /opt/ros/kinetic/share/ur10_moveit_config/launch/planning_context.launch \
65+
&& sed -i 's/ur10_robot.urdf.xacro/robot_description_original.urdf.xacro/g' /opt/ros/kinetic/share/ur10_moveit_config/launch/planning_context.launch
66+
67+
COPY scenario4-local /root/ros_catkin_ws/src/scenario4
68+
COPY ariac_utils/ /root/ros_catkin_ws/src/ariac_utils
69+
70+
RUN /bin/bash -c "mkdir -p /root/.gazebo/models/ && cp -r /root/ros_catkin_ws/src/scenario4/models/* /root/.gazebo/models/"
71+
72+
RUN /bin/bash -c "cd /root/ros_catkin_ws \
73+
&& source /opt/ros/kinetic/setup.bash \
74+
&& catkin_make_isolated --install --install-space /opt/ros/kinetic \
75+
&& cd && rm -r /root/ros_catkin_ws"
76+
77+
RUN rm -rf /etc/update-motd.d/* && rm -rf /etc/legal && sed -i 's/\#force_color_prompt=yes/force_color_prompt=yes/' /root/.bashrc \
78+
&& sed -i 's/robotctf_scenario1/robotctf_scenario4/g' /opt/ros/kinetic/share/ur10_moveit_config/launch/planning_context.launch
79+
80+
COPY motd /etc/motd
81+
82+
RUN echo "cat /etc/motd" >> /root/.bashrc && echo "source /opt/ros/kinetic/setup.bash" >> /root/.bashrc
83+
84+
COPY launch_script.bash /root/
85+
86+
ENTRYPOINT ["/root/launch_script.bash"]

LICENSE

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# rctf-scemario4
2+
3+
## How to run it?
4+
5+
### Download and compile the image:
6+
7+
```bash
8+
git clone https://github.com/aliasrobotics/rctf-scenario4
9+
cd rctf-scenario4
10+
docker build -t rctf-scenario4 .
11+
```
12+
13+
### Play with the scenario:
14+
15+
#### In one terminal:
16+
17+
```bash
18+
docker run -it -p 8080:8080 rctf-scenario4
19+
```
20+
21+
#### In another terminal, list the current running docker images, select the image id for the rctf-scenario4 and run it:
22+
23+
```bash
24+
docker ps
25+
----------
26+
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
27+
caccd5e51f6f rctf-scenario4 "/root/launch_script…" 8 minutes ago Up 8 minutes 0.0.0.0:8080->8080/tcp, 11345/tcp stupefied_nightingale
28+
-----------
29+
docker exec -it caccd5e51f6f bash
30+
```
31+
32+
#### Check the simulation, open a web browser and copy the following URL:
33+
34+
```bash
35+
127.0.0.1:8080
36+
```

ariac_utils/CMakeLists.txt

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
cmake_minimum_required(VERSION 3.5)
2+
project(ariac_utils)
3+
4+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
5+
6+
if(NOT WIN32)
7+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra")
8+
endif()
9+
10+
find_package(catkin REQUIRED COMPONENTS
11+
gazebo_ros
12+
gazebo_plugins
13+
roscpp
14+
std_msgs
15+
std_srvs
16+
tf
17+
geometry_msgs
18+
message_generation
19+
)
20+
find_package(gazebo REQUIRED)
21+
22+
add_message_files(DIRECTORY msg
23+
FILES
24+
ConveyorBeltState.msg
25+
DetectedProduct.msg
26+
Shipment.msg
27+
Product.msg
28+
ShippingBox.msg
29+
LogicalCameraImage.msg
30+
Model.msg
31+
Order.msg
32+
PopulationState.msg
33+
Proximity.msg
34+
StorageUnit.msg
35+
ShippingBoxContents.msg
36+
VacuumGripperState.msg
37+
)
38+
39+
add_service_files(DIRECTORY srv
40+
FILES
41+
DroneControl.srv
42+
ConveyorBeltControl.srv
43+
GetMaterialLocations.srv
44+
PopulationControl.srv
45+
SubmitShipment.srv
46+
VacuumGripperControl.srv
47+
)
48+
49+
generate_messages(
50+
DEPENDENCIES
51+
geometry_msgs
52+
std_msgs
53+
)
54+
55+
catkin_package(
56+
CATKIN_DEPENDS
57+
message_runtime
58+
std_srvs
59+
tf
60+
)
61+
62+
include_directories(
63+
include
64+
${GAZEBO_INCLUDE_DIRS}
65+
${roscpp_INCLUDE_DIRS}
66+
${catkin_INCLUDE_DIRS}
67+
)
68+
link_directories(
69+
${GAZEBO_LIBRARY_DIRS}
70+
)
71+
72+
# Create the libConveyorBeltPlugin.so library.
73+
set(conveyor_belt_plugin_name ConveyorBeltPlugin)
74+
add_library(${conveyor_belt_plugin_name} src/ConveyorBeltPlugin.cc)
75+
target_link_libraries(${conveyor_belt_plugin_name}
76+
${GAZEBO_LIBRARIES}
77+
${side_contact_plugin_name}
78+
)
79+
install(TARGETS ${conveyor_belt_plugin_name}
80+
ARCHIVE DESTINATION lib
81+
LIBRARY DESTINATION lib
82+
RUNTIME DESTINATION bin
83+
)
84+
85+
#Create the libROSConveyorBeltPlugin.so library.
86+
set(ros_conveyor_belt_plugin_name ROSConveyorBeltPlugin)
87+
add_library(${ros_conveyor_belt_plugin_name} src/ROSConveyorBeltPlugin.cc)
88+
target_link_libraries(${ros_conveyor_belt_plugin_name}
89+
${conveyor_belt_plugin_name}
90+
${GAZEBO_LIBRARIES}
91+
)
92+
add_dependencies(${ros_conveyor_belt_plugin_name}
93+
${${PROJECT_NAME}_EXPORTED_TARGETS}
94+
)
95+
install(TARGETS ${ros_conveyor_belt_plugin_name}
96+
ARCHIVE DESTINATION lib
97+
LIBRARY DESTINATION lib
98+
RUNTIME DESTINATION bin
99+
)
100+
101+
# Create the libROSLogicalCameraPlugin.so library.
102+
set(ros_logical_camera_plugin_name ROSLogicalCameraPlugin)
103+
add_library(${ros_logical_camera_plugin_name} src/ROSLogicalCameraPlugin.cc)
104+
target_link_libraries(${ros_logical_camera_plugin_name}
105+
${GAZEBO_LIBRARIES}
106+
${catkin_LIBRARIES}
107+
)
108+
add_dependencies(${ros_logical_camera_plugin_name}
109+
${${PROJECT_NAME}_EXPORTED_TARGETS}
110+
)
111+
install(TARGETS ${ros_logical_camera_plugin_name}
112+
ARCHIVE DESTINATION lib
113+
LIBRARY DESTINATION lib
114+
RUNTIME DESTINATION bin
115+
)

0 commit comments

Comments
 (0)