• aditya mehrotra.

scout updates: first "steps" in programming [updates]

The goal for today is very scoped and hopefully should be simple. Get a SINGLE MOTOR CONTROLLER communicating over CANBus with the Jetson TX1, and then get this controller implementing PID velocity or position control. Determine if we want velocity or position control based on this. We have the whole freaking day so hopefully this will happen. We will power everything from the on-board power system through this process, to ensure any results can be replicated on battery power most likely.



So the setup is a Logitech craft keyboard connected to the Jetson via bluetooth, then there's a usb touchscreen monitor connected to the Jetson as well. For some reason, the Jetson was not turning on when powered with the 19v power jack we connected to the 12v board, the onboard Jetson power supply isn't working at the moment. We will debug it later, for now we're just powering it from the wall outlet. Note that we have an SD card we will be using as a workspace. We're first going to create a catkin_ws in this for later development, and try to make it.


<sd card>$ mkdir -p catkin_ws/src

<sd card>$ cd catkin_ws

catkin_ws$ catkin_make


That was successful but not the reason for what we are doing today. Our goal today is to get CAN Bridge from REV robotics working. A few days ago we were able to build the actual CAN Bridge software. We'll need to download the REV Robotics SDK later, but for now let's find the build output of CAN Bridge. Remember CAN Bridge is a USB to CAN bridge that allows us to communicate with REV CAN devices over USB.



So the output of the build will be in CANBridge/build/repos. When we go in there we see a folder called releases. After going through like seven other folder, we reach CANBridge-cpp and CANBridge-java. Since we will ultimately be using ROS for this - we will use CANBridge-cpp. What we are going to do is copy the contents of CANBridge-cpp to the home directory. So now what we have in the SD Card is the folder CANBridge-release, catkin_ws, and a new folder called scout_CAN which we will use as a workspace in VSCode for testing today. What we are going to do is move the CANBridge-release to the scout_CAN folder. It says this library can be installed the same way as other projects. So we are going to try and install it.


The problem is, I don't even know how to install it so this may be a lofty goal for the day to get this system to even communicate with one Spark Max. We've posted another question on GitHub on how do I even install a repo you built? Maybe it is obvious to CS people, it is very not obvious to me :(


We went here and stared for a bit: https://github.com/REVrobotics/CANBridge/blob/master/src/test/cpp/main.cpp this so far is the test code to use this they have. In the meantime, in the same SD card we will install the Spark MAX SDK while we are at it. We will download the latest c++ API! Move it into scout_CAN and extract it there. BOTH of these are vendordeps that need to be installed. I just have no clue how to install a vendordep so what we will do is just WAIT and see what the guys on GitHub have to say. Since I don't even understand how to install a vendor dep. I moved the entire folder of CANBridge into the scout_CAN development space and deleted the nonsense I did above which was trying to find the actual libraries to use. In the scout_CAN folder, I'm making a folder called dependencies and a workspace called catkin_ws for the ROS driver when we get there. Now we have...


<SD Card>

<catkin_ws>

<build>

<devel>

<src>

<scout_CAN>

<deps>

<CANBridge>

<SparkMAX API>

<catkin_ws>

<build>

<devel>

<src>


So really until we understand how to install these libraries we are completely stuck. What we will do instead then is solve this Jetson TX1 power problem. Why he no turn on with the power system we built. He did before!


#scout #updates #learning_cpp

0 views0 comments
© copyright 2019 | aditya mehrotra