Comments (9)
What do you mean with strange stuff?
One thing to note is that it is relative to your current position. Also see: #684
from mavsdk-python.
Thanks for your reply! After, digging into the log through QGroundControl, I've think I've figured out that drone.offboard.set_position_ned(0, 0, 0, 0) was kinda equivalent to "go back home". Which is not what I wanna do! What I wanna do is:
1/ arm; takeoff the drone and go to a random location (thx to goto_location)
2/ hold for a few second there
3/ move the drone meter after meter according a custom pattern along North, East and Down.
Therefore my questions are:
- is drone.offboard.set_position is done for that? or exists another way to do such thing?
- to initiate the drone.offboard I have to provide initial NED coordinates. To do so, and whithout moving the drone, do I have to do: drone.offboard.set_position_ned(current_north_position_in_NED, current_east_position_in_NED,current_down_position_in_NED). If so, how can I get those info?
- is there a way to make "set the new NED home here"?
Thanks a lot for your answers
from mavsdk-python.
Okay, so I've succeeded into making such a thing BUT i can't provide the speed I want to apply during the move. Attached, you will find a piece of code (to move) and the picture of the trajectory.
# fonction pour bouger relativement au drone selon le nord/sud/est/ouest
async def move_by(drone:System, north:float, east:float, down:float, yaw:float = 0):
"""
ATTENTION, FONCTION A EFFET DIRECT SUR LE DRONE; NE PAS UTILISER LA FONCTION SANS REFLECHIR AUX CONSEQUENCES
"""
global position_du_drone_souhaitee
print("yo")
ajout = [north, east, down]
if await drone.offboard.is_active():
position_du_drone_souhaitee = [position_du_drone_souhaitee[i] + ajout[i] for i in range(len(position_du_drone_souhaitee))]
next_point = PositionNedYaw(*position_du_drone_souhaitee, yaw)
speed_ned = VelocityNedYaw(1, 0, 0, 60)
accel_ned = AccelerationNed(1, 0, 0)
await drone.offboard.set_position_velocity_ned(next_point, speed_ned)
# await drone.offboard.set_position_ned(next_point)
else:
print("offboard non activated")
The color gives the speed in m/s.
from mavsdk-python.
Right, that's always a question: how to set the speed, and unfortunately I don't have a good answer because the normal parameters are not applied in offboard control.
One way is to use velocity control but that requires to close the loop on the outside which is not always what you want to do.
@Jaeyoung-Lim do you know of a way to limit the speed? Could we add a param?
from mavsdk-python.
Mmmh; okay. But if we can't set the speed what is the aim of the function drone.offboard.set_position_velocity_ned ? I thought that it was a way to provide a target point and the speed to go with to.
from mavsdk-python.
The speed is a feed forward speed control, not the max speed. I would find max speed more intuitive as well but that's what PX4 exposes, unfortunately.
from mavsdk-python.
Okay, by the way, I see this "feed forward speed control" everywhere. But what does it exactly mean? Physically at least? thanks
from mavsdk-python.
It's the feed foward of the controller. https://en.wikipedia.org/wiki/Feed_forward_(control) I think it's unfortunate because it's not beginner friendly, but it does allow for more aggressive flying.
from mavsdk-python.
Thanks for your reply! After, digging into the log through QGroundControl, I've think I've figured out that drone.offboard.set_position_ned(0, 0, 0, 0) was kinda equivalent to "go back home". Which is not what I wanna do! What I wanna do is: 1/ arm; takeoff the drone and go to a random location (thx to goto_location) 2/ hold for a few second there 3/ move the drone meter after meter according a custom pattern along North, East and Down. Therefore my questions are:
* is drone.offboard.set_position is done for that? or exists another way to do such thing? * to initiate the drone.offboard I have to provide initial NED coordinates. To do so, and whithout moving the drone, do I have to do: drone.offboard.set_position_ned(current_north_position_in_NED, current_east_position_in_NED,current_down_position_in_NED). If so, how can I get those info? * is there a way to make "set the new NED home here"? Thanks a lot for your answers
Why don't you try offboard from csv example?
I've been working with off-board mode from quite a while now and it seems to work fine for me with GPS and GPS-denied environments to with minimal changes.
from mavsdk-python.
Related Issues (20)
- drone.info.get_version() INFORMATION_NOT_RECEIVED_YET HOT 8
- FILE_DOES_NOT_EXIST on calling the drone.ftp.list_directory() to fetch internal directories file HOT 13
- Unable to upload rally_items through MAVSDK HOT 10
- Error when uploading mission: INVALID_PARAM1 HOT 6
- `aiogrpc` RuntimeError HOT 35
- Running missions in ArduPilot HOT 12
- How to use mavsdk-python to takeoff without GPS HOT 4
- How do I use `telemetry_server` correctly? HOT 4
- Analyzing log files or Distance travelled data from mavsdk python HOT 5
- Geofence crashes with the only information being "Error" HOT 1
- connectivity HOT 5
- Support custom COMMAND_LONG listeners and be able to ACK HOT 6
- can't connect to QGC via UDP connection using mavsdk HOT 3
- Get HEARTBEAT message from MAVSDK HOT 5
- How to use Mavsdk to call Led_control to control LED lights? HOT 2
- MAVSDK server not connecting with JMAVSIM - Windows WSL HOT 2
- How can I set flight mode - manual mode? HOT 1
- Altitude error while doing swarming using mavsdk-python ? HOT 2
- RuntimeError: Task pending got Future attached to a different loop during Offboard control with FastAPI and MAVSDK HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mavsdk-python.