|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Forklift
So we have a forklift on our robot that my team wants to be controlled by the joystick instead of a button. I don't know how i would go about that, as far as teleop.vi programming.
|
|
#2
|
||||
|
||||
|
Re: Forklift
Tell us a little bit more about the forklift mechanism. How is it driven? What does it do?
|
|
#3
|
|||
|
|||
|
Re: Forklift
"Two miniCIM motors are connected to two sprockets via #25 chain. The motors are run in tandem to move the forks." As dictated by my teammate.
|
|
#4
|
|||
|
|||
|
Re: Forklift
They want it to be tied to the x-axis of our joystick. I am thinking it would be easier for everyone to have two buttons lower/lift the forklift instead.
|
|
#5
|
||||
|
||||
|
Re: Forklift
You can read the joystick axis like a potentiometer (-1 to 1), then map the position of the forklift with a PID loop and some encoders using the joystick axis as the setpoint.
If you don't know how to use PID or what it is, a quick search on this site will bring up many helpful links. ![]() |
|
#6
|
|||||
|
|||||
|
Re: Forklift
Do you want the joystick to control the speed of motion of the motors? You can just get the joystick x-axis value and wire it to a motor set function. That way, if the joystick is centered the motor does not turn, and the farther away from center the joystick is moved, the faster the motor turns.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|