larics / icuas22_competition

The main repository for the ICUAS 2022 UAV competition.
17 stars 4 forks source link

ICUAS 2022 UAV Competition

The main repository for the ICUAS 2022 UAV competition.

ICUAS 2022 Competition build status Melodic Noetic

Install

You can either manually install the UAV software stack by following uav_ros_simulation instruction or simply use Docker insted.

To install Docker on your system execute the following command:

curl https://raw.githubusercontent.com/larics/uav_ros_simulation/main/installation/dependencies/docker.sh | bash

Troubleshooting

Checkout CHANGELOG.md for any new changes added to this project.

Feel free to use Discussions tab to exchange ideas and ask questions.

Consider opening an Issue if you have troubles with the simulation setup.

NOTE - If the challenge does not setup correctly it is (probably) not your fault! Components are subject to some changes during the competition so most problems should be solved by updating packages. Try following the troubleshooting recommendation. If the problem persists please post an issue.

Update this package

In case there are new changes to the challenge repository:

git pull origin main --rebase
catkin build

Update Docker images

In case the Docker container simulation is not working correctly (e.g. an update happened):

git pull lmark1/uav_ros_simulation:[[DISTRO]]

In case the simulation inside the Docker container is (still) not working correctly:

./docker_build.sh --build-args "--no-cache --pull" --[[DISTRO]]

Updating native installation

If you're building all the packages natively, navigate to the uav_ros_simulation folder and do the following:

git pull origin main
./installation/install.sh

# Navigate to catkin workspace (default is uav_ws)
catkin build

Update all the, manually installed, required dependencies as follows:

git pull origin main
catkin build

Required dependencies are as follows:

Build

You can either manually build all the packages on your system using the catkin build command.

Alternatively, to build the ICUAS2022 Competition solution image please execute the following command:

./docker_build.sh

Additional arguments:

Startup

To automatically start and setup the challenge navigate to startup/challenge and run:

./start.sh

This should automatically setup and start the challenge, as well as run your code.

There are three worlds available for the challenge. If you want to start the challenge with different world you can run:

./start.sh N

where N can be 1, 2 or 3 depending on the world you want to load.

NOTE If you are unfamiliar with the Docker or Tmux commands please check out this quick-start guide.

NOTE If you choose to run the challenge inside the docker environment, please run the container first using:

./docker_run.sh

Additional arguments:

NOTE Keep in mind this will start a new container so any changes you make inside that container will be lost if you remove the container. The idea of the container is to easily integrate your code with the challenge flight stack. To do so, please add your code diretcly to this ROS package since it is copied to the container. Furthermore, feel free to edit Dockerfile.focal or Dockerfile.bionic files to get all the resources and build your solution.

Simulation

simulation.png
UAV simulation template startup. Tmux session is running on the left side, with Gazebo client positioned on the right.

Controlling the UAV

For your reference, we have set up trajectory planning using TOPP-RA, which you can use by publishing to two topics:

To control the UAV directly, and to publish the trajectory that you generated via your solution, you need to use the following topic:

Current position reference (last one sent to the position controller of the UAV) can be obtained via carrot/pose topic, while current pose of the UAV (in simulation) is available at mavros/global_position/local topic.

Configuration

Configuration files are placed in the startup/challenge/custom_config folder.

Challenge

More details on the challenge can be found in the competition rulebook http://www.uasconferences.com/2022_icuas/uav-competition-rulebook-and-faq/ 0 challenge.png
UAV setup for the ICUAS 2022 challenge.

NOTE If you detach the ball by setting the UAV magnet gain to 0 and want to spawn another ball using the spawn_ball service, you will have to reset the gain to 1.0 in order for the UAV magnet to become active again.