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

can not simulate with jmavsim or Gazebo #36

Open
OneOfManyyy opened this issue Feb 24, 2021 · 5 comments
Open

can not simulate with jmavsim or Gazebo #36

OneOfManyyy opened this issue Feb 24, 2021 · 5 comments

Comments

@OneOfManyyy
Copy link

Hello, new user here. I tried to simulate the example application with both Jmavsim and Gazebo by running "./mavlink_control -u 127.0.0.1 -a". I see on the QGroundControl that the drone gets armed at the start and disarmed in the end so I think the commands are sent successfully but there is no takeoff, no movement and no landing happens. What am I doing wrong?

@hamishwillee
Copy link
Contributor

No idea. What do you see on the console? https://github.com/mavlink/c_uart_interface_example#execution

This is pretty low level code. What are you ultimately trying to do? If it is "control a drone" then you would be better off looking at the MAVSDK https://mavsdk.mavlink.io/develop/en/index.html

@OneOfManyyy
Copy link
Author

Thanks a lot for your response. I was able to run the code by commenting one of the "if" statements which I suppose was disabling the position to be changed. I am trying to develop algorithms for multiple drone movements but since I am using a microcontroller with FreeRTOS on top, as far as I understood MAVSDK can not be a choice.

@hamishwillee
Copy link
Contributor

as far as I understood MAVSDK can not be a choice.

That is a question to ask on the PX4 slack channel #mavsdk. It may be that FreeRTOS is not a supported platform, but would still work if you built from source.

@xiaoshengjianan
Copy link

commenting one of the "if" statements

Could you reply in detail?

@julianoes
Copy link
Contributor

julianoes commented Dec 26, 2023

It may be that FreeRTOS is not a supported platform, but would still work if you built from source.

MAVSDK requires threads, networking, and serial APIs as provided by Linux/Unix and Windows. There is a chance that it would work on top of NuttX which is mostly POSIX compliant, but likely not FreeRTOS.

So this means you will have to learn how to mess with MAVLink at the lower level, using something like this repo as a starting point. This will likely be difficult to get going, so testing as much as possible on the simulator makes sense.

Now, when it comes to certain commands and why they don't work, one way would be to check what MAVSDK is doing and copy that.

And for anyone to help you here, you have to post more detail, such as console output, PX4 output and PX4 log (always upload to logs.px4.io and share links).

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

No branches or pull requests

4 participants