ddemidov/ev3dev-lang-cpp

Motors not running in drive-test.cpp

ccimrie opened this issue · 5 comments

I've installed this library along with the ROS ev3dev setup (https://github.com/moriarty/ros-ev3/blob/master/brickstrap-build-status.md), and so far the sensors are working, however when I tried running the drive-test.cpp file the motors are not running.

They're being acknowledged and showing that they are connected, but are not responding to the commands. Not sure if I've done something silly or not.

What kernel do you use? Some time ago there was a change in the motor drivers, so the version of the kernel and the version of the library should be compatible. The remote-control demo works for me on the latest kernel. Can you try that? The demo uses the explorer robot by Laurens Valk: http://robotsquare.com/2015/10/06/explor3r-building-instructions/.

Also, I've just noticed that drive-test.cpp uses duty_cycle_sp attribute to control the motors. This should be replaced by speed_sp, since in the latest kernels this is the only way to control motors. duty_cycle_sp is reserved for use with run-direct command.

The issue with drive-test.cpp should be fixed by 7b1cf10.

And a7ab4d6 updates remote-control.cpp. The changes were lying on my development machine, and I've just noticed I did not push those upstream. The remote-control.cpp should really work now :).

Yes, the change to speed_sp works, thank you!