-
Notifications
You must be signed in to change notification settings - Fork 1
Software ‐ Installation & Development
Maintaining consistent installation Wiki instructions across all PCs has proven to be a challenge.
Instead of a step-wise installation instruction, we provide installation scripts that define the required dependencies, located in the box_configuration folder.
Location: box_configuration/general/general_install.sh
This script installs general helper tools that are useful across all machines:
- Installs:
vim,tmux - Configures
vimwith a color scheme - Adds IP addresses to
/etc/hosts
Location: box_configuration/jetson/jetson_configure.sh
This script contains more detailed information on which packages were required for the specific PC.
We lay out the general workflow here to get started with the installation.
Clone the repository into the ~/git folder:
cd ~/git
git clone --recurse-submodules [email protected]:leggedrobotics/grand_tour_box.gitTip: If you are not doing development, you can speed up cloning with:
--shallow-submodules --depth 1 --branch mainWe recommend creating two workspaces. This separation helps to avoid long build times by isolating heavy packages (like gtsam and opencv) from the main workspace.
mkdir -p ~/opencv_gtsam_ws/src
cd ~/opencv_gtsam_ws
catkin init
catkin config --extend /opt/ros/noetic
catkin config --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo
# Ideally, this workspace is only built once.mkdir -p ~/catkin_ws/src
cd ~/catkin_ws
catkin init
catkin config --extend ~/workspaces/opencv_gtsam_ws/devel
catkin config --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo
# Keep this workspace lightweight for fast rebuilds when switching branches or commits.Simlink only the required packages into the box_ws. There are some ros2 and ros1 packages with conflicting names therefore we cannot simply ln -s ~/git/grand_tour_box ~/box_ws/src and rather instead select individual packages.
The most accurate and up-to-date list of required packages can be found in the Docker container configurations or box_configuration:
box_utils/box_auto/docker/box_kleinkram.Dockerfilebox_utils/box_auto/docker/dependenciesbox_configuration
Review these files to identify necessary dependencies. Each package should include comments explaining its purpose.
There are multiple systemwide apt install packages to get right but while we tried to include most packages as submodules within the grand_tour_box some are pulled in via the default rosdep dependency management. Refer more to the individual installation script.
To verify that everything is set up correctly, run:
boxi build --<host> --clean<host> can be one of:
jetson,opc,nuc,pi
If this command runs successfully, your setup is good to go. It corresponds to the manual workflow:
cd ~/catkin_ws
catkin clean
catkin build launch_<host>For more details about the Boxi CLI, see Boxi – Custom CLI Tool.
To streamline common tasks, we provide alias files for each computer:
-
Example Aliases:
-
l-recording– launches the recording tmux session -
tk– terminates all tmux sessions
-
Aliases are defined in:
box_configuration/<respective_pc>/alias.sh
We've created a lightweight CLI tool called boxi to simplify common workflows.
Installation:
cd ~/git/grand_tour_box/box_utils/boxi
pip3 install -e ./Usage:
boxi <command>
⚠️ Note: The CLI is functional but currently lacks features like tab completion. A future improvement should involve migrating it to a more robust CLI framework.
To keep code clean and consistent, we use pre-commit hooks. These automatically check code (e.g., formatting, whitespace) before each commit.
- Install pre-commit:
pip install pre-commit- Install the hooks:
cd ~/git/grand_tour_box
pre-commit installThis activates the hooks for this repository.
To check all files manually:
pre-commit run --all-files
⚠️ Old Instructions here:
see old instructions
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt install curl # if you haven't already installed curl
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
sudo apt update
sudo apt install ros-noetic-desktop-full python3-catkin-tools
sudo apt install libv4l-dev v4l-utils
# Find camera with:
# v4l2-ctl --list-devices
sudo apt install libpcap-dev
cd ~/catkin_ws/src/grand_tour_box/box_drivers/Livox-SDK2
mkdir build
cd build
cmake .. && make -j
sudo make install
sudo apt install python3-pip
pip3 install pyserial
sudo apt install python3-rosdep sudo rosdep init rosdep update rosdep install -i --as-root pip:false --reinstall --from-paths ~/catkin_ws/src/grand_tour_box/box_drivers/multimaster_fkie
source ~/catkin_ws/devel/setup.bash
cd ~/catkin_ws/src
./grand_tour_box/box_drivers/ethz_piksi_ros/piksi_multi_cpp/install/prepare-jenkins-slave.sh
git clone [email protected]:catkin/catkin_simple.git
git clone [email protected]:ethz-asl/libsbp_catkin.git
git clone [email protected]:ethz-asl/libserialport_catkin.git
cd ~/catkin_ws/src
git clone [email protected]:ethz-asl/cuckoo_time_translator.git
# Install alphasense drivers
# Add the Sevensense PGP key to make this machine trust Sevensense's packages.
curl -Ls http://deb.7sr.ch/pubkey.gpg | sudo gpg --dearmor -o /usr/share/keyrings/deb-7sr-ch-keyring.gpg
# Add the Sevensense APT repository to the list of known sources.
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/deb-7sr-ch-keyring.gpg] http://deb.7sr.ch/alphasense/stable $(lsb_release -cs) main" \
| sudo tee /etc/apt/sources.list.d/sevensense.list
# Install the Alphasense driver.
sudo apt update
sudo apt install alphasense-driver-core alphasense-viewer alphasense-firmware ros-noetic-alphasense-driver-ros ros-noetic-alphasense-driver
# Set the maximum socket buffer size
sudo sysctl -w net.core.rmem_max=11145728
Install the firmware on the microcontroller. (probably already done)
Install Rosserial driver:
sudo apt install ros-noetic-rosserial
sudo apt install ros-noetic-rosserial-arduino
sudo copy box_drivers/adis16475_ros/udev/70-adis16475.rules /etc/udev/rules.d/
sudo service udev reload
sudo service udev restart
mkdir -p ~/opencv_ws/src
source /opt/ros/noetic/setup.bash
cd ~/opencv_ws
catkin init
catkin config --extend /opt/ros/noetic
catkin config --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo
mkdir -p ~/catkin_ws/src
source /opt/ros/noetic/setup.bash
cd ~/catkin_ws
catkin init
catkin config --extend /rsl/home/opencv_ws/devel
catkin config --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo
mkdir -p ~/git
cd ~/git
# Make sure to initialize the submodule
git clone --recurse-submodules [email protected]:leggedrobotics/grand_tour_box.git
cd ~/git/grand_tour_box
ln -s ~/git/grand_tour_box ~/catkin_ws/src
cd ~/catkin_ws
catkin build box_launch
cd ~/catkin_ws/src/grand_tour_box/box_drivers
rosdep install -i --as-root pip:false --reinstall --from-paths multimaster_fkie
catkin build fkie_multimaster
The rviz visualization tool uses the rviz_rqt_wrapper from ANYbotics. Follow the newest release instructions on the bitbucket.
catkin build anymal_rsl_user_interface
git submodule update --remote usb_cam
boxi autocomplete append
# Copy of __expand_tilde_by_ref from bash-completion
__python_argcomplete_expand_tilde_by_ref () {
if [ "${!1:0:1}" = "~" ]; then
if [ "${!1}" != "${!1//\/}" ]; then
eval $1="${!1/%\/*}"/'${!1#*/}';
else
eval $1="${!1}";
fi;
fi
}
# complete -o default -o bashdefault -D -F _python_argcomplete_global
eval "$(register-python-argcomplete boxi)"
source ~/catkin_ws/src/grand_tour_box/box_configuration/alias.sh
⚠️ Old Instructions here:
Presented by RSL.