(2021-05-25, 02:44 PM)seandepagnier Wrote: You can simply run:
pypilot_client servo.clutch_pwm=50
if pypilot is running
if not running edit ~/.pypilot/pypilot.conf
I have Pypilot 2.1.1-beta. The arduino code is the one on github updated a few days ago.
Editing pypilot.conf there is no variable that resembles servo.clutch_pwm. I only have:
"servo.faults": 26179,
"servo.max_current": 20.0,
"servo.current.factor": 1,
"servo.current.offset": 0,
"servo.voltage.factor": 1,
"servo.voltage.offset": 0,
"servo.max_controller_temp": 60,
"servo.max_motor_temp": 60,
"servo.max_slew_speed": 10.236220472440944,
"servo.max_slew_slow": 8.267716535433072,
"servo.gain": 1,
"servo.period": 1.0,
"servo.compensate_current": false,
"servo.compensate_voltage": false,
"servo.amp_hours": 121.23307400571649,
"servo.speed.min": 25.0,
"servo.speed.max": 100,
"servo.position.p": 0.15,
"servo.position.i": 0,
"servo.position.d": 0.02,
"servo.use_eeprom": true,
"servo.disengage_on_timeout": true,
Running pypilot_client servo.clutch_pwm=50 in the Terminal gives me:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/pypilot-0.16-py3.7-linux-armv7l.egg/pypilot/client.py", line 156, in receive_line
msg = json.loads(line.rstrip())
File "/usr/lib/python3.7/json/__init__.py", line 348, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.7/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.7/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/pypilot_client", line 11, in <module>
load_entry_point('pypilot==0.16', 'console_scripts', 'pypilot_client')()
File "/usr/local/lib/python3.7/dist-packages/pypilot-0.16-py3.7-linux-armv7l.egg/pypilot/client.py", line 383, in main
msg = client.receive_single(.1)
File "/usr/local/lib/python3.7/dist-packages/pypilot-0.16-py3.7-linux-armv7l.egg/pypilot/client.py", line 207, in receive_single
line = self.receive_line(timeout)
File "/usr/local/lib/python3.7/dist-packages/pypilot-0.16-py3.7-linux-armv7l.egg/pypilot/client.py", line 172, in receive_line
return self.receive_line(timeout - dt)
File "/usr/local/lib/python3.7/dist-packages/pypilot-0.16-py3.7-linux-armv7l.egg/pypilot/client.py", line 158, in receive_line
raise Exception('invalid message from server:', line)
Exception: ('invalid message from server:', 'invalid request: set unknown value: servo.clutch_pwm')
Uninstalling and reinstalling Pypilot did not solve the issue.