dbkim_ballbeam
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dbkim_ballbeam [2019/06/02 04:41] – dongbinkim | dbkim_ballbeam [2019/06/02 14:05] (current) – dongbinkim | ||
---|---|---|---|
Line 40: | Line 40: | ||
To complete this tutorial, you'll need the following items <!-- in table below, replace ??? with relevant information and add additional lines if necessary --> | To complete this tutorial, you'll need the following items <!-- in table below, replace ??? with relevant information and add additional lines if necessary --> | ||
<!-- Alternatively create: (1) a Google XLS document that's publicly viewable and provide link; and (2) a PDF version of the Google XLS, store the PDF file in your site, and provide link to it --> | <!-- Alternatively create: (1) a Google XLS document that's publicly viewable and provide link; and (2) a PDF version of the Google XLS, store the PDF file in your site, and provide link to it --> | ||
+ | \\ | ||
\\ | \\ | ||
Line 50: | Line 51: | ||
| Power Supply| Amazon | | Power Supply| Amazon | ||
+ | \\ | ||
\\ | \\ | ||
* For dynamixel motor control, the following article should be downloaded [[http:// | * For dynamixel motor control, the following article should be downloaded [[http:// | ||
Line 55: | Line 57: | ||
* 3D printing is required for the connector that links the dynamixel and the beam. (Ask dongbin.kim@unlv.edu for the CAD file. Wiki wasn't able to upload here) | * 3D printing is required for the connector that links the dynamixel and the beam. (Ask dongbin.kim@unlv.edu for the CAD file. Wiki wasn't able to upload here) | ||
- | ==== Hardware Construction ==== | + | ===== Hardware Construction |
{{ bandb: | {{ bandb: | ||
Line 65: | Line 67: | ||
\\ | \\ | ||
**Step 1** | **Step 1** | ||
- | \\ | + | * 8020 Aluminum Build : Connect 8020 Aluminum beams like the hardware setup above |
- | \\ | + | |
- | 8020 Aluminum Build : Connect 8020 Aluminum beams like the hardware setup above | + | |
- | \\ | + | |
- | \\ | + | |
**Step 2** | **Step 2** | ||
- | \\ | + | * The Foam Board : Cut the board 48cm by 10cm. In 10cm area, slice a little bit 3 cm from both edges, so you can fold to the create a semi-triangle shape. It will be the beam that will support the hallow ball |
- | \\ | + | |
- | The Foam Board : Cut the board 48cm by 10cm. In 10cm area, slice a little bit 3 cm from both edges, so you can fold to the create a semi-triangle shape. It will be the beam that will support the hallow ball | + | |
- | \\ | + | |
- | \\ | + | |
**Step 3** | **Step 3** | ||
- | \\ | + | * Dynamixel MX-28 : Mount the 3D-Printed connector on Dynamixel MX-28, then connect with the beam. |
- | \\ | + | |
- | Dynamixel MX-28 : Mount the 3D-Printed connector on Dynamixel MX-28, then connect with the beam. | + | |
- | \\ | + | |
- | \\ | + | |
**Step 4** | **Step 4** | ||
+ | * Sony Camera : Mount the camera on top border of the aluminum frame. | ||
+ | * Dynamixel + Beam : Place is 36cm under the sony camera. It's because all part of the beam will be inside the camera display. Therefore the position of the ball will be achieved correctly. | ||
+ | **Step 5** | ||
+ | * Power Supply : Place it near the dynamixel to provide the continuous power | ||
+ | * USB Cable : Organize nicely so the cable will not touch the beam or interfere the camera. | ||
+ | |||
+ | |||
+ | ===== Software Construction===== | ||
+ | |||
+ | ==== Prerequisites ==== | ||
+ | To run this tutorial. The following should be completed | ||
+ | * ROS Tutorial - begineer/ | ||
+ | * Dynamixel SDK tutorial -> read/write on dynamixel motor to change the position or velocity of joint [[http:// | ||
+ | * OPENCV Tutorial - Object recognition, | ||
\\ | \\ | ||
+ | ==== MATLAB Simulation ==== | ||
+ | {{ bandb: | ||
\\ | \\ | ||
- | Sony Camera : Mount the camera | + | The above describe |
+ | {{: | ||
\\ | \\ | ||
- | Dynamixel + Beam : Place is 36cm under the sony camera. It's because all part of the beam will be inside the camera display. Therefore the position of the ball will be achieved correctly. | + | {{ bandb:bb_4.jpg?500 |}}{{ bandb:bb_5.jpg?500 |}} |
\\ | \\ | ||
+ | The top above figure describes the simulink of the ball and beam system. PID compensator is used to deal with the feedback. The bottom above figure describes the simulated results. The ball should settle in desired position around 2~3 seconds. | ||
+ | |||
+ | ==== Robot Operating System Set-up ==== | ||
\\ | \\ | ||
- | **Step 5** | + | {{ bandb: |
\\ | \\ | ||
+ | The above figure describes ROS scheme of the final ball and beam control system. The control frequency is set to 100Hz. There are 3 nodes, Vision, PID Compensator, | ||
\\ | \\ | ||
- | Power Supply : Place it near the dynamixel | + | ==Finalized codes are written in Python, and it is not opened as this tutorial is built for the DASL's control class. For people outside of DASL, if you need the code. please email to the author. The author will explain more details. But prerequisites should have been done beforehand == |
+ | Email: < | ||
\\ | \\ | ||
- | USB Cable : Organize nicely so the cable will not touch the beam or interfere the camera. | ||
+ | ===== Experiment Results ===== | ||
+ | ==== Trouble Shooting ==== | ||
- | ==== Software Construction==== | + | The experiment is to target the ball to 30cm position from the motor. |
- | A link to the source code can be found <provide URL to your code, probably saved in this DASL Wiki>. | + | {{youtube> |
+ | |||
+ | The Video above shows that the system is not balancing the ball at all. It also shows that there is latency from the response. | ||
+ | |||
+ | {{ bandb: | ||
+ | |||
+ | The figure above shows that there' | ||
+ | |||
+ | {{ bandb: | ||
+ | |||
+ | The author tried to take measurement of the motor response time to approximate motor transfer function. The above picture shows how slow the dynamixel is. It takes 0.06 seconds to move every 5 degrees angle. The author then assumed the motor transfer function has like a first order system with 0.06 seconds rise time. The next 3 pictures describes the final simulink blocks as well as the simulation change with and without the latency. | ||
+ | |||
+ | {{ bandb: | ||
+ | {{ bandb: | ||
+ | {{ bandb: | ||
+ | |||
+ | Same condition with latency, The position of the ball shows the divergence. Even if the ball is positioned at 30cm, desired position. it will slowly rolling to get out of the beam. See the video below | ||
+ | |||
+ | {{youtube> | ||
\\ | \\ | ||
- | The goal of the code is <brief explanation> | ||
\\ | \\ | ||
- | ---- | + | ==== Solution ==== |
- | <!- Insert a snippet of your code here. Try to keep to less than 0.5 page long --> | + | |
- | ---- | + | |
\\ | \\ | ||
- | The snippet above serves to <fill in the blank>. It does this by <fill in the blank>. | ||
\\ | \\ | ||
- | ---- | + | {{ bandb:bb_12.jpg?500 |}} |
- | <!- Insert another snippet of your code here. Try to keep to less than 0.5 page long --> | + | \\ |
- | ---- | + | |
- | Next, the code does < | + | To solve the troubleshooting described |
- | <!-- Keep entering snippets of code and descriptions until you've given enough for a reader to understand how it works --> | + | |
- | // | + | {{ bandb: |
- | // | + | {{ bandb: |
- | ==== Final Words ==== | + | |
+ | {{youtube> | ||
- | This tutorial' | + | The video shows the result with gain of 25. You can see the ball is controlled to reach at 30cm from the motor. |
\\ | \\ | ||
\\ | \\ | ||
- | Speculating future work derived from this tutorial, includes <fill in the blank>. In the big picture, the problem of <fill in the blank> can be solved with this tutorial. | + | ===== Conclusion ===== |
\\ | \\ | ||
\\ | \\ | ||
- | For questions, clarifications, | + | This tutorial describes single degree of freedom ball balancing system. The main goal of this tutorial is to teach senior undergrad or above (graduate student) classical control theory as well as conversion from simulation into the real life hardware application. The Robot Operating Systems(ROS) is used as software to run the hardware system. PID Compensator is used to deal with the ball position error, and give the feedback angle to the motor. As the motor has the latency for feedback response, additional gain compensation is given to solve the problem. The future work will describe full-state feedback control with different motor selection due to the dynamixel' |
dbkim_ballbeam.1559475690.txt.gz · Last modified: 2019/06/02 04:41 by dongbinkim