LibrePilot Forum

Users => Vehicles - Ground => Topic started by: karla on January 15, 2017, 07:32:23 am

Title: Sailboat RC Laser set up for waypoints with Revo and Libre 16.09
Post by: karla on January 15, 2017, 07:32:23 am
Hello!

I want to explore the current Groundpath module to see how far it will go and need some advice on the configuration.

The sailboat do not have an engine other than the wind working on the sail. It will only use 'help' on the rudder/stearing/yaw. The rest is handled manually by the pilot. You cannot sail straight against the wind but need to tack to get wherever you want etc. In a way this is too simple a configuration for the Vehicle set up in the GCS :)
The pilot control the speed via a strong servo who controls the angel the Sail has to the wind. This is like a throttle but much more complex logic so better leave it to the Pilot for now.

Since there is no readymade setup for this case (using only yaw) I try choose the closest and simplest one and modify it, and come up with a Ground Turnable Car.
The problem is to make the FlightController think its in a standard car and bring it to waypoints but not to interfere with the real 'throttle' of the boat. It should be able to be Armed etc even though this is not really used. So I understand how to add the motor and assign it away from the FC to an empty output slot on the Revo. However, I need to add the Servo that really do control the sail. Thats my problem.

Under the Vehicle type Fixed wing you have the easy controls for i at bottom right hand corner. But in the Ground Car case you do not. Then you need to enter into the Custom Vehicle window. I can set up the servo there successfully but then the system will no longer recognize this as a Ground Car but a custom thing. In such case I cannot be sure it will use the Ground logics in Grounpath...

So anyway to use the system settings and do this manually?
Any other suggestions How to do it? any ides welcome

Tanks a lot!
Title: Re: Sailboat RC Laser set up for waypoints with Revo and Libre 16.09
Post by: paulj on January 15, 2017, 07:54:55 am
This is an interesting idea. In fact, I don't think arming is necessary as there isn't a motor as such. I think you need to have two "flight" modes - manual, where the rudder input is passed directly to the servo from the pilot, and yaw stabilised where the control input is processed by the flight controller. In this case, when you are sailing and the is a gust which changes the direction of the yacht, the flight controller can apply a correction to return to the original heading.I think it makes most sense to have the input controlling using rate mode. The rate of change of yaw is proportional to the stick position.
Have you tried to set up the flight controller without using the wizard?
I am not around much for the next few days, so don't take my lack of response as a lack of interest! I will have a look in more detail at the software to see how this could be achieved with the current setup.
Title: Re: Sailboat RC Laser set up for waypoints with Revo and Libre 16.09
Post by: karla on January 15, 2017, 08:09:38 am
You are absolutely right.

The FC do a truley beautiful job keeping the course when wind and water work in the boat.
After all it was the navy and the sea that first developed the PID controller!
But I want to take this to the next level.

Yes I have 5 flight modes
1. manual rudder
2. axislock (PIDs tuned last summer, perfect)
3. path finder (to be explored)
4. rtb (to be explored)

However, I don't agree with you arming is not necessary, but I dont know the logics of the ground path model works.
So to rule out everything that is not the same as a ground car I like to set it as if ...

Hope you all see my point here?
Title: Re: Sailboat RC Laser set up for waypoints with Revo and Libre 16.09
Post by: paulj on January 15, 2017, 08:33:51 am
Arming is specifically for safety management with motors. I am not sure I understand why you think arming is necessary? If it is to stop selection of other modes than manual unless "armed", I would probably just make this logic on a switch (or switch combination) on my transmitter disabling or enabling the flight mode selection as appropriate. Of course if this is the intended purpose, and you don't have a transmitter with this possibility, then arming could be one way to achieve this goal.

For path finder and rtb, we would need to write specific modes for sailing, where there is no chance to sail in any direction regardless of wind direction. This also implies that we need to be able to measure the wind direction and calculate the course to give best VMG towards the goal, considering leeway as well as possible currents. For autonomous modes, we would also need to control the sail. This could be a simple relationship between wind direction and sail servo setting, or perhaps something more complex, if we could somehow measure sail efficiency vs setting. Force on the sheet perhaps? I need to think about that :). Finally with autonomous modes, I think it necessary to understand the area in which the model can sail, since there are probably more obstructions to consider, and the model can't always backtrack (due to wind direction).
Title: Re: Sailboat RC Laser set up for waypoints with Revo and Libre 16.09
Post by: paulj on January 15, 2017, 08:41:53 am
One other key consideration: avoidance of other vessels. The risks are higher in 2D than 3D. This would mean these modes could only be used with visual oversight so the pilot could take control if necessary.
Title: Re: Sailboat RC Laser set up for waypoints with Revo and Libre 16.09
Post by: karla on January 15, 2017, 09:30:01 am
I really like the way you get started on this :)
Seems you are a developer?
Lovely!
Will be great discuss development of this.
But now my question is just rudimentary.


