Difference between revisions of "CAN Communication"
(10 intermediate revisions by one user not shown) | |||
Line 5: | Line 5: | ||
{{alert success footer}} | {{alert success footer}} | ||
<br> | <br> | ||
− | This tutorial will show how to open & close CAN communication. Also, how to get position data and send pwm to operate Allegro Hand. You will follow step by step with adding sample codes. Source code assumes you have a peak-systems pcan to usb adapter so if you are not using PEAK CAN device, please check your own device CAN api and channel. | + | This tutorial will show how to open & close CAN communication. Also, how to get position data and send pwm to operate Allegro Hand. You will follow step by step with adding sample codes. Source code assumes you have a peak-systems pcan to usb adapter so if you are not using PEAK CAN device, please check your own device CAN api and channel.<br><br> |
===simple diagram=== | ===simple diagram=== | ||
Below picture shows a structure of a sample program for this tutorial.<br> | Below picture shows a structure of a sample program for this tutorial.<br> | ||
[[Image:tutorial_.png|300px]] | [[Image:tutorial_.png|300px]] | ||
+ | <br> | ||
− | === | + | ===steps=== |
− | + | *[[Read CAN data]] : how to Initialize CAN I/O thread and get CAN data. | |
− | + | *[[Send PWM data]] : how to send data to Allegro Hand. | |
+ | <br> | ||
− | + | ===build & run=== | |
− | + | cd {The directory where you extracted CAN_tutorial.zip.} | |
− | + | mkdir build | |
− | + | cd build | |
− | + | cmake .. | |
− | + | make install | |
− | + | ./bin/grasp | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | // | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + |
Latest revision as of 18:30, 2 July 2019
Contents |
[edit] CAN Communication Tutorial
Please download CAN_tutorial.zip file and follow below steps. File:CAN tutorial.zip
CAN_tutorial.zip contains CMakeList.txt, README and grasp directory.
CAN_tutorial.zip contains CMakeList.txt, README and grasp directory.
This tutorial will show how to open & close CAN communication. Also, how to get position data and send pwm to operate Allegro Hand. You will follow step by step with adding sample codes. Source code assumes you have a peak-systems pcan to usb adapter so if you are not using PEAK CAN device, please check your own device CAN api and channel.
[edit] simple diagram
Below picture shows a structure of a sample program for this tutorial.
[edit] steps
- Read CAN data : how to Initialize CAN I/O thread and get CAN data.
- Send PWM data : how to send data to Allegro Hand.
[edit] build & run
cd {The directory where you extracted CAN_tutorial.zip.} mkdir build cd build cmake .. make install ./bin/grasp
Whos here now: Members 0 Guests 0 Bots & Crawlers 1 |