Skip to content

Motors don't stop when using run-to-rel-pos command in ev3dev-stretch-ev3-generic-2018-07-26 image #1137

@ndward

Description

@ndward

It seems to me the 27 July EV3 Stretch image is broken! Even a simple script like this fails to run correctly, even though it runs fine on the preceding Stretch image.

#!/usr/bin/env python3
from ev3dev.ev3 import *
mB = LargeMotor('outB')
mB.stop_action = 'hold'
mB.run_to_rel_pos(position_sp=360, speed_sp=100)
mB.wait_while('running')

I expected the motor to stop after turning 360° but it never stopped. I could not stop it from VS Code nor did it stop when I pressed the Back button on the EV3. I had to reboot the brick to make the motor stop.

I'm using VS Code 1.25.1 on a Win10 machine.

Image file:         ev3dev-stretch-ev3-generic-2018-07-26
Kernel version:     4.14.58-ev3dev-2.2.1-ev3
Brickman:           0.10.0
BogoMIPS:           148.88
Board:              board0
BOARD_INFO_HW_REV=7
BOARD_INFO_MODEL=LEGO MINDSTORMS EV3
BOARD_INFO_ROM_REV=6
BOARD_INFO_SERIAL_NUM=00165340377E
BOARD_INFO_TYPE=main

I've exchanged emails with @WasabiFan and he confirms the problem. He adds 'my guess is that something about positional readings was broken with the new position implementation. It looks to me like the driver is partially frozen once it starts moving the motor.' He also wrote to me 'The port names changed a few Stretch releases ago, so the port name is actually “ev3-ports:outB” now. In general you should use the “OUTPUT_B” constants rather than the string “outB” so that library updates can change those names internally. In this case we haven’t released an accordingly updated library version anyway so it wouldn’t fix it in this case. Honestly, I’m not sure why it works for you at all – I would expect it to throw an error about the port name'.

I modified the script to use OUTPUT_B and experienced the same problem.

I encourage all users of my site ev3python.com (which targets beginners) to always use the latest Stretch version and VS Code, so this will be a problem for them. I hope a fixed image can be released ASAP!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions