-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
Gazebo HIL #6631
Comments
@L4ncelot this is ongoing with mavlink/mavros#684. Then, we just need HIL interface working, which |
@TSC21, well I've figured it out a long time ago. I've basically connected the navio2 board with my computer through ethernet and ran the same ROS instance on both devices. Then I just edited the UDP link in gazebo model of iris copter to my navio2 IP address and on the navio2 board ran other components we needed to test alongside SITL simulation to be able to control copter in gazebo. It's not true HIL, because of the running simulation on the board, but it gave us the clue which components of our code could be run on the board and which couldn't. Or at least I think I did it this way, can't remember, because we're using something else right now. |
Actually it's not but if it fit your needs, good. Still, the HIL<->ROS interface is already possible through the above plugin. Right now we just need proper Gazebo support. |
Do you remember which parameter you changed in the iris.sdf? I'm trying to do the same, running the roslaunch mavros px4.launch on my RPi 3b+. |
@iftahnaf is your ROS networking working properly? I don't have my work computer with me right now, but there are some variables for the mavlink_interface gazebo plugin you can play with found in the model. |
Thanks for the answer, Ill look for that. |
It depends on your configuration... the fcu_link should be connected to the autopilot binary. So if you're running autopilot's binary on the PI, set the IP to the PI_address. Look at the px4 documentation explaining all the variables etc. It will help you a lot in understanding the configuration. You need to check the configuration yourself. I'm using the system differently now, so I don't have the default values in my head anymore. |
The autopilot's binary is on the PC and I set the fcu_link to it. |
Hi,
I've been using px4 firmware for some time with ROS and Gazebo simulator in SIL configuration.
Now what I would like to do is to test my algorithms in HIL configuration. The idea is to take data from simulated sensors in Gazebo and send them to my px4 which would send flying commands back to Gazebo.
We're using navio2 board with raspberry PI. I was thinking about connecting GCS, in which the simulation runs, with my navio2 board through USB. Then modify gazebo_mavlink_interface plugin from sitl_gazebo package to send messages through serial port instead of UDP. And then somehow modify px4 firmware on board to accept those messages.
Or is there another way? I saw someone doing HIL with jMAVSim but I have no idea how to make this work with Gazebo.
Thank you for any advice.
The text was updated successfully, but these errors were encountered: