STEERING Data Hub use with MOTOR Block (NXT-G 2.0)

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
sealyon
Posts: 4
Joined: 17 Nov 2010, 00:24

STEERING Data Hub use with MOTOR Block (NXT-G 2.0)

Post by sealyon »

Hi,

I have a question about using the STEERING input data hub to the MOVE block (NXT-G 2.0). According to the docs it is supposed to take a value between -100 & 100 with values < 0 steering towards the LEFT motor and values > 0 steering towards the RIGHT motor. Since the normal STEERING slider in the configuration window only allows 10 steps LEFT or RIGHT, it looks like this should provide much more granularity for CURVE TURNS. I'm used to addressing more accurate CURVE TURNS via the use of 2 separate MOTOR blocks or separate sequence beams but this seemed like it might provide a cleaner solution.

However, it doesn't appear to be working (at least not as I'd expect). The robot appears to be doing a point turn (one motor forward & other backward) in all cases and the STEERING value supplied to the data hub only changes the power level of one of the motors. This seems really strange! Here's the simple test program I'm using;
MOVE Steering Adjustment.jpg
(175.07 KiB) Downloaded 142 times
Any ideas ???

Thanks,
Chris
timpattinson
Posts: 224
Joined: 30 Oct 2010, 04:10
Location: 127.0.0.1
Contact:

Re: STEERING Data Hub use with MOTOR Block (NXT-G 2.0)

Post by timpattinson »

This is only a guess, but maybe the program does not wait for the motor to finish moving and so decrements the steering to -100 (the min value) in a second or less
-Tim
Commit to Lego Mindstorms StackExchange Q&A http://area51.stackexchange.com/proposals/4105
Minboards IRC Channel #mindboards on Freenode
My blog: http://timpattinson.wordpress.com/
sealyon
Posts: 4
Joined: 17 Nov 2010, 00:24

Re: STEERING Data Hub use with MOTOR Block (NXT-G 2.0)

Post by sealyon »

Hi Tim,

Don't think there is a timing issue here. The MOVE block is doing 5 rotations for each set STEERING value, so the block waits till it completes the 5 rotations before decrementing the STEERING value and MOVING again. In theory this should cause the bot to move in a spiral pattern with brief pauses as the MOVE blocks get run.

Any other ideas? Did you try the program to see if you get the same results as I'm seeing? If not, please do and let me know what you find.

Thanks,
Chris
hassenplug
Posts: 346
Joined: 27 Sep 2010, 03:05
Contact:

Re: STEERING Data Hub use with MOTOR Block (NXT-G 2.0)

Post by hassenplug »

sealyon wrote:Hi,
the STEERING value supplied to the data hub only changes the power level of one of the motors. This seems really strange!
Chris,

What is it that you're expecting the steering value to do? (beyond change the power level of one of the motors)

Try running the same program, with a couple changes:
1) Set the motor speed/power to 100
2) Set the "Rotation Move Distance" to something much less than 5 rotations. Start with 1 rotation.

Steve
---> Link to lots of MINDSTORMS stuff under my picture --->
sealyon
Posts: 4
Joined: 17 Nov 2010, 00:24

Re: STEERING Data Hub use with MOTOR Block (NXT-G 2.0)

Post by sealyon »

Hi,

My feeling would be that the STEERING data-hub value should act in a similar fashion to adjusting the STEERING slider in the MOVE block. As you know, if the MOVE block is setup to control 2 motors, the STEERING slider will adjust the power to BOTH motors, not just one. The result is a CURVE TURN with a diameter set by the STEERING slider setting. One issue with the STEERING slider is that it only allows 10 unspecific value changes. It seems like this data-hub should allow you to set the STEERING value with more granularity & resolution (to a specific set value) so you could adjust your CURVE TURNs more precisely. I do this now using a separate MOTOR block for each motor and/or using parallel sequence beams, but it would be much better if you could simply adjust the STEERING value via this data-hub on the MOVE block.

Chris
hassenplug
Posts: 346
Joined: 27 Sep 2010, 03:05
Contact:

Re: STEERING Data Hub use with MOTOR Block (NXT-G 2.0)

Post by hassenplug »

sealyon wrote:It seems like this data-hub should allow you to set the STEERING value with more granularity & resolution (to a specific set value) so you could adjust your CURVE TURNs more precisely.
I guess I can't see what's wrong from the picture you've posted. Your description is exactly how I use the data-hub to set the steering.

If you think about it, the slider only controls the power to one motor at a time. With the slider in the middle, both motors are at full speed. When you move the slider to one side, ONE motor slows down, while the other stays at full speed.

From what you've said about the program you wrote, it will be slow to show the results you'd expect.

Steve
---> Link to lots of MINDSTORMS stuff under my picture --->
sealyon
Posts: 4
Joined: 17 Nov 2010, 00:24

Re: STEERING Data Hub use with MOTOR Block (NXT-G 2.0)

Post by sealyon »

Hi Steve,

I'll test it again and fully verify what I see. The idea with it was to have it do a slow spiral. I'll change the steering value decrement to -5 so it reacts more quickly. When I first tested it, it was not doing a CURVE TURN, it was doing a POINT TURN (1 wheel forward & the other backward), as though the steering value was pinned at 100 or -100. However, it was changing the speed of the forward wheel. It was displaying the correct steering values as they were decremented, so I assumed that was working correctly. It's really a pain to test some of this without a debugger!

Can you test my program and see what you get? I can post the .rbt if you need it. I'm using NXT-G 2.0 & fw1.29. Is it attempting to do a CURVE TURN for you? Appreciate the help.

Thanks,
Chris
loopymech
Posts: 35
Joined: 30 Sep 2010, 15:35

Re: STEERING Data Hub use with MOTOR Block (NXT-G 2.0)

Post by loopymech »

Please do post the .rbt; I would be happy to test and give feedback. Perhaps others would too.

-Loopy
loopymech
Posts: 35
Joined: 30 Sep 2010, 15:35

Re: STEERING Data Hub use with MOTOR Block (NXT-G 2.0)

Post by loopymech »

In the meantime, here's some code that I know works for making a differential drive bot move in an expanding circular pattern. It uses the steering hub and updates the steering value in a separate thread from the move block/loop.

Give it a try and let me know how this works for you.

Cheers!

-Loopymech
Attachments
CWexpandingCircle.zip
rbt coded in NXT-G 2.0
(263.57 KiB) Downloaded 302 times
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests