Real time helm control of rudder - how to implement this #122
Replies: 4 comments 16 replies
-
The autopilot plugin does this. |
Beta Was this translation helpful? Give feedback.
-
It only currently works with Raymarine AP's, but it's pretty easy to add new ones. There are no issues with latency. We always welcome pull requests! |
Beta Was this translation helpful? Give feedback.
-
Some more thoughts.... Looking at the work in progress on autopilot API v2 I think some of the basic data structure needs alterations to account for manual rudder control. For example currently it has:
I would suggest
The I see there isn't yet a dedicated function to set rudder angle so I thought perhaps the |
Beta Was this translation helpful? Give feedback.
-
Back to latency: You can basically route signalk in a myriad of ways. Especially with wifi links. Using non-realtime processes running signalk server can have unexpected delays. 100ms latency degrades manual control of an autopilot, more is worse and worse. So I dont know if you measured the latency or not, but saying latency is not a problem is an oversimplification. This is exactly why autopilots should not get their inertial data or send the rudder commands via signalk or any other type of network: it degrades performance. If you want the best manual control of an autopilot I seriously doubt you want messages going through signalk, nmea or any generic data protocol at all. Unless you can demonstrate guaranteed latency below 100ms (which is not the case on a raspberry pi running signalk-node) latency is an issue. Otherwise it is like trying to steer with lots of slack in the cables and so on. Just because it works on one boat doesnt mean it is fast enough on a high performance boat, or that it will work if people bounce signalk through several systems, or that even a single pi's wifi wont occasionally lag from interference or any number of reasons... For these reasons, reporting latency to the user in manual control should be at least considered by measuring the time from the command to when the rudder feedback detects movement, or the motor controller detects current. |
Beta Was this translation helpful? Give feedback.
-
Hey guys, thanks for all the great work on the signal K project.
I noticed that the Autopilot plugins seem to be lacking the commands needed for controlling the helm position.
Is this something we could add? There are many cases when it is useful to hand steer using the autopilot motor, either wirelessly or from a wired controller. Often larger vessels do not have a mechanical steering wheel at all and the only way to hand steer is via the autopilot system.
There are two basic modes:
Proportional (AKA Follow-on or follow-up) : Send the desired rudder angle in degrees and the autopilot will put the rudder there (ramping up and down motor power to do it smoothly but as quickly as possible). This is used by proper proportional helm controllers (wheel or tiller type) which usually either send NMEA sentences or a simple 0-5v signal.
Non-follow-up : For basic controllers with buttons like [-10] [-1] [+1] [+10] these adjust the rudder angle by a small amount. Usually these are the same buttons which adjust the course when the autopilot is engaged, they adjust the rudder position when the autopilot is not engaged.
Plus a bonus mode:
Dodge function - with some autopilots, moving the helm control while the pilot is engaged will allow you to hand steer around an obstacle and then the autopilot will resume steering on the same course.
Most good autopilots allow commanding a rudder position by sending NMEA 2000 PGN number 127245 but we might need to do a bit more to trick them into believing the sentence is coming from their own branded controller.
We should perhaps also consider the possibility of cutting out the autopilot altogether and talking to a rudder motor controller directly. Then we also need to use the rudder sensor so we don't push it beyond the limits. Perhaps the best way to do this is with a signal K "autopilot module" which doesn't actually implement autopilot capability, just helm motor control.
Some questions:
Is this the right approach?
Is Signal K fast enough for this or would there be too much latency for real time steering?
How much latency is typically added if the helm command is forwarded through a signal K server compared to if the helm controller sends an NMEA sentence direct to the autopilot?
Does pypilot already accept rudder position commands like this or is work needed in pypilot too to make this possible on a pypilot boat?
Can I help with this and make a pull request or do the primary developers prefer to keep things in house?
@panaaj @seandepagnier
Beta Was this translation helpful? Give feedback.
All reactions