-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running Multiple Containers #39
Comments
For the first question, I don't think anything prevents you from running a multi-vehicle headless simulation with some changes to this image. I haven't looked into it though, it would require a couple changes. For the second question, the ports are defined here: https://github.com/JonasVautherin/px4-gazebo-headless/blob/master/edit_rcS.bash#L59C35-L59C58. So you could probably change |
Thanks for the prompt response! I will look into modifying this image/ dockerfile to support multi-vehicle simulation. I think this is a more elegant solution over running multiple containers, with each running a simulator. Perhaps I will open up a pull request if I arrive to an elegant solution... Regarding the |
Hello again! Thought I'd reopen this issue instead of making a new one so the discussion stays on one thread... Below are the changes I have made in my attempt to get the multi-vehicle simulation working in a docker container. I used this repo as a baseline and made changes to a couple of the scripts. entrypoint.shChanging the + ./Tools/simulation/gazebo-classic/sitl_multiple_run.sh -s "${vehicle}:3" -w "${world}"
- HEADLESS=1 make px4_sitl gazebo_${vehicle}__${world} sitl_multiple_run.shAdd headless option to the px4 referenced binaries to ensure it uses the headless mode instead. + HEADLESS=1 $build_path/bin/px4 -i $n -d "$build_path/etc" >out.log 2>err.log &
- $build_path/bin/px4 -i $n -d "$build_path/etc" >out.log 2>err.log & Issue with REST RequestWhen I run the below console command, being sure to map the other UDP ports which will be used for other vehicles (following the documentation), I get part of the way there. oliver@ubuntu:~/<DIR>$ docker run --name sitl -p 14541:14541 -p 14542:14542 --rm -it px4-sitl-headless:latest From the screenshot below, you can see that all three vehicles are created in the docker container and the headless mode is in fact working. The two errors are relating to an Audio device (which perhaps is not an issue since audio is then disabled) and then the REST request. The programme then hangs on the I have however tested the connections to the vehicles in the docker containers and it seems to be working which is great however. Any idea on these issues? I suspect if you follow those two changes, you should be able to replicate my issue. Thanks again for your help! |
I think I wouldn't care about the "Audio will be disabled" part. IMO that could be a warning. I don't know about the REST error, but the line just above says "Starting gazebo client". I believe it suggests that it is trying to run the frontend, which you don't want. So somehow something is not running headless with your setup. |
Hello! I am currently exploring running multiple simulators in parallel for some CICD pipeline testing. I have used the Multi-Vehicle-Simulation-With-Gazebo which has been useful in checking that my agents can connect to multiple assets/ vehicles. Note: this helped me find the correct shell script.
My issue with this is that I cannot run the simulation in a headless environment i.e. on a pipeline test. I was thinking about containerising the multi-vehicle simulation. Gut feel is that three individual docker images may actually be the simplest option but I don't know how to map the
UDP:14540
port to other ports as you aren't using the traditional docker-p
command for it (noting that this approach would have three instances of Gazebo running which isn't great either).So my question is two fold:
The text was updated successfully, but these errors were encountered: