This repository is organized as follows:
ROS2
contains the gokart packet library and ROS2 driverPCB
contains Altium PCB design filesMCU
contains microcontroller codes (depricated, moved to a separate repository)
License: Apache License 2.0
This repository is organized as follows:
ROS2
contains the gokart packet library and ROS2 driverPCB
contains Altium PCB design filesMCU
contains microcontroller codes (depricated, moved to a separate repository)To start on both the high-level and low level communication, we need:
std::vector<uint8_t>
, which can be easily transfered on any kind of comm: serial, CAN, ethernet.@HaoruXue suggests the reason probably is: "I suspect some vector iteration boundary condition may be broken with one byte"
The code where the issue appeared:
`void thread_comm_function()
{
auto packet_sub = myGkcPacketSubscriber();
packet_sub.set_actuator(&act);
auto factory = tritonai::gkc::GkcPacketFactory(&packet_sub, tritonai::gkc::GkcPacketUtils::debug_cout);
int bytes_read;
/*std::vector<uint8_t> recv_buffer(1, 0);
while (1)
{
bytes_read = rs232.read(recv_buffer.data(), 1); //it reads one byte at a time
if (bytes_read < 0)
;//error
factory.Receive(recv_buffer);
}*/
std::vector<uint8_t> recv_buffer(2, 0);
while (1)
{
for (int i = 0; i < 2; i++)
{
bytes_read = rs232.read(&(recv_buffer.data()[i]), 1); //it reads one byte at a
if (bytes_read < 0)
;//error
}
factory.Receive(recv_buffer);
}
}`
The commented version (1 byte) at a time doesn't work. But 2 bytes at a time and 3 bytes at a time work.
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.