-
Notifications
You must be signed in to change notification settings - Fork 13.4k
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
Posix iris stereo fix #16993
Posix iris stereo fix #16993
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the contribution,
-
Can you check the conflicts and rebase this PR?
Seems like the base branch is outdated therefore the diff includes a lot more than you intent to merge -
Also, adding
iris_stereo_camera
as a make target or adding an airframe config is not the correct way to handle your use case. Rather, you need to handle the launchfile where the airframe config name and the sdf model names can be defined separately.
I've been using Firmware v1.11.2. So, I made the changes in there, I think all of the additional commits are the ones submitted between v1.11.2 and the current master branch.
I'll rebase as requested.
Having not understood why it isn't the correct way, I know what you're suggesting is an alternative solution that also solves the problem. So, I'll undo the changes I made and fix the launch file. (It might be easier to create a separate PR for this.) |
Argh! Rebasing caused me to solve some merge conflicts that deviated my PR away from its intended purpose; I'm closing this one, I'll open a new one. |
It loads the battery parameters but then overwrites them with hardcoded values and it breaks the ModuleParams parent/child hierarchy. Both is undesired.
iris_stereo_camera wasn't working with the posix. I fixed that problem.
I'm sorry, but would you mind rebasing it again? |
@LorenzMeier I originally modified |
It looks like the main branch is very dynamic, files are changing very quickly. There've been some merge conflicts since I opened the PR. We need to act quickly if we want to merge this in. So, please give me some guidance on how to remove some of the commits out of my PR, and how to solve the new merge conflicts. |
@canberkdurmus Adding the The correct solution for your use case it to use
iris_stereo_camera sdf file in
Please let me know if you have issues using the model this way. I am closing this PR for since it doesn't seem applicable to solve your problem. |
Hi, @Jaeyoung-Lim I am not the right Canberk, he is @canberkgurel. Not a problem of course 😄 |
@Jaeyoung-Lim You tagged the wrong person. In the original post, I've clearly stated that |
@canberkdurmus Oh, very sorry about that.
@canberkgurel What I am saying applies also for you just need to leave
as it is and set the sdf path as
or if you want to do it as you are launching by command line
|
So I ran the command But when I run rostopic list, I dont see any topic related to depth image. But when i replace |
Describe problem solved by this pull request
I typically only use the iris model for my PX4-SITL testing, lately I migrated to a new Linux machine and installed a later version of the PX4-Autopilot (following this documentation). I wanted to use the iris-stereo-camera model for an application I'm working on. In the bottom of the documentation I used, there's a short code snippet showing how the Gazebo simulation can be modified to integrate sensors publishing directly to ROS topics; to support this feature, Gazebo is launched with the appropriate ROS wrappers. I realized that the launch file (posix_sitl.launch) that's referred in this code snippet doesn't support the iris-stereo-camera.
This wasn't working:
Describe your solution
I've originally created a post on discuss.px4/ROS to find out what the problem is. I spent a little more time digging it. I found the script printing the error message that I was receiving. I noticed that the
platforms/posix/cmake/sitl_target.cmake
excludes the iris-stereo-camera. I fixed the problem with the modifications I made in this PR. The branch I'm trying to merge works with the posix_sitl.launch file when used as it is stated in the documentation.Describe possible alternatives
posix_sitl.launch
is documented as the plain SITL launch script that needs to be used to run the simulation wrapped in ROS. There's no other alternative to use posix_sitl.launch and iris_stereo_camera as far as I know. However, it's possible to use the iris-stereo-camera with px4.launch. My intention here is to fix the problem in the posix_sitl.launch as it appears to be the preferred method.Test data / coverage
I ran the code snippet I've provided above and confirmed that it was working by monitoring the published topics via
rostopic list
, viewed the images published viarosrun image_view ...
, and ensured that the camera_info topic contained the camera specs modeled in the stereo_camera.sdf file.Additional context