question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

motor commands not working

See original GitHub issue

I was testing some motor commands. run-direct command and run_direct() function work fine. However, run-to-abs-pos and run-timed commands, along with run_to_abs_pos() and run_timed() functions, are not in the mood to work. (They don’t throw any errors, they just do nothing).

These are my .py files. Hope I was using the functions properly.

#!/usr/bin/python

from ev3dev.auto import *

m = LargeMotor(OUTPUT_A)

m.position_sp = 360
m.run_to_abs_pos()
#!/usr/bin/python

from ev3dev.auto import *

m = LargeMotor(OUTPUT_A)

m.time_sp = 1000
m.run_timed()

Also, I don’t know how to use position_p attribute. It always comes with this error.

>>> m.position_p
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/ev3dev/core.py", line 416, in position_p
    return self.get_attr_int('hold_pid/Kp')
  File "/usr/lib/python2.7/dist-packages/ev3dev/core.py", line 207, in get_attr_int
    return int(self._get_attribute(attribute))
  File "/usr/lib/python2.7/dist-packages/ev3dev/core.py", line 200, in _get_attribute
    return self._attribute_cache.read(abspath(self._path + '/' + attribute))
  File "/usr/lib/python2.7/dist-packages/ev3dev/core.py", line 85, in read
    return f.read().decode().strip()
IOError: [Errno 95] Operation not supported

Thank you!

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:26 (19 by maintainers)

github_iconTop GitHub Comments

2reactions
jrayerscommented, Oct 3, 2016

Thanks a TON for the help. I figured it had to be something fairly straightforward given how much of my setup was working. I will post back with results, likely will not be until tomorrow at this point.

Thanks again.

1reaction
dlechcommented, Oct 3, 2016

@dlech are we currently blocked by anything for a release?

https://github.com/ev3dev/ev3dev/milestone/3

Read more comments on GitHub >

github_iconTop Results From Across the Web

Motion Direct Commands Not Working | Studio 5000 Servo ...
Why will your motion direct commands not work ?We have the answer in this short 3-minute video.Getting your servo to respond with motion ......
Read more >
Apraxia - an overview | ScienceDirect Topics
Dyspraxia (apraxia ) is difficulty with motor planning, affecting a person's ability to coordinate appropriate body movements. It results in various problems ...
Read more >
Apraxia: Definition, causes, symptoms, and treatment
People with ideomotor apraxia are unable to follow a verbal command to copy the movements of others or follow suggestions for movements. This ......
Read more >
Motor Test Command Denied - QGroundControl - PX4 Discuss
After that you can control motors and no more “Motor command denied” It is working now . I hope you can also solve...
Read more >
!MS command does not work ? - Roboteq Online Forum
Hi all, I need to use the !MS command to turn off motors individually but the command seems does not work. On the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found