|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: RobotDrive
Try disabling the safety on the RobotDrive with
Code:
drive.setSafetyEnabled(false) About the RioLog, anything printed to stdout or stderror will appear in the log. |
|
#2
|
|||
|
|||
|
Re: RobotDrive
So that solved my "Robot Drive... Output not updated enough" issue and I did find that message in MotorSafetyHelper, so I was close,
But what about 2, and 3 2) Im assuming that associating a drive with controllers and then associating a Joystick to the drive is going to automatically allow me to control movement of my motors. 3) Im assuming that I will not have to capture inputs from the joystick and translate them myself to the motors. |
|
#3
|
||||
|
||||
|
Re: RobotDrive
Yes, the code you have should allow you to drive with that Joystick. You should not have to manually write code to get stick values then write them to the motors. Robot drive will do this for you.
|
|
#4
|
|||
|
|||
|
Re: RobotDrive
Now that Im reading further into the demos, it looks like you do have to keep pulling the value of the
2) Im assuming that associating a drive with controllers and then associating a Joystick to the drive is going to automatically allow me to control movement of my motors. (FALSE) 3) Im assuming that I will not have to capture inputs from the joystick and translate them myself to the motors. (FALSE) In the operatorControl method, they are looping and polling. I thought it was going to be more event driven. |
|
#5
|
|||
|
|||
|
Re: RobotDrive
Those assumptions are incorrect. Every time you call drive.arcadeDrive, it will update the speed controllers with the new values. The drive methods that take a joystick are simply convenience methods that save you the step of getting the joystick axes and passing them into the RobotDrive object. With safety off, the motors will continue to drive at the last set speed until you disable the robot or it runs out of power.
|
|
#6
|
|||
|
|||
|
Re: RobotDrive
just to make sure, you aren't calling the constructor (drive = new RobotDrive(vic01, vic02, vic03, vic04) every time in the loop, you just have that once in robotInit()?
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|