Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
fc9eaa4
Remove orb_slam2 dependency
MarcelTorne Apr 1, 2022
4a976d0
Add configs to depth img class
MarcelTorne Apr 4, 2022
c7a06ce
Merging branches
MarcelTorne Apr 5, 2022
622c86b
Fix self.configs not found
MarcelTorne Apr 6, 2022
a255e03
Fix indent in kinematics
MarcelTorne Apr 6, 2022
a7e5d85
Merge branch 'remove-orb2-slam' of github.com:Improbable-AI/pyrobot i…
MarcelTorne Apr 6, 2022
2ed20f9
Fixing identations in kinematics
MarcelTorne Apr 6, 2022
40a5207
add calibration scripts
MarcelTorne Apr 15, 2022
20c1775
Merge branch 'remove-orb2-slam' of https://github.com/Improbable-AI/p…
MarcelTorne Apr 15, 2022
6b03d83
add calibration file
MarcelTorne Apr 15, 2022
4b648b5
Go back to previous version of locobot calibration
MarcelTorne Apr 16, 2022
53db5c3
Add third person camera launch
MarcelTorne Apr 18, 2022
100461e
Add serial number in launch file
MarcelTorne Apr 18, 2022
018506c
Installing pyrobot on docker image
MarcelTorne Apr 18, 2022
5d8f52e
Add ubuntu cuda
MarcelTorne Apr 24, 2022
9209705
Add pytorch with cuda in cuda docker image
MarcelTorne Apr 24, 2022
902b57e
Add pytorch with cuda in cuda docker image
MarcelTorne Apr 24, 2022
6f78cfe
Add newer pytorch cuda version
MarcelTorne Apr 24, 2022
76cbffc
update run_image_cuda
taochenshh Apr 25, 2022
06726dd
Install torchvision in cuda
MarcelTorne Apr 25, 2022
edfc473
Modify IP address improbable 006
MarcelTorne Apr 26, 2022
12e5ba6
Install tensorboard in cuda docker
MarcelTorne May 11, 2022
87ef666
Modify docker build
MarcelTorne May 18, 2022
364beef
Change ros ip for imp5
MarcelTorne May 18, 2022
8c6c6f2
Change ros ip for imp5
MarcelTorne May 18, 2022
47db541
Add IP imp006
MarcelTorne May 19, 2022
98a2408
Modify IP on image docker
MarcelTorne May 19, 2022
0357a16
Change cuda image
MarcelTorne May 20, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ thirdparty/ORB_SLAM2/Vocabulary/ORBvoc.txt