I just want keep this super simple for now and add nothing to what is available today and explore what 16.09 can do.
However there is a very cool potential development path to be followed to sail with LibrePilot FC support :)
New sensors etc, this can eventually be scaled to real size sailboats. Thats for the future.

. I do know how to make the set-up so its armed already. This is of no particular interest of importance to me other than its just one of the factors the current code assumes the state to be. And I would like to cover them all.

. I have been sailing since I was 8 years old so I know the forces at work. But know really nothing how LP does the waypoint thing.

I just need help set up the servo controlling the sail.
Basically I want one more servo in the Output tab for the servo from what I have now.
see pic.
Not sure I can explain this clearly
Title: Re: Sailboat RC Laser set up for waypoints with Revo and Libre 16.09
Post by: paulj on January 15, 2017, 09:39:55 am
 ??? Ahhh - now I understand the arming "problem". You are right - at the moment, I don't think there is anyway to configure "Always armed". That could be added if there are no motors, or if the vehicle type is "yacht" (which would need future incorporation). Because of the danger of always armed for other vehicle types, this is not currently an available option, so yes, you will need to arm currently.
For servo connection, could you not assign the output as an accessory channel, and assign the input channel to the same accessory? I don't have a vehicle to hand to connect up and enable the relevant fields on the page you posted, and I should already be driving to Germany :), so I can't do this now. I will have a look when I am back next weekend.
Title: Re: Sailboat RC Laser set up for waypoints with Revo and Libre 16.09
Post by: karla on January 15, 2017, 09:45:50 am
For servo connection, could you not assign the output as an accessory channel, and assign the input channel to the same accessory?

Yes, but How to do that?
That is my question - anyone...

Drive carefully!
Title: Re: Sailboat RC Laser set up for waypoints with Revo and Libre 16.09
Post by: paulj on January 15, 2017, 09:47:11 am
This is what I normally sail!  8) It belongs to the Rona Sailing Project, and we take youngsters for sail training each year. I also have an International One Metre yacht.
(https://c1.staticflickr.com/1/497/20339199745_9e8c698a7c_c.jpg)
Title: Re: Sailboat RC Laser set up for waypoints with Revo and Libre 16.09
Post by: paulj on January 15, 2017, 09:50:59 am
For servo connection, could you not assign the output as an accessory channel, and assign the input channel to the same accessory?

Yes, but How to do that?
That is my question - anyone...

Drive carefully!

On the configuration Tab, under input, for Accessory0, assign the input channel for the sail control. For Type, you probably want to assign "servo" (have a look at the options - as I said, I need to connect a controller to get the field options visible). Then in the output screen, you can assign the the relevant output channel to Accessory0.

Give it a try, and see how you get on!

I'm really going now :)
Title: Re: Sailboat RC Laser set up for waypoints with Revo and Libre 16.09
Post by: karla on January 15, 2017, 10:07:52 am
Please depart immediately,
and feel assured we will make something work for your bit yacht soon!
Best
Title: Re: Sailboat RC Laser set up for waypoints with Revo and Libre 16.09
Post by: TheOtherCliff on January 15, 2017, 03:18:46 pm
There is an "always armed" setting.  As long as you have manual rudder on your switch I would think it would be OK to use always armed?
Title: Re: Sailboat RC Laser set up for waypoints with Revo and Libre 16.09
Post by: karla on January 16, 2017, 12:28:09 am
Yes it can work. But lets forget about the arming for now, its besides the main point.
How to add a servo in the Output screen without changing the Vehicle type?
Title: Re: Sailboat RC Laser set up for waypoints with Revo and Libre 16.09
Post by: TheOtherCliff on January 16, 2017, 04:51:05 am
Do you just want a pass through from input to output?
Title: Re: Sailboat RC Laser set up for waypoints with Revo and Libre 16.09
Post by: karla on January 16, 2017, 08:21:49 am
Yes.
I am using Roll on the transmitter channel 2 for Radio control and want it to control the servo I have hooked up on port 1 on the Revo output pins. No interference from the FC what so over.
Title: Re: Sailboat RC Laser set up for waypoints with Revo and Libre 16.09
Post by: DocHardinger on January 16, 2017, 10:46:39 am
Maybe a stupid idea...why not using your pwm output directly from your receiver?
Title: Re: Sailboat RC Laser set up for waypoints with Revo and Libre 16.09
Post by: karla on January 16, 2017, 02:35:40 pm
interesting, please explain a bit what you mean  :)
Title: Re: Sailboat RC Laser set up for waypoints with Revo and Libre 16.09
Post by: paulj on January 16, 2017, 03:04:36 pm
interesting, please explain a bit what you mean  :)

