Skip to content

Commit

Permalink
Merge pull request #31 from ETHZ-RobotX/preRSS2023
Browse files Browse the repository at this point in the history
Update for RSS2023
  • Loading branch information
mantelt committed Jun 28, 2023
2 parents d5f2e42 + f161c7b commit 2504902
Show file tree
Hide file tree
Showing 11 changed files with 150 additions and 84 deletions.
43 changes: 29 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ jobs:
HW_FILE: ${{ github.workspace }}/smb_hw.repos
ROS_PARALLEL_JOBS: '-j8 -l6'
ROS_DISTRO: noetic
CATKIN_WS: ~/catkin_ws_test/
CATKIN_WS: /root/catkin_ws_test/
LIBSPINNAKER_FILEID: 1r4LNuU9IhfRWavegSaLTFLIenTrmMpN1
LIBSPINNAKER_FILENAME: spinnaker-2.7.0.128-Ubuntu20.04-amd64-pkg.tar.gz
container:
image: ethzrobotx/smb_docker:latest
steps:
Expand All @@ -29,8 +31,7 @@ jobs:
run: |
mkdir -p $CATKIN_WS/src
cd $CATKIN_WS
catkin init
catkin config --extend /opt/ros/noetic -DCMAKE_BUILD_TYPE=Release
catkin config --init --extend /opt/ros/noetic -DCMAKE_BUILD_TYPE=Release
- name: Install ROS packages with rosdep
run: |
rosdep update
Expand All @@ -54,26 +55,40 @@ jobs:
run: |
cd $CATKIN_WS
catkin build smb_path_planner --no-status
- name: Install dependencies for hardware
- name: catkin build gbplanner
run: |
cd $CATKIN_WS
catkin build gbplanner* pci_general --no-status
- name: catkin build frontier_exploration
run: |
cd $CATKIN_WS
catkin build explore_lite slam_gmapping --no-status
- name: Install librealsense and dependencies
run: |
# Realsense
sudo apt-key adv --keyserver keys.gnupg.net --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE
sudo add-apt-repository "deb https://librealsense.intel.com/Debian/apt-repo $(lsb_release -cs) main"
sudo apt update
sudo apt install librealsense2-dev librealsense2-dkms librealsense2-utils -y
sudo apt install ros-noetic-ddynamic-reconfigure -y
- name: Install Robosense dependencies
run: |
# Robosense
sudo apt-get install -y libyaml-cpp-dev libpcap-dev libprotobuf-dev protobuf-compiler git
# Spinnaker
sudo apt update
sudo apt install debconf-utils libusb-1.0-0 -y
wget --load-cookies /tmp/cookies.txt "https://drive.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://drive.google.com/uc?export=download&id=1wVK0dAH4mre1Prsr-Wsaowz0_OAmWe2f' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=1wVK0dAH4mre1Prsr-Wsaowz0_OAmWe2f" -O 'spinnaker-2.4.0.143-Ubuntu20.04-amd64-pkg.tar.gz' && rm -rf /tmp/cookies.txt
tar -xvf spinnaker-2.4.0.143-Ubuntu20.04-amd64-pkg.tar.gz
rm spinnaker-2.4.0.143-Ubuntu20.04-amd64-pkg.tar.gz
cd spinnaker-2.4.0.143-amd64/
echo libspinnaker libspinnaker/accepted-flir-eula boolean true | sudo debconf-set-selections
sudo dpkg -i libgentl_2.4.0.143_amd64.deb libspinnaker_2.4.0.143_amd64.deb libspinnaker-dev_2.4.0.143_amd64.deb libspinnaker-c_2.4.0.143_amd64.deb libspinnaker-c-dev_2.4.0.143_amd64.deb
# - name: Install FLIR camera driver (libspinnaker)
# run: |
# # Spinnaker
# sudo apt update
# sudo apt install debconf-utils libusb-1.0-0 -y
# wget --quiet --load-cookies /tmp/cookies.txt "https://drive.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://drive.google.com/uc?export=download&id='"$LIBSPINNAKER_FILEID" -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=$LIBSPINNAKER_FILEID" -O $LIBSPINNAKER_FILENAME && rm -rf /tmp/cookies.txt
# tar -xf $LIBSPINNAKER_FILENAME
# SPINNAKER_DIR=$(tar -xvf $LIBSPINNAKER_FILENAME | head -1)
# SPINNAKER_VERSION=${SPINNAKER_DIR#spinnaker-}
# SPINNAKER_VERSION="${SPINNAKER_VERSION%-amd64/}"_amd64
# rm $LIBSPINNAKER_FILENAME
# cd $SPINNAKER_DIR
# echo libspinnaker libspinnaker/accepted-flir-eula boolean true | sudo debconf-set-selections
# sudo dpkg -i libgentl_${SPINNAKER_VERSION}.deb libspinnaker_${SPINNAKER_VERSION}.deb libspinnaker-dev_${SPINNAKER_VERSION}.deb libspinnaker-c_${SPINNAKER_VERSION}.deb libspinnaker-c-dev_${SPINNAKER_VERSION}.deb
- name: catkin build smb
run: |
cd $CATKIN_WS
Expand Down
2 changes: 0 additions & 2 deletions docs/core-software/HowToRunSoftware.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,6 @@ roslaunch smb_opc opc.launch
# You should see the robot model in Rviz
```
When launching the `smb.launch` file with default arguments, the onboard computer assumes control over the motor controller. This means that the motors can now only be controlled via software (not directly via RC anymore).
You might need to restart the _SMB base_ if the robot does not respond to sofware commands.
{: .smb-info }
Expand Down
60 changes: 37 additions & 23 deletions docs/core-software/docker_installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: default
title: Docker installation
parent: SMB Core Software
nav_order: 2
nav_order: 1
---

# Using Docker for Simulation
Expand All @@ -29,28 +29,28 @@ To use the SMB Docker, basic knowledge of Docker is needed. Please check [the of
cd <path/to/repo>

# Activate Container
create_container.bash
./create_container.bash
```

