Closed kois86 closed 2 years ago
Thanks for the issue. I will have to try to reproduce it sometime.
For precision landing I would suggest to use offboard rather than manual control though.
Thanks for the issue. I will have to try to reproduce it sometime.
For precision landing I would suggest to use offboard rather than manual control though.
Understood but the precision landing system I have been developed require precision pitch yaw roll and throttle control.
In offboard example, it defines the UAV's movement by its rotation angle and throttle value as well as duration which I find quite hard to use in my main program in order to position the UAV at the coordinate that I wanted to.
Meanwhile, I try to reinstall and test different PX4 FW for troubleshooting.
Thank you.
p/s: In SiTL mode, this example and my main program works well
require precision pitch yaw roll and throttle control.
You can do that with offboard attitude control: https://mavsdk.mavlink.io/main/en/cpp/api_reference/classmavsdk_1_1_offboard.html#classmavsdk_1_1_offboard_1af6f0d3991bb6b62f39d862c46fcffb34
require precision pitch yaw roll and throttle control.
You can do that with offboard attitude control: https://mavsdk.mavlink.io/main/en/cpp/api_reference/classmavsdk_1_1_offboard.html#classmavsdk_1_1_offboard_1af6f0d3991bb6b62f39d862c46fcffb34
i try to use offboard attitude command but doesn't work perfectly as my manual_control. the reason being, it requires duration after the command which makes the movement jerky and not smooth, unlike manual_control that can repeat its command without duration, thus making the UAV movement seamless and steady carrying its inertia from previous command.
I not sure how to explain but I hope u understand
it requires duration after the command
You should be able to set an offboard command as fast as you want.
Hi Julian,
have u tested the manual control? when i go through the documentation i found this
async set_manual_control_input(x, y, z, r) Set manual control input
The manual control input needs to be sent at a rate high enough to prevent triggering of RC loss, a good minimum rate is 10 Hz.
Which I think is the cause of the API not running. is there a way to override or to adjust the 10hz fast rate input requirement?
Well you have to call the function, if you want to call it at 20Hz that's on your end, right?
Programming wise, i have run the examples given in the github repository, refer to https://github.com/mavlink/MAVSDK-Python/blob/main/examples/manual_control.py.
when running the program in simulation together with QGroundControl as monitoring, the drone will enter position mode and then it will do nothing. but will move accordingly when I run it without.
Thus, when I want to test onto the actual drone, it will not move similar to the simulation - it just only enter position mode
anyhow, have u tried the example with QGC?
thank you very much
but will move accordingly when I run it without.
You mean the mavsdk example works if QGC is not connected, but it fails if QGC is connected?
but will move accordingly when I run it without.
You mean the mavsdk example works if QGC is not connected, but it fails if QGC is connected?
Yes, exactly. with QGC connected, the drone doesnt move accordingly and just descend until it lands
Do you have the virtual joysticks enabled in QGC? Could it be interfering somehow?
Do you have the virtual joysticks enabled in QGC? Could it be interfering somehow?
I have disabled the virtual joystick, but unfortunately to a same result.
Any idea why i cant use the example with QGC connected?
Feels like some kind of interference at the mavlink level :thinking:. Would be nice to understand why, if you can have a closer look :+1:
I did try to troubleshoot and have a closer look but can only think this requirement (The manual control input needs to be sent at a rate high enough to prevent triggering of RC loss, a good minimum rate is 10 Hz) that prevent the example to run.
the reason I prefer the manual control over offboard attitude is that it gives natural smooth movement of the drone without the need to put in await asyncio.sleep after the instruction to make it move, which lead to two problems that I encountered when using offboard attitude:
However, currently I'm still using offboard attitude for my actual drone, while still looking for a way to use manual control. do feedback if you have any idea, or example of manual control being used in the actual drone which requires QGC in the loop.
thank you
@kois86 which PX4 version are you using? And what is your param https://docs.px4.io/master/en/advanced_config/parameter_reference.html#COM_RC_IN_MODE?
Closing, as there was no more follow up.
is there any update on the manual_control to work?
@kennethakiti1 please create a new issue with whatever does not work as it should for you please.
Hi,
I am at loss in troubleshooting the issue for my program. FYI, my program performs precision landing on a moving platform and for that, I use manual_control.py example.
I use HiTL setup whereby my Raspi, containing the program above, is connected to pixhawk FC, and this pixhawk is connected to the PC running Gazebo simulator.
FYI, what weird is, when i run my program, only drone.manual_control.set_manual_control_input() not running. Other instructions within the example, such as takeoff and land, and even drone.manual_control.start_position_control(), having an effect on the gazebo simulator.
Other examples such as offboard_attitude.py, telemetry_flight.py, all run well, only that instruction not working.
Anyone has the same issue or can solve my problem. Thank you in advance and please help as I really have no idea how to move forward on this.
Thank you