This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rudder control from app
#1
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


Attached Files Image(s)
       
Reply
#2
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)
Reply
#3
Thumbs Up 
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
Reply
#4
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
Reply
#5
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.
Reply
#6
I am pretty sure any value greater than 1 (or less than -1) will be clamped to the maximum speed.
Reply
#7
Isn't servo.position_command the correct command to use? servo.position is rejected as non-writable.
Reply
#8
for absolute position yes. For relative (speed command) it is servo.command not servo.position. Perhaps it could be renamed?
Reply
#9
I find that sending servo.position_command it does not change the servo.position
Reply
#10
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?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)