4. To exit the container type `exit` in the terminal
This will automatically setup your system to later run the docker and download the pre-compiled image from dockerhub. Once downloaded, the script starts a container called `smb_container` that can be used to run the SMB software (see [reconnecting to the docker container](#reconnecting-to-the-docker-container)).


### Windows

1. Install Docker Desktop by using [the official website](https://docs.docker.com/desktop/windows/install/)
2. Install VcXsrv [here](https://sourceforge.net/projects/vcxsrv/)
3. Launch VcXsrv and put the settings as in the pictures
![setup 1](../images/docker_setup_1.png)
![setup 2](../images/docker_setup_2.png)
![setup 3](../images/docker_setup_3.png)
![setup 1](../images/docker_setup_1.png){: width="600px"}

![setup 2](../images/docker_setup_2.png){: width="600px"}

![setup 3](../images/docker_setup_3.png){: width="600px"}

4. Open the powershell and run

```bash
# Get your ip address
ipconfig

# Run docker
docker run -it --env="DISPLAY=<YOUR_IP_ADDR>:0.0" --volume=smb_volume:/home/catkin_ws/src --net=host --name smb_container ethzrobotx/smb_docker bash
docker run -it --env="DISPLAY=host.docker.internal:0.0" --volume=smb_volume:/home/catkin_ws/src --net=host --name smb_container ethzrobotx/smb_docker bash
```

5. To exit the container type `exit` in the terminal
Expand All @@ -61,30 +61,44 @@ Visual Studio Code is a powerful integrated development environment that even al
Usage of Visual Studio is not necessary.
{: .smb-info}

1. Open Visual Studio Code and install the **Remote - Containers** extension.
2. Click on the extension on the sidebar and connect to the previously created container.
1. Open Visual Studio Code and install the **dev - containers** extension.
2. Click on the extension on the bottom left corner and attach to the previously created container.
3. When the new window opens install the **C/C++** and **Python** extension from Microsoft inside the container. This is needed in order to get autocompletion.
4. The catkin workspace is located in /home/catkin_ws

## Reconnecting to the Docker container
## (Re-)connecting to the Docker container

Once you have setup the smb_container, you can create a terminal (bash shell) by running

```bash
# Start the Docker Container
sudo docker container start smb_container
docker exec -it smb_container bash
```

There is no need to run the script create_container.sh anymore.

# Attach the Docker Container
sudo docker container attach smb_container
If you closed all running instances of bash in the `smb_container`, you might need to start it again by running

```bash
# start docker container
docker start smb_container

# create a terminal (bash) in the container:
docker exec -it smb_container bash
```

## How to use simulation the Docker
The latter command can be repeated multiple times to create several terminals in the same container.

If you want to launch several sessions connected to the same container from multiple terminals:
## How to use the simulation in the Docker container

If you want to run the simulation you can follow the [how to run SMB software](HowToRunSoftware.md) and run the commands given there in a terminal in the smb_container. I.e.

```bash
# Launch new session to the same container
# create a terminal (bash) in the container:
docker exec -it smb_container bash
```

If you want to run the simulation you can follow the [how to run SMB software](https://ethz-robotx.github.io/SuperMegaBot/core-software/HowToRunSoftware.html).
In the then so created terminal, run:

You can run launch_gazebo_gui:=false if you do not need to see the simulation environment. Yet, you can recognize the obstacles in the Rviz visualization tool thanks to the modeled sensor behavior.
{: .smb-info}
```bash
roslaunch smb_gazebo sim.launch
```
9 changes: 5 additions & 4 deletions docs/core-software/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ has_children: true
{:.no_toc}
The SMB core software allows simulation of the robot in a gazebo environment but is also required on the real robots.

## Local Installation
## Using Docker

To install the simulation/SMB core software, follow the steps described in the [installation documentation](installation_core.md).
To run the SMB software only in simulation, you can use a Docker image with pre-compiled software. Details are given in the [SMB docker documentation](docker_installation.md). With this, no further installation is needed.

## Using Docker
## Local Installation

Instead of running the docker image, you can install the simulation/SMB core software on a native Ubuntu 20.04 running ROS Noetic: Follow the steps described in the [installation documentation](installation_core.md).

Instead of downloading and building the SMB core software directly on your machine, you can use a Docker image with a pre-compiled software. Details are given in the [SMB docker documentation](docker_installation.md)

## Starting the Simulation

Expand Down
10 changes: 6 additions & 4 deletions docs/core-software/installation_core.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: default
title: Core Software Setup
parent: SMB Core Software
nav_order: 1
nav_order: 2
---

# Setting up the SMB Core Software
Expand All @@ -17,13 +17,15 @@ Please [create an issue](https://github.com/ETHZ-RobotX/SuperMegaBot/issues/new)
* Table of contents
{:toc}

## Remark
## Remarks

{:.no_toc}

The SMB software consists of two parts: core and hardware related.
1. In case you would like to only run the simulation environment, it is enough to [download and run the SMB docker image](docker_installation.md). <br />
Alternatively, you can follow the steps below to set the simulation up in an Ubuntu 20.04 environment.

If you want to use the system on a real SMB robot with real sensors and actuators, the [hardware related part](../robot-operation/installation_hw_packages.md) should be installed **on top of the core part**. This document contains the instructions about SMB core software, which also contains the simulation environment.
2. The SMB software is split up in two parts: non-hardware and hardware related. <br />
If you want to use the system on a real SMB robot with real sensors and actuators, the [hardware related part](../robot-operation/installation_hw_packages.md) should be installed **on top of the non-hardware part**. This document contains the instructions about SMB non-hardware related software, which also contains the simulation environment.


## Prerequisites
Expand Down
Binary file modified docs/images/docker_setup_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/docker_setup_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/docker_setup_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 14 additions & 9 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,32 @@ Documentation of the SuperMegaBot (SMB) for the ETHZ Robotics Summer School.

## Introduction
This documentation aims at introducing basic usage of the SMB software.
To get a basic understanding and perform basic testing, a simulation environment based on Gazebo can be used.

A [simulation environment](#the-simulation) based on Gazebo can be used to get a basic understanding of the SMB software and perform basic testing.
This simulation is part of the core software setup.

Furthermore, the fundamentals in how to use the real robot is described as well.

## Issue tracking
Please use the [issues page](https://github.com/ETHZ-RobotX/SuperMegaBot/issues) to report any issues concerning the robots (hardware and software related issues).
Furthermore, the fundamentals of how to use the real robot are described as well.

## The Simulation
For simulation of the SuperMegaBot, the Gazebo environment is used.
For simulation of the SuperMegaBot the Gazebo environment is used.
It incorporates a simulation of the 4-wheeled robot including most of its sensors (16 beam Lidar, RGB camera, tracking camera, IMU)

### Installation
To install the simulation/SMB core software, follow the steps described in the [installation documentation](core-software/installation_core.md).
### Setup
To setup the simulation, you have two options:

1. Use a [docker environment](core-software/docker_installation.md) or
2. follow the steps described in the [core software documentation](core-software/installation_core.md) to install the software stack in a native Ubuntu 20.04 environment.


### Running the simulation environment
Once the SMB core software is installed, you can start the simulation by following the steps in [How To Run the SMB Software](core-software/HowToRunSoftware.md)
Once the SMB software is setup, you can start the simulation by following the steps in [How To Run the SMB Software](core-software/HowToRunSoftware.md)

## Operating the real robot
Please follow the steps described in [How to use the SMB](robot-operation) to operate a SuperMegaBot.

## Issue tracking
Please use the [issues page](https://github.com/ETHZ-RobotX/SuperMegaBot/issues) to report any issues concerning the robots (hardware and software related issues).

## History
The SuperMegaBot was originally developped by the ETH Construction Robotics group. It is now maintained by the [ETHZ RobotX Center](https://center-for-robotics.ethz.ch/).

Expand Down
77 changes: 56 additions & 21 deletions smb.repos
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,10 @@ repositories:
type: git
url: https://github.com/ETHZ-RobotX/smb_powerstatus.git
version: main
lib/libnabo:
type: git
url: https://github.com/ANYbotics/libnabo.git
version: master
lib/libpointmatcher:
type: git
url: https://github.com/leggedrobotics/libpointmatcher.git
version: master
lib/ocs2:
type: git
url: https://github.com/leggedrobotics/ocs2.git
version: summerschool_2022
lib/pointmatcher_ros:
type: git
url: https://github.com/leggedrobotics/pointmatcher-ros.git
version: master
misc/catkin_simple:
type: git
url: https://github.com/catkin/catkin_simple.git
Expand Down Expand Up @@ -55,18 +43,10 @@ repositories:
type: git
url: https://github.com/leggedrobotics/ethzasl_msf.git
version: master
slam/icp_localization:
type: git
url: https://github.com/leggedrobotics/icp_localization.git
version: master
slam/open3d_slam:
type: git
url: https://github.com/leggedrobotics/open3d_slam.git
version: master
ui/multimaster_fkie:
type: git
url: https://github.com/ETHZ-RobotX/multimaster_fkie
version: master
version: robotics_summer_school_2023
ui/smb_rviz_plugins:
type: git
url: https://github.com/ETHZ-RobotX/smb_rviz_plugins.git
Expand All @@ -75,3 +55,58 @@ repositories:
type: git
url: https://github.com/ETHZ-RobotX/smb_object_detection.git
version: main
# EXPLORATION MISC
misc/eigen_catkin:
type: git
url: https://github.com/ethz-asl/eigen_catkin.git
version: 00b5eb254bad8de9cd68d238aa994e443062cf30
misc/eigen_checks:
type: git
url: https://github.com/ethz-asl/eigen_checks.git
version: 22a6247a3df11bc285d43d1a030f4e874a413997
misc/gflags_catkin:
type: git
url: https://github.com/ethz-asl/gflags_catkin.git
version: 5324e74119996a6e2da12d20e5388c17480ebd79
misc/minkindr:
type: git
url: https://github.com/ethz-asl/minkindr.git
version: bc4503c34970a13b7ef06f62505e3333395ce02c
misc/minkindr_ros:
type: git
url: https://github.com/ethz-asl/minkindr_ros.git
version: 88e0bd476f82027453f04fdf7c40c7c9a358aa1b
misc/mav_comm:
type: git
url: https://github.com/ethz-asl/mav_comm.git
version: master
misc/yaml_cpp_catkin:
type: git
url: https://github.com/ethz-asl/yaml_cpp_catkin.git
version: master
# EXPLORATION MAPPING
mapping/voxblox:
type: git
url: https://github.com/ntnu-arl/voxblox.git
version: dev/noetic
mapping/slam_gmapping:
type: git
url: https://github.com/ETHZ-RobotX/slam_gmapping
version: melodic-devel
# EXPLORATION
exploration/gbplanner_ros:
type: git
url: https://github.com/ETHZ-RobotX/gbplanner_ros.git
version: gbplanner2
exploration/pci_general:
type: git
url: https://github.com/ntnu-arl/pci_general.git
version: main
exploration/adaptive_obb_ros:
type: git
url: https://github.com/ntnu-arl/adaptive_obb_ros.git
version: master
exploration/m-explore:
type: git
url: https://github.com/hrnr/m-explore.git
version: noetic-devel
10 changes: 3 additions & 7 deletions smb_hw.repos
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,10 @@ repositories:
type: git
url: https://github.com/ETHZ-RobotX/rslidar_sdk.git
version: supermegabot
hardware/versavis:
hardware/smb_imu_interface:
type: git
url: https://github.com/ethz-asl/versavis.git
version: feature/noetic_support
hardware/flir_camera_driver:
type: git
url: https://github.com/ethz-asl/flir_camera_driver.git
version: master
url: https://github.com/ETHZ-RobotX/smb_imu_interface.git
version: main
hardware/realsense:
type: git
url: https://github.com/IntelRealSense/realsense-ros.git
Expand Down

0 comments on commit 2504902

Please sign in to comment.