# tmp files for testing
tmp/*

*.swo
*.swp
# docusaurus
node_modules
18 changes: 18 additions & 0 deletions docker/calibrated.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"camera_link": {
"from": "head_tilt_link",
"quat": [
0.0020485991725649184,
-0.02249425053471297,
0.0001768645209827914,
0.9997448577778497
],
"to": "camera_link",
"trans": [
0.0545564563198051,
0.01111847207083916,
0.004833795657717313
]
}
}

2 changes: 1 addition & 1 deletion docker/docker_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def execute_build(args):
# copy requirements file from parent into docker folder

cmd = 'DOCKER_BUILDKIT=1 docker build '
cmd += '--ssh default '
#cmd += '--ssh default '
cmd += '--network=host '
if args.no_cache:
cmd += '--no-cache '
Expand Down
59 changes: 59 additions & 0 deletions docker/docker_build_cuda.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/usr/bin/env python

from __future__ import print_function

import argparse
import os
import shutil


def execute_build(args):
"""
Create docker build command based on user input arguments
and execute the command

Args:
args (argparse.Namespace): Build arguments
"""
if not os.path.exists(args.docker_file):
print('Dockerfile %s not found! Exiting' % args.docker_file)
return

# copy requirements file from parent into docker folder

cmd = 'DOCKER_BUILDKIT=1 docker build '
#cmd += '--ssh default '
cmd += '--network=host '
if args.no_cache:
cmd += '--no-cache '
cmd += '-t %s -f %s .' % (args.image, args.docker_file)

print('command = \n\n', cmd)

if not args.dry_run:
os.system(cmd)


if __name__ == '__main__':
default_image_name = "ros:noetic-ros-core-focal-cuda"

parser = argparse.ArgumentParser()

parser.add_argument('-i', '--image', type=str,
default=default_image_name,
help='name for new docker image')

parser.add_argument('--no_cache', action='store_true',
help='0 if should build without using cache')

parser.add_argument('-f', '--docker_file', type=str,
default='locobot_cuda.dockerfile',
help='which Dockerfile to build from')


parser.add_argument('-d', '--dry_run', action='store_true',
help='1 if we should only print the build command '
'without executing')

args = parser.parse_args()
execute_build(args)
4 changes: 2 additions & 2 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ source /opt/ros/noetic/setup.bash
source /root/create_ws/devel/setup.bash
source /root/locobot_ws/devel/setup.bash
source /root/.bashrc
cd workspace/
pip install -e /workspace/pyrobot

cd /workspace/

eval "bash"

Expand Down
19 changes: 15 additions & 4 deletions docker/install_scripts/install_locobot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,21 @@ git clone https://github.com/turtlebot/turtlebot_interactions.git
git clone https://github.com/turtlebot/turtlebot_simulator.git
git clone https://github.com/ROBOTIS-GIT/dynamixel-workbench.git
git clone https://github.com/ROBOTIS-GIT/dynamixel-workbench-msgs.git
git clone https://github.com/AutonomyLab/create_robot.git
git clone https://github.com/Improbable-AI/pyrobot.git
git clone --branch remove-orb2-slam https://github.com/Improbable-AI/pyrobot.git
git clone --branch indigo-devel https://github.com/AutonomyLab/create_autonomy.git
git clone https://github.com/Improbable-AI/airobot.git


cd ..
rosdep update
apt-get update
rosdep install --from-paths src/create_robot src/dynamixel-workbench src/dynamixel-workbench-msgs src/ar_track_alvar -i -y
catkin build
rosdep install --from-paths src/create_autonomy src/dynamixel-workbench src/dynamixel-workbench-msgs src/ar_track_alvar -i -y
catkin build

cd src/pyrobot
pip install .
cd ..
cd airobot
pip install .


1 change: 1 addition & 0 deletions docker/install_scripts/install_pytorch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ rm -rf /var/lib/apt/lists/*

# install pytorch
pip install torch==1.11.0+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html
pip install torchvision
9 changes: 9 additions & 0 deletions docker/install_scripts/install_pytorch_cuda.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

set -euxo pipefail

rm -rf /var/lib/apt/lists/*

# install pytotorch
pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/cu113
pip install tensorboard
4 changes: 4 additions & 0 deletions docker/locobot.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,13 @@ COPY install_scripts/install_py_pkgs2.sh /tmp/install_py_pkgs2.sh
RUN chmod +x /tmp/install_py_pkgs2.sh
RUN /tmp/install_py_pkgs2.sh

COPY calibrated.json /root/.robot/calibrated.json

RUN echo "source /opt/ros/noetic/setup.bash" >> /root/.bashrc
RUN echo "source /root/create_ws/devel/setup.bash" >> /root/.bashrc
RUN echo "source /root/locobot_ws/devel/setup.bash" >> /root/.bashrc
RUN echo "export ROS_IP=192.168.50.117" >> /root/.bashrc
RUN echo "export ROS_MASTER_URI=http://192.168.50.117:11311" >> /root/.bashrc


WORKDIR /
Expand Down
104 changes: 104 additions & 0 deletions docker/locobot_cuda.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# syntax=docker/dockerfile:experimental

FROM nvidia/cudagl:11.4.2-devel-ubuntu20.04

RUN echo 'America/New_York' > /etc/timezone && \
ln -s /usr/share/zoneinfo/America/New_York /etc/localtime && \
apt-get update && \
apt-get install -q -y --no-install-recommends tzdata && \
rm -rf /var/lib/apt/lists/*

### second stage ###
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8

# Replacing shell with bash for later docker build commands
RUN mv /bin/sh /bin/sh-old && \
ln -s /bin/bash /bin/sh

# install basic system stuff
COPY ./install_scripts/install_basic.sh /tmp/install_basic.sh
RUN chmod +x /tmp/install_basic.sh
RUN /tmp/install_basic.sh


# install ROS stuff
ENV ROS_DISTRO noetic



COPY ./install_scripts/install_python.sh /tmp/install_python.sh
RUN chmod +x /tmp/install_python.sh
RUN /tmp/install_python.sh

ARG DEBIAN_FRONTEND=noninteractive

# create catkin workspace


COPY ./install_scripts/install_realsense.sh /tmp/install_realsense.sh
RUN chmod +x /tmp/install_realsense.sh
RUN /tmp/install_realsense.sh

COPY ./install_scripts/install_ros.sh /tmp/install_ros.sh
RUN chmod +x /tmp/install_ros.sh
RUN /tmp/install_ros.sh

# bootstrap rosdep
RUN rosdep init
RUN rosdep update


ENV CATKIN_WS=/root/catkin_ws
RUN source /opt/ros/$ROS_DISTRO/setup.bash


COPY ./install_scripts/install_pytorch_cuda.sh /tmp/install_pytorch_cuda.sh
RUN chmod +x /tmp/install_pytorch_cuda.sh
RUN /tmp/install_pytorch_cuda.sh

# copy local requirements file for pip install python deps
ENV IMPROB /workspace
RUN mkdir ${IMPROB}


COPY install_scripts/install_py_pkgs.sh /tmp/install_py_pkgs.sh
RUN chmod +x /tmp/install_py_pkgs.sh
RUN /tmp/install_py_pkgs.sh

COPY ./install_scripts/install_libcreate.sh /tmp/install_libcreate.sh
RUN chmod +x /tmp/install_libcreate.sh
RUN /tmp/install_libcreate.sh


COPY ./install_scripts/install_locobot.sh /tmp/install_locobot.sh
RUN chmod +x /tmp/install_locobot.sh
RUN /tmp/install_locobot.sh

COPY install_scripts/install_py_pkgs2.sh /tmp/install_py_pkgs2.sh
RUN chmod +x /tmp/install_py_pkgs2.sh
RUN /tmp/install_py_pkgs2.sh

COPY calibrated.json /root/.robot/calibrated.json

RUN echo "source /opt/ros/noetic/setup.bash" >> /root/.bashrc
RUN echo "source /root/create_ws/devel/setup.bash" >> /root/.bashrc
RUN echo "source /root/locobot_ws/devel/setup.bash" >> /root/.bashrc
RUN echo "export ROS_MASTER_URI=http://192.168.50.117:11311" >> /root/.bashrc
RUN echo "export ROS_IP=192.168.50.111" >> /root/.bashrc


WORKDIR /
# Exposing the ports
EXPOSE 11311


# setup entrypoint
COPY ./entrypoint.sh /

ENTRYPOINT ["./entrypoint.sh"]
CMD ["bash"]




14 changes: 14 additions & 0 deletions docker/run_image_cuda.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
IMAGE=ros:noetic-ros-core-focal-cuda
docker run -it\
--env="DISPLAY" \
--env="QT_X11_NO_MITSHM=1" \
--volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
--volume="$PWD/../../:/workspace/" \
-v /dev:/dev \
--gpus all \
-e NVIDIA_DRIVER_CAPABILITIES=all \
-e NVIDIA_VISIBLE_DEVICES=all \
--privileged \
--net=host \
${IMAGE}

Loading