5yler / gigabug Goto Github PK
View Code? Open in Web Editor NEWAutonomous Power Racing Series Racecar - Arduino Motor Control Debugging Code
License: Other
Autonomous Power Racing Series Racecar - Arduino Motor Control Debugging Code
License: Other
On the master
branch, commanding a positive steering angle makes the car turn right, and a negative steering angle makes the car turn left.
By the right-hand rule, the yaw angle increases counterclockwise, so both the command input and sensor reading output need to have their sign swapped.
Individual wheels have sign reversed, i.e. commanding the right wheel a velocity of 1 m/s will result in a velocity of -1 m/s.
After Peter added the filter cap the readings have been a lot smoother. But it's been months since we last calibrated it. I want to know if the limited steering range is the result of the calibration being off, or the new shield we're using.
dcservo.cpp
The current kilotron
branch encoder code is just a copy of the master
(Gigatron) branch. We are getting readings from the encoders, but the number of ticks per revolution is probably different, so we need to test how the resulting odometry compares to reality.
gigatron_hardware/launch/kilotron.launch
odom
topic to the actual length traveledPULSES_PER_REV
value in kilotron
branch if necessaryRight now the JetsonCommander
class only handles motor RPM commands 0 or greater.
The current behavior is to switch to RC throttle (and keep autonomous steering) which will result in coasting. Instead the Arduino should issue closed-loop zero velocity commands, so the car will actually stop.
The current Arduino code is hardcoded to have the car running either in fully autonomous mode, or semiautomatic mode (autonomous steering with RC throttle).
Instead, add a callback method to gigabug.ino
that will set the mode to either autonomous or semiautomatic.
Copyright (c) 2017, Cult Classic Racing. All rights reserved.
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The relevant variable is _autonomous
in JetsonCommander
(see usage in context.cpp
Probably have it light up when it's autonomous/semiautomatic (i.e. _autonomous > 0
).
Check if the output of a zero steering angle command from ROS in autonomous mode results in a zero steering angle on the vehicle.
Check if the output of a positive steering angle command from ROS results in steering left, and a negative steering angle command results in steering right.
Note: this test can only be performed after metatron issue #5 is successfully resolved
kilobug
branch to Kilotron Arduinoroslaunch gigatron_hardware kilotron.launch
rosrun gigatron hare
/command/drive
with desired steering angle and wheel velocities
/arduino/command/motors
with desired steering pwm
The right rear wheel consistently gives higher readings for distance traveled. Adjust PULSES_PER_REV
on a per-wheel basis if needed.
Right now, RC mode has both rear wheels driven equally. Instead, we can modify the motor commands based on the RC steering angle.
This enables us to test the car's native velocity control safely. Issuing closed-loop stop commands when the throttle is released is a better safety mechanism than switching to RC mode, where the vehicle can coast.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.