This is what I understand his comment to mean: If you plug the servo channel input for the rudder into the flight controller, you can plug the sail servo directly into the receiver - there is no need to pass the signal through the FC if you don't want to have any management of the sail control at the moment. The method I proposed with the accessory0 should also achieve this - what happened when you tried this?
Title: Re: Sailboat RC Laser set up for waypoints with Revo and Libre 16.09
Post by: DocHardinger on January 16, 2017, 04:40:27 pm
Yes thats exactly what i mean...just doing it the oldschool way ;-)
Title: Re: Sailboat RC Laser set up for waypoints with Revo and Libre 16.09
Post by: Mateusz on January 16, 2017, 05:16:31 pm
Should be more or less similar to adding buzzer http://librepilot.atlassian.net/wiki/plugins/servlet/mobile?contentId=6324237#content/view/6324237 if you don't use sbus/ppm receiver and have pwm output on it you can connect servo directly to receiver.
Title: Re: Sailboat RC Laser set up for waypoints with Revo and Libre 16.09
Post by: karla on January 17, 2017, 04:56:57 am
Maybe a stupid idea...why not using your pwm output directly from your receiver?

Now I understand what you mean. I dont have a separate receiver, I use OPlink so this is not an option.

Quote
Should be more or less similar to adding buzzer http://librepilot.atlassian.net/wiki/plugins/servlet/mobile?contentId=6324237#content/view/6324237 if you don't use sbus/ppm receiver and have pwm output on it you can connect servo directly to receiver.

This works because the Vehicle type is not a ground vehicle, there is no nice way to assign the output if you look at the Car type.

Thats what I have been trying to explain.
It should be possible to do ut directly in the system settings... but How?
Title: Re: Sailboat RC Laser set up for waypoints with Revo and Libre 16.09
Post by: f5soh on January 17, 2017, 08:07:24 am
Go to the System tab > UAVOBrowser
Search for MixerSettings, assuming you want the output 7 linked with Accessory0 you need this:

(https://forum.librepilot.org/index.php?action=dlattach;topic=2923.0;attach=5056)

Mixer7Type set to the Accessory you want and Curve1 set to 127
Save in UAVOBrowser.
If you save from the Vehicle tab you lost the Accessory/linking settings.

and next set the Output settings:

(https://forum.librepilot.org/index.php?action=dlattach;topic=2923.0;attach=5054)
Title: Re: Sailboat RC Laser set up for waypoints with Revo and Libre 16.09
Post by: karla on January 19, 2017, 02:07:51 am
Yes!
Finally got a chance to test it.
It works fine so the configuration is now set up the way I wanted.
Thanks a lot!

Now will do calibrations etc to get INS13 to work and then some test :)
Title: Re: Sailboat RC Laser set up for waypoints with Revo and Libre 16.09
Post by: karla on March 04, 2017, 05:25:15 pm
Some steps of improvement here.
Its still ice on my lake so I can not sail yet,
however I have set up the boat just like this car and yesterday I had a chance to test the car performance for some autonomous tasks like Return to base, Position hold and Waypoints.

https://www.youtube.com/watch?v=nFGUKZad7mA

It worked well over my expectations and clearly better than using Openpilot (last version 15.05.02, just going in circles).

https://www.youtube.com/watch?v=I6Ue79ss9Lo

Really encouraging results for putting the same configuration on to the sailboat.

For the car project, now I need some Lidars and functions to avoid obstacles :)
Title: Re: Sailboat RC Laser set up for waypoints with Revo and Libre 16.09
Post by: karla on April 17, 2017, 12:46:31 am
Success!

The ice has melted long ago at my lake and I have been there a couple of times this spring but not until last weekend did I get all the autonomous functions to work, Failsafe RTB, Position hold, Pathfinder with Waypoints.

https://www.youtube.com/watch?v=VD0KJYK0UJ4

We join the boat when just about to reach Waypoint 2. It turned out I accidentally put the line between WP 1 and WP 2 almost straight into the wind. However, it started to do random tacking and still made it against the wind to the WP.

The last problem that fixed it all was changing the altitude at each waypoint from a default i think of 15m to 0m. I also made the waypoints location fixed and not relative to home. Works like a clock.

I will post details in the showroom later.
Attached is the UAV file.

Thank you all who helped!
/Karl
Title: Re: Sailboat RC Laser set up for waypoints with Revo and Libre 16.09
Post by: TheOtherCliff on April 17, 2017, 05:00:22 am
Video is private.  Also I don't have a youtube account.  If you set it to have a password and post that here, it should do what you need.  :)
Title: Re: Sailboat RC Laser set up for waypoints with Revo and Libre 16.09
Post by: karla on April 17, 2017, 05:33:01 am
Oh sorry, I thought I saved it as Unlisted, not private.
Now it should work.
Thanks