| | 161 | |
| | 162 | ==== Instructions for MIMIC (aka SCAMP) ==== |
| | 163 | |
| | 164 | |
| | 165 | Clone repository into /opt |
| | 166 | |
| | 167 | ===== Teensy 4.0 Setup: ===== |
| | 168 | |
| | 169 | |
| | 170 | 1. copy the links for the downloadable tar files for arduino-cli and teensy_loader_cli |
| | 171 | |
| | 172 | -> https://github.com/arduino/arduino-cli/releases |
| | 173 | |
| | 174 | -> https://github.com/PaulStoffregen/teensy_loader_cli/releases |
| | 175 | |
| | 176 | |
| | 177 | 2. Use **wget** to download the tar files and extract them with **tar -xvf {filename}** |
| | 178 | |
| | 179 | |
| | 180 | 3. Move the two executable files to "/bin" to add it to path (makes it so that the executable can be run from any directory) |
| | 181 | |
| | 182 | -> This allows the **./teensy-tool.sh** file in mimic/teensy to compile and upload to the teensy |
| | 183 | |
| | 184 | |
| | 185 | 4. Refer to https://arduino.github.io/arduino-cli/0.33/getting-started/#adding-3rd-party-cores to add Teensy support to arduino-cli |
| | 186 | |
| | 187 | -> You may have to create a file called arduino-cli.yaml in ~/.arduino15 with information about additional urls, format is provided in the link above |
| | 188 | |
| | 189 | -> https://www.pjrc.com/teensy/td_download.html |
| | 190 | |
| | 191 | -> https://www.pjrc.com/teensy/package_teensy_index.json |
| | 192 | |
| | 193 | |
| | 194 | 5. Follow the instructions to create the 00-teensy.rules file: |
| | 195 | |
| | 196 | -> https://www.pjrc.com/teensy/00-teensy.rules |
| | 197 | |
| | 198 | |
| | 199 | 6. Use **arduino-cli board** list command to find the port of the Teensy |
| | 200 | |
| | 201 | -> Modify the sketch.yaml file in the ./teensy directory to makes sure default_port and default_fqbn matches what is listed from **arduino-cli board list** |
| | 202 | |
| | 203 | |
| | 204 | 7. Upload teensy code by running **./teensy-tool -bu** in mimic/teensy/ to build and upload the code |
| | 205 | |
| | 206 | -> additionally, you can add the -m flag to open the monitor as well |
| | 207 | |
| | 208 | |
| | 209 | ===== ROS Melodic Setup: ===== |
| | 210 | |
| | 211 | Uses ROS Melodic for Ubuntu 18.04 on the Jetson Nano |
| | 212 | |
| | 213 | 1. Refer to http://wiki.ros.org/melodic/Installation/Ubuntu for install |
| | 214 | |
| | 215 | |
| | 216 | 2. Add the following lines to ~/.bashrc |
| | 217 | |
| | 218 | - source/opt/ros/melodic/setup.bash |
| | 219 | |
| | 220 | - source/opt/mimic/devel/setup.bash |
| | 221 | |
| | 222 | |
| | 223 | 3. cd into mimic repo and run **catkin_make** to create ROS environment |
| | 224 | |
| | 225 | |
| | 226 | 4. Run ROS nodes by running **./roslaunch.sh** in mimic/ |
| | 227 | -> check ports for teensy for serial communication |
| | 228 | -> check joystick connection |
| | 229 | |
| | 230 | |
| | 231 | 5. Making new nodes/msg |
| | 232 | -> List out .py files and .msg files as needed in the CMakeLists.txt file located in the package folder (ie test_pkg) |
| | 233 | -> Run **catkin_make** to refresh environment messages/nodes |
| | 234 | |
| | 235 | |
| | 236 | ===== Integration with Web Display: ===== |
| | 237 | |
| | 238 | 1. Use **ip a** to find the ip of the Jetson Nano |
| | 239 | |
| | 240 | 2. Open a web brower and go to {ip}:5000 to view |