-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added SunFounder actuator #887
base: main
Are you sure you want to change the base?
Conversation
donkeycar/parts/actuator.py
Outdated
self.bw.speed = speed | ||
elif speed < 0: | ||
self.bw.backward() | ||
self.bw.speed = speed * -1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- speed
avoids an unnecessary multiplication.
donkeycar/parts/actuator.py
Outdated
def __init__(self): | ||
import picar | ||
from picar import back_wheels | ||
print('Set up back_wheels') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We moved from print -> logging.
Hi @blaughlin - your code can't be merged, you have to rebase first. |
changed print to logging
3d9c8d7
to
40ab72b
Compare
logger.info('Set up back_wheels') | ||
picar.setup() | ||
# place path to your car's config file below | ||
db_file = "/home/pi/SunFounder_PiCar-V/remote_control/remote_control/driver/config" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be passed as an argument, and then we should have two config parameters in cfg_complete.py
:
SUNFOUNDER = False
SUNFOUNDER_RC_CFG_PATH = "/home/pi/SunFounder_PiCar-V/remote_control/remote_control/driver/config"
Add an entry in complete.py
which does what you wrote in the comment above, i.e. change the throttle controller to your new part. Then it should work for the SunFounder car without tweaking any code, just an update of the myconfig.py
file.
You should probably also write a comment in the class how to install the picar
package.
Added actuator for SunFounder car kit. https://youtu.be/lvZDpLVAIQY