Closed dcmcshan closed 9 years ago
Do you mean on the Plan, when you right click on the map and select "Go to here" or "Set home location here"?
Right, when vehicle is attached it will actually let you view and edit waypoints on the map. Not sure why.
This is helpful to accomplish because one of the next things is going to be to define "geofence" polygons on that map, and I don't want you to have to connect a vehicle just to test it.
I did this with the latest commit, however only the Home location can be set. "Go to here" options also require UASWaypointManager to be present, which I guess will not be true until UAS is connected indeed.
Can we add UASWaypointManager without it?
Basically we are looking to be able to design a mission with waypoints and boundaries without needing a vehicle attached...
Sent from my iPhone
On Jun 9, 2015, at 4:48 PM, BojanKverh notifications@github.com wrote:
I did this with the latest commit, however only the Home location can be set. "Go to here" options also require UASWaypointManager to be present, which I guess will not be true until UAS is connected indeed.
— Reply to this email directly or view it on GitHub.
I guess it must be possible, I will look into it.
I created a default UASWaypointManager and assigned it a fake UAS object (without that it will crash, because on several places in the code, the manager addresses the UAS without checking whether it is 0 or not). Now 'Go to Here' option sets the selected WP in this default manager, however nothing happens on the map visually. In the UASWaypointManager::goToWaypoint method, there is this code later on: mavlink_msg_mission_item_encode(uas->mavlink->getSystemId(), uas->mavlink->getComponentId(), &message, &mission); uas->sendMessage(message); which I suspect does something, that should reflect on the map, but I am not sure how to do this with our fake UAS so far.
I found this MockLink connection under the Connect menu top right. Maybe that does what we need?
Thanks, I will look into it.
Well, it looks like you can add links that communicate through serial port, UDP or TCP socket, but nothing changes on the map after I connect to one of those. I guess your MockLink must be one of those (user defined) connections, because I don't see it here. EDIT: I found MockLink class in the code, however it does not seem to be related to UAS. MockLink is derived from LinkInterface, which is derived from QThread. While in case of UAS, the inheritance is UAS -> UASInterface -> QObject
With the latest commit, creating waypoints on the map by double-clicking on the location is now possible without vehicle connected. Not sure what happens when a vehicle is then connected on, if everything is still consistent. The key thing here was that an UAS object has to be created first and it will create its UASWaypointManager automatically and not the other way around, unfortunately it took me quite a long time to figure this out.
By default, you can't point and click waypoints on the may without a system connected. Not sure why, but for some upcoming tasks, I'd like to be able to define a mission without anything connected...