Hi,
I am trying to build my own version of the Jetson Hacks RaceCar using a Jetson Nano instead of the board they use. I have the car physically built, and have control of the steering servo with the use of a PCA9685, but run into issues trying to control the ESC.
Following the Jetson Hacks tutorials, I set up the steering control as per their video ( Jetson RACECAR Part 2 - Steering Control - YouTube ), though I did run into an issue and get some errors when running the command ‘make’. This has been found and fixed on their GitHub repo, it was an issue using Ubuntu 18 and changes in the i2c libraries. The fixes were:
ADD
g++ servoExample.cpp …/src/JHPWMPCA9685.cpp -li2c -I…/src -o servoExample
to the makefile and
ADD
extern “C”
{
#include <linux/i2c-dev.h>
#include <i2c/smbus.h>
}
to ‘JHPWMPCA9685.h’ and this fixed the issue allowing me to run their steering example, great!
Fixes can be seen here ( Some changes to Makefile and src/JHPWMPCA9685.h by younjinjeong · Pull Request #2 · jetsonhacks/JHPWMDriver · GitHub )
Moving onto the throttle control, following this tutorial: Jetson RACECAR Part 3 - Motor ESC Control - YouTube
I run into an error:
‘undefined reference to i2c_smbus_read_byte_data’ and ‘undefined reference to i2c_smbus_write_byte_data’
My limited knowledge tells me this is likely to be the same issue as before, and I have added:
extern “C”
{
#include <linux/i2c-dev.h>
#include <i2c/smbus.h>
}
to ‘jetsonRACECAR/research/setThrottle/JHPWMPCA9685.h’
but assume I also need to edit the make file as before.
My issue is, what do I add and to where in these files? The repo I have cloned is: GitHub - jetsonhacks/jetsonRACECAR: Working area for the Jetson RACECAR Project