Jump to content

[Breaking Ground] Input Mixing / Multi Axis Inputs for Single Motor/Rotor


Recommended Posts

Attempted to create a basic fixed-pitch quadcopter, using the fundamental forces for maneuvering as does a real quad (e.g. increase rotor speed for specific rotors to effect specific maneuvers).

Now, the issue encountered -- how to have multiple input axis effect the state of a single rotor ?

E.G.  'Pitch' control needs to increase front motor torque (1+2), and decrease rear motor torque(3+4)
simultaneously  'Roll' control needs to increase left motor torque (1+3) and decrease right motor torque (2+4)
additionally 'Yaw' control needs to increase alternating motors to effect yaw (increase motors 1+4, decrease motors 2+3)

Individually I can make any one of those controls function properly.  If I specify all three of them -- only the last one in the action group list is functional (the last action groups settings take precedence over previous action groups).

 

The question:  How can I mix inputs from those three axis channels onto a single motor?  All three channels need to be combined in order to determine the output state of the motor.

Link to comment
Share on other sites

I'd use KRPC to write up whatever control scheme I want on any axis I want.

One of our folks confirmed yesterday that this will successfully collapse pistons on his craft:

part_name = "piston.02"
module_name = "ModuleRoboticServoPiston"
field_name = "Target Extension"

for part in vessel.parts.all:
    if part.name == part_name:
        for module in part.modules:
            if module.name == module_name:
                module.set_field_float(field_name, 0.0)

You can get at the axes and action groups via the Control class: https://krpc.github.io/krpc/python/api/space-center/control.html

You can name the individual rotors with tags.

Edited by FleshJeb
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...