Skip to content
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

Adding Gazebo to multi simulation script #11502

Closed
wants to merge 1 commit into from

Conversation

shrit
Copy link

@shrit shrit commented Feb 19, 2019

This will allow users to start several quadcopter at the
same time within gazebo. Users can have up to N quadcopter.
The actual script only start a number of px4 instances defined by the users.

This will allow users to start several quadcopter at the
same time within gazebo. Users can have up to N quadcopter.
@bkueng
Copy link
Member

bkueng commented Feb 20, 2019

Hi
How is this supposed to work? You are running gazebo but with only one model.

@shrit
Copy link
Author

shrit commented Feb 20, 2019

Hello,

In fact you need to define several quadcopter in the world files, and start the same number of the instance in px4. However, since there is no world that have several quadcopter, I used the default iris world that contain only one quadcopter.
If you have any idea how to make better please let me know.

@bkueng
Copy link
Member

bkueng commented Feb 20, 2019

Looking at how it's done with ROS multi-vehicle setup: it instantiates multiple models with different locations: https://github.com/PX4/Firmware/blob/master/launch/multi_uav_mavros_sitl.launch#L28.
The command to generate the model is then called here: https://github.com/PX4/Firmware/blob/master/launch/single_vehicle_spawn.launch#L23.
Which then however uses a ROS-specific script: https://github.com/ros-simulation/gazebo_ros_pkgs/blob/kinetic-devel/gazebo_ros/scripts/spawn_model, so we cannot do that.

However we can still use xacro to generate the different models, and then create a modified world file to include all models, and launch that. But maybe you find a better way?

Also, can you create a separate script for that, to avoid breaking the already-working jMAVSim multi setup (or add an argument to support both)?

@shrit
Copy link
Author

shrit commented Feb 20, 2019

Hi,
I understand perfectly you answer.
I know that you use ROS to simulate several vehicles in gazebo. This will oblige users to install ROS and use MAVROS to control the quadcopters.
Since my objective is to do simulation for several vehicles and want to control the quadcopters using only the DronecodeSDK, I decided to not use ROS in my project. So I found a way to start gazebo simulation without using ROS.

  1. I modified the above script to start several instance of px4 and start gazebo at the same time, I understand that it may break the jMAVSim for this reason, I totally agree that we need to separate it into two different script.
  2. I had to copy the models and create different one with different name manually, following the same principle that is used in ROS (I know that my method is not logical and not professional). I understand that I need to create a script to generate these models and the world. However, I had to do it manually just to verify that it is bug free, but I had a small bug with the IRIS model, bug details can be viewed in this pull request:
    Three quad copter PX4-SITL_gazebo-classic#276
    So, this is the actual case, what do you think?

@bkueng
Copy link
Member

bkueng commented Feb 20, 2019

Ok that link provides the necessary context, thanks.

However, I had to do it manually just to verify that it is bug free, but I had a small bug with the IRIS model, bug details can be viewed in this pull request:

It would have helped if you provided that information in the first place.
Since we all seem to agree, I expect you to continue and write the necessary scripts to create the models? Is there anything unclear?

@shrit
Copy link
Author

shrit commented Feb 20, 2019

Ok, I understand, concerning the bug it is well described in the pull request, the idea is that it is not possible to add a new plugins to the original IRIS model files, only the copy created by me can have a new plugins, that is the reason in the first place I have mentioned the pull request. Also it is not clear why only the iris model is different from the other models in the way it is constructed using xacro files

@stale
Copy link

stale bot commented Jul 10, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale
Copy link

stale bot commented Jul 24, 2019

Closing as stale.

@stale stale bot closed this Jul 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants