Controlling Drivetrain Motors individually (to make 'Swing' turns)

Once a Drivetrain has been configured, we cannot find any way to control those Motors individually.

If we want to make a swing (wide) turn, but the Drivetrain is configured, how do we do this?

Thanks :slight_smile:

1 Like

I don’t know how to code IQ, but I bet you could make a swing turn by driving forward and turning at the same time.

I think you may have to manually program your steering instead of configuring it in the set up

1 Like

I don’t think you can do this using the drive train commands as it stands. You would need to calculate these manually using individual motors rather than the drive train.

1 Like

image

For example, this would work for a swing turn but it is based on time movement rather than a specific distance.

This version would do a specific distance of the outside wheel of the swing turn:
image

Just be careful not to use = in the “Wait Until”, use >. I guess the motor encoder value is a double behind the scenes so is never exactly = 2.

2 Likes

Correct - The drivetrain feature is used to simplify 2-wheel drive robots. We chose to use point turns as it requires less space for the robot to make accurate turns, whereas swing turns requires a larger area to make the same turn.

You can always use the individual motor control to build any type of motion.

3 Likes

The solution for me is to simply not use the drivetrain and control the motors individually. It’s really not that hard to do and it’ll let you do all the individual things you want to on each motor.

1 Like

Hiya, All

@sankeydd That’s what we have done: I have introduced the students to movement using individual motors for this precise reason. We will now look at the Drivetrain as a quick way of achieving movement. It would have been nice to still be able to use the Motor Blocks used in Drivetrain individually, though. I’ve latterly noticed that if you specify a Gyro sensor as part of the Drivetrain, you cannot use its values separately, either :grimacing:

It would be nice to be able to configure a Drivetrain, but also use all parts of it singly outside of the shortcuts it provides. (As I remember, RobotMesh achieved this by having the Drivetrain Blocks in a separate section to the Motor Blocks - would be nice in a future update :wink: )

Thanks again for all comments and advice: I’m enjoying using the Blocks with the class so far. Not too many bugs for a 1.0!

1 Like

It may not always be this way (with drivetrains limited to 2 motors), but you’re exactly right - we wanted initial users to feel that initial “aha” moment by using an example template + Drivetrain commands to get a robot moving in less than a few minutes.

As the community uses VEXcode Blocks and we see how users are engaging with the new tools and the features they’re looking for, that feedback will definitely influence our roadmap moving forward.

3 Likes