About the code...
These study materials were originally created for the Infield Robotics Workshop of the VDI-Land.Technik / EurAgEng pre-conference. You can run the exercises directly on your own machine using a local ROS install, inside a VS-devcontainer, or using the VirtualBox VM template provided to course attendants.
Table of Contents
- Requirements
- Installation
- installation in a new catkin workspace
- installation in an existing catkin workspace
- installation using VS Code Devcontainer
- Running the Excercises
Requirements
A system with setup ROS 1 Melodic or higher (tested for Melodic and Noetic)
Installation
Installation in a new catkin workspace
exemplary installation using using catkin_make
source your ROS installation (replace ROS_DISTRO with the ROS_DISTRO you are using (e.g. 'noetic')
source /opt/ros/ROS_DISTRO/setup.bash
create new catkin workspace
mkdir -p ~/infield_robotics_ws/src
switch into that workspace
cd ~/infield_robotics_ws/src
clone the repository with the tasks from above or git clone our alternative hub repository:
(optional) clone the repository with the solutions (see below), or git clone our alternative hub repository:
switch to workspace root folder
cd ~/infield_robotics_ws
build the workspace
catkin_make
Installation in an existing catkin workspace
- source your catkin workspace
- change directory into your workspaces src folder
- clone the reposistories
- build using catkin_make / catkin build
Installation using Devcontainers (VS Code)
NOTE: This option installs the workspace in a Docker container, unlike the above two options which install on your local system.
A Devcontainer configuration is provided in this repo under .devcontainer for use within VS Code. Note:
You will need to have Docker installed on your system in order to build and run the container.
Install the Dev Containers extension for VS Code.
From the remote connection window (found by clicking on the green icon at the bottom left of the VS Code window) choose "Reopen in Container"
From the ~/infield_robotics_ws directory in a bash shell, build using catkin_make / catkin build
The container will open in a pre-made ROS workspace directory with this respository cloned inside a src/ subdirectory, having already run
the setup script for ROS.
See here for more information about using Devcontainers in VS Code.
Running the Exercises
Open a terminal and source your catkin_ws and ROS installation
~/infield_robotics_ws/devel/setup.bash
roslaunch infield_robotics_workshop workshop.launch
open a second terminal and source your catkin_ws and ROS installation
~/infield_robotics_ws/devel/setup.bash
run the tasks contained in the 'scripts' foulder (here the task1.py)
rosrun infield_robotics_workshop task1.py