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

Add SITL targets for Iris models with depth cameras #21972

Merged
merged 1 commit into from
Aug 22, 2023

Conversation

DanMesh
Copy link
Contributor

@DanMesh DanMesh commented Aug 16, 2023

Solved Problem

Vehicle models with depth cameras were available, but the corresponding targets to run simulations with these models were missing.

Docs for the models were prematurely added in PX4/PX4-user_guide#2264, but had to be hidden since these targets were not available.

Solution

Add SITL targets for Iris with forward- and downward-facing depth cameras.

Changelog Entry

For release notes:

Add SITL targets for Iris models with depth cameras

Alternatives

Remove the depth camera models and not support simulations with depth cameras.

Test coverage

Tested that the simulation could be launched with the new models.

Context

N/A

Copy link
Member

@Jaeyoung-Lim Jaeyoung-Lim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These models were intentionally left out, since they are only used in the context of ROS.

For me it only makes sense to add airframe configs if they require different configurations for the specific sensor set

@DanMesh
Copy link
Contributor Author

DanMesh commented Aug 17, 2023

If they're left out, what would the workflow look like for developers who want to use these and other ROS-related models?

As PX4 becomes more closely linked with ROS, I'd imagine we'll have more people wanting to work with models like these. So it would be beneficial to have suitable simulation targets already available.

I agree that adding the airframe configs is somewhat unnecessary, but is it possible to use a default config with a different model?

@hamishwillee
Copy link
Contributor

, but is it possible to use a default config with a different model?

This is the question.

As a user I want to be able to use a depth camera. I'd actually prefer to be able to add the sensor to my preferred airframe (not iris). But if iris is the only way, then I'd rather that than nothing.

Similarly, it would make my life easier to be able to attach arbitrary video cameras to an iris (say) to test multi camera setups.

@Jaeyoung-Lim
Copy link
Member

@DanMesh The make targets are only used when you build and run SITL through the make command. However, you will never do this when you are launching with ros correct?

In ROS, you normally select the model and airframe separately in the launchfile. For example, if you are trying to use the model for obstacle avoidance, adding a new airframe config makes sense since you need to configure the vehicle for this use case(which is already done for px4vision).

I am not against adding airframe configs when it makes sense. I just don't see why these particular models are useful to have an airframe config.

@DanMesh
Copy link
Contributor Author

DanMesh commented Aug 17, 2023

The make targets are only used when you build and run SITL through the make command. However, you will never do this when you are launching with ros correct?

@Jaeyoung-Lim I use the make command to launch the simulation and don't use ROS for that. Separately, I have a ROS 2 node running which is subscribing to the depth camera images. This is the kind of use case I have in mind when wanting to add the models, where all that is needed for the PX4 sim is

make px4_sitl gazebo-classic_iris_depth_camera

I'm not entirely clear on what you mean by "launching with ROS". If there is a way to launch a PX4 simulation with customisable airframes (using ROS or not), that would fit my use case equally well - and that which @hamishwillee describes.

@Jaeyoung-Lim
Copy link
Member

Jaeyoung-Lim commented Aug 17, 2023

If there is a way to launch a PX4 simulation with customisable airframes (using ROS or not), that would fit my use case equally well 

This is how it is already with the launchfile of ROS1.(Hence the left out airframes, I was not aware anyone would be using ROS2 woth gazebo classic to be honest.)

With ROS2, this is also possible, but you would just need to write a launchfile in this way. The only problem is that px4 does not contain launchfiles for ros2 at the moment. @dagar FYI

@hamishwillee
Copy link
Contributor

@Jaeyoung-Lim OK, so pretend ROS does not exist (as I like to). How do I:

  • Launch a simulation with a depth camera
  • Launch a simulated vehicle with three MAVLink cameras?

@Jaeyoung-Lim
Copy link
Member

Jaeyoung-Lim commented Aug 18, 2023

@hamishwillee It doesn't make sense to launch a depth camera model without ROS, since the depth data is published to ROS. If you luanch the iris depth model without ros, it is identical to the iris

For the camera, you just need to add multiple instances of the camera manager to different camera sensors in gazebo and configure the udp ports for it.

@dagar dagar merged commit 8682217 into PX4:main Aug 22, 2023
80 of 84 checks passed
@hamishwillee
Copy link
Contributor

For the camera, you just need to add multiple instances of the camera manager to different camera sensors in gazebo and configure the udp ports for it.

@Jaeyoung-Lim That's awesome. I don't see any documentation on that? Am I missing something?

@Jaeyoung-Lim
Copy link
Member

@hamishwillee For me this is more of an integration problem.

AFAIK QGC does not supports this usecase, so even if someone creates such a model they would only be able to test it with a proprietery ground station that has multicam support (e.g. Auterion Mission Control)

@DanMesh DanMesh deleted the depth_camera_sitl_targets branch September 1, 2023 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gazebo iris depth camera
4 participants