OpenMarine

Full Version: Rudder control from app
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi

I am developping a PyPilot interface for the M5Dial. I use the tcp connection to port 23322 and it is working changing the mode, the command and I think tacking. It uses the touch pannel and the encoder which makes it very intuitive.

But I don't understand the commands when you are disengaged and want to move just the rudder.

After trying to understand the source, I think the commands to move the rudder are:

servo.position and the value should be the desired position of the rudder in degrees. - port, + starboard
servo.command and the value the direction as -1 port, +1 starboard

But for the moment I have no way to check this is ok. 

Have anyone any suggestion?

Thanks

Paco
Yes that is right.

Just try sending servo.command to set the motor speed for manual control and keep sending it as long as moving. It is best to set it to zero again to stop moving (otherwise it will timeout but control is less precise)
Nice interface! Is that open source?

To illustrate what Sean said, you might have a look here: while the button is down in standby mode, I repeatedly send the same command. Also note the difference between +1 and +10: in the +1 mode I send a different value, making the actuator move slower thus facilitating hooking it onto the rudder.

https://github.com/marcobergman/pypilot_...ay.py#L421
Will send it to GitHub but I need to -it configuration for WiFi etc which is a bit annoying. Hope to have it up in a week. Now fighting with a tiny[ilot that does not want to connect to the WiFi (changed access point)

(2024-01-14, 11:59 AM)ironman Wrote: [ -> ]Nice interface! Is that open source?

To illustrate what Sean said, you might have a look here: while the button is down in standby mode, I repeatedly send the same command. Also note the difference between +1 and +10: in the +1 mode I send a different value, making the actuator move slower thus facilitating hooking it onto the rudder.

https://github.com/marcobergman/pypilot_...ay.py#L421

Thanks. Very useful. So just send servo.command with value 1 or -1 or 0
In fact, 2 resp -2 is what I do. And 0.2 and -0.2 for a slow move. But as you see I repeat sending this about 20 times per second.
I am pretty sure any value greater than 1 (or less than -1) will be clamped to the maximum speed.
Isn't servo.position_command the correct command to use? servo.position is rejected as non-writable.
for absolute position yes. For relative (speed command) it is servo.command not servo.position. Perhaps it could be renamed?
I find that sending servo.position_command it does not change the servo.position
Also when sending servo.command = -1, I vave the behaviour that every 3s I have like a command that pushes up servo.position up nothing more connected)!!!

When I stop of sending servo.command servo position grows once again till 60.

May be because there is no controller connectes?
Pages: 1 2