<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://rsewiki.electro.dtu.dk/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=S130074</id>
	<title>Rsewiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://rsewiki.electro.dtu.dk/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=S130074"/>
	<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Special:Contributions/S130074"/>
	<updated>2026-04-24T02:56:37Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Compile_teensy&amp;diff=3249</id>
		<title>Compile teensy</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Compile_teensy&amp;diff=3249"/>
		<updated>2017-12-07T21:59:24Z</updated>

		<summary type="html">&lt;p&gt;S130074: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Flexbot]] main page&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
As all code is located and updated through the git repository, it necessary to have a set of standard instructions on how the code is brought to the NUC, compiled and uploaded to the Teensy.&lt;br /&gt;
&lt;br /&gt;
It is advised that the code on the NUC stays untouched as it both is somewhat difficult to maintain and edit the code from the NUC and you most likely will forget to commit and push the changes to the git repository when you are done. Then the git repo will fall out of sync, you head will explode trying to fix it and Flexbot will run away (if it could). So change the code locally on your PC/laptop and follow this guide to get it running on Flexbot.&lt;br /&gt;
&lt;br /&gt;
=Pulling the code from the NUC=&lt;br /&gt;
Start by connecting the NUC to the internet via ethernet. &#039;&#039;You might have to reboot before it actually has connection.&#039;&#039;&lt;br /&gt;
Join the NUC network with&lt;br /&gt;
 ssid: NUC&lt;br /&gt;
 pw: grenen89&lt;br /&gt;
ssh with X into the NUC by &lt;br /&gt;
 ssh -x local@10.42.0.1&lt;br /&gt;
or use a screen and keyboard connected to it. X isn&#039;t tested on the NUC - if it isn&#039;t supported go ahead and install it for others to enjoy.&lt;br /&gt;
Go to &lt;br /&gt;
 ~/flexbot&lt;br /&gt;
and type&lt;br /&gt;
 git pull&lt;br /&gt;
if you get any errors it is probably one out of two things, or both:&lt;br /&gt;
* You forgot to restart after connecting the ethernet.&lt;br /&gt;
* Someone changed the code on the NUC and did not commit and push.&lt;br /&gt;
If the latter is true, type&lt;br /&gt;
 git reset --hard&lt;br /&gt;
and try pulling again.&lt;br /&gt;
&lt;br /&gt;
=Compiling Teensy code=&lt;br /&gt;
Now that a new version is pulled onto the NUC, go to the folder&lt;br /&gt;
 ~/flexbot_deploy&lt;br /&gt;
and compile the code by&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
=Uploading to Teensy=&lt;br /&gt;
From the folder&lt;br /&gt;
 ~/flexbot_deploy&lt;br /&gt;
open up the Teensy application by typing&lt;br /&gt;
 ./teensy&lt;br /&gt;
Push the button on the Teensy located in the Flexbot leg, and upload the code from the Teensy application.&lt;br /&gt;
&lt;br /&gt;
=Closing Remarks=&lt;br /&gt;
It is always recommended to completely reboot the power supply to the Flexbot leg after uploading the code. The IMU&#039;s are known to sometimes have issues after the Teensy have rebooted and they have not. So to be safe, just kill the power to the hardware and turn it on again.&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Compile_teensy&amp;diff=3248</id>
		<title>Compile teensy</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Compile_teensy&amp;diff=3248"/>
		<updated>2017-12-07T21:58:47Z</updated>

		<summary type="html">&lt;p&gt;S130074: Created page with &amp;quot;Back to Flexbot main page  =Introduction= As all code is located and updated through the git repository, it necessary to have a set of standard instructions on how the cod...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Flexbot]] main page&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
As all code is located and updated through the git repository, it necessary to have a set of standard instructions on how the code is brought to the NUC, compiled and uploaded to the Teensy.&lt;br /&gt;
&lt;br /&gt;
It is advised that the code on the NUC stays untouched as it both is somewhat difficult to maintain and edit the code from the NUC and you most likely will forget to commit and push the changes to the git repository when you are done. Then the git repo will fall out of sync, you head will explode trying to fix and Flexbot will run away (if it could). So change the code locally on your PC/laptop and follow this guide to get it running on Flexbot.&lt;br /&gt;
&lt;br /&gt;
=Pulling the code from the NUC=&lt;br /&gt;
Start by connecting the NUC to the internet via ethernet. &#039;&#039;You might have to reboot before it actually has connection.&#039;&#039;&lt;br /&gt;
Join the NUC network with&lt;br /&gt;
 ssid: NUC&lt;br /&gt;
 pw: grenen89&lt;br /&gt;
ssh with X into the NUC by &lt;br /&gt;
 ssh -x local@10.42.0.1&lt;br /&gt;
or use a screen and keyboard connected to it. X isn&#039;t tested on the NUC - if it isn&#039;t supported go ahead and install it for others to enjoy.&lt;br /&gt;
Go to &lt;br /&gt;
 ~/flexbot&lt;br /&gt;
and type&lt;br /&gt;
 git pull&lt;br /&gt;
if you get any errors it is probably one out of two things, or both:&lt;br /&gt;
* You forgot to restart after connecting the ethernet.&lt;br /&gt;
* Someone changed the code on the NUC and did not commit and push.&lt;br /&gt;
If the latter is true, type&lt;br /&gt;
 git reset --hard&lt;br /&gt;
and try pulling again.&lt;br /&gt;
&lt;br /&gt;
=Compiling Teensy code=&lt;br /&gt;
Now that a new version is pulled onto the NUC, go to the folder&lt;br /&gt;
 ~/flexbot_deploy&lt;br /&gt;
and compile the code by&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
=Uploading to Teensy=&lt;br /&gt;
From the folder&lt;br /&gt;
 ~/flexbot_deploy&lt;br /&gt;
open up the Teensy application by typing&lt;br /&gt;
 ./teensy&lt;br /&gt;
Push the button on the Teensy located in the Flexbot leg, and upload the code from the Teensy application.&lt;br /&gt;
&lt;br /&gt;
=Closing Remarks=&lt;br /&gt;
It is always recommended to completely reboot the power supply to the Flexbot leg after uploading the code. The IMU&#039;s are known to sometimes have issues after the Teensy have rebooted and they have not. So to be safe, just kill the power to the hardware and turn it on again.&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Flexbot&amp;diff=3247</id>
		<title>Flexbot</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Flexbot&amp;diff=3247"/>
		<updated>2017-12-07T21:36:00Z</updated>

		<summary type="html">&lt;p&gt;S130074: /* Instructions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Introduction=&lt;br /&gt;
This is the main page of Flexbot. Here you will find all information and instructions related to the Flexbot project. A very important resource of this project is the git-repository which holds all documents, drawings, schematics and software.&lt;br /&gt;
&lt;br /&gt;
[[File:Flexbot-rendered-115678 gi tonemapped reinhard05.png]]&lt;br /&gt;
&amp;lt;!--[[File:underben-screenshot.png]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Information=&lt;br /&gt;
[[Repository | Documents, drawings and software]] (git repository)&lt;br /&gt;
&lt;br /&gt;
[[flexbot_design|Hardware design overview]] and open items (to-do).&lt;br /&gt;
&lt;br /&gt;
[[To do | Mechanical design modification to do list]] - design change request list (please amend when you note a problem / and delete when solved)&lt;br /&gt;
&lt;br /&gt;
[[flexbot_software | Software to do list]] - change request and to do (please amend when you note a problem / and delete when solved)&lt;br /&gt;
&lt;br /&gt;
[[Flexbot_parts_list | Flexbot parts list]] (please note, when you know)&lt;br /&gt;
&lt;br /&gt;
[[ProjectPlan | Project plan]] notes&lt;br /&gt;
&lt;br /&gt;
=Instructions=&lt;br /&gt;
&lt;br /&gt;
[[mavlink| MAVLink communication protocol ]]&lt;br /&gt;
&lt;br /&gt;
[[compile_teensy| Updating, compiling and uploading Teensy code from the NUC]]&lt;br /&gt;
&lt;br /&gt;
[[flexbot_visualizer| Flexbot Visualizer (GUI) ]]&lt;br /&gt;
&lt;br /&gt;
[[Importing_models_from_OnShape| Importing model from OnShape ]]&lt;br /&gt;
&lt;br /&gt;
=Current state of Flexbot=&lt;br /&gt;
This section presents a &#039;&#039;&#039;very&#039;&#039;&#039; short summary of the current state of Flexbot. When a new change (of relevance i.e. no minors) is made, please update this section by adding a new line on top of the existing.&lt;br /&gt;
&lt;br /&gt;
* 03/12 2017: One complete leg of Flexbot has been build. PCBs have been fabricated and mounted. Main PCB holds all I/O + Teensy, another distributes power and thirds are current sensing breakout boards. No design errors have been identified to this point. MAVLink have been implemented as communication protocol. A GUI have been designed to visualise data wirelessly from Flexbot and simple control means have been implemented to test all actuators on Flexbot.&lt;br /&gt;
&lt;br /&gt;
* 23/07 2017: The mechanics from wheel to knee is finished. Electronics including external sensors have been mounted. Software supports basic functionality for interfacing, control, test and logging of each actuator (wheel, heading, height) and sensor.&lt;br /&gt;
&lt;br /&gt;
=Software terminal interface=&lt;br /&gt;
&#039;&#039;&#039;This is deprecated and replaced with MAVLink + GUI  as of 03/12-2017. However code still remains in source code - not active&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Each Teensy can be interfaced separately via USB communication. Simply plug in a USB cable, open a serial communication in Putty, Arduino or whatever you prefer and type  &lt;br /&gt;
 help&lt;br /&gt;
This should return a menu with all options for the connected device. This should include:&lt;br /&gt;
* Changing controller and reference parameters&lt;br /&gt;
* Starting and stopping&lt;br /&gt;
* Printout of sensor data (to be used for debugging)&lt;br /&gt;
* Adding and removing items for logging&lt;br /&gt;
* Logging features (start logging, log interval and retrieve log in a MATLAB compatible format)&lt;br /&gt;
* Save and load to and from EEPROM (holds logging parameters and controller setting)&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_visualizer&amp;diff=3246</id>
		<title>Flexbot visualizer</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_visualizer&amp;diff=3246"/>
		<updated>2017-12-07T21:34:23Z</updated>

		<summary type="html">&lt;p&gt;S130074: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Flexbot]] main page&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
The Flexbot Visualizer have been created as a tool for everyone using and working on Flexbot. The GUI will allow users to connect wirelessly to Flexbot with the ultimate purpose of receiving and sending messages  in real time. The GUI also features a very basic control interface that allows the user excite all actuators in real time. This is meant for testing purposes only and not as a gamepad for driving Flexbot around. (although that sounds quite fun!)&lt;br /&gt;
&lt;br /&gt;
=Dependencies=&lt;br /&gt;
The GUI is developed with Qt in C++ and should be run from the source/project files, i.e. there exists no executable format of this application. Qt supports all operating systems and is not depended on anything but its own libraries. &lt;br /&gt;
&lt;br /&gt;
This means that Qt must be downloaded and installed. Qt can be downloaded from https://www1.qt.io/download/ - choose Desktop Applications and then the Open Source version. Note that Qt is a heavy gentlemen and will require approximately 5 GB of free space. The upside is that Qt comes with a &#039;&#039;&#039;very nice&#039;&#039;&#039; IDE that can be used for all projects (not only Qt applications).&lt;br /&gt;
&lt;br /&gt;
Other than Qt, make sure to pull the newest version of the Flexbot git repository.&lt;br /&gt;
&lt;br /&gt;
=Instructions on how to use=&lt;br /&gt;
This section will split down the &amp;quot;user manual&amp;quot; in small steps ensuring that all users should be able to navigate and utilize the GUI after reading this.&lt;br /&gt;
&lt;br /&gt;
==Running the Application==&lt;br /&gt;
Start by firing up Qt Creator - on the welcome screen choose to open a project. From here locate and select&lt;br /&gt;
 flexbot_visualizer.pro&lt;br /&gt;
which should be found under /code/GUI/flexbot_visualizer. This should open up the project including all project files.&lt;br /&gt;
&lt;br /&gt;
Run the application by pushing the green &amp;quot;play&amp;quot;-button or by pressing &#039;&#039;&#039;Ctrl+r&#039;&#039;&#039;. This builds and runs the application ultimately opening window as shown below&lt;br /&gt;
[[File:Gui1.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Connecting to Flexbot==&lt;br /&gt;
All communication to the Flexbot goes through the Intel NUC mounted on the Flexbot. The NUC will be running a very simple Python script that serves as a bridge for communication. Basically all it does is broadcast everything it receives over the USB serial interface to the network, and write everything it receives over the network to the Teensy via the USB serial interface. &lt;br /&gt;
&lt;br /&gt;
Connect to Flexbot WiFi hotspot&lt;br /&gt;
 ssid: NUC&lt;br /&gt;
 pw: grenen89&lt;br /&gt;
&lt;br /&gt;
To start the Python bridge, ssh into the NUC by opening a terminal and type&lt;br /&gt;
 ssh local@10.42.0.1&lt;br /&gt;
with password &#039;&#039;&#039;grenen&#039;&#039;&#039;. Change folder to&lt;br /&gt;
 ~/flexbot/code/MAVLink/Bridge&lt;br /&gt;
and start the script by typing&lt;br /&gt;
 python FlexbotBridge.py --dev /dev/ttyACM0&lt;br /&gt;
where &#039;&#039;/dev/ttyACM0&#039;&#039; corresponds to serial device. It tends to change, so if it fails to launch, try changing it to &#039;&#039;/dev/ttyACM1&#039;&#039;. &#039;&#039;&#039;Make sure ethernet is disconnected at this point. Otherwise it will not work!!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the bridge is running, and the client laptop/PC is connected to the NUC-network, press the connect button on the GUI.&lt;br /&gt;
This will bind to the multicast IP and port that Flexbot broadcasts to as well as it will read the &#039;&#039;flexbot.xml&#039;&#039; message definitions file and initialize all available signals. Note that the &#039;&#039;flexbot.xml&#039;&#039; file should be located in the same folder as the flexbot_visualizer but if it isn&#039;t found, the GUI will automatically warn the user about this and open a file browser that will let the user locate the file themself.&lt;br /&gt;
&lt;br /&gt;
To verify that connection is established, the heartbeat should pulse once a second or so. &lt;br /&gt;
&lt;br /&gt;
==Subscribing to Signals==&lt;br /&gt;
&lt;br /&gt;
After connecting to Flexbot, the &#039;&#039;Signals&#039;&#039; tab will be available. From here all signals to/from Flexbot are listed as shown below&lt;br /&gt;
[[File:Gui2.PNG]]&lt;br /&gt;
&lt;br /&gt;
In order to subscribe to a signal, i.e. receiving for real-time data visualizing, simply press the &#039;&#039;subcribe&#039;&#039; checkbox available for each message. When not listening in on specific messages, users should unsubscribe to them (and save bandwidth) by clicking the checkbox again. &lt;br /&gt;
&lt;br /&gt;
==Real-Time Data Visualization==&lt;br /&gt;
&lt;br /&gt;
After a message have been subscribed to, go back to the &#039;&#039;Plot&#039;&#039; tab. Here it is possible to generate up to four plots at once, each capable of plotting three messages at a time. An example of this is shown below&lt;br /&gt;
[[File:Gui3.PNG]]&lt;br /&gt;
&lt;br /&gt;
The time-slider sets the time-window visualised for each graph.&lt;br /&gt;
&lt;br /&gt;
==Basic Control Interface==&lt;br /&gt;
&lt;br /&gt;
The third tab, &#039;&#039;Controls&#039;&#039;, serves as a very simple control interface to Flexbot. At the time of writing it looks something like shown below&lt;br /&gt;
[[File:Gui4.PNG]]&lt;br /&gt;
&lt;br /&gt;
From here, each actuator of the currently build robot leg can be controlled and tested. &lt;br /&gt;
&lt;br /&gt;
This could and should (at some point) be extended to include the possibility to set reference inputs to Flexbot to obtain step-response and permit online tuning of controllers. However, at this point it serves only as very basic interface to test and run each actuator.&lt;br /&gt;
&lt;br /&gt;
=Closing Remarks=&lt;br /&gt;
In the time of writing the application is still very new. There may arise some issues along the way and the code might contain a few bugs. &lt;br /&gt;
&lt;br /&gt;
For questions regarding the GUI or bug fix requests (that you are not able to fix yourself), please refer to Jesper H. Christensen: jesper@haahrchristensen.dk&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_design&amp;diff=3245</id>
		<title>Flexbot design</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_design&amp;diff=3245"/>
		<updated>2017-12-04T18:13:20Z</updated>

		<summary type="html">&lt;p&gt;S130074: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Flexbot]] main page&lt;br /&gt;
&lt;br /&gt;
==Design overview hardware==&lt;br /&gt;
Each &amp;quot;leg&amp;quot; of the flexbot consists of 4 actuators. &lt;br /&gt;
* An angled DC motor to control the wheel.&lt;br /&gt;
* Two linear actuators to control the motion of the robot&#039;s body.&lt;br /&gt;
* A linear actuator to adjust heading angle on the wheel.&lt;br /&gt;
Each of the legs are interfaced and controlled by two &amp;amp;mu;-processor boards (Teensy 3.2 and 3.5). The boards are currently placed on matrix boards where other hardware components (IMU, motor driver, etc.) are accessible from.&lt;br /&gt;
Each leg is split up in two parts which are presented as the [[#Ankle hardware design|ankle configuration]] and the [[#Knee hardware design|knee configuration]]. The hardware design for robot&#039;s body is presented  [[#Body hardware design|here]].&lt;br /&gt;
&lt;br /&gt;
A complete 3D model of the robot is available using the online CAD software Onshape.com - JCA should be contacted for sharing and editing the model.&lt;br /&gt;
&lt;br /&gt;
Each leg part is connected with a two parallel stretches (mostly carbon tubes), each 4 carbon tubes, from foot to knee and from knee to hip (see also &lt;br /&gt;
[[Flexbot 3D print]]). &lt;br /&gt;
&lt;br /&gt;
[[File:tube_geometry.png]]&lt;br /&gt;
&lt;br /&gt;
Figure 1. Basic geometry.&lt;br /&gt;
&lt;br /&gt;
==Ankle hardware design==&lt;br /&gt;
The ankle configuration currently includes:&lt;br /&gt;
* Angled DC motor to run the wheel - model IG42-CRGM&lt;br /&gt;
* SyRen 10 motor driver - see [[Syren 10A motorcontroller| Syren 10A motorcontroller]]&lt;br /&gt;
* Teensy 3.2 &amp;amp;mu;-processor board&lt;br /&gt;
* Pololu 24V to 5V voltage regulator - model D24V22F5&lt;br /&gt;
* Firgelli L12-50-210-12-I linear actuator&lt;br /&gt;
* 14-bit rotary encoder - model AS5048A&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;As of November 2017 this schematic is deprecated - the git repository should be consulted for newest version&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The schematic for the ankle configuration is shown in Figure 1 and can be accessed using Upverter, a free online e-CAD design tool. Link to the project on Upverter is given [https://upverter.com/DTUAutomationControlFlexbot/97591cdad92a1840/Teensy_Wheel_Configuration/ here] - contact JCA for editorial access.&lt;br /&gt;
&lt;br /&gt;
In addition to the schematic shown it can be mentioned that a ferrite core has been introduced on the power supply wires for the DC motor. This reduces EMI which was found to greatly interfere with the encoder signals from the motor. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Teensy Wheel Configuration.png|970px]]&lt;br /&gt;
&lt;br /&gt;
Figure 1: Schematic for the ankle configuration for the Flexbot. (Click on picture for full resolution)&lt;br /&gt;
&lt;br /&gt;
===Open items (to-do list)===&lt;br /&gt;
This list includes items that needs to be done, but have not been finished (or started) yet. This serves as reference for where to start when catching up on the project. This list should be updated as items are finished and finished items should be moved to the list which represents the current configuration of the ankle. The responsibility of updating the schematic and git repository falls to the person responsible for carrying out the open item. This way the documentation both here and on git reflects the current state of the ankle configuration.&lt;br /&gt;
* The rotary encoder has been wired and tested. Connections in the schematic from the Teensy to the encoder are missing. The encoder still needs to be fixed to correct position on the wheel configuration and magnets needs to be attached to bolt fastening the spring dampener.&lt;br /&gt;
* A Pololu 24V to 12V needs to implemented on the matrix board to supply the small linear actuator. They are of model D24V22F12 (link to product is on git) and should be ordered but have not been received. &lt;br /&gt;
* The I2C interface for inter-configuration(and host)-communication should be removed from the board. USB should be used instead.&lt;br /&gt;
* When the final hardware configuration for the ankle has been decided upon, a revision 1 of a PCB layout should be made. Upverter holds the schematic, but footprints for layout should be carefully checked(or made).&lt;br /&gt;
&lt;br /&gt;
==Knee hardware design==&lt;br /&gt;
The knee configuration currently includes:&lt;br /&gt;
* A linear actuator to control the height (tilt) of the configuration - model DLA-12-10-A-200-POT-IP66&lt;br /&gt;
* Cytron 10A DC Motor Driver - model RB-Cyt-132&lt;br /&gt;
* MPU to obtain tilt - model MPU-9250/6500&lt;br /&gt;
* Teensy 3.5 &amp;amp;mu;-processor board&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;As of November 2017 this schematic is deprecated - the git repository should be consulted for newest version&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The schematic for the knee configuration is shown in Figure 2 and can be accessed using the free online e-CAD design tool Upverter. Link to the project on Upverter is given [https://upverter.com/DTUAutomationControlFlexbot/09ebc8887ee10a31/Teensy_Knee_Configuration/ here] - contact JCA for editorial access.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Flexbot Knee Configuration.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
Figure 2: Schematic for the knee configuration for the Flexbot. (Click on picture for full resolution)&lt;br /&gt;
&lt;br /&gt;
===Open items (to-do list)===&lt;br /&gt;
This list includes items that needs to be done, but have not been finished yet. This serves as reference for where to start when catching up on the project. This list should be updated as items are finished and finished items should be moved to the list which represents the current configuration of the knee. The responsibility of updating the schematic and git repository falls to the person responsible for carrying out the open item. This way the documentation both here and on git reflects the current state of the ankle configuration.&lt;br /&gt;
* A Pololu 24V to 5V needs to inserted onto the matrix board. Wiring has been made, only thing missing is the component and to solder pin headers onto the component. They are of model D24V22F5 (link to product is on git) and should be ordered but have not been received. &lt;br /&gt;
* A second motor driver needs to be fitted to the knee. Wiring has been made and the driver is on stock and are found in one of the two boxes containing parts for the project. &lt;br /&gt;
* The interface for linear actuator 1 supports the linear actuator with potentiometer feedback. This should at some point be changed to the ordered actuators with hall sensor feedback and the configuration on the matrix should be changed to reflect this as well (should be same as linear actuator 2). &lt;br /&gt;
* The matrix board needs to support a second MPU. It has not been investigated whether or not it can be connected to the same bus by changing the address. Maybe it would be easier to simply connect to its own I2C bus. Teensy 3.5 holds 3 I2C interfaces and currently uses 1. &lt;br /&gt;
* A second linear actuator should be connected to the knee. This relies on the mechanics to be finished. &lt;br /&gt;
* The I2C interface for inter-configuration(and host)-communication should be removed from the board. USB should be used instead.&lt;br /&gt;
* When the final hardware configuration for the knee has been decided upon, a revision 1 of a PCB layout should be made. Upverter holds the schematic, but footprints for layout should be carefully checked (or made).&lt;br /&gt;
* The encoder counts for the DC motor at the ankle is still giving issues after ferrit cores.&lt;br /&gt;
&lt;br /&gt;
==Body hardware design==&lt;br /&gt;
The design of the body hardware has not been started yet. A few ideas have been discussed bot nothing final has been decided upon. The body hardware design will first be relevant in mid/late autumn.&lt;br /&gt;
A few discussed ideas of what the body hardware design should include are listed below:&lt;br /&gt;
* An Intel Nuc i7 configuration: https://www.intel.com/content/www/us/en/products/boards-kits/nuc/kits.html&lt;br /&gt;
* A USB hub or at least enough connections to connect all Teensy &amp;amp;mu;-processor boards. This will sum up to 8 &amp;amp;mu;-processor boards (2 on each leg).&lt;br /&gt;
* A main power supply. Should be 24V obtained from LiPo batteries or other mobile source.&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_design&amp;diff=3244</id>
		<title>Flexbot design</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_design&amp;diff=3244"/>
		<updated>2017-12-04T18:12:05Z</updated>

		<summary type="html">&lt;p&gt;S130074: /* Ankle hardware design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Flexbot]] main page&lt;br /&gt;
&lt;br /&gt;
==Design overview hardware==&lt;br /&gt;
Each &amp;quot;leg&amp;quot; of the flexbot consists of 4 actuators. &lt;br /&gt;
* An angled DC motor to control the wheel.&lt;br /&gt;
* Two linear actuators to control the motion of the robot&#039;s body.&lt;br /&gt;
* A linear actuator to adjust heading angle on the wheel.&lt;br /&gt;
Each of the legs are interfaced and controlled by two &amp;amp;mu;-processor boards (Teensy 3.2 and 3.5). The boards are currently placed on matrix boards where other hardware components (IMU, motor driver, etc.) are accessible from.&lt;br /&gt;
Each leg is split up in two parts which are presented as the [[#Ankle hardware design|ankle configuration]] and the [[#Knee hardware design|knee configuration]]. The hardware design for robot&#039;s body is presented  [[#Body hardware design|here]].&lt;br /&gt;
&lt;br /&gt;
A complete 3D model of the robot is available using the online CAD software Onshape.com - JCA should be contacted for sharing and editing the model.&lt;br /&gt;
&lt;br /&gt;
Each leg part is connected with a two parallel stretches (mostly carbon tubes), each 4 carbon tubes, from foot to knee and from knee to hip (see also &lt;br /&gt;
[[Flexbot 3D print]]). &lt;br /&gt;
&lt;br /&gt;
[[File:tube_geometry.png]]&lt;br /&gt;
&lt;br /&gt;
Figure 1. Basic geometry.&lt;br /&gt;
&lt;br /&gt;
==Ankle hardware design==&lt;br /&gt;
The ankle configuration currently includes:&lt;br /&gt;
* Angled DC motor to run the wheel - model IG42-CRGM&lt;br /&gt;
* SyRen 10 motor driver - see [[Syren 10A motorcontroller| Syren 10A motorcontroller]]&lt;br /&gt;
* Teensy 3.2 &amp;amp;mu;-processor board&lt;br /&gt;
* Pololu 24V to 5V voltage regulator - model D24V22F5&lt;br /&gt;
* Firgelli L12-50-210-12-I linear actuator&lt;br /&gt;
* 14-bit rotary encoder - model AS5048A&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;As of November 2017 this schematic is deprecated - the git repository should be consulted for newest version&#039;&#039;&#039;&lt;br /&gt;
The schematic for the ankle configuration is shown in Figure 1 and can be accessed using Upverter, a free online e-CAD design tool. Link to the project on Upverter is given [https://upverter.com/DTUAutomationControlFlexbot/97591cdad92a1840/Teensy_Wheel_Configuration/ here] - contact JCA for editorial access.&lt;br /&gt;
&lt;br /&gt;
In addition to the schematic shown it can be mentioned that a ferrite core has been introduced on the power supply wires for the DC motor. This reduces EMI which was found to greatly interfere with the encoder signals from the motor. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Teensy Wheel Configuration.png|970px]]&lt;br /&gt;
&lt;br /&gt;
Figure 1: Schematic for the ankle configuration for the Flexbot. (Click on picture for full resolution)&lt;br /&gt;
&lt;br /&gt;
===Open items (to-do list)===&lt;br /&gt;
This list includes items that needs to be done, but have not been finished (or started) yet. This serves as reference for where to start when catching up on the project. This list should be updated as items are finished and finished items should be moved to the list which represents the current configuration of the ankle. The responsibility of updating the schematic and git repository falls to the person responsible for carrying out the open item. This way the documentation both here and on git reflects the current state of the ankle configuration.&lt;br /&gt;
* The rotary encoder has been wired and tested. Connections in the schematic from the Teensy to the encoder are missing. The encoder still needs to be fixed to correct position on the wheel configuration and magnets needs to be attached to bolt fastening the spring dampener.&lt;br /&gt;
* A Pololu 24V to 12V needs to implemented on the matrix board to supply the small linear actuator. They are of model D24V22F12 (link to product is on git) and should be ordered but have not been received. &lt;br /&gt;
* The I2C interface for inter-configuration(and host)-communication should be removed from the board. USB should be used instead.&lt;br /&gt;
* When the final hardware configuration for the ankle has been decided upon, a revision 1 of a PCB layout should be made. Upverter holds the schematic, but footprints for layout should be carefully checked(or made).&lt;br /&gt;
&lt;br /&gt;
==Knee hardware design==&lt;br /&gt;
The knee configuration currently includes:&lt;br /&gt;
* A linear actuator to control the height (tilt) of the configuration - model DLA-12-10-A-200-POT-IP66&lt;br /&gt;
* Cytron 10A DC Motor Driver - model RB-Cyt-132&lt;br /&gt;
* MPU to obtain tilt - model MPU-9250/6500&lt;br /&gt;
* Teensy 3.5 &amp;amp;mu;-processor board&lt;br /&gt;
&lt;br /&gt;
The schematic for the knee configuration is shown in Figure 2 and can be accessed using the free online e-CAD design tool Upverter. Link to the project on Upverter is given [https://upverter.com/DTUAutomationControlFlexbot/09ebc8887ee10a31/Teensy_Knee_Configuration/ here] - contact JCA for editorial access.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Flexbot Knee Configuration.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
Figure 2: Schematic for the knee configuration for the Flexbot. (Click on picture for full resolution)&lt;br /&gt;
&lt;br /&gt;
===Open items (to-do list)===&lt;br /&gt;
This list includes items that needs to be done, but have not been finished yet. This serves as reference for where to start when catching up on the project. This list should be updated as items are finished and finished items should be moved to the list which represents the current configuration of the knee. The responsibility of updating the schematic and git repository falls to the person responsible for carrying out the open item. This way the documentation both here and on git reflects the current state of the ankle configuration.&lt;br /&gt;
* A Pololu 24V to 5V needs to inserted onto the matrix board. Wiring has been made, only thing missing is the component and to solder pin headers onto the component. They are of model D24V22F5 (link to product is on git) and should be ordered but have not been received. &lt;br /&gt;
* A second motor driver needs to be fitted to the knee. Wiring has been made and the driver is on stock and are found in one of the two boxes containing parts for the project. &lt;br /&gt;
* The interface for linear actuator 1 supports the linear actuator with potentiometer feedback. This should at some point be changed to the ordered actuators with hall sensor feedback and the configuration on the matrix should be changed to reflect this as well (should be same as linear actuator 2). &lt;br /&gt;
* The matrix board needs to support a second MPU. It has not been investigated whether or not it can be connected to the same bus by changing the address. Maybe it would be easier to simply connect to its own I2C bus. Teensy 3.5 holds 3 I2C interfaces and currently uses 1. &lt;br /&gt;
* A second linear actuator should be connected to the knee. This relies on the mechanics to be finished. &lt;br /&gt;
* The I2C interface for inter-configuration(and host)-communication should be removed from the board. USB should be used instead.&lt;br /&gt;
* When the final hardware configuration for the knee has been decided upon, a revision 1 of a PCB layout should be made. Upverter holds the schematic, but footprints for layout should be carefully checked (or made).&lt;br /&gt;
* The encoder counts for the DC motor at the ankle is still giving issues after ferrit cores.&lt;br /&gt;
&lt;br /&gt;
==Body hardware design==&lt;br /&gt;
The design of the body hardware has not been started yet. A few ideas have been discussed bot nothing final has been decided upon. The body hardware design will first be relevant in mid/late autumn.&lt;br /&gt;
A few discussed ideas of what the body hardware design should include are listed below:&lt;br /&gt;
* An Intel Nuc i7 configuration: https://www.intel.com/content/www/us/en/products/boards-kits/nuc/kits.html&lt;br /&gt;
* A USB hub or at least enough connections to connect all Teensy &amp;amp;mu;-processor boards. This will sum up to 8 &amp;amp;mu;-processor boards (2 on each leg).&lt;br /&gt;
* A main power supply. Should be 24V obtained from LiPo batteries or other mobile source.&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_visualizer&amp;diff=3243</id>
		<title>Flexbot visualizer</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_visualizer&amp;diff=3243"/>
		<updated>2017-12-04T18:08:10Z</updated>

		<summary type="html">&lt;p&gt;S130074: /* Closing Remarks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Flexbot]] main page&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
The Flexbot Visualizer have been created as a tool for everyone using and working on Flexbot. The GUI will allow users to connect wirelessly to Flexbot with the ultimate purpose of receiving and sending messages  in real time. The GUI also features a very basic control interface that allows the user excite all actuators in real time. This is meant for testing purposes only and not as a gamepad for driving Flexbot around. (although that sounds quite fun!)&lt;br /&gt;
&lt;br /&gt;
=Dependencies=&lt;br /&gt;
The GUI is developed with Qt in C++ and should be run from the source/project files, i.e. there exists no executable format of this application. Qt supports all operating systems and is not depended on anything but its own libraries. &lt;br /&gt;
&lt;br /&gt;
This means that Qt must be downloaded and installed. Qt can be downloaded from https://www1.qt.io/download/ - choose Desktop Applications and then the Open Source version. Note that Qt is a heavy gentlemen and will require approximately 5 GB of free space. The upside is that Qt comes with a &#039;&#039;&#039;very nice&#039;&#039;&#039; IDE that can be used for all projects (not only Qt applications).&lt;br /&gt;
&lt;br /&gt;
Other than Qt, make sure to pull the newest version of the Flexbot git repository.&lt;br /&gt;
&lt;br /&gt;
=Instructions on how to use=&lt;br /&gt;
This section will split down the &amp;quot;user manual&amp;quot; in small steps ensuring that all users should be able to navigate and utilize the GUI after reading this.&lt;br /&gt;
&lt;br /&gt;
==Running the Application==&lt;br /&gt;
Start by firing up Qt Creator - on the welcome screen choose to open a project. From here locate and select&lt;br /&gt;
 flexbot_visualizer.pro&lt;br /&gt;
which should be found under /code/GUI/flexbot_visualizer. This should open up the project including all project files.&lt;br /&gt;
&lt;br /&gt;
Run the application by pushing the green &amp;quot;play&amp;quot;-button or by pressing &#039;&#039;&#039;Ctrl+r&#039;&#039;&#039;. This builds and runs the application ultimately opening window as shown below&lt;br /&gt;
[[File:Gui1.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Connecting to Flexbot==&lt;br /&gt;
All communication to the Flexbot goes through the Intel NUC mounted on the Flexbot. The NUC will be running a very simple Python script that serves as a bridge for communication. Basically all it does is broadcast everything it receives over the USB serial interface to the network, and write everything it receives over the network to the Teensy via the USB serial interface. &lt;br /&gt;
&lt;br /&gt;
Connect to Flexbot WiFi hotspot&lt;br /&gt;
 ssid: NUC&lt;br /&gt;
 pw: grenen89&lt;br /&gt;
If the Python script somehow isn&#039;t running automatically (it should), SSH into the NUC, go to ~/flexbot/code/MAVLink/Bridge and start the script by typing&lt;br /&gt;
 python FlexbotBridge.py&lt;br /&gt;
&lt;br /&gt;
When the bridge is running, and the client laptop/PC is connected to the NUC-network, press the connect button on the GUI.&lt;br /&gt;
This will bind to the multicast IP and port that Flexbot broadcasts to as well as it will read the &#039;&#039;flexbot.xml&#039;&#039; message definitions file and initialize all available signals. Note that the &#039;&#039;flexbot.xml&#039;&#039; file should be located in the same folder as the flexbot_visualizer but if it isn&#039;t found, the GUI will automatically warn the user about this and open a file browser that will let the user locate the file themself.&lt;br /&gt;
&lt;br /&gt;
To verify that connection is established, the heartbeat should pulse once a second or so. &lt;br /&gt;
&lt;br /&gt;
==Subscribing to Signals==&lt;br /&gt;
&lt;br /&gt;
After connecting to Flexbot, the &#039;&#039;Signals&#039;&#039; tab will be available. From here all signals to/from Flexbot are listed as shown below&lt;br /&gt;
[[File:Gui2.PNG]]&lt;br /&gt;
&lt;br /&gt;
In order to subscribe to a signal, i.e. receiving for real-time data visualizing, simply press the &#039;&#039;subcribe&#039;&#039; checkbox available for each message. When not listening in on specific messages, users should unsubscribe to them (and save bandwidth) by clicking the checkbox again. &lt;br /&gt;
&lt;br /&gt;
==Real-Time Data Visualization==&lt;br /&gt;
&lt;br /&gt;
After a message have been subscribed to, go back to the &#039;&#039;Plot&#039;&#039; tab. Here it is possible to generate up to four plots at once, each capable of plotting three messages at a time. An example of this is shown below&lt;br /&gt;
[[File:Gui3.PNG]]&lt;br /&gt;
&lt;br /&gt;
The time-slider sets the time-window visualised for each graph.&lt;br /&gt;
&lt;br /&gt;
==Basic Control Interface==&lt;br /&gt;
&lt;br /&gt;
The third tab, &#039;&#039;Controls&#039;&#039;, serves as a very simple control interface to Flexbot. At the time of writing it looks something like shown below&lt;br /&gt;
[[File:Gui4.PNG]]&lt;br /&gt;
&lt;br /&gt;
From here, each actuator of the currently build robot leg can be controlled and tested. &lt;br /&gt;
&lt;br /&gt;
This could and should (at some point) be extended to include the possibility to set reference inputs to Flexbot to obtain step-response and permit online tuning of controllers. However, at this point it serves only as very basic interface to test and run each actuator.&lt;br /&gt;
&lt;br /&gt;
=Closing Remarks=&lt;br /&gt;
In the time of writing the application is still very new. There may arise some issues along the way and the code might contain a few bugs. &lt;br /&gt;
&lt;br /&gt;
For questions regarding the GUI or bug fix requests (that you are not able to fix yourself), please refer to Jesper H. Christensen: jesper@haahrchristensen.dk&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_visualizer&amp;diff=3242</id>
		<title>Flexbot visualizer</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_visualizer&amp;diff=3242"/>
		<updated>2017-12-04T18:07:41Z</updated>

		<summary type="html">&lt;p&gt;S130074: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Flexbot]] main page&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
The Flexbot Visualizer have been created as a tool for everyone using and working on Flexbot. The GUI will allow users to connect wirelessly to Flexbot with the ultimate purpose of receiving and sending messages  in real time. The GUI also features a very basic control interface that allows the user excite all actuators in real time. This is meant for testing purposes only and not as a gamepad for driving Flexbot around. (although that sounds quite fun!)&lt;br /&gt;
&lt;br /&gt;
=Dependencies=&lt;br /&gt;
The GUI is developed with Qt in C++ and should be run from the source/project files, i.e. there exists no executable format of this application. Qt supports all operating systems and is not depended on anything but its own libraries. &lt;br /&gt;
&lt;br /&gt;
This means that Qt must be downloaded and installed. Qt can be downloaded from https://www1.qt.io/download/ - choose Desktop Applications and then the Open Source version. Note that Qt is a heavy gentlemen and will require approximately 5 GB of free space. The upside is that Qt comes with a &#039;&#039;&#039;very nice&#039;&#039;&#039; IDE that can be used for all projects (not only Qt applications).&lt;br /&gt;
&lt;br /&gt;
Other than Qt, make sure to pull the newest version of the Flexbot git repository.&lt;br /&gt;
&lt;br /&gt;
=Instructions on how to use=&lt;br /&gt;
This section will split down the &amp;quot;user manual&amp;quot; in small steps ensuring that all users should be able to navigate and utilize the GUI after reading this.&lt;br /&gt;
&lt;br /&gt;
==Running the Application==&lt;br /&gt;
Start by firing up Qt Creator - on the welcome screen choose to open a project. From here locate and select&lt;br /&gt;
 flexbot_visualizer.pro&lt;br /&gt;
which should be found under /code/GUI/flexbot_visualizer. This should open up the project including all project files.&lt;br /&gt;
&lt;br /&gt;
Run the application by pushing the green &amp;quot;play&amp;quot;-button or by pressing &#039;&#039;&#039;Ctrl+r&#039;&#039;&#039;. This builds and runs the application ultimately opening window as shown below&lt;br /&gt;
[[File:Gui1.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Connecting to Flexbot==&lt;br /&gt;
All communication to the Flexbot goes through the Intel NUC mounted on the Flexbot. The NUC will be running a very simple Python script that serves as a bridge for communication. Basically all it does is broadcast everything it receives over the USB serial interface to the network, and write everything it receives over the network to the Teensy via the USB serial interface. &lt;br /&gt;
&lt;br /&gt;
Connect to Flexbot WiFi hotspot&lt;br /&gt;
 ssid: NUC&lt;br /&gt;
 pw: grenen89&lt;br /&gt;
If the Python script somehow isn&#039;t running automatically (it should), SSH into the NUC, go to ~/flexbot/code/MAVLink/Bridge and start the script by typing&lt;br /&gt;
 python FlexbotBridge.py&lt;br /&gt;
&lt;br /&gt;
When the bridge is running, and the client laptop/PC is connected to the NUC-network, press the connect button on the GUI.&lt;br /&gt;
This will bind to the multicast IP and port that Flexbot broadcasts to as well as it will read the &#039;&#039;flexbot.xml&#039;&#039; message definitions file and initialize all available signals. Note that the &#039;&#039;flexbot.xml&#039;&#039; file should be located in the same folder as the flexbot_visualizer but if it isn&#039;t found, the GUI will automatically warn the user about this and open a file browser that will let the user locate the file themself.&lt;br /&gt;
&lt;br /&gt;
To verify that connection is established, the heartbeat should pulse once a second or so. &lt;br /&gt;
&lt;br /&gt;
==Subscribing to Signals==&lt;br /&gt;
&lt;br /&gt;
After connecting to Flexbot, the &#039;&#039;Signals&#039;&#039; tab will be available. From here all signals to/from Flexbot are listed as shown below&lt;br /&gt;
[[File:Gui2.PNG]]&lt;br /&gt;
&lt;br /&gt;
In order to subscribe to a signal, i.e. receiving for real-time data visualizing, simply press the &#039;&#039;subcribe&#039;&#039; checkbox available for each message. When not listening in on specific messages, users should unsubscribe to them (and save bandwidth) by clicking the checkbox again. &lt;br /&gt;
&lt;br /&gt;
==Real-Time Data Visualization==&lt;br /&gt;
&lt;br /&gt;
After a message have been subscribed to, go back to the &#039;&#039;Plot&#039;&#039; tab. Here it is possible to generate up to four plots at once, each capable of plotting three messages at a time. An example of this is shown below&lt;br /&gt;
[[File:Gui3.PNG]]&lt;br /&gt;
&lt;br /&gt;
The time-slider sets the time-window visualised for each graph.&lt;br /&gt;
&lt;br /&gt;
==Basic Control Interface==&lt;br /&gt;
&lt;br /&gt;
The third tab, &#039;&#039;Controls&#039;&#039;, serves as a very simple control interface to Flexbot. At the time of writing it looks something like shown below&lt;br /&gt;
[[File:Gui4.PNG]]&lt;br /&gt;
&lt;br /&gt;
From here, each actuator of the currently build robot leg can be controlled and tested. &lt;br /&gt;
&lt;br /&gt;
This could and should (at some point) be extended to include the possibility to set reference inputs to Flexbot to obtain step-response and permit online tuning of controllers. However, at this point it serves only as very basic interface to test and run each actuator.&lt;br /&gt;
&lt;br /&gt;
=Closing Remarks=&lt;br /&gt;
In the time of writing the application is still very new. Their may arise some issues along the way and the code might contain a few bugs. &lt;br /&gt;
&lt;br /&gt;
For questions regarding the GUI or bug fix requests (that you are not able to fix yourself), please refer to Jesper H. Christensen: jesper@haahrchristensen.dk&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_visualizer&amp;diff=3241</id>
		<title>Flexbot visualizer</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_visualizer&amp;diff=3241"/>
		<updated>2017-12-04T18:00:14Z</updated>

		<summary type="html">&lt;p&gt;S130074: Created page with &amp;quot;Back to Flexbot main page  =Introduction= The Flexbot Visualizer have been created as a tool for everyone using and working on Flexbot. The GUI will allow users to connect...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Flexbot]] main page&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
The Flexbot Visualizer have been created as a tool for everyone using and working on Flexbot. The GUI will allow users to connect wirelessly to Flexbot with the ultimate purpose of receiving and sending messages  in real time. The GUI also features very basic element that allows the user excite all actuators (as a controller) in real time. This is meant for testing purposes only and not as a gamepad for driving Flexbot around. (although that sounds quite fun!)&lt;br /&gt;
&lt;br /&gt;
=Dependencies=&lt;br /&gt;
The GUI is developed with Qt in C++ and should be run from the source/project files, i.e. there exists no executable format of this application. Qt supports all operating systems and is not depended on anything but its own libraries. &lt;br /&gt;
&lt;br /&gt;
This means that Qt must be downloaded and installed. Qt can be downloaded from https://www1.qt.io/download/ - choose Desktop Applications and then the Open Source version. Note that Qt is a heavy gentlemen and will require approximately 5 GB of free space. The upside is that Qt comes with a &#039;&#039;&#039;very nice&#039;&#039;&#039; IDE that can be used for all projects (not only Qt applications).&lt;br /&gt;
&lt;br /&gt;
Other than Qt, make sure to pull the newest version of the Flexbot git repository.&lt;br /&gt;
&lt;br /&gt;
=Instructions on how to use=&lt;br /&gt;
This section will split down the &amp;quot;user manual&amp;quot; in small steps ensuring that all users should be able to navigate and utilize the GUI after reading this.&lt;br /&gt;
&lt;br /&gt;
==Running the Application==&lt;br /&gt;
Start by firing up Qt Creator - on the welcome screen choose to open a project. From here locate and select&lt;br /&gt;
 flexbot_visualizer.pro&lt;br /&gt;
which should be found under /code/GUI/flexbot_visualizer. This should open up the project including all project files.&lt;br /&gt;
&lt;br /&gt;
Run the application by pushing the green &amp;quot;play&amp;quot;-button or by pressing &#039;&#039;&#039;Ctrl+r&#039;&#039;&#039;. This build and run should the application ultimately opening window as shown below&lt;br /&gt;
[[File:Gui1.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Connecting to Flexbot==&lt;br /&gt;
All communication to the Flexbot goes through the Intel NUC mounted on the Flexbot. The NUC will be running a very simple Python script that serves as a bridge for communication. Basically all it does is broadcast everything it receives over the USB serial interface to the network, and write everything it receives over the network to the Teensy via the USB serial interface. &lt;br /&gt;
&lt;br /&gt;
Connect to Flexbot WiFi hotspot&lt;br /&gt;
 ssid: NUC&lt;br /&gt;
 pw: grenen89&lt;br /&gt;
If the Python script somehow isn&#039;t running automatically (it should), SSH into the NUC, go to ~/flexbot/code/MAVLink/Bridge and start the script by typing&lt;br /&gt;
 python FlexbotBridge.py&lt;br /&gt;
&lt;br /&gt;
When the bridge is running, and the client laptop/PC is connected to the NUC-network, press the connect button on the GUI.&lt;br /&gt;
This will bind to the multicast IP and port that Flexbot broadcasts to as well as it will the &#039;&#039;flexbot.xml&#039;&#039; message definitions file and initialize all available signals. Not that the &#039;&#039;flexbot.xml&#039;&#039; file should be located in the same folder as the flexbot_visualizer but if it isn&#039;t found, the GUI will automatically warn the user about this and open a file browser that will let the user locate the file themself.&lt;br /&gt;
&lt;br /&gt;
To verify that connection is established, the heartbeat should pulse once a second or so. &lt;br /&gt;
&lt;br /&gt;
==Subscribing to Signals==&lt;br /&gt;
&lt;br /&gt;
After connecting to Flexbot, the &#039;&#039;Signals&#039;&#039; tab will be available. From here all signals to/from Flexbot are listed as shown below&lt;br /&gt;
[[File:Gui2.PNG]]&lt;br /&gt;
&lt;br /&gt;
In order to subscribe to a signal, i.e. receiving for real-time data visualizing, simply press the &#039;&#039;subcribe&#039;&#039; checkbox available for each message. When not listening in on specific messages, users should unsubscribe to them (and save bandwidth) by clicking the checkbox again. &lt;br /&gt;
&lt;br /&gt;
==Real-Time Data Visualization==&lt;br /&gt;
&lt;br /&gt;
After a message have been subscribed to go back to the &#039;&#039;Plot&#039;&#039; tab. Here it is possible to generate up to four plots at once, each capable of plotting three messages at a time. An example of this is shown below&lt;br /&gt;
[[File:Gui3.PNG]]&lt;br /&gt;
&lt;br /&gt;
The time-slider sets the time-window visualised for each graph.&lt;br /&gt;
&lt;br /&gt;
==Basic Control Interface==&lt;br /&gt;
&lt;br /&gt;
The third tab &#039;&#039;Controls&#039;&#039; serves as very simple control interface to Flexbot. At the time writing is looks something like shown below&lt;br /&gt;
[[File:Gui4.PNG]]&lt;br /&gt;
&lt;br /&gt;
From here each actuator of the currently build robot leg can be controlled and tested. &lt;br /&gt;
&lt;br /&gt;
This could and should (at some point) be extended to include the possibility to set reference inputs to Flexbot to obtain step-response and permit online tuning of controllers. However, at this point it only serves as very basic interface to test and run each actuator.&lt;br /&gt;
&lt;br /&gt;
=Closing Remarks=&lt;br /&gt;
In the time of writing the application is still very new. Their may arise some issues along the way and the code might contain a few bugs. &lt;br /&gt;
&lt;br /&gt;
For questions regarding the GUI or bug fix requests (that you are not able to fix yourself), please refer to Jesper H. Christensen: jesper@haahrchristensen.dk&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=File:Gui4.PNG&amp;diff=3240</id>
		<title>File:Gui4.PNG</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=File:Gui4.PNG&amp;diff=3240"/>
		<updated>2017-12-04T17:52:22Z</updated>

		<summary type="html">&lt;p&gt;S130074: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=File:Gui3.PNG&amp;diff=3239</id>
		<title>File:Gui3.PNG</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=File:Gui3.PNG&amp;diff=3239"/>
		<updated>2017-12-04T17:49:31Z</updated>

		<summary type="html">&lt;p&gt;S130074: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=File:Gui2.PNG&amp;diff=3238</id>
		<title>File:Gui2.PNG</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=File:Gui2.PNG&amp;diff=3238"/>
		<updated>2017-12-04T17:41:55Z</updated>

		<summary type="html">&lt;p&gt;S130074: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=File:Gui1.PNG&amp;diff=3237</id>
		<title>File:Gui1.PNG</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=File:Gui1.PNG&amp;diff=3237"/>
		<updated>2017-12-04T17:19:04Z</updated>

		<summary type="html">&lt;p&gt;S130074: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Mavlink&amp;diff=3236</id>
		<title>Mavlink</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Mavlink&amp;diff=3236"/>
		<updated>2017-12-04T16:53:20Z</updated>

		<summary type="html">&lt;p&gt;S130074: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Flexbot]] main page&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
The MAVLink protocol have been implemented in the Flexbot project to secure a standardized communication protocol with as little overhead as possible. This allows for not only transferring data over the serial USB interface between the Teensy and Intel NUC, but also for wireless transfer of all data from the NUC to client(s) and vice versa. &lt;br /&gt;
&lt;br /&gt;
For more information of the MAVLink protocol itself see http://qgroundcontrol.org/mavlink/start.&lt;br /&gt;
&lt;br /&gt;
This page will give information on how MAVLink is utilized in this project as well as how to update the main &#039;&#039;flexbot.xml&#039;&#039; message container and generate the C-headers + Python files needed.&lt;br /&gt;
&lt;br /&gt;
=Prerequisites=&lt;br /&gt;
Make sure to have downloaded the newest version of the Flexbot repository and head into code/MAVLink/ and make sure flexbot.xml, Bridge/ and Generator/ is present.&lt;br /&gt;
&lt;br /&gt;
=Adding messages to Flexbot=&lt;br /&gt;
All messages/signals to/from Flexbot are defined in flexbot.xml. &lt;br /&gt;
A message is defined by an ID, name and description. All signals related to this message is defined by a type (uint8_t, float, etc), name and signal description. &lt;br /&gt;
&lt;br /&gt;
E.g. to add a new message to Flexbot identify the last listed message ID and append to it:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;message id=&amp;quot;16&amp;quot; name=&amp;quot;TestSignal&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;description&amp;gt;Test signal for this example&amp;lt;/description&amp;gt;&lt;br /&gt;
   &amp;lt;field type=&amp;quot;float&amp;quot; name=&amp;quot;value1&amp;quot;&amp;gt;Floating point test value.&amp;lt;/field&amp;gt;&lt;br /&gt;
   &amp;lt;field type=&amp;quot;uint8_t&amp;quot; name=&amp;quot;publish&amp;quot;&amp;gt;Sets whether or not Teensy should publish this message.&amp;lt;/field&amp;gt;&lt;br /&gt;
 &amp;lt;/message&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An important note which goes for all messages is that it must contain the &#039;&#039;publish&#039;&#039; signal. This signal allows clients to subscribe to different messages and will save bandwidth as the Teensy only will publish messages that has subscribers.&lt;br /&gt;
&lt;br /&gt;
By updating flexbot.xml nothing magical will happen. In order to integrate the new version of the message definitions, C-headers must be generated and the source code on both Teensy and the GUI must be altered to support the new message definitions. &lt;br /&gt;
&lt;br /&gt;
=Generating C-headers &amp;amp; Python file=&lt;br /&gt;
In order to generate the header files used by the Teensy and GUI, a MAVLink generator program is used. This translates the message definition file (flexbot.xml) into a bunch of files related to the chosen language. In order to run the generator, go to /code/MAVLink/Generator and type&lt;br /&gt;
&lt;br /&gt;
 python mavgenerate.py&lt;br /&gt;
&lt;br /&gt;
This program should only depend on Python itself and Tkinter. See https://github.com/mavlink/mavlink for references.&lt;br /&gt;
&lt;br /&gt;
In the GUI, choose flexbot.xml and set an output path. Set the protocol to version 1.0 and choose the desired language. By pressing generate, the program should generate a set of files if C has been chosen and a single file for Python. &lt;br /&gt;
&lt;br /&gt;
What to do with these is broken down in the sections below.&lt;br /&gt;
&lt;br /&gt;
==Python==&lt;br /&gt;
For Python, the generator produces an error. This is corrected by changing line 13 from&lt;br /&gt;
 13: from ...generator.mavcrc import x25crc&lt;br /&gt;
to&lt;br /&gt;
 13: from mavcrc import x25crc&lt;br /&gt;
Now move the newly generated file to /code/MAVLink/Bridge and replace it with the one already existing. &lt;br /&gt;
&lt;br /&gt;
==C==&lt;br /&gt;
The files generated for C will need to be put into two locations. First copy all the generated files into &lt;br /&gt;
 /code/Teensy/src/mavlink &lt;br /&gt;
and replace with the ones already existing. &lt;br /&gt;
Repeat the process for the GUI - files are located at &lt;br /&gt;
 /code/GUI/flexbot_visualizer/mavlink&lt;br /&gt;
&lt;br /&gt;
=Update source code to support new messages=&lt;br /&gt;
This is considered the most important part. This ensures that the newly introduced messages are supported by software in both the Teensy source code and in the Flexbot Visualizer. There is a bit manual labour here, but with the given MAVLink protocol there is no way around it.&lt;br /&gt;
&lt;br /&gt;
==Updating Teensy source code==&lt;br /&gt;
A few steps needs to be taken here to ensure that the new message is supported. First locate and open&lt;br /&gt;
 /code/Teensy/src/command.cpp&lt;br /&gt;
Starting from line 320 or so is a function called &lt;br /&gt;
 void MAVLink_msg_handler(mavlink_message_t _msg)&lt;br /&gt;
This is where the incomming MAVLink messages will be processed. In order to support new messages there needs to be a section that processes each message. Follow the syntax in the code to append to the function. &lt;br /&gt;
&lt;br /&gt;
E.g. for a message with ID = 3 the processing will look similar to this&lt;br /&gt;
&lt;br /&gt;
 else if(ID == 3)&lt;br /&gt;
 {&lt;br /&gt;
   // DCCmd&lt;br /&gt;
   mavlink_dcwheelcmd_t msg;&lt;br /&gt;
   mavlink_msg_dcwheelcmd_decode(&amp;amp;_msg,&amp;amp;msg);&lt;br /&gt;
   dc_wheel.set(msg.dutycycle,msg.direction);&lt;br /&gt;
   dc_wheel.publish = msg.publish;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
I.e. a struct available from the MAVLink generated files needs to be initialised. This struct needs to be the one that matches the message. Next the message is decoded and put into the struct. From the struct all signals will be available as showed in the example and existing source code.&lt;br /&gt;
&lt;br /&gt;
The general idea is that each message is associated with a class (or signal) that has an attribute called &#039;&#039;publish&#039;&#039;. This will become useful when printing data over the USB serial interface. This is seen by looking at &lt;br /&gt;
 void printSensorStatus()&lt;br /&gt;
in &#039;&#039;command.cpp&#039;&#039;. This function call all classes&#039; &#039;&#039;print_data()&#039;&#039;-function which could look similar to this&lt;br /&gt;
 void Linear_Actuator::print_data()&lt;br /&gt;
 {&lt;br /&gt;
   if (publish)&lt;br /&gt;
   {&lt;br /&gt;
     uint8_t buf[2041];&lt;br /&gt;
     mavlink_message_t msg;&lt;br /&gt;
     mavlink_msg_act1sts_pack(0,0,&amp;amp;msg,0,current, publish);&lt;br /&gt;
     uint16_t len = mavlink_msg_to_send_buffer(buf,&amp;amp;msg);&lt;br /&gt;
     usb_serial_write(buf,len);&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
where the data is printed only if &#039;&#039;publish&#039;&#039; is set.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is basically what needs to be done in the Teensy source code. It is important to make sure that each received signal is decoded and processed.&lt;br /&gt;
&lt;br /&gt;
==Updating Flexbot Visualizer source code==&lt;br /&gt;
Two files needs to updated here. First locate and open&lt;br /&gt;
 /code/GUI/flexbot_visualizer/receiver.cpp&lt;br /&gt;
and go to the function&lt;br /&gt;
 QList&amp;lt;int&amp;gt; Receiver::process_MAVLink_msg(mavlink_message_t _msg)&lt;br /&gt;
As with the Teensy source code, the GUI also needs to process all incoming MAVLink messages. An example to this could be&lt;br /&gt;
 else if(ID == 3)&lt;br /&gt;
 {&lt;br /&gt;
   // DCCmd&lt;br /&gt;
   mavlink_dcwheelcmd_t msg;&lt;br /&gt;
   mavlink_msg_dcwheelcmd_decode(&amp;amp;_msg,&amp;amp;msg);&lt;br /&gt;
   flexbot-&amp;gt;update(flexbot-&amp;gt;MavIDtoID(ID),msg.speed);&lt;br /&gt;
   IDarray.push_back(flexbot-&amp;gt;MavIDtoID(ID));&lt;br /&gt;
   flexbot-&amp;gt;update(flexbot-&amp;gt;MavIDtoID(ID)+1,msg.publish);&lt;br /&gt;
   IDarray.push_back(flexbot-&amp;gt;MavIDtoID(ID)+1);&lt;br /&gt;
 }&lt;br /&gt;
Again the message is decoded, and the signal values are used to update the local values held by the GUI. Follow the examples already existing in the source code.&lt;br /&gt;
&lt;br /&gt;
Next locate and open&lt;br /&gt;
 /code/GUI/flexbot_visualizer/sender.cpp&lt;br /&gt;
and go to the function&lt;br /&gt;
 void Sender::process_mavlink_message(int ID)&lt;br /&gt;
Here each value for a given signal is retrieved from the GUI and packed as a MAVLink struct. An example of this is&lt;br /&gt;
 else if(ID == 3)&lt;br /&gt;
 {&lt;br /&gt;
  // DCCmd&lt;br /&gt;
  double speed = flexbot-&amp;gt;getValue(&amp;quot;DCWheelCmd&amp;quot;,&amp;quot;speed&amp;quot;);&lt;br /&gt;
  int dc = flexbot-&amp;gt;getValue(&amp;quot;DCWheelCmd&amp;quot;,&amp;quot;dutycycle&amp;quot;);&lt;br /&gt;
  int dir = flexbot-&amp;gt;getValue(&amp;quot;DCWheelCmd&amp;quot;,&amp;quot;direction&amp;quot;);&lt;br /&gt;
  int publish = flexbot-&amp;gt;getValue(&amp;quot;DCWheelCmd&amp;quot;,&amp;quot;publish&amp;quot;);&lt;br /&gt;
  mavlink_msg_dcwheelcmd_pack(0,0,&amp;amp;msg,speed,dc,dir,publish);&lt;br /&gt;
 }&lt;br /&gt;
Follow the examples already existing in the source code.&lt;br /&gt;
&lt;br /&gt;
=Closing remarks=&lt;br /&gt;
This is all that needs to be done to add new signals/messages to Flexbot.&lt;br /&gt;
&lt;br /&gt;
Some manual labour goes into hardcoding these functions as they cannot exist dynamically. It is very important that this is completed every single time a message is added. Otherwise the MAVLink interface, GUI and general communication simply cannot work. So please make sure this is complied to at all times!&lt;br /&gt;
&lt;br /&gt;
Questions about this can be referred to Jesper Christensen: jesper@haahrchristensen.dk&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Mavlink&amp;diff=3235</id>
		<title>Mavlink</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Mavlink&amp;diff=3235"/>
		<updated>2017-12-04T16:52:51Z</updated>

		<summary type="html">&lt;p&gt;S130074: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
The MAVLink protocol have been implemented in the Flexbot project to secure a standardized communication protocol with as little overhead as possible. This allows for not only transferring data over the serial USB interface between the Teensy and Intel NUC, but also for wireless transfer of all data from the NUC to client(s) and vice versa. &lt;br /&gt;
&lt;br /&gt;
For more information of the MAVLink protocol itself see http://qgroundcontrol.org/mavlink/start.&lt;br /&gt;
&lt;br /&gt;
This page will give information on how MAVLink is utilized in this project as well as how to update the main &#039;&#039;flexbot.xml&#039;&#039; message container and generate the C-headers + Python files needed.&lt;br /&gt;
&lt;br /&gt;
=Prerequisites=&lt;br /&gt;
Make sure to have downloaded the newest version of the Flexbot repository and head into code/MAVLink/ and make sure flexbot.xml, Bridge/ and Generator/ is present.&lt;br /&gt;
&lt;br /&gt;
=Adding messages to Flexbot=&lt;br /&gt;
All messages/signals to/from Flexbot are defined in flexbot.xml. &lt;br /&gt;
A message is defined by an ID, name and description. All signals related to this message is defined by a type (uint8_t, float, etc), name and signal description. &lt;br /&gt;
&lt;br /&gt;
E.g. to add a new message to Flexbot identify the last listed message ID and append to it:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;message id=&amp;quot;16&amp;quot; name=&amp;quot;TestSignal&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;description&amp;gt;Test signal for this example&amp;lt;/description&amp;gt;&lt;br /&gt;
   &amp;lt;field type=&amp;quot;float&amp;quot; name=&amp;quot;value1&amp;quot;&amp;gt;Floating point test value.&amp;lt;/field&amp;gt;&lt;br /&gt;
   &amp;lt;field type=&amp;quot;uint8_t&amp;quot; name=&amp;quot;publish&amp;quot;&amp;gt;Sets whether or not Teensy should publish this message.&amp;lt;/field&amp;gt;&lt;br /&gt;
 &amp;lt;/message&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An important note which goes for all messages is that it must contain the &#039;&#039;publish&#039;&#039; signal. This signal allows clients to subscribe to different messages and will save bandwidth as the Teensy only will publish messages that has subscribers.&lt;br /&gt;
&lt;br /&gt;
By updating flexbot.xml nothing magical will happen. In order to integrate the new version of the message definitions, C-headers must be generated and the source code on both Teensy and the GUI must be altered to support the new message definitions. &lt;br /&gt;
&lt;br /&gt;
=Generating C-headers &amp;amp; Python file=&lt;br /&gt;
In order to generate the header files used by the Teensy and GUI, a MAVLink generator program is used. This translates the message definition file (flexbot.xml) into a bunch of files related to the chosen language. In order to run the generator, go to /code/MAVLink/Generator and type&lt;br /&gt;
&lt;br /&gt;
 python mavgenerate.py&lt;br /&gt;
&lt;br /&gt;
This program should only depend on Python itself and Tkinter. See https://github.com/mavlink/mavlink for references.&lt;br /&gt;
&lt;br /&gt;
In the GUI, choose flexbot.xml and set an output path. Set the protocol to version 1.0 and choose the desired language. By pressing generate, the program should generate a set of files if C has been chosen and a single file for Python. &lt;br /&gt;
&lt;br /&gt;
What to do with these is broken down in the sections below.&lt;br /&gt;
&lt;br /&gt;
==Python==&lt;br /&gt;
For Python, the generator produces an error. This is corrected by changing line 13 from&lt;br /&gt;
 13: from ...generator.mavcrc import x25crc&lt;br /&gt;
to&lt;br /&gt;
 13: from mavcrc import x25crc&lt;br /&gt;
Now move the newly generated file to /code/MAVLink/Bridge and replace it with the one already existing. &lt;br /&gt;
&lt;br /&gt;
==C==&lt;br /&gt;
The files generated for C will need to be put into two locations. First copy all the generated files into &lt;br /&gt;
 /code/Teensy/src/mavlink &lt;br /&gt;
and replace with the ones already existing. &lt;br /&gt;
Repeat the process for the GUI - files are located at &lt;br /&gt;
 /code/GUI/flexbot_visualizer/mavlink&lt;br /&gt;
&lt;br /&gt;
=Update source code to support new messages=&lt;br /&gt;
This is considered the most important part. This ensures that the newly introduced messages are supported by software in both the Teensy source code and in the Flexbot Visualizer. There is a bit manual labour here, but with the given MAVLink protocol there is no way around it.&lt;br /&gt;
&lt;br /&gt;
==Updating Teensy source code==&lt;br /&gt;
A few steps needs to be taken here to ensure that the new message is supported. First locate and open&lt;br /&gt;
 /code/Teensy/src/command.cpp&lt;br /&gt;
Starting from line 320 or so is a function called &lt;br /&gt;
 void MAVLink_msg_handler(mavlink_message_t _msg)&lt;br /&gt;
This is where the incomming MAVLink messages will be processed. In order to support new messages there needs to be a section that processes each message. Follow the syntax in the code to append to the function. &lt;br /&gt;
&lt;br /&gt;
E.g. for a message with ID = 3 the processing will look similar to this&lt;br /&gt;
&lt;br /&gt;
 else if(ID == 3)&lt;br /&gt;
 {&lt;br /&gt;
   // DCCmd&lt;br /&gt;
   mavlink_dcwheelcmd_t msg;&lt;br /&gt;
   mavlink_msg_dcwheelcmd_decode(&amp;amp;_msg,&amp;amp;msg);&lt;br /&gt;
   dc_wheel.set(msg.dutycycle,msg.direction);&lt;br /&gt;
   dc_wheel.publish = msg.publish;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
I.e. a struct available from the MAVLink generated files needs to be initialised. This struct needs to be the one that matches the message. Next the message is decoded and put into the struct. From the struct all signals will be available as showed in the example and existing source code.&lt;br /&gt;
&lt;br /&gt;
The general idea is that each message is associated with a class (or signal) that has an attribute called &#039;&#039;publish&#039;&#039;. This will become useful when printing data over the USB serial interface. This is seen by looking at &lt;br /&gt;
 void printSensorStatus()&lt;br /&gt;
in &#039;&#039;command.cpp&#039;&#039;. This function call all classes&#039; &#039;&#039;print_data()&#039;&#039;-function which could look similar to this&lt;br /&gt;
 void Linear_Actuator::print_data()&lt;br /&gt;
 {&lt;br /&gt;
   if (publish)&lt;br /&gt;
   {&lt;br /&gt;
     uint8_t buf[2041];&lt;br /&gt;
     mavlink_message_t msg;&lt;br /&gt;
     mavlink_msg_act1sts_pack(0,0,&amp;amp;msg,0,current, publish);&lt;br /&gt;
     uint16_t len = mavlink_msg_to_send_buffer(buf,&amp;amp;msg);&lt;br /&gt;
     usb_serial_write(buf,len);&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
where the data is printed only if &#039;&#039;publish&#039;&#039; is set.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is basically what needs to be done in the Teensy source code. It is important to make sure that each received signal is decoded and processed.&lt;br /&gt;
&lt;br /&gt;
==Updating Flexbot Visualizer source code==&lt;br /&gt;
Two files needs to updated here. First locate and open&lt;br /&gt;
 /code/GUI/flexbot_visualizer/receiver.cpp&lt;br /&gt;
and go to the function&lt;br /&gt;
 QList&amp;lt;int&amp;gt; Receiver::process_MAVLink_msg(mavlink_message_t _msg)&lt;br /&gt;
As with the Teensy source code, the GUI also needs to process all incoming MAVLink messages. An example to this could be&lt;br /&gt;
 else if(ID == 3)&lt;br /&gt;
 {&lt;br /&gt;
   // DCCmd&lt;br /&gt;
   mavlink_dcwheelcmd_t msg;&lt;br /&gt;
   mavlink_msg_dcwheelcmd_decode(&amp;amp;_msg,&amp;amp;msg);&lt;br /&gt;
   flexbot-&amp;gt;update(flexbot-&amp;gt;MavIDtoID(ID),msg.speed);&lt;br /&gt;
   IDarray.push_back(flexbot-&amp;gt;MavIDtoID(ID));&lt;br /&gt;
   flexbot-&amp;gt;update(flexbot-&amp;gt;MavIDtoID(ID)+1,msg.publish);&lt;br /&gt;
   IDarray.push_back(flexbot-&amp;gt;MavIDtoID(ID)+1);&lt;br /&gt;
 }&lt;br /&gt;
Again the message is decoded, and the signal values are used to update the local values held by the GUI. Follow the examples already existing in the source code.&lt;br /&gt;
&lt;br /&gt;
Next locate and open&lt;br /&gt;
 /code/GUI/flexbot_visualizer/sender.cpp&lt;br /&gt;
and go to the function&lt;br /&gt;
 void Sender::process_mavlink_message(int ID)&lt;br /&gt;
Here each value for a given signal is retrieved from the GUI and packed as a MAVLink struct. An example of this is&lt;br /&gt;
 else if(ID == 3)&lt;br /&gt;
 {&lt;br /&gt;
  // DCCmd&lt;br /&gt;
  double speed = flexbot-&amp;gt;getValue(&amp;quot;DCWheelCmd&amp;quot;,&amp;quot;speed&amp;quot;);&lt;br /&gt;
  int dc = flexbot-&amp;gt;getValue(&amp;quot;DCWheelCmd&amp;quot;,&amp;quot;dutycycle&amp;quot;);&lt;br /&gt;
  int dir = flexbot-&amp;gt;getValue(&amp;quot;DCWheelCmd&amp;quot;,&amp;quot;direction&amp;quot;);&lt;br /&gt;
  int publish = flexbot-&amp;gt;getValue(&amp;quot;DCWheelCmd&amp;quot;,&amp;quot;publish&amp;quot;);&lt;br /&gt;
  mavlink_msg_dcwheelcmd_pack(0,0,&amp;amp;msg,speed,dc,dir,publish);&lt;br /&gt;
 }&lt;br /&gt;
Follow the examples already existing in the source code.&lt;br /&gt;
&lt;br /&gt;
=Closing remarks=&lt;br /&gt;
This is all that needs to be done to add new signals/messages to Flexbot.&lt;br /&gt;
&lt;br /&gt;
Some manual labour goes into hardcoding these functions as they cannot exist dynamically. It is very important that this is completed every single time a message is added. Otherwise the MAVLink interface, GUI and general communication simply cannot work. So please make sure this is complied to at all times!&lt;br /&gt;
&lt;br /&gt;
Questions about this can be referred to Jesper Christensen: jesper@haahrchristensen.dk&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Mavlink&amp;diff=3234</id>
		<title>Mavlink</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Mavlink&amp;diff=3234"/>
		<updated>2017-12-03T19:57:35Z</updated>

		<summary type="html">&lt;p&gt;S130074: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
The MAVLink protocol have been implemented in the Flexbot project to secure a standardized communication protocol with as little overhead as possible. This allows for not only transferring data over the serial USB interface between the Teensy and Intel NUC, but also for wireless transformation of all data from the NUC to client(s) and vice versa. &lt;br /&gt;
&lt;br /&gt;
For more information of the MAVLink protocol itself see http://qgroundcontrol.org/mavlink/start.&lt;br /&gt;
&lt;br /&gt;
This page will give information on how MAVLink is utilized in this project as well as how to update the main flexbot.xml message container and generate the C-headers + Python files needed.&lt;br /&gt;
&lt;br /&gt;
=Prerequisites=&lt;br /&gt;
Make sure to have downloaded the newest version of the Flexbot repository and head into code/MAVLink/ and make sure flexbot.xml, Bridge/ and Generator/ is present.&lt;br /&gt;
&lt;br /&gt;
=Adding messages to Flexbot=&lt;br /&gt;
All messages/signals to/from Flexbot are defined in flexbot.xml. &lt;br /&gt;
A message is defined by an ID, name and description. All signals related to this message is defined by a type (uint8_t, float, etc), name and signal description. &lt;br /&gt;
&lt;br /&gt;
E.g. to add a new message to Flexbot identify the last listed message ID and append to it:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;message id=&amp;quot;16&amp;quot; name=&amp;quot;TestSignal&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;description&amp;gt;Test signal for this example&amp;lt;/description&amp;gt;&lt;br /&gt;
   &amp;lt;field type=&amp;quot;float&amp;quot; name=&amp;quot;value1&amp;quot;&amp;gt;Floating point test value.&amp;lt;/field&amp;gt;&lt;br /&gt;
   &amp;lt;field type=&amp;quot;uint8_t&amp;quot; name=&amp;quot;publish&amp;quot;&amp;gt;Sets whether or not Teensy should publish this message.&amp;lt;/field&amp;gt;&lt;br /&gt;
 &amp;lt;/message&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An important note which goes for all messages is that it must contain the &#039;&#039;publish&#039;&#039; signal. This signal allows clients to subscribe to different messages and will save bandwidth as the Teensy only will publish messages that has subscribers.&lt;br /&gt;
&lt;br /&gt;
By updating flexbot.xml nothing magical will happen. In order to integrate the new version of the message definitions C-headers must be generated and the source code on both Teensy and the GUI must be altered to support the new message definitions. &lt;br /&gt;
&lt;br /&gt;
=Generating C-headers &amp;amp; Python file=&lt;br /&gt;
In order to generate the header files used by the Teensy and GUI, a MAVLink generator program is used. This translated the message definition file (flexbot.xml) into a bunch of files related to the chosen language. In order to run the generator, go to /code/MAVLink/Generator and type&lt;br /&gt;
&lt;br /&gt;
 python mavgenerate.py&lt;br /&gt;
&lt;br /&gt;
This program should only depend on Python itself and Tkinter. See https://github.com/mavlink/mavlink for references.&lt;br /&gt;
&lt;br /&gt;
In the GUI, choose flexbot.xml and set an output path. Set the protocol to version 1.0 and choose the desired language. By pressing generate, the program should generate a set files if C has been chosen and a single file for Python. &lt;br /&gt;
&lt;br /&gt;
What to do with these is broken down in the sections below.&lt;br /&gt;
&lt;br /&gt;
==Python==&lt;br /&gt;
For Python, the generator produces an error. This is corrected by changing line 13 from&lt;br /&gt;
 13: from ...generator.mavcrc import x25crc&lt;br /&gt;
to&lt;br /&gt;
 13: from mavcrc import x25crc&lt;br /&gt;
Now move the newly generated file to /code/MAVLink/Bridge and replace it with the one already existing. &lt;br /&gt;
&lt;br /&gt;
==C==&lt;br /&gt;
The files generated for C will need to be put into two locations. First copy all the generated files into &lt;br /&gt;
 /code/Teensy/src/mavlink &lt;br /&gt;
and replace with the ones already existing. &lt;br /&gt;
Repeat the process for the GUI - files are located at &lt;br /&gt;
 /code/GUI/flexbot_visualizer/mavlink&lt;br /&gt;
&lt;br /&gt;
=Update source code to support new messages=&lt;br /&gt;
This is considered the most important part. This ensures that the newly introduced messages are supported by software in both the Teensy source code and in the Flexbot Visualizer. There is a bit manual labour here, but with the given MAVLink protocol there is no way around it.&lt;br /&gt;
&lt;br /&gt;
==Updating Teensy source code==&lt;br /&gt;
A few steps needs to be taken here to ensure that the new message is supported. First locate and open&lt;br /&gt;
 /code/Teensy/src/command.cpp&lt;br /&gt;
Starting from line 320 or so is a function called &lt;br /&gt;
 void MAVLink_msg_handler(mavlink_message_t _msg)&lt;br /&gt;
This is where the incomming MAVLink messages will be processed. In order to support new messages there needs to be a section that processes each message. Follow the syntax in the code to append to the function. &lt;br /&gt;
&lt;br /&gt;
E.g. for a message with ID = 3 the processing will look similar to this&lt;br /&gt;
&lt;br /&gt;
 else if(ID == 3)&lt;br /&gt;
 {&lt;br /&gt;
   // DCCmd&lt;br /&gt;
   mavlink_dcwheelcmd_t msg;&lt;br /&gt;
   mavlink_msg_dcwheelcmd_decode(&amp;amp;_msg,&amp;amp;msg);&lt;br /&gt;
   dc_wheel.set(msg.dutycycle,msg.direction);&lt;br /&gt;
   dc_wheel.publish = msg.publish;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
I.e. a struct available from the MAVLink generated files needs to be initialised. This struct needs to be the one that matches the message. Next the message is decoded and put into the struct. From the struct all signals will be available as showed in the example and existing source code.&lt;br /&gt;
&lt;br /&gt;
The general idea is that each message is associated with a class (or signal) that has an attribute called &#039;&#039;publish&#039;&#039;. This will become useful when printing data over the USB serial interface. This is seen by looking at &lt;br /&gt;
 void printSensorStatus()&lt;br /&gt;
in &#039;&#039;command.cpp&#039;&#039;. This function call all classes&#039; &#039;&#039;print_data()&#039;&#039;-function which could look similar to this&lt;br /&gt;
 void Linear_Actuator::print_data()&lt;br /&gt;
 {&lt;br /&gt;
   if (publish)&lt;br /&gt;
   {&lt;br /&gt;
     uint8_t buf[2041];&lt;br /&gt;
     mavlink_message_t msg;&lt;br /&gt;
     mavlink_msg_act1sts_pack(0,0,&amp;amp;msg,0,current, publish);&lt;br /&gt;
     uint16_t len = mavlink_msg_to_send_buffer(buf,&amp;amp;msg);&lt;br /&gt;
     usb_serial_write(buf,len);&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
where the data is printed only if &#039;&#039;publish&#039;&#039; is set.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is basically what needs to be done in the Teensy source code. It is important to make sure that each received signal is decoded and processed.&lt;br /&gt;
&lt;br /&gt;
==Updating Flexbot Visualizer source code==&lt;br /&gt;
Two files needs to updated here. First locate and open&lt;br /&gt;
 /code/GUI/flexbot_visualizer/receiver.cpp&lt;br /&gt;
and go to the function&lt;br /&gt;
 QList&amp;lt;int&amp;gt; Receiver::process_MAVLink_msg(mavlink_message_t _msg)&lt;br /&gt;
As with the Teensy source code, the GUI also needs to process all incoming MAVLink messages. An example to this could be&lt;br /&gt;
 else if(ID == 3)&lt;br /&gt;
 {&lt;br /&gt;
   // DCCmd&lt;br /&gt;
   mavlink_dcwheelcmd_t msg;&lt;br /&gt;
   mavlink_msg_dcwheelcmd_decode(&amp;amp;_msg,&amp;amp;msg);&lt;br /&gt;
   flexbot-&amp;gt;update(flexbot-&amp;gt;MavIDtoID(ID),msg.speed);&lt;br /&gt;
   IDarray.push_back(flexbot-&amp;gt;MavIDtoID(ID));&lt;br /&gt;
   flexbot-&amp;gt;update(flexbot-&amp;gt;MavIDtoID(ID)+1,msg.publish);&lt;br /&gt;
   IDarray.push_back(flexbot-&amp;gt;MavIDtoID(ID)+1);&lt;br /&gt;
 }&lt;br /&gt;
Again the message is decoded, and the signal values are used to update the local values held by the GUI. Follow the examples already existing in the source code.&lt;br /&gt;
&lt;br /&gt;
Next locate and open&lt;br /&gt;
 /code/GUI/flexbot_visualizer/sender.cpp&lt;br /&gt;
and go to the function&lt;br /&gt;
 void Sender::process_mavlink_message(int ID)&lt;br /&gt;
Here each value for a given signal is retrieved from the GUI and packed as a MAVLink struct. An example of this is&lt;br /&gt;
 else if(ID == 3)&lt;br /&gt;
 {&lt;br /&gt;
  // DCCmd&lt;br /&gt;
  double speed = flexbot-&amp;gt;getValue(&amp;quot;DCWheelCmd&amp;quot;,&amp;quot;speed&amp;quot;);&lt;br /&gt;
  int dc = flexbot-&amp;gt;getValue(&amp;quot;DCWheelCmd&amp;quot;,&amp;quot;dutycycle&amp;quot;);&lt;br /&gt;
  int dir = flexbot-&amp;gt;getValue(&amp;quot;DCWheelCmd&amp;quot;,&amp;quot;direction&amp;quot;);&lt;br /&gt;
  int publish = flexbot-&amp;gt;getValue(&amp;quot;DCWheelCmd&amp;quot;,&amp;quot;publish&amp;quot;);&lt;br /&gt;
  mavlink_msg_dcwheelcmd_pack(0,0,&amp;amp;msg,speed,dc,dir,publish);&lt;br /&gt;
 }&lt;br /&gt;
Follow the examples already existing in the source code.&lt;br /&gt;
&lt;br /&gt;
=Closing remarks=&lt;br /&gt;
This is all that needs to be done to add new signals/messages to Flexbot.&lt;br /&gt;
&lt;br /&gt;
Some manual labour goes into hardcoding these functions as they cannot exist dynamically. It is very important that this is completed every single time a message is added. Otherwise the MAVLink interface, GUI and general communication simply cannot work. So please make sure this is complied to at all times!&lt;br /&gt;
&lt;br /&gt;
Questions about this can be referred to Jesper Christensen: jesper@haahrchristensen.dk&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Mavlink&amp;diff=3233</id>
		<title>Mavlink</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Mavlink&amp;diff=3233"/>
		<updated>2017-12-03T19:56:39Z</updated>

		<summary type="html">&lt;p&gt;S130074: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
The MAVLink protocol have been implemented in the Flexbot project to secure a standardized communication protocol with as little overhead as possible. This allows for not only transferring data over the serial USB interface between the Teensy and Intel NUC, but also for wireless transformation of all data from the NUC to client(s) and vice versa. &lt;br /&gt;
&lt;br /&gt;
For more information of the MAVLink protocol itself see http://qgroundcontrol.org/mavlink/start.&lt;br /&gt;
&lt;br /&gt;
This page will give information on how MAVLink is utilized in this project as well as how to update the main flexbot.xml message container and generate the C-headers + Python files needed.&lt;br /&gt;
&lt;br /&gt;
Questions about this can be referred to JCA or jesper@haahrchristensen.dk&lt;br /&gt;
&lt;br /&gt;
=Prerequisites=&lt;br /&gt;
Make sure to have downloaded the newest version of the Flexbot repository and head into code/MAVLink/ and make sure flexbot.xml, Bridge/ and Generator/ is present.&lt;br /&gt;
&lt;br /&gt;
=Adding messages to Flexbot=&lt;br /&gt;
All messages/signals to/from Flexbot are defined in flexbot.xml. &lt;br /&gt;
A message is defined by an ID, name and description. All signals related to this message is defined by a type (uint8_t, float, etc), name and signal description. &lt;br /&gt;
&lt;br /&gt;
E.g. to add a new message to Flexbot identify the last listed message ID and append to it:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;message id=&amp;quot;16&amp;quot; name=&amp;quot;TestSignal&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;description&amp;gt;Test signal for this example&amp;lt;/description&amp;gt;&lt;br /&gt;
   &amp;lt;field type=&amp;quot;float&amp;quot; name=&amp;quot;value1&amp;quot;&amp;gt;Floating point test value.&amp;lt;/field&amp;gt;&lt;br /&gt;
   &amp;lt;field type=&amp;quot;uint8_t&amp;quot; name=&amp;quot;publish&amp;quot;&amp;gt;Sets whether or not Teensy should publish this message.&amp;lt;/field&amp;gt;&lt;br /&gt;
 &amp;lt;/message&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An important note which goes for all messages is that it must contain the &#039;&#039;publish&#039;&#039; signal. This signal allows clients to subscribe to different messages and will save bandwidth as the Teensy only will publish messages that has subscribers.&lt;br /&gt;
&lt;br /&gt;
By updating flexbot.xml nothing magical will happen. In order to integrate the new version of the message definitions C-headers must be generated and the source code on both Teensy and the GUI must be altered to support the new message definitions. &lt;br /&gt;
&lt;br /&gt;
=Generating C-headers &amp;amp; Python file=&lt;br /&gt;
In order to generate the header files used by the Teensy and GUI, a MAVLink generator program is used. This translated the message definition file (flexbot.xml) into a bunch of files related to the chosen language. In order to run the generator, go to /code/MAVLink/Generator and type&lt;br /&gt;
&lt;br /&gt;
 python mavgenerate.py&lt;br /&gt;
&lt;br /&gt;
This program should only depend on Python itself and Tkinter. See https://github.com/mavlink/mavlink for references.&lt;br /&gt;
&lt;br /&gt;
In the GUI, choose flexbot.xml and set an output path. Set the protocol to version 1.0 and choose the desired language. By pressing generate, the program should generate a set files if C has been chosen and a single file for Python. &lt;br /&gt;
&lt;br /&gt;
What to do with these is broken down in the sections below.&lt;br /&gt;
&lt;br /&gt;
==Python==&lt;br /&gt;
For Python, the generator produces an error. This is corrected by changing line 13 from&lt;br /&gt;
 13: from ...generator.mavcrc import x25crc&lt;br /&gt;
to&lt;br /&gt;
 13: from mavcrc import x25crc&lt;br /&gt;
Now move the newly generated file to /code/MAVLink/Bridge and replace it with the one already existing. &lt;br /&gt;
&lt;br /&gt;
==C==&lt;br /&gt;
The files generated for C will need to be put into two locations. First copy all the generated files into &lt;br /&gt;
 /code/Teensy/src/mavlink &lt;br /&gt;
and replace with the ones already existing. &lt;br /&gt;
Repeat the process for the GUI - files are located at &lt;br /&gt;
 /code/GUI/flexbot_visualizer/mavlink&lt;br /&gt;
&lt;br /&gt;
=Update source code to support new messages=&lt;br /&gt;
This is considered the most important part. This ensures that the newly introduced messages are supported by software in both the Teensy source code and in the Flexbot Visualizer. There is a bit manual labour here, but with the given MAVLink protocol there is no way around it.&lt;br /&gt;
&lt;br /&gt;
==Updating Teensy source code==&lt;br /&gt;
A few steps needs to be taken here to ensure that the new message is supported. First locate and open&lt;br /&gt;
 /code/Teensy/src/command.cpp&lt;br /&gt;
Starting from line 320 or so is a function called &lt;br /&gt;
 void MAVLink_msg_handler(mavlink_message_t _msg)&lt;br /&gt;
This is where the incomming MAVLink messages will be processed. In order to support new messages there needs to be a section that processes each message. Follow the syntax in the code to append to the function. &lt;br /&gt;
&lt;br /&gt;
E.g. for a message with ID = 3 the processing will look similar to this&lt;br /&gt;
&lt;br /&gt;
 else if(ID == 3)&lt;br /&gt;
 {&lt;br /&gt;
   // DCCmd&lt;br /&gt;
   mavlink_dcwheelcmd_t msg;&lt;br /&gt;
   mavlink_msg_dcwheelcmd_decode(&amp;amp;_msg,&amp;amp;msg);&lt;br /&gt;
   dc_wheel.set(msg.dutycycle,msg.direction);&lt;br /&gt;
   dc_wheel.publish = msg.publish;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
I.e. a struct available from the MAVLink generated files needs to be initialised. This struct needs to be the one that matches the message. Next the message is decoded and put into the struct. From the struct all signals will be available as showed in the example and existing source code.&lt;br /&gt;
&lt;br /&gt;
The general idea is that each message is associated with a class (or signal) that has an attribute called &#039;&#039;publish&#039;&#039;. This will become useful when printing data over the USB serial interface. This is seen by looking at &lt;br /&gt;
 void printSensorStatus()&lt;br /&gt;
in &#039;&#039;command.cpp&#039;&#039;. This function call all classes&#039; &#039;&#039;print_data()&#039;&#039;-function which could look similar to this&lt;br /&gt;
 void Linear_Actuator::print_data()&lt;br /&gt;
 {&lt;br /&gt;
   if (publish)&lt;br /&gt;
   {&lt;br /&gt;
     uint8_t buf[2041];&lt;br /&gt;
     mavlink_message_t msg;&lt;br /&gt;
     mavlink_msg_act1sts_pack(0,0,&amp;amp;msg,0,current, publish);&lt;br /&gt;
     uint16_t len = mavlink_msg_to_send_buffer(buf,&amp;amp;msg);&lt;br /&gt;
     usb_serial_write(buf,len);&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
where the data is printed only if &#039;&#039;publish&#039;&#039; is set.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is basically what needs to be done in the Teensy source code. It is important to make sure that each received signal is decoded and processed.&lt;br /&gt;
&lt;br /&gt;
==Updating Flexbot Visualizer source code==&lt;br /&gt;
Two files needs to updated here. First locate and open&lt;br /&gt;
 /code/GUI/flexbot_visualizer/receiver.cpp&lt;br /&gt;
and go to the function&lt;br /&gt;
 QList&amp;lt;int&amp;gt; Receiver::process_MAVLink_msg(mavlink_message_t _msg)&lt;br /&gt;
As with the Teensy source code, the GUI also needs to process all incoming MAVLink messages. An example to this could be&lt;br /&gt;
 else if(ID == 3)&lt;br /&gt;
 {&lt;br /&gt;
   // DCCmd&lt;br /&gt;
   mavlink_dcwheelcmd_t msg;&lt;br /&gt;
   mavlink_msg_dcwheelcmd_decode(&amp;amp;_msg,&amp;amp;msg);&lt;br /&gt;
   flexbot-&amp;gt;update(flexbot-&amp;gt;MavIDtoID(ID),msg.speed);&lt;br /&gt;
   IDarray.push_back(flexbot-&amp;gt;MavIDtoID(ID));&lt;br /&gt;
   flexbot-&amp;gt;update(flexbot-&amp;gt;MavIDtoID(ID)+1,msg.publish);&lt;br /&gt;
   IDarray.push_back(flexbot-&amp;gt;MavIDtoID(ID)+1);&lt;br /&gt;
 }&lt;br /&gt;
Again the message is decoded, and the signal values are used to update the local values held by the GUI. Follow the examples already existing in the source code.&lt;br /&gt;
&lt;br /&gt;
Next locate and open&lt;br /&gt;
 /code/GUI/flexbot_visualizer/sender.cpp&lt;br /&gt;
and go to the function&lt;br /&gt;
 void Sender::process_mavlink_message(int ID)&lt;br /&gt;
Here each value for a given signal is retrieved from the GUI and packed as a MAVLink struct. An example of this is&lt;br /&gt;
 else if(ID == 3)&lt;br /&gt;
 {&lt;br /&gt;
  // DCCmd&lt;br /&gt;
  double speed = flexbot-&amp;gt;getValue(&amp;quot;DCWheelCmd&amp;quot;,&amp;quot;speed&amp;quot;);&lt;br /&gt;
  int dc = flexbot-&amp;gt;getValue(&amp;quot;DCWheelCmd&amp;quot;,&amp;quot;dutycycle&amp;quot;);&lt;br /&gt;
  int dir = flexbot-&amp;gt;getValue(&amp;quot;DCWheelCmd&amp;quot;,&amp;quot;direction&amp;quot;);&lt;br /&gt;
  int publish = flexbot-&amp;gt;getValue(&amp;quot;DCWheelCmd&amp;quot;,&amp;quot;publish&amp;quot;);&lt;br /&gt;
  mavlink_msg_dcwheelcmd_pack(0,0,&amp;amp;msg,speed,dc,dir,publish);&lt;br /&gt;
 }&lt;br /&gt;
Follow the examples already existing in the source code.&lt;br /&gt;
&lt;br /&gt;
=Closing remarks=&lt;br /&gt;
This is all that needs to be done to add new signals/messages to Flexbot.&lt;br /&gt;
&lt;br /&gt;
Some manual labour goes into hardcoding these functions as they cannot exist dynamically. It is very important that this is completed every single time a message is added. Otherwise the MAVLink interface, GUI and general communication simply cannot work. So please make sure this is complied to at all times!&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Mavlink&amp;diff=3232</id>
		<title>Mavlink</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Mavlink&amp;diff=3232"/>
		<updated>2017-12-03T18:31:54Z</updated>

		<summary type="html">&lt;p&gt;S130074: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
The MAVLink protocol have been implemented in the Flexbot project to secure a standardized communication protocol with as little overhead as possible. This allows for not only transferring data over the serial USB interface between the Teensy and Intel NUC, but also for wireless transformation of all data from the NUC to client(s) and vice versa. &lt;br /&gt;
&lt;br /&gt;
For more information of the MAVLink protocol itself see http://qgroundcontrol.org/mavlink/start.&lt;br /&gt;
&lt;br /&gt;
This page will give information on how MAVLink is utilized in this project as well as how to update the main flexbot.xml message container and generate the C-headers + Python files needed.&lt;br /&gt;
&lt;br /&gt;
=Prerequisites=&lt;br /&gt;
Make sure to have downloaded the newest version of the Flexbot repository and head into code/MAVLink/ and make sure flexbot.xml, Bridge/ and Generator/ is present.&lt;br /&gt;
&lt;br /&gt;
=Adding messages to Flexbot=&lt;br /&gt;
All messages/signals to/from Flexbot are defined in flexbot.xml. &lt;br /&gt;
A message is defined by an ID, name and description. All signals related to this message is defined by a type (uint8_t, float, etc), name and signal description. &lt;br /&gt;
&lt;br /&gt;
E.g. to add a new message to Flexbot identify the last listed message ID and append to it:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;message id=&amp;quot;16&amp;quot; name=&amp;quot;TestSignal&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;description&amp;gt;Test signal for this example&amp;lt;/description&amp;gt;&lt;br /&gt;
   &amp;lt;field type=&amp;quot;float&amp;quot; name=&amp;quot;value1&amp;quot;&amp;gt;Floating point test value.&amp;lt;/field&amp;gt;&lt;br /&gt;
   &amp;lt;field type=&amp;quot;uint8_t&amp;quot; name=&amp;quot;publish&amp;quot;&amp;gt;Sets whether or not Teensy should publish this message.&amp;lt;/field&amp;gt;&lt;br /&gt;
 &amp;lt;/message&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An important note which goes for all messages is that it must contain the &#039;&#039;publish&#039;&#039; signal. This signal allows clients to subscribe to different messages and will save bandwidth as the Teensy only will publish messages that has subscribers.&lt;br /&gt;
&lt;br /&gt;
By updating flexbot.xml nothing magical will happen. In order to integrate the new version of the message definitions C-headers must be generated and the source code on both Teensy and the GUI must be altered to support the new message definitions. &lt;br /&gt;
&lt;br /&gt;
=Generating C-headers &amp;amp; Python file=&lt;br /&gt;
In order to generate the header files used by the Teensy and GUI, a MAVLink generator program is used. This translated the message definition file (flexbot.xml) into a bunch of files related to the chosen language. In order to run the generator, go to /code/MAVLink/Generator and type&lt;br /&gt;
&lt;br /&gt;
 python mavgenerate.py&lt;br /&gt;
&lt;br /&gt;
This program should only depend on Python itself and Tkinter. See https://github.com/mavlink/mavlink for references.&lt;br /&gt;
&lt;br /&gt;
In the GUI, choose flexbot.xml and set an output path. Set the protocol to version 1.0 and choose the desired language. By pressing generate, the program should generate a set files if C has been chosen and a single file for Python. &lt;br /&gt;
&lt;br /&gt;
What to do with these is broken down in the sections below.&lt;br /&gt;
&lt;br /&gt;
==Python==&lt;br /&gt;
For Python, the generator produces an error. This is corrected by changing line 13 from&lt;br /&gt;
 13: from ...generator.mavcrc import x25crc&lt;br /&gt;
to&lt;br /&gt;
 13: from mavcrc import x25crc&lt;br /&gt;
Now move the newly generated file to /code/MAVLink/Bridge and replace it with the one already existing. &lt;br /&gt;
&lt;br /&gt;
==C==&lt;br /&gt;
The files generated for C will need to be put into two locations. First copy all the generated files into &lt;br /&gt;
 /code/Teensy/src/mavlink &lt;br /&gt;
and replace with the ones already existing. &lt;br /&gt;
Repeat the process for the GUI - files are located at &lt;br /&gt;
 /code/GUI/flexbot_visualizer/mavlink&lt;br /&gt;
&lt;br /&gt;
=Update source code to support new messages=&lt;br /&gt;
This is considered the most important part. This ensures that the newly introduced messages are supported by software in both the Teensy source code and in the Flexbot Visualizer. There is a bit manual labour here, but with the given MAVLink protocol there is no way around it.&lt;br /&gt;
&lt;br /&gt;
==Updating Teensy source code==&lt;br /&gt;
A few steps needs to be taken here to ensure that the new message is supported. First locate and open&lt;br /&gt;
 /code/Teensy/src/command.cpp&lt;br /&gt;
Starting from line 320 or so is a function called &lt;br /&gt;
 void MAVLink_msg_handler(mavlink_message_t _msg)&lt;br /&gt;
This is where the incomming MAVLink messages will be processed. In order to support new messages there needs to be a section that processes each message. Follow the syntax in the code to append to the function. &lt;br /&gt;
&lt;br /&gt;
E.g. for a message with ID = 2&lt;br /&gt;
&lt;br /&gt;
 else if(ID == 3)&lt;br /&gt;
 {&lt;br /&gt;
   // DCCmd&lt;br /&gt;
   mavlink_dcwheelcmd_t msg;&lt;br /&gt;
   mavlink_msg_dcwheelcmd_decode(&amp;amp;_msg,&amp;amp;msg);&lt;br /&gt;
   dc_wheel.set(msg.dutycycle,msg.direction);&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Mavlink&amp;diff=3231</id>
		<title>Mavlink</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Mavlink&amp;diff=3231"/>
		<updated>2017-12-03T18:08:38Z</updated>

		<summary type="html">&lt;p&gt;S130074: Created page with &amp;quot;=Introduction= The MAVLink protocol have been implemented in the Flexbot project to secure a standardized communication protocol with as little overhead as possible. This allo...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
The MAVLink protocol have been implemented in the Flexbot project to secure a standardized communication protocol with as little overhead as possible. This allows for not only transferring data over the serial USB interface between the Teensy and Intel NUC, but also for wireless transformation of all data from the NUC to client(s) and vice versa. &lt;br /&gt;
&lt;br /&gt;
For more information of the MAVLink protocol itself see http://qgroundcontrol.org/mavlink/start.&lt;br /&gt;
&lt;br /&gt;
This page will give information on how MAVLink is utilized in this project as well as how to update the main flexbot.xml message container and generate the C-headers + Python files needed.&lt;br /&gt;
&lt;br /&gt;
=Prerequisites=&lt;br /&gt;
Make sure to have downloaded the newest version of the Flexbot repository and head into code/MAVLink/ and make sure flexbot.xml, Bridge/ and Generator/ is present.&lt;br /&gt;
&lt;br /&gt;
=Adding messages to Flexbot=&lt;br /&gt;
All messages/signals to/from Flexbot are defined in flexbot.xml. &lt;br /&gt;
A message is defined by an ID, name and description. All signals related to this message is defined by a type (uint8_t, float, etc), name and signal description. &lt;br /&gt;
&lt;br /&gt;
E.g. to add a new message to Flexbot identify the last listed message ID and append to it:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;message id=&amp;quot;16&amp;quot; name=&amp;quot;TestSignal&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;description&amp;gt;Test signal for this example&amp;lt;/description&amp;gt;&lt;br /&gt;
   &amp;lt;field type=&amp;quot;float&amp;quot; name=&amp;quot;value1&amp;quot;&amp;gt;Floating point test value.&amp;lt;/field&amp;gt;&lt;br /&gt;
   &amp;lt;field type=&amp;quot;uint8_t&amp;quot; name=&amp;quot;publish&amp;quot;&amp;gt;Sets whether or not Teensy should publish this message.&amp;lt;/field&amp;gt;&lt;br /&gt;
 &amp;lt;/message&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An important note which goes for all messages is that it must contain the &#039;&#039;publish&#039;&#039; signal. This signal allows clients to subscribe to different messages and will save bandwidth as the Teensy only will publish messages that has subscribers.&lt;br /&gt;
&lt;br /&gt;
By updating flexbot.xml nothing magical will happen. In order to integrate the new version of the message definitions C-headers must be generated and the source code on both Teensy and the GUI must be altered to support the new message definitions. &lt;br /&gt;
&lt;br /&gt;
=Generating C-headers &amp;amp; Python file=&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Flexbot&amp;diff=3230</id>
		<title>Flexbot</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Flexbot&amp;diff=3230"/>
		<updated>2017-12-03T17:32:57Z</updated>

		<summary type="html">&lt;p&gt;S130074: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Introduction=&lt;br /&gt;
This is the main page of Flexbot. Here you will find all information and instructions related to the Flexbot project. A very important resource of this project is the git-repository which holds all documents, drawings, schematics and software.&lt;br /&gt;
&lt;br /&gt;
[[File:Flexbot-rendered-115678 gi tonemapped reinhard05.png]]&lt;br /&gt;
&amp;lt;!--[[File:underben-screenshot.png]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Information=&lt;br /&gt;
[[Repository | Documents, drawings and software]] (git repository)&lt;br /&gt;
&lt;br /&gt;
[[flexbot_design|Hardware design overview]] and open items (to-do).&lt;br /&gt;
&lt;br /&gt;
[[To do | Mechanical design modification to do list]] - design change request list (please amend when you note a problem / and delete when solved)&lt;br /&gt;
&lt;br /&gt;
[[flexbot_software | Software to do list]] - change request and to do (please amend when you note a problem / and delete when solved)&lt;br /&gt;
&lt;br /&gt;
[[Flexbot_parts_list | Flexbot parts list]] (please note, when you know)&lt;br /&gt;
&lt;br /&gt;
[[ProjectPlan | Project plan]] notes&lt;br /&gt;
&lt;br /&gt;
=Instructions=&lt;br /&gt;
&lt;br /&gt;
[[mavlink| MAVLink communication protocol ]]&lt;br /&gt;
&lt;br /&gt;
[[flexbot_visualizer| Flexbot Visualizer (GUI) ]]&lt;br /&gt;
&lt;br /&gt;
[[Importing_models_from_OnShape| Importing model from OnShape ]]&lt;br /&gt;
&lt;br /&gt;
=Current state of Flexbot=&lt;br /&gt;
This section presents a &#039;&#039;&#039;very&#039;&#039;&#039; short summary of the current state of Flexbot. When a new change (of relevance i.e. no minors) is made, please update this section by adding a new line on top of the existing.&lt;br /&gt;
&lt;br /&gt;
* 03/12 2017: One complete leg of Flexbot has been build. PCBs have been fabricated and mounted. Main PCB holds all I/O + Teensy, another distributes power and thirds are current sensing breakout boards. No design errors have been identified to this point. MAVLink have been implemented as communication protocol. A GUI have been designed to visualise data wirelessly from Flexbot and simple control means have been implemented to test all actuators on Flexbot.&lt;br /&gt;
&lt;br /&gt;
* 23/07 2017: The mechanics from wheel to knee is finished. Electronics including external sensors have been mounted. Software supports basic functionality for interfacing, control, test and logging of each actuator (wheel, heading, height) and sensor.&lt;br /&gt;
&lt;br /&gt;
=Software terminal interface=&lt;br /&gt;
&#039;&#039;&#039;This is deprecated and replaced with MAVLink + GUI  as of 03/12-2017. However code still remains in source code - not active&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Each Teensy can be interfaced separately via USB communication. Simply plug in a USB cable, open a serial communication in Putty, Arduino or whatever you prefer and type  &lt;br /&gt;
 help&lt;br /&gt;
This should return a menu with all options for the connected device. This should include:&lt;br /&gt;
* Changing controller and reference parameters&lt;br /&gt;
* Starting and stopping&lt;br /&gt;
* Printout of sensor data (to be used for debugging)&lt;br /&gt;
* Adding and removing items for logging&lt;br /&gt;
* Logging features (start logging, log interval and retrieve log in a MATLAB compatible format)&lt;br /&gt;
* Save and load to and from EEPROM (holds logging parameters and controller setting)&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Flexbot&amp;diff=3229</id>
		<title>Flexbot</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Flexbot&amp;diff=3229"/>
		<updated>2017-12-03T17:32:41Z</updated>

		<summary type="html">&lt;p&gt;S130074: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=Introduction=&lt;br /&gt;
This is the main page of Flexbot. Here you will find all information and instructions related to the Flexbot project. A very important resource of this project is the git-repository which holds all documents, drawings, schematics and software.&lt;br /&gt;
&lt;br /&gt;
[[File:Flexbot-rendered-115678 gi tonemapped reinhard05.png]]&lt;br /&gt;
&amp;lt;!--[[File:underben-screenshot.png]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Information=&lt;br /&gt;
[[Repository | Documents, drawings and software]] (git repository)&lt;br /&gt;
&lt;br /&gt;
[[flexbot_design|Hardware design overview]] and open items (to-do).&lt;br /&gt;
&lt;br /&gt;
[[To do | Mechanical design modification to do list]] - design change request list (please amend when you note a problem / and delete when solved)&lt;br /&gt;
&lt;br /&gt;
[[flexbot_software | Software to do list]] - change request and to do (please amend when you note a problem / and delete when solved)&lt;br /&gt;
&lt;br /&gt;
[[Flexbot_parts_list | Flexbot parts list]] (please note, when you know)&lt;br /&gt;
&lt;br /&gt;
[[ProjectPlan | Project plan]] notes&lt;br /&gt;
&lt;br /&gt;
=Instructions=&lt;br /&gt;
&lt;br /&gt;
[[mavlink| MAVLink communication protocol ]]&lt;br /&gt;
&lt;br /&gt;
[[flexbot_visualizer| Flexbot Visualizer (GUI) ]]&lt;br /&gt;
&lt;br /&gt;
[[Importing_models_from_OnShape| Importing model from OnShape ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Current state of Flexbot=&lt;br /&gt;
This section presents a &#039;&#039;&#039;very&#039;&#039;&#039; short summary of the current state of Flexbot. When a new change (of relevance i.e. no minors) is made, please update this section by adding a new line on top of the existing.&lt;br /&gt;
&lt;br /&gt;
* 03/12 2017: One complete leg of Flexbot has been build. PCBs have been fabricated and mounted. Main PCB holds all I/O + Teensy, another distributes power and thirds are current sensing breakout boards. No design errors have been identified to this point. MAVLink have been implemented as communication protocol. A GUI have been designed to visualise data wirelessly from Flexbot and simple control means have been implemented to test all actuators on Flexbot.&lt;br /&gt;
&lt;br /&gt;
* 23/07 2017: The mechanics from wheel to knee is finished. Electronics including external sensors have been mounted. Software supports basic functionality for interfacing, control, test and logging of each actuator (wheel, heading, height) and sensor.&lt;br /&gt;
&lt;br /&gt;
=Software terminal interface=&lt;br /&gt;
&#039;&#039;&#039;This is deprecated and replaced with MAVLink + GUI  as of 03/12-2017. However code still remains in source code - not active&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Each Teensy can be interfaced separately via USB communication. Simply plug in a USB cable, open a serial communication in Putty, Arduino or whatever you prefer and type  &lt;br /&gt;
 help&lt;br /&gt;
This should return a menu with all options for the connected device. This should include:&lt;br /&gt;
* Changing controller and reference parameters&lt;br /&gt;
* Starting and stopping&lt;br /&gt;
* Printout of sensor data (to be used for debugging)&lt;br /&gt;
* Adding and removing items for logging&lt;br /&gt;
* Logging features (start logging, log interval and retrieve log in a MATLAB compatible format)&lt;br /&gt;
* Save and load to and from EEPROM (holds logging parameters and controller setting)&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_design&amp;diff=3228</id>
		<title>Flexbot design</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_design&amp;diff=3228"/>
		<updated>2017-12-03T17:21:00Z</updated>

		<summary type="html">&lt;p&gt;S130074: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Flexbot]] main page&lt;br /&gt;
&lt;br /&gt;
==Design overview hardware==&lt;br /&gt;
Each &amp;quot;leg&amp;quot; of the flexbot consists of 4 actuators. &lt;br /&gt;
* An angled DC motor to control the wheel.&lt;br /&gt;
* Two linear actuators to control the motion of the robot&#039;s body.&lt;br /&gt;
* A linear actuator to adjust heading angle on the wheel.&lt;br /&gt;
Each of the legs are interfaced and controlled by two &amp;amp;mu;-processor boards (Teensy 3.2 and 3.5). The boards are currently placed on matrix boards where other hardware components (IMU, motor driver, etc.) are accessible from.&lt;br /&gt;
Each leg is split up in two parts which are presented as the [[#Ankle hardware design|ankle configuration]] and the [[#Knee hardware design|knee configuration]]. The hardware design for robot&#039;s body is presented  [[#Body hardware design|here]].&lt;br /&gt;
&lt;br /&gt;
A complete 3D model of the robot is available using the online CAD software Onshape.com - JCA should be contacted for sharing and editing the model.&lt;br /&gt;
&lt;br /&gt;
Each leg part is connected with a two parallel stretches (mostly carbon tubes), each 4 carbon tubes, from foot to knee and from knee to hip (see also &lt;br /&gt;
[[Flexbot 3D print]]). &lt;br /&gt;
&lt;br /&gt;
[[File:tube_geometry.png]]&lt;br /&gt;
&lt;br /&gt;
Figure 1. Basic geometry.&lt;br /&gt;
&lt;br /&gt;
==Ankle hardware design==&lt;br /&gt;
The ankle configuration currently includes:&lt;br /&gt;
* Angled DC motor to run the wheel - model IG42-CRGM&lt;br /&gt;
* SyRen 10 motor driver - see [[Syren 10A motorcontroller| Syren 10A motorcontroller]]&lt;br /&gt;
* Teensy 3.2 &amp;amp;mu;-processor board&lt;br /&gt;
* Pololu 24V to 5V voltage regulator - model D24V22F5&lt;br /&gt;
* Firgelli L12-50-210-12-I linear actuator&lt;br /&gt;
* 14-bit rotary encoder - model AS5048A&lt;br /&gt;
&lt;br /&gt;
The schematic for the ankle configuration is shown in Figure 1 and can be accessed using Upverter, a free online e-CAD design tool. Link to the project on Upverter is given [https://upverter.com/DTUAutomationControlFlexbot/97591cdad92a1840/Teensy_Wheel_Configuration/ here] - contact JCA for editorial access.&lt;br /&gt;
&lt;br /&gt;
In addition to the schematic shown it can be mentioned that a ferrite core has been introduced on the power supply wires for the DC motor. This reduces EMI which was found to greatly interfere with the encoder signals from the motor. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Teensy Wheel Configuration.png|970px]]&lt;br /&gt;
&lt;br /&gt;
Figure 1: Schematic for the ankle configuration for the Flexbot. (Click on picture for full resolution)&lt;br /&gt;
&lt;br /&gt;
===Open items (to-do list)===&lt;br /&gt;
This list includes items that needs to be done, but have not been finished (or started) yet. This serves as reference for where to start when catching up on the project. This list should be updated as items are finished and finished items should be moved to the list which represents the current configuration of the ankle. The responsibility of updating the schematic and git repository falls to the person responsible for carrying out the open item. This way the documentation both here and on git reflects the current state of the ankle configuration.&lt;br /&gt;
* The rotary encoder has been wired and tested. Connections in the schematic from the Teensy to the encoder are missing. The encoder still needs to be fixed to correct position on the wheel configuration and magnets needs to be attached to bolt fastening the spring dampener.&lt;br /&gt;
* A Pololu 24V to 12V needs to implemented on the matrix board to supply the small linear actuator. They are of model D24V22F12 (link to product is on git) and should be ordered but have not been received. &lt;br /&gt;
* The I2C interface for inter-configuration(and host)-communication should be removed from the board. USB should be used instead.&lt;br /&gt;
* When the final hardware configuration for the ankle has been decided upon, a revision 1 of a PCB layout should be made. Upverter holds the schematic, but footprints for layout should be carefully checked(or made). &lt;br /&gt;
&lt;br /&gt;
==Knee hardware design==&lt;br /&gt;
The knee configuration currently includes:&lt;br /&gt;
* A linear actuator to control the height (tilt) of the configuration - model DLA-12-10-A-200-POT-IP66&lt;br /&gt;
* Cytron 10A DC Motor Driver - model RB-Cyt-132&lt;br /&gt;
* MPU to obtain tilt - model MPU-9250/6500&lt;br /&gt;
* Teensy 3.5 &amp;amp;mu;-processor board&lt;br /&gt;
&lt;br /&gt;
The schematic for the knee configuration is shown in Figure 2 and can be accessed using the free online e-CAD design tool Upverter. Link to the project on Upverter is given [https://upverter.com/DTUAutomationControlFlexbot/09ebc8887ee10a31/Teensy_Knee_Configuration/ here] - contact JCA for editorial access.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Flexbot Knee Configuration.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
Figure 2: Schematic for the knee configuration for the Flexbot. (Click on picture for full resolution)&lt;br /&gt;
&lt;br /&gt;
===Open items (to-do list)===&lt;br /&gt;
This list includes items that needs to be done, but have not been finished yet. This serves as reference for where to start when catching up on the project. This list should be updated as items are finished and finished items should be moved to the list which represents the current configuration of the knee. The responsibility of updating the schematic and git repository falls to the person responsible for carrying out the open item. This way the documentation both here and on git reflects the current state of the ankle configuration.&lt;br /&gt;
* A Pololu 24V to 5V needs to inserted onto the matrix board. Wiring has been made, only thing missing is the component and to solder pin headers onto the component. They are of model D24V22F5 (link to product is on git) and should be ordered but have not been received. &lt;br /&gt;
* A second motor driver needs to be fitted to the knee. Wiring has been made and the driver is on stock and are found in one of the two boxes containing parts for the project. &lt;br /&gt;
* The interface for linear actuator 1 supports the linear actuator with potentiometer feedback. This should at some point be changed to the ordered actuators with hall sensor feedback and the configuration on the matrix should be changed to reflect this as well (should be same as linear actuator 2). &lt;br /&gt;
* The matrix board needs to support a second MPU. It has not been investigated whether or not it can be connected to the same bus by changing the address. Maybe it would be easier to simply connect to its own I2C bus. Teensy 3.5 holds 3 I2C interfaces and currently uses 1. &lt;br /&gt;
* A second linear actuator should be connected to the knee. This relies on the mechanics to be finished. &lt;br /&gt;
* The I2C interface for inter-configuration(and host)-communication should be removed from the board. USB should be used instead.&lt;br /&gt;
* When the final hardware configuration for the knee has been decided upon, a revision 1 of a PCB layout should be made. Upverter holds the schematic, but footprints for layout should be carefully checked (or made).&lt;br /&gt;
* The encoder counts for the DC motor at the ankle is still giving issues after ferrit cores.&lt;br /&gt;
&lt;br /&gt;
==Body hardware design==&lt;br /&gt;
The design of the body hardware has not been started yet. A few ideas have been discussed bot nothing final has been decided upon. The body hardware design will first be relevant in mid/late autumn.&lt;br /&gt;
A few discussed ideas of what the body hardware design should include are listed below:&lt;br /&gt;
* An Intel Nuc i7 configuration: https://www.intel.com/content/www/us/en/products/boards-kits/nuc/kits.html&lt;br /&gt;
* A USB hub or at least enough connections to connect all Teensy &amp;amp;mu;-processor boards. This will sum up to 8 &amp;amp;mu;-processor boards (2 on each leg).&lt;br /&gt;
* A main power supply. Should be 24V obtained from LiPo batteries or other mobile source.&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Flexbot&amp;diff=3227</id>
		<title>Flexbot</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Flexbot&amp;diff=3227"/>
		<updated>2017-12-03T17:20:04Z</updated>

		<summary type="html">&lt;p&gt;S130074: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
[[flexbot_design|Hardware design overview]] and open items (to-do).&lt;br /&gt;
&lt;br /&gt;
[[To do | Mechanical design modification to do list]] - design change request list (please amend when you note a problem / and delete when solved)&lt;br /&gt;
&lt;br /&gt;
[[flexbot_software | Software to do list]] - change request and to do (please amend when you note a problem / and delete when solved)&lt;br /&gt;
&lt;br /&gt;
[[Flexbot_parts_list | Flexbot parts list]] (please note, when you know)&lt;br /&gt;
&lt;br /&gt;
[[Repository | Documents, drawings and software]] (git repository)&lt;br /&gt;
&lt;br /&gt;
[[ProjectPlan | Project plan]] notes&lt;br /&gt;
&lt;br /&gt;
[[Importing_models_from_OnShape| Importing model from OnShape ]]&lt;br /&gt;
&lt;br /&gt;
[[File:Flexbot-rendered-115678 gi tonemapped reinhard05.png]]&lt;br /&gt;
&amp;lt;!--[[File:underben-screenshot.png]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Current state of Flexbot=&lt;br /&gt;
This section presents a &#039;&#039;&#039;very&#039;&#039;&#039; short summary of the current state of Flexbot. When a new change (of relevance i.e. no minors) is made, please update this section by adding a new line on top of the existing.&lt;br /&gt;
&lt;br /&gt;
* 03/12 2017: One complete leg of Flexbot has been build. PCBs have been fabricated and mounted. Main PCB holds all I/O + Teensy, another distributes power and thirds are current sensing breakout boards. No design errors have been identified to this point. MAVLink have been implemented as communication protocol. A GUI have been designed to visualise data wirelessly from Flexbot and simple control means have been implemented to test all actuators on Flexbot.&lt;br /&gt;
&lt;br /&gt;
* 23/07 2017: The mechanics from wheel to knee is finished. Electronics including external sensors have been mounted. Software supports basic functionality for interfacing, control, test and logging of each actuator (wheel, heading, height) and sensor.&lt;br /&gt;
&lt;br /&gt;
=Software terminal interface=&lt;br /&gt;
Each Teensy can be interfaced separately via USB communication. Simply plug in a USB cable, open a serial communication in Putty, Arduino or whatever you prefer and type  &lt;br /&gt;
 help&lt;br /&gt;
This should return a menu with all options for the connected device. This should include:&lt;br /&gt;
* Changing controller and reference parameters&lt;br /&gt;
* Starting and stopping&lt;br /&gt;
* Printout of sensor data (to be used for debugging)&lt;br /&gt;
* Adding and removing items for logging&lt;br /&gt;
* Logging features (start logging, log interval and retrieve log in a MATLAB compatible format)&lt;br /&gt;
* Save and load to and from EEPROM (holds logging parameters and controller setting)&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Flexbot&amp;diff=3226</id>
		<title>Flexbot</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Flexbot&amp;diff=3226"/>
		<updated>2017-12-03T17:19:15Z</updated>

		<summary type="html">&lt;p&gt;S130074: /* Current state of Flexbot */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
[[flexbot_design|Hardware design overview]] and open items (to-do).&lt;br /&gt;
&lt;br /&gt;
[[To do | Mechanical design modification to do list]] - design change request list (please amend when you note a problem / and delete when solved)&lt;br /&gt;
&lt;br /&gt;
[[flexbot_software | Software to do list]] - change request and to do (please amend when you note a problem / and delete when solved)&lt;br /&gt;
&lt;br /&gt;
[[Flexbot_parts_list | Flexbot parts list]] (please note, when you know)&lt;br /&gt;
&lt;br /&gt;
[[Repository | Documents, drawings and software]] (git repository)&lt;br /&gt;
&lt;br /&gt;
[[ProjectPlan | Project plan]] notes&lt;br /&gt;
&lt;br /&gt;
[[Importing_models_from_OnShape| Importing model from OnShape ]]&lt;br /&gt;
&lt;br /&gt;
[[Syren 10A motorcontroller| Syren 10A motorcontroller]]&lt;br /&gt;
&lt;br /&gt;
[[File:Flexbot-rendered-115678 gi tonemapped reinhard05.png]]&lt;br /&gt;
&amp;lt;!--[[File:underben-screenshot.png]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Current state of Flexbot=&lt;br /&gt;
This section presents a &#039;&#039;&#039;very&#039;&#039;&#039; short summary of the current state of Flexbot. When a new change (of relevance i.e. no minors) is made, please update this section by adding a new line on top of the existing.&lt;br /&gt;
&lt;br /&gt;
* 03/12 2017: One complete leg of Flexbot has been build. PCBs have been fabricated and mounted. Main PCB holds all I/O + Teensy, another distributes power and thirds are current sensing breakout boards. No design errors have been identified to this point. MAVLink have been implemented as communication protocol. A GUI have been designed to visualise data wirelessly from Flexbot and simple control means have been implemented to test all actuators on Flexbot.&lt;br /&gt;
&lt;br /&gt;
* 23/07 2017: The mechanics from wheel to knee is finished. Electronics including external sensors have been mounted. Software supports basic functionality for interfacing, control, test and logging of each actuator (wheel, heading, height) and sensor.&lt;br /&gt;
&lt;br /&gt;
=Software terminal interface=&lt;br /&gt;
Each Teensy can be interfaced separately via USB communication. Simply plug in a USB cable, open a serial communication in Putty, Arduino or whatever you prefer and type  &lt;br /&gt;
 help&lt;br /&gt;
This should return a menu with all options for the connected device. This should include:&lt;br /&gt;
* Changing controller and reference parameters&lt;br /&gt;
* Starting and stopping&lt;br /&gt;
* Printout of sensor data (to be used for debugging)&lt;br /&gt;
* Adding and removing items for logging&lt;br /&gt;
* Logging features (start logging, log interval and retrieve log in a MATLAB compatible format)&lt;br /&gt;
* Save and load to and from EEPROM (holds logging parameters and controller setting)&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_parts_list&amp;diff=3097</id>
		<title>Flexbot parts list</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_parts_list&amp;diff=3097"/>
		<updated>2017-07-23T08:59:04Z</updated>

		<summary type="html">&lt;p&gt;S130074: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Flexbot]] main page&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
This page should hold the complete parts list for Flexbot. When adding a new component, please update correspondingly.&lt;br /&gt;
&lt;br /&gt;
=Leg=&lt;br /&gt;
&lt;br /&gt;
==Knee section==&lt;br /&gt;
&lt;br /&gt;
* [https://www.transmotec.se/produkt/dla-12-20-a-250-hs2-ip65/ DLA-12-20-A-250-HS2-ip65] - Transmotec actuator 12V, 500N, 25cm stroke, with magnetic encoder. Each encoder channel deliveres 13.8 transitions every mm, i.e. two channels delivers a transition every 0.0362mm. At 20V (0.8A no load) motor voltage (12V motor) the hall channel period is T=6.2ms =&amp;gt; 23mm/s, at 12V (0.65A no load) T=10.2ms =&amp;gt; 14.9mm/s. 12V full stroke 17 sek (25cm) = 14.7mm/s.&lt;br /&gt;
* [http://www.robotshop.com/en/cytron-13a-5-30v-single-dc-motor-controller.html Cytron 10A DC Motor Driver] - model RB-Cyt-132&lt;br /&gt;
* [https://www.sparkfun.com/products/13762 MPU-9250/6500] - IMU&lt;br /&gt;
* [https://www.pjrc.com/store/teensy35.html Teensy 3.5] - μ-processor board&lt;br /&gt;
* [https://www.pololu.com/product/2858 Pololu D24V22F5] - 24V to 5V voltage regulator&lt;br /&gt;
* Connectors and headers for the electronics - to be determined later.&lt;br /&gt;
*           - fjederben&lt;br /&gt;
&lt;br /&gt;
==Foot==&lt;br /&gt;
&lt;br /&gt;
* [http://www.trossenrobotics.com/p/figelli-L12-50mm-210-1-Linear-Actuator.aspx Firgelli L12-50-210-12-l] - steering actuator (12V) 5cm stroke, with controller&lt;br /&gt;
* [https://www.superdroidrobots.com/shop/item.aspx/ig42-24vdc-right-angle-240-rpm-gear-motor-with-encoder/1832/ IG42CR0024x00020R] - 24V drive motor with 20 pulse encoder&lt;br /&gt;
* [https://www.dimensionengineering.com/products/syren10 TE-098-110] - SyRen 10A motor driver (24V)&lt;br /&gt;
* [http://ams.com/eng/Products/Magnetic-Position-Sensors/Angle-Position-On-Axis/AS5047P as5047] - angle encoder for damper position&lt;br /&gt;
* [https://www.pololu.com/product/2858 Pololu D24V22F5] - 24V to 5V voltage regulator&lt;br /&gt;
* [https://www.pololu.com/product/2855 Pololu D24V22F12] - 24V to 12V voltage regulator&lt;br /&gt;
* [https://www.pjrc.com/store/teensy32.html Teensy 3.2] - μ-processor board.&lt;br /&gt;
* Connectors and headers for the electronics - to be determined later.&lt;br /&gt;
&lt;br /&gt;
==Mechanics==&lt;br /&gt;
&lt;br /&gt;
* FIDRacing DBXL front hub (FIDXL032) steering parts, including axle (but no wheel nut)&lt;br /&gt;
* RovalLosi LT Wheel nut&lt;br /&gt;
* RovanLosi LT tyre inner foam&lt;br /&gt;
* -tire?&lt;br /&gt;
* (link) - flex coupling between motor and wheel&lt;br /&gt;
* (link) - 6mm axle&lt;br /&gt;
&lt;br /&gt;
=Body=&lt;br /&gt;
* (link) - main PC (Intel Nuc i7?)&lt;br /&gt;
* (link) - batteries (LiPo?)&lt;br /&gt;
* (link) - USB hub (min. 8 ports)&lt;br /&gt;
&lt;br /&gt;
==Mechanics==&lt;br /&gt;
* - frame?&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_parts_list&amp;diff=3096</id>
		<title>Flexbot parts list</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_parts_list&amp;diff=3096"/>
		<updated>2017-07-23T08:58:20Z</updated>

		<summary type="html">&lt;p&gt;S130074: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Flexbot]] main page&lt;br /&gt;
&lt;br /&gt;
This page should hold the complete parts list for Flexbot. When adding a new component, please update correspondingly.&lt;br /&gt;
&lt;br /&gt;
=Leg=&lt;br /&gt;
&lt;br /&gt;
==Knee section==&lt;br /&gt;
&lt;br /&gt;
* [https://www.transmotec.se/produkt/dla-12-20-a-250-hs2-ip65/ DLA-12-20-A-250-HS2-ip65] - Transmotec actuator 12V, 500N, 25cm stroke, with magnetic encoder. Each encoder channel deliveres 13.8 transitions every mm, i.e. two channels delivers a transition every 0.0362mm. At 20V (0.8A no load) motor voltage (12V motor) the hall channel period is T=6.2ms =&amp;gt; 23mm/s, at 12V (0.65A no load) T=10.2ms =&amp;gt; 14.9mm/s. 12V full stroke 17 sek (25cm) = 14.7mm/s.&lt;br /&gt;
* [http://www.robotshop.com/en/cytron-13a-5-30v-single-dc-motor-controller.html Cytron 10A DC Motor Driver] - model RB-Cyt-132&lt;br /&gt;
* [https://www.sparkfun.com/products/13762 MPU-9250/6500] - IMU&lt;br /&gt;
* [https://www.pjrc.com/store/teensy35.html Teensy 3.5] - μ-processor board&lt;br /&gt;
* [https://www.pololu.com/product/2858 Pololu D24V22F5] - 24V to 5V voltage regulator&lt;br /&gt;
* Connectors and headers for the electronics - to be determined later.&lt;br /&gt;
*           - fjederben&lt;br /&gt;
&lt;br /&gt;
==Foot==&lt;br /&gt;
&lt;br /&gt;
* [http://www.trossenrobotics.com/p/figelli-L12-50mm-210-1-Linear-Actuator.aspx Firgelli L12-50-210-12-l] - steering actuator (12V) 5cm stroke, with controller&lt;br /&gt;
* [https://www.superdroidrobots.com/shop/item.aspx/ig42-24vdc-right-angle-240-rpm-gear-motor-with-encoder/1832/ IG42CR0024x00020R] - 24V drive motor with 20 pulse encoder&lt;br /&gt;
* [https://www.dimensionengineering.com/products/syren10 TE-098-110] - SyRen 10A motor driver (24V)&lt;br /&gt;
* [http://ams.com/eng/Products/Magnetic-Position-Sensors/Angle-Position-On-Axis/AS5047P as5047] - angle encoder for damper position&lt;br /&gt;
* [https://www.pololu.com/product/2858 Pololu D24V22F5] - 24V to 5V voltage regulator&lt;br /&gt;
* [https://www.pololu.com/product/2855 Pololu D24V22F12] - 24V to 12V voltage regulator&lt;br /&gt;
* [https://www.pjrc.com/store/teensy32.html Teensy 3.2] - μ-processor board.&lt;br /&gt;
* Connectors and headers for the electronics - to be determined later.&lt;br /&gt;
&lt;br /&gt;
==Mechanics==&lt;br /&gt;
&lt;br /&gt;
* FIDRacing DBXL front hub (FIDXL032) steering parts, including axle (but no wheel nut)&lt;br /&gt;
* RovalLosi LT Wheel nut&lt;br /&gt;
* RovanLosi LT tyre inner foam&lt;br /&gt;
* -tire?&lt;br /&gt;
* (link) - flex coupling between motor and wheel&lt;br /&gt;
* (link) - 6mm axle&lt;br /&gt;
&lt;br /&gt;
=Body=&lt;br /&gt;
* (link) - main PC (Intel Nuc i7?)&lt;br /&gt;
* (link) - batteries (LiPo?)&lt;br /&gt;
* (link) - USB hub (min. 8 ports)&lt;br /&gt;
&lt;br /&gt;
==Mechanics==&lt;br /&gt;
* - frame?&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_parts_list&amp;diff=3095</id>
		<title>Flexbot parts list</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_parts_list&amp;diff=3095"/>
		<updated>2017-07-23T08:56:54Z</updated>

		<summary type="html">&lt;p&gt;S130074: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Flexbot]] main page&lt;br /&gt;
&lt;br /&gt;
=Parts list=&lt;br /&gt;
This page should hold the complete parts list for Flexbot. When adding a new component, please update correspondingly.&lt;br /&gt;
&lt;br /&gt;
==Leg==&lt;br /&gt;
&lt;br /&gt;
===Knee section===&lt;br /&gt;
&lt;br /&gt;
* [https://www.transmotec.se/produkt/dla-12-20-a-250-hs2-ip65/ DLA-12-20-A-250-HS2-ip65] - Transmotec actuator 12V, 500N, 25cm stroke, with magnetic encoder. Each encoder channel deliveres 13.8 transitions every mm, i.e. two channels delivers a transition every 0.0362mm. At 20V (0.8A no load) motor voltage (12V motor) the hall channel period is T=6.2ms =&amp;gt; 23mm/s, at 12V (0.65A no load) T=10.2ms =&amp;gt; 14.9mm/s. 12V full stroke 17 sek (25cm) = 14.7mm/s.&lt;br /&gt;
* [http://www.robotshop.com/en/cytron-13a-5-30v-single-dc-motor-controller.html Cytron 10A DC Motor Driver] - model RB-Cyt-132&lt;br /&gt;
* [https://www.sparkfun.com/products/13762 MPU-9250/6500] - IMU&lt;br /&gt;
* [https://www.pjrc.com/store/teensy35.html Teensy 3.5] - μ-processor board&lt;br /&gt;
* [https://www.pololu.com/product/2858 Pololu D24V22F5] - 24V to 5V voltage regulator&lt;br /&gt;
* Connectors and headers for the electronics - to be determined later.&lt;br /&gt;
*           - fjederben&lt;br /&gt;
&lt;br /&gt;
===Foot===&lt;br /&gt;
&lt;br /&gt;
* [http://www.trossenrobotics.com/p/figelli-L12-50mm-210-1-Linear-Actuator.aspx Firgelli L12-50-210-12-l] - steering actuator (12V) 5cm stroke, with controller&lt;br /&gt;
* [https://www.superdroidrobots.com/shop/item.aspx/ig42-24vdc-right-angle-240-rpm-gear-motor-with-encoder/1832/ IG42CR0024x00020R] - 24V drive motor with 20 pulse encoder&lt;br /&gt;
* [https://www.dimensionengineering.com/products/syren10 TE-098-110] - SyRen 10A motor driver (24V)&lt;br /&gt;
* [http://ams.com/eng/Products/Magnetic-Position-Sensors/Angle-Position-On-Axis/AS5047P as5047] - angle encoder for damper position&lt;br /&gt;
* [https://www.pololu.com/product/2858 Pololu D24V22F5] - 24V to 5V voltage regulator&lt;br /&gt;
* [https://www.pololu.com/product/2855 Pololu D24V22F12] - 24V to 12V voltage regulator&lt;br /&gt;
* [https://www.pjrc.com/store/teensy32.html Teensy 3.2] - μ-processor board.&lt;br /&gt;
* Connectors and headers for the electronics - to be determined later.&lt;br /&gt;
&lt;br /&gt;
===Mechanics===&lt;br /&gt;
&lt;br /&gt;
* FIDRacing DBXL front hub (FIDXL032) steering parts, including axle (but no wheel nut)&lt;br /&gt;
* RovalLosi LT Wheel nut&lt;br /&gt;
* RovanLosi LT tyre inner foam&lt;br /&gt;
* -tire?&lt;br /&gt;
* (link) - flex coupling between motor and wheel&lt;br /&gt;
* (link) - 6mm axle&lt;br /&gt;
&lt;br /&gt;
==Body==&lt;br /&gt;
* (link) - main PC (Intel Nuc i7?)&lt;br /&gt;
* (link) - batteries (LiPo?)&lt;br /&gt;
* (link) - USB hub (min. 8 ports)&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_parts_list&amp;diff=3094</id>
		<title>Flexbot parts list</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_parts_list&amp;diff=3094"/>
		<updated>2017-07-23T08:56:26Z</updated>

		<summary type="html">&lt;p&gt;S130074: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Flexbot]] main page&lt;br /&gt;
&lt;br /&gt;
=Parts list=&lt;br /&gt;
This page should hold the complete parts list for Flexbot. When adding a new component, please update correspondingly.&lt;br /&gt;
&lt;br /&gt;
==Leg==&lt;br /&gt;
&lt;br /&gt;
===Knee section===&lt;br /&gt;
&lt;br /&gt;
* [https://www.transmotec.se/produkt/dla-12-20-a-250-hs2-ip65/ DLA-12-20-A-250-HS2-ip65] - Transmotec actuator 12V, 500N, 25cm stroke, with magnetic encoder. Each encoder channel deliveres 13.8 transitions every mm, i.e. two channels delivers a transition every 0.0362mm. At 20V (0.8A no load) motor voltage (12V motor) the hall channel period is T=6.2ms =&amp;gt; 23mm/s, at 12V (0.65A no load) T=10.2ms =&amp;gt; 14.9mm/s. 12V full stroke 17 sek (25cm) = 14.7mm/s.&lt;br /&gt;
* [http://www.robotshop.com/en/cytron-13a-5-30v-single-dc-motor-controller.html Cytron 10A DC Motor Driver] - model RB-Cyt-132&lt;br /&gt;
* [https://www.sparkfun.com/products/13762 MPU-9250/6500] - IMU&lt;br /&gt;
* [https://www.pjrc.com/store/teensy35.html Teensy 3.5] - μ-processor board&lt;br /&gt;
* [https://www.pololu.com/product/2858 Pololu D24V22F5] - 24V to 5V voltage regulator&lt;br /&gt;
* Connectors and headers for the electronics - to be determined later.&lt;br /&gt;
*           - fjederben&lt;br /&gt;
&lt;br /&gt;
===Foot===&lt;br /&gt;
&lt;br /&gt;
* [http://www.trossenrobotics.com/p/figelli-L12-50mm-210-1-Linear-Actuator.aspx Firgelli L12-50-210-12-l] - steering actuator (12V) 5cm stroke, with controller&lt;br /&gt;
* [https://www.superdroidrobots.com/shop/item.aspx/ig42-24vdc-right-angle-240-rpm-gear-motor-with-encoder/1832/ IG42CR0024x00020R] - 24V drive motor with 20 pulse encoder&lt;br /&gt;
* [https://www.dimensionengineering.com/products/syren10 TE-098-110] - SyRen 10A motor driver (24V)&lt;br /&gt;
* [http://ams.com/eng/Products/Magnetic-Position-Sensors/Angle-Position-On-Axis/AS5047P as5047] - angle encoder for damper position&lt;br /&gt;
* [https://www.pololu.com/product/2858 Pololu D24V22F5] - 24V to 5V voltage regulator&lt;br /&gt;
* [https://www.pololu.com/product/2855 Pololu D24V22F12] - 24V to 12V voltage regulator&lt;br /&gt;
* [https://www.pjrc.com/store/teensy32.html Teensy 3.2] - μ-processor board.&lt;br /&gt;
&lt;br /&gt;
===Mechanics===&lt;br /&gt;
&lt;br /&gt;
* FIDRacing DBXL front hub (FIDXL032) steering parts, including axle (but no wheel nut)&lt;br /&gt;
* RovalLosi LT Wheel nut&lt;br /&gt;
* RovanLosi LT tyre inner foam&lt;br /&gt;
* -tire?&lt;br /&gt;
* (link) - flex coupling between motor and wheel&lt;br /&gt;
* (link) - 6mm axle&lt;br /&gt;
&lt;br /&gt;
==Body==&lt;br /&gt;
* (link) - main PC (Intel Nuc i7?)&lt;br /&gt;
* (link) - batteries (LiPo?)&lt;br /&gt;
* (link) - USB hub (min. 8 ports)&lt;br /&gt;
&lt;br /&gt;
===Mechanics===&lt;br /&gt;
Note when you know&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_parts_list&amp;diff=3093</id>
		<title>Flexbot parts list</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_parts_list&amp;diff=3093"/>
		<updated>2017-07-23T08:49:21Z</updated>

		<summary type="html">&lt;p&gt;S130074: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Flexbot]] main page&lt;br /&gt;
&lt;br /&gt;
=Parts list=&lt;br /&gt;
This page should hold the complete parts list for Flexbot. When adding a new component, please update correspondingly.&lt;br /&gt;
&lt;br /&gt;
==Leg==&lt;br /&gt;
&lt;br /&gt;
===Knee section===&lt;br /&gt;
&lt;br /&gt;
* [https://www.transmotec.se/produkt/dla-12-20-a-250-hs2-ip65/ DLA-12-20-A-250-HS2-ip65] - Transmotec actuator 12V, 500N, 25cm stroke, with magnetic encoder. Each encoder channel deliveres 13.8 transitions every mm, i.e. two channels delivers a transition every 0.0362mm. At 20V (0.8A no load) motor voltage (12V motor) the hall channel period is T=6.2ms =&amp;gt; 23mm/s, at 12V (0.65A no load) T=10.2ms =&amp;gt; 14.9mm/s. 12V full stroke 17 sek (25cm) = 14.7mm/s.&lt;br /&gt;
* [http://www.robotshop.com/en/cytron-13a-5-30v-single-dc-motor-controller.html Cytron 10A DC Motor Driver] - model RB-Cyt-132&lt;br /&gt;
* [https://www.sparkfun.com/products/13762 MPU-9250/6500] - IMU&lt;br /&gt;
* [https://www.pjrc.com/store/teensy35.html Teensy 3.5] - μ-processor board&lt;br /&gt;
* [https://www.pololu.com/product/2858 Pololu voltage regulator] - 24V to 5V&lt;br /&gt;
* Connectors and headers for the electronics - to be determined later.&lt;br /&gt;
*           - fjederben&lt;br /&gt;
&lt;br /&gt;
===Foot===&lt;br /&gt;
&lt;br /&gt;
* Firgelli L12-50-210-12-l - steering actuator (12V) 5cm stroke, with controller&lt;br /&gt;
* [https://www.superdroidrobots.com/shop/item.aspx/ig42-24vdc-right-angle-240-rpm-gear-motor-with-encoder/1832/ IG42CR0024x00020R] - 24V drive motor with 20 pulse encoder&lt;br /&gt;
* TE-098-110 - SyRen 10A motor driver (24V)&lt;br /&gt;
* [http://ams.com/eng/Products/Magnetic-Position-Sensors/Angle-Position-On-Axis/AS5047P as5047] - angle encoder for damper position&lt;br /&gt;
&lt;br /&gt;
===Mechanics===&lt;br /&gt;
&lt;br /&gt;
* FIDRacing DBXL front hub (FIDXL032) steering parts, including axle (but no wheel nut)&lt;br /&gt;
* RovalLosi LT Wheel nut&lt;br /&gt;
* RovanLosi LT tyre inner foam&lt;br /&gt;
* -tire?&lt;br /&gt;
* (link) - flex coupling between motor and wheel&lt;br /&gt;
* (link) - 6mm axle&lt;br /&gt;
&lt;br /&gt;
==Body==&lt;br /&gt;
* (link) - main PC (Intel Nuc i7?)&lt;br /&gt;
* (link) - batteries (LiPo?)&lt;br /&gt;
* (link) - USB hub (min. 8 ports)&lt;br /&gt;
&lt;br /&gt;
===Mechanics===&lt;br /&gt;
Note when you know&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Flexbot&amp;diff=3092</id>
		<title>Flexbot</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Flexbot&amp;diff=3092"/>
		<updated>2017-07-23T08:39:39Z</updated>

		<summary type="html">&lt;p&gt;S130074: /* Current state of Flexbot */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
[[flexbot_design|Hardware design overview]] and open items (to-do).&lt;br /&gt;
&lt;br /&gt;
[[To do | Mechanical design modification to do list]] - design change request list (please amend when you note a problem / and delete when solved)&lt;br /&gt;
&lt;br /&gt;
[[flexbot_software | Software to do list]] - change request and to do (please amend when you note a problem / and delete when solved)&lt;br /&gt;
&lt;br /&gt;
[[Flexbot_parts_list | Flexbot parts list]] (please note, when you know)&lt;br /&gt;
&lt;br /&gt;
[[Repository | Documents, drawings and software]] (git repository)&lt;br /&gt;
&lt;br /&gt;
[[ProjectPlan | Project plan]] notes&lt;br /&gt;
&lt;br /&gt;
[[Importing_models_from_OnShape| Importing model from OnShape ]] being written.&lt;br /&gt;
&lt;br /&gt;
[[File:Flexbot-rendered-115678 gi tonemapped reinhard05.png]]&lt;br /&gt;
&amp;lt;!--[[File:underben-screenshot.png]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Current state of Flexbot=&lt;br /&gt;
This section presents a &#039;&#039;&#039;very&#039;&#039;&#039; short summary of the current state of Flexbot. When a new change (of relevance i.e. no minors) is made, please update this section by adding a new line on top of the existing.&lt;br /&gt;
&lt;br /&gt;
* 23/07 2017: The mechanics from wheel to knee is finished. Electronics including external sensors have been mounted. Software supports basic functionality for interfacing, control, test and logging of each actuator (wheel, heading, height) and sensor.&lt;br /&gt;
&lt;br /&gt;
=Software terminal interface=&lt;br /&gt;
Each Teensy can be interfaced separately via USB communication. Simply plug in a USB cable, open a serial communication in Putty, Arduino or whatever you prefer and type  &lt;br /&gt;
 help&lt;br /&gt;
This should return a menu with all options for the connected device. This should include:&lt;br /&gt;
* Changing controller and reference parameters&lt;br /&gt;
* Starting and stopping&lt;br /&gt;
* Printout of sensor data (to be used for debugging)&lt;br /&gt;
* Adding and removing items for logging&lt;br /&gt;
* Logging features (start logging, log interval and retrieve log in a MATLAB compatible format)&lt;br /&gt;
* Save and load to and from EEPROM (holds logging parameters and controller setting)&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Flexbot&amp;diff=3091</id>
		<title>Flexbot</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Flexbot&amp;diff=3091"/>
		<updated>2017-07-20T20:33:13Z</updated>

		<summary type="html">&lt;p&gt;S130074: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
[[flexbot_design|Hardware design overview]] and open items (to-do).&lt;br /&gt;
&lt;br /&gt;
[[To do | Mechanical design modification to do list]] - design change request list (please amend when you note a problem / and delete when solved)&lt;br /&gt;
&lt;br /&gt;
[[flexbot_software | Software to do list]] - change request and to do (please amend when you note a problem / and delete when solved)&lt;br /&gt;
&lt;br /&gt;
[[Flexbot_parts_list | Flexbot parts list]] (please note, when you know)&lt;br /&gt;
&lt;br /&gt;
[[Repository | Documents, drawings and software]] (git repository)&lt;br /&gt;
&lt;br /&gt;
[[ProjectPlan | Project plan]] notes&lt;br /&gt;
&lt;br /&gt;
[[Importing_models_from_OnShape| Importing model from OnShape ]] being written.&lt;br /&gt;
&lt;br /&gt;
[[File:Flexbot-rendered-115678 gi tonemapped reinhard05.png]]&lt;br /&gt;
&amp;lt;!--[[File:underben-screenshot.png]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Current state of Flexbot=&lt;br /&gt;
&lt;br /&gt;
=Software terminal interface=&lt;br /&gt;
Each Teensy can be interfaced separately via USB communication. Simply plug in a USB cable, open a serial communication in Putty, Arduino or whatever you prefer and type  &lt;br /&gt;
 help&lt;br /&gt;
This should return a menu with all options for the connected device. This should include:&lt;br /&gt;
* Changing controller and reference parameters&lt;br /&gt;
* Starting and stopping&lt;br /&gt;
* Printout of sensor data (to be used for debugging)&lt;br /&gt;
* Adding and removing items for logging&lt;br /&gt;
* Logging features (start logging, log interval and retrieve log in a MATLAB compatible format)&lt;br /&gt;
* Save and load to and from EEPROM (holds logging parameters and controller setting)&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=File:Flexbot-rendered-115678_gi_tonemapped_reinhard05.png&amp;diff=3086</id>
		<title>File:Flexbot-rendered-115678 gi tonemapped reinhard05.png</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=File:Flexbot-rendered-115678_gi_tonemapped_reinhard05.png&amp;diff=3086"/>
		<updated>2017-07-16T16:11:03Z</updated>

		<summary type="html">&lt;p&gt;S130074: S130074 uploaded a new version of &amp;amp;quot;File:Flexbot-rendered-115678 gi tonemapped reinhard05.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Flexbot&amp;diff=3085</id>
		<title>Flexbot</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Flexbot&amp;diff=3085"/>
		<updated>2017-07-16T13:51:49Z</updated>

		<summary type="html">&lt;p&gt;S130074: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
[[flexbot_design|Hardware design overview]] and open items (to-do).&lt;br /&gt;
&lt;br /&gt;
[[To do | Mechanical design modification to do list]] - design change request list (please amend when you note a problem / and delete when solved)&lt;br /&gt;
&lt;br /&gt;
[[flexbot_software | Software to do list]] - change request and to do (please amend when you note a problem / and delete when solved)&lt;br /&gt;
&lt;br /&gt;
[[Flexbot_parts_list | Flexbot parts list]] (please note, when you know)&lt;br /&gt;
&lt;br /&gt;
[[Repository | Documents, drawings and software]] (git repository)&lt;br /&gt;
&lt;br /&gt;
[[ProjectPlan | Project plan]] notes&lt;br /&gt;
&lt;br /&gt;
[[Importing_models_from_OnShape| Importing model from OnShape ]] being written.&lt;br /&gt;
&lt;br /&gt;
[[File:Flexbot-rendered-115678 gi tonemapped reinhard05.png]]&lt;br /&gt;
&amp;lt;!--[[File:underben-screenshot.png]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Software terminal interface=&lt;br /&gt;
Each Teensy can be interfaced separately via USB communication. Simply plug in a USB cable, open a serial communication in Putty, Arduino or whatever you prefer and type  &lt;br /&gt;
 help&lt;br /&gt;
This should return a menu with all options for the connected device. This should include:&lt;br /&gt;
* Changing controller and reference parameters&lt;br /&gt;
* Starting and stopping&lt;br /&gt;
* Printout of sensor data (to be used for debugging)&lt;br /&gt;
* Adding and removing items for logging&lt;br /&gt;
* Logging features (start logging, log interval and retrieve log in a MATLAB compatible format)&lt;br /&gt;
* Save and load to and from EEPROM (holds logging parameters and controller setting)&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=File:Flexbot-rendered-115678_gi_tonemapped_reinhard05.png&amp;diff=3084</id>
		<title>File:Flexbot-rendered-115678 gi tonemapped reinhard05.png</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=File:Flexbot-rendered-115678_gi_tonemapped_reinhard05.png&amp;diff=3084"/>
		<updated>2017-07-16T13:50:33Z</updated>

		<summary type="html">&lt;p&gt;S130074: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_software&amp;diff=3083</id>
		<title>Flexbot software</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_software&amp;diff=3083"/>
		<updated>2017-07-16T13:08:04Z</updated>

		<summary type="html">&lt;p&gt;S130074: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Flexbot]] main page&lt;br /&gt;
=Change request (issues)=&lt;br /&gt;
Amend when a problem is noted, and delete when corrected.&lt;br /&gt;
* No items yet - yay!&lt;br /&gt;
&lt;br /&gt;
=Open items (to-do)=&lt;br /&gt;
The software can divided into three parts; [[#Ankle software|ankle]], [[#Knee software|knee]] and [[#Body software|body]]. Each section holds the open items for the specified Teensy board.&lt;br /&gt;
&lt;br /&gt;
When starting on a new item, the developer should create a branch of the master in order maintain a current working version of the software on the master branch. When an item is completed and well tested, the developer should merge the branch into the master branch. It is the developers responsibility to ensure everything on the master branch works as it should after merging. After completing an item, please delete it from the list below and remove the branch on git (both locally and remote). The history of the branch will be not be deleted. &lt;br /&gt;
&lt;br /&gt;
==Ankle software==&lt;br /&gt;
This list specifies the to do list for the ankle software.&lt;br /&gt;
&lt;br /&gt;
* Port data_logger, eeconfig, command (terminal interface) and control from knee code to obtain a matching interface.&lt;br /&gt;
* Implement support for rotary encoder.&lt;br /&gt;
* Add a modular controller setup. See regbot code for reference.&lt;br /&gt;
* Add a mission interface, where users can build and carry out missions based on timing and sensor values. See regbot for reference.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Knee software==&lt;br /&gt;
* Add a more modular controller setup. As of now only a P-controller is available. See regbot code for reference.&lt;br /&gt;
* Add a mission interface, where users can build and carry out missions based on timing and sensor values. See regbot for reference.&lt;br /&gt;
* Implement a second linear actuator in code. Most variable are already arrays of 2 to hold values for both actuators, but complete implementation is missing.&lt;br /&gt;
* Implement a second MPU. Either on same bus as the one already existing or to a new wire. &lt;br /&gt;
* Add support for the linear actuators with hall sensor feedback. Currently the linear actuator has potentiometer feedback, but this will be changed in the future.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Body software==&lt;br /&gt;
Not started yet. Will wait till mid/late autumn.&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_software&amp;diff=3082</id>
		<title>Flexbot software</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_software&amp;diff=3082"/>
		<updated>2017-07-16T12:46:09Z</updated>

		<summary type="html">&lt;p&gt;S130074: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Change request (issues)==&lt;br /&gt;
Amend when a problem is noted, and delete when corrected.&lt;br /&gt;
&lt;br /&gt;
==Open items (to-do)==&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_software&amp;diff=3081</id>
		<title>Flexbot software</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_software&amp;diff=3081"/>
		<updated>2017-07-16T12:45:59Z</updated>

		<summary type="html">&lt;p&gt;S130074: Created page with &amp;quot;=Change request (issues)== Amend when a problem is noted, and delete when corrected.  ==Open items (to-do)==&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Change request (issues)==&lt;br /&gt;
Amend when a problem is noted, and delete when corrected.&lt;br /&gt;
&lt;br /&gt;
==Open items (to-do)==&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Flexbot&amp;diff=3080</id>
		<title>Flexbot</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Flexbot&amp;diff=3080"/>
		<updated>2017-07-16T12:43:40Z</updated>

		<summary type="html">&lt;p&gt;S130074: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
[[flexbot_design|Hardware design overview]] and open items (to-do).&lt;br /&gt;
&lt;br /&gt;
[[To do | Mechanical design modification to do list]] - design change request list (please amend when you note a problem / and delete when solved)&lt;br /&gt;
&lt;br /&gt;
[[flexbot_software | Software to do list]] - change request and to do (please amend when you note a problem / and delete when solved)&lt;br /&gt;
&lt;br /&gt;
[[Flexbot_parts_list | Flexbot parts list]] (please note, when you know)&lt;br /&gt;
&lt;br /&gt;
[[Repository | Documents, drawings and software]] (git repository)&lt;br /&gt;
&lt;br /&gt;
[[ProjectPlan | Project plan]] notes&lt;br /&gt;
&lt;br /&gt;
[[Importing_models_from_OnShape| Importing model from OnShape ]] being written.&lt;br /&gt;
&lt;br /&gt;
[[File:underben-screenshot.png]]&lt;br /&gt;
&lt;br /&gt;
=Software terminal interface=&lt;br /&gt;
Each Teensy can be interfaced separately via USB communication. Simply plug in a USB cable, open a serial communication in Putty, Arduino or whatever you prefer and type  &lt;br /&gt;
 help&lt;br /&gt;
This should return a menu with all options for the connected device. This should include:&lt;br /&gt;
* Changing controller and reference parameters&lt;br /&gt;
* Starting and stopping&lt;br /&gt;
* Printout of sensor data (to be used for debugging)&lt;br /&gt;
* Adding and removing items for logging&lt;br /&gt;
* Logging features (start logging, log interval and retrieve log in a MATLAB compatible format)&lt;br /&gt;
* Save and load to and from EEPROM (holds logging parameters and controller setting)&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Flexbot&amp;diff=3079</id>
		<title>Flexbot</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Flexbot&amp;diff=3079"/>
		<updated>2017-07-16T12:37:02Z</updated>

		<summary type="html">&lt;p&gt;S130074: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
[[flexbot_design|Hardware design overview]] and open items (to-do).&lt;br /&gt;
&lt;br /&gt;
[[To do | Mechanical design modification to do list]] - design change request list (please amend when you note a problem / and delete when solved)&lt;br /&gt;
&lt;br /&gt;
[[Flexbot_parts_list | Flexbot parts list]] (please note, when you know)&lt;br /&gt;
&lt;br /&gt;
[[Repository | Documents, drawings and software]] (git repository)&lt;br /&gt;
&lt;br /&gt;
[[ProjectPlan | Project plan]] notes&lt;br /&gt;
&lt;br /&gt;
[[Importing_models_from_OnShape| Importing model from OnShape ]] being written.&lt;br /&gt;
&lt;br /&gt;
[[File:underben-screenshot.png]]&lt;br /&gt;
&lt;br /&gt;
=Software terminal interface=&lt;br /&gt;
Each Teensy can be interfaced separately via USB communication. Simply plug in a USB cable, open a serial communication in Putty, Arduino or whatever you prefer and type  &lt;br /&gt;
 help&lt;br /&gt;
This should return a menu with all options for the connected device. This should include:&lt;br /&gt;
* Changing controller and reference parameters&lt;br /&gt;
* Starting and stopping&lt;br /&gt;
* Printout of sensor data (to be used for debugging)&lt;br /&gt;
* Adding and removing items for logging&lt;br /&gt;
* Logging features (start logging, log interval and retrieve log in a MATLAB compatible format)&lt;br /&gt;
* Save and load to and from EEPROM (holds logging parameters and controller setting)&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_parts_list&amp;diff=3078</id>
		<title>Flexbot parts list</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_parts_list&amp;diff=3078"/>
		<updated>2017-07-16T12:18:32Z</updated>

		<summary type="html">&lt;p&gt;S130074: /* Body */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Flexbot]] main page&lt;br /&gt;
&lt;br /&gt;
=Parts list=&lt;br /&gt;
This page should hold the complete parts list for Flexbot. &lt;br /&gt;
&lt;br /&gt;
==Leg==&lt;br /&gt;
&lt;br /&gt;
===Knee section===&lt;br /&gt;
&lt;br /&gt;
* [https://www.transmotec.se/produkt/dla-12-20-a-250-hs2-ip65/ DLA-12-20-A-250-HS2-ip65] - Transmotec actuator 12V, 500N, 25cm stroke, with magnetic encoder.&lt;br /&gt;
*           - fjederben&lt;br /&gt;
&lt;br /&gt;
===Foot===&lt;br /&gt;
&lt;br /&gt;
* Firgelli L12-50-210-12-l - steering actuator (12V) 5cm stroke, with controller&lt;br /&gt;
* [https://www.superdroidrobots.com/shop/item.aspx/ig42-24vdc-right-angle-240-rpm-gear-motor-with-encoder/1832/ IG42CR0024x00020R] - 24V drive motor with 20 pulse encoder&lt;br /&gt;
* TE-098-110 - SyRen 10A motor driver (24V)&lt;br /&gt;
* [http://ams.com/eng/Products/Magnetic-Position-Sensors/Angle-Position-On-Axis/AS5047P as5047] - angle encoder for damper position&lt;br /&gt;
&lt;br /&gt;
===Mechanics===&lt;br /&gt;
&lt;br /&gt;
* FIDRacing DBXL front hub (FIDXL032) steering parts, including axle (but no wheel nut)&lt;br /&gt;
* RovalLosi LT Wheel nut&lt;br /&gt;
* RovanLosi LT tyre inner foam&lt;br /&gt;
* -tire?&lt;br /&gt;
* (link) - flex coupling between motor and wheel&lt;br /&gt;
* (link) - 6mm axle&lt;br /&gt;
&lt;br /&gt;
==Body==&lt;br /&gt;
* (link) - main PC (Intel Nuc i7?)&lt;br /&gt;
* (link) - batteries (LiPo?)&lt;br /&gt;
* (link) - USB hub (min. 8 ports)&lt;br /&gt;
&lt;br /&gt;
===Mechanics===&lt;br /&gt;
Note when you know&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_parts_list&amp;diff=3077</id>
		<title>Flexbot parts list</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_parts_list&amp;diff=3077"/>
		<updated>2017-07-16T12:17:57Z</updated>

		<summary type="html">&lt;p&gt;S130074: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Flexbot]] main page&lt;br /&gt;
&lt;br /&gt;
=Parts list=&lt;br /&gt;
This page should hold the complete parts list for Flexbot. &lt;br /&gt;
&lt;br /&gt;
==Leg==&lt;br /&gt;
&lt;br /&gt;
===Knee section===&lt;br /&gt;
&lt;br /&gt;
* [https://www.transmotec.se/produkt/dla-12-20-a-250-hs2-ip65/ DLA-12-20-A-250-HS2-ip65] - Transmotec actuator 12V, 500N, 25cm stroke, with magnetic encoder.&lt;br /&gt;
*           - fjederben&lt;br /&gt;
&lt;br /&gt;
===Foot===&lt;br /&gt;
&lt;br /&gt;
* Firgelli L12-50-210-12-l - steering actuator (12V) 5cm stroke, with controller&lt;br /&gt;
* [https://www.superdroidrobots.com/shop/item.aspx/ig42-24vdc-right-angle-240-rpm-gear-motor-with-encoder/1832/ IG42CR0024x00020R] - 24V drive motor with 20 pulse encoder&lt;br /&gt;
* TE-098-110 - SyRen 10A motor driver (24V)&lt;br /&gt;
* [http://ams.com/eng/Products/Magnetic-Position-Sensors/Angle-Position-On-Axis/AS5047P as5047] - angle encoder for damper position&lt;br /&gt;
&lt;br /&gt;
===Mechanics===&lt;br /&gt;
&lt;br /&gt;
* FIDRacing DBXL front hub (FIDXL032) steering parts, including axle (but no wheel nut)&lt;br /&gt;
* RovalLosi LT Wheel nut&lt;br /&gt;
* RovanLosi LT tyre inner foam&lt;br /&gt;
* -tire?&lt;br /&gt;
* (link) - flex coupling between motor and wheel&lt;br /&gt;
* (link) - 6mm axle&lt;br /&gt;
&lt;br /&gt;
==Body==&lt;br /&gt;
* (link) - main PC (Intel Nuc i7?)&lt;br /&gt;
* (link) - batteries (LiPo?)&lt;br /&gt;
* (link) - USB hub (min. 8 ports)&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_design&amp;diff=3076</id>
		<title>Flexbot design</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_design&amp;diff=3076"/>
		<updated>2017-07-16T12:14:37Z</updated>

		<summary type="html">&lt;p&gt;S130074: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Flexbot]] main page&lt;br /&gt;
&lt;br /&gt;
==Design overview hardware==&lt;br /&gt;
Each &amp;quot;leg&amp;quot; of the flexbot consists of 4 actuators. &lt;br /&gt;
* An angled DC motor to control the wheel.&lt;br /&gt;
* Two linear actuators to control the motion of the robot&#039;s body.&lt;br /&gt;
* A linear actuator to adjust heading angle on the wheel.&lt;br /&gt;
Each of the legs are interfaced and controlled by two &amp;amp;mu;-processor boards (Teensy 3.2 and 3.5). The boards are currently placed on matrix boards where other hardware components (IMU, motor driver, etc.) are accessible from.&lt;br /&gt;
Each leg is split up in two parts which are presented as the [[#Ankle hardware design|ankle configuration]] and the [[#Knee hardware design|knee configuration]]. The hardware design for robot&#039;s body is presented  [[#Body hardware design|here]].&lt;br /&gt;
&lt;br /&gt;
A complete 3D model of the robot is available using the online CAD software Onshape.com - JCA should be contacted for sharing and editing the model.&lt;br /&gt;
&lt;br /&gt;
==Ankle hardware design==&lt;br /&gt;
The ankle configuration currently includes:&lt;br /&gt;
* Angled DC motor to run the wheel - model IG42-CRGM&lt;br /&gt;
* SyRen 10 motor driver&lt;br /&gt;
* Teensy 3.2 &amp;amp;mu;-processor board&lt;br /&gt;
* Pololu 24V to 5V voltage regulator - model D24V22F5&lt;br /&gt;
* Firgelli L12-50-210-12-I linear actuator&lt;br /&gt;
* 14-bit rotary encoder - model AS5048A&lt;br /&gt;
&lt;br /&gt;
The schematic for the ankle configuration is shown in Figure 1 and can be accessed using Upverter, a free online e-CAD design tool. Link to the project on Upverter is given [https://upverter.com/DTUAutomationControlFlexbot/97591cdad92a1840/Teensy_Wheel_Configuration/ here] - contact JCA for editorial access.&lt;br /&gt;
&lt;br /&gt;
In addition to the schematic shown it can be mentioned that a ferrite core has been introduced on the power supply wires for the DC motor. This reduces EMI which was found to greatly interfere with the encoder signals from the motor. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Teensy Wheel Configuration.png|970px]]&lt;br /&gt;
&lt;br /&gt;
Figure 1: Schematic for the ankle configuration for the Flexbot. (Click on picture for full resolution)&lt;br /&gt;
&lt;br /&gt;
===Open items (to-do list)===&lt;br /&gt;
This list includes items that needs to be done, but have not been finished (or started) yet. This serves as reference for where to start when catching up on the project. This list should be updated as items are finished and finished items should be moved to the list which represents the current configuration of the ankle. The responsibility of updating the schematic and git repository falls to the person responsible for carrying out the open item. This way the documentation both here and on git reflects the current state of the ankle configuration.&lt;br /&gt;
* The rotary encoder has been wired and tested. Connections in the schematic from the Teensy to the encoder are missing. The encoder still needs to be fixed to correct position on the wheel configuration and magnets needs to be attached to bolt fastening the spring dampener.&lt;br /&gt;
* A Pololu 24V to 12V needs to implemented on the matrix board to supply the small linear actuator. They are of model D24V22F12 (link to product is on git) and should be ordered but have not been received. &lt;br /&gt;
* The I2C interface for inter-configuration(and host)-communication should be removed from the board. USB should be used instead.&lt;br /&gt;
* When the final hardware configuration for the ankle has been decided upon, a revision 1 of a PCB layout should be made. Upverter holds the schematic, but footprints for layout should be carefully checked(or made). &lt;br /&gt;
&lt;br /&gt;
==Knee hardware design==&lt;br /&gt;
The knee configuration currently includes:&lt;br /&gt;
* A linear actuator to control the height (tilt) of the configuration - model DLA-12-10-A-200-POT-IP66&lt;br /&gt;
* Cytron 10A DC Motor Driver - model RB-Cyt-132&lt;br /&gt;
* MPU to obtain tilt - model MPU-9250/6500&lt;br /&gt;
* Teensy 3.5 &amp;amp;mu;-processor board&lt;br /&gt;
&lt;br /&gt;
The schematic for the knee configuration is shown in Figure 2 and can be accessed using the free online e-CAD design tool Upverter. Link to the project on Upverter is given [https://upverter.com/DTUAutomationControlFlexbot/09ebc8887ee10a31/Teensy_Knee_Configuration/ here] - contact JCA for editorial access.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Flexbot Knee Configuration.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
Figure 2: Schematic for the knee configuration for the Flexbot. (Click on picture for full resolution)&lt;br /&gt;
&lt;br /&gt;
===Open items (to-do list)===&lt;br /&gt;
This list includes items that needs to be done, but have not been finished (or started) yet. This serves as reference for where to start when catching up on the project. This list should be updated as items are finished and finished items should be moved to the list which represents the current configuration of the knee. The responsibility of updating the schematic and git repository falls to the person responsible for carrying out the open item. This way the documentation both here and on git reflects the current state of the ankle configuration.&lt;br /&gt;
* A Pololu 24V to 5V needs to inserted onto the matrix board. Wiring has been made, only thing missing is the component and to solder pin headers onto the component. They are of model D24V22F5 (link to product is on git) and should be ordered but have not been received. &lt;br /&gt;
* A second motor driver needs to be fitted to the knee. Wiring has been made and the driver is on stock and are found in one of the two boxes containing parts for the project. &lt;br /&gt;
* The interface for linear actuator 1 supports the linear actuator with potentiometer feedback. This should at some point be changed to the ordered actuators with hall sensor feedback and the configuration on the matrix should be changed to reflect this as well (should be same as linear actuator 2). &lt;br /&gt;
* The matrix board needs to support a second MPU. It has not been investigated whether or not it can be connected to the same bus by changing the address. Maybe it would be easier to simply connect to its own I2C bus. Teensy 3.5 holds 3 I2C interfaces and currently uses 1. &lt;br /&gt;
* A second linear actuator should be connected to the knee. This relies on the mechanics to be finished. &lt;br /&gt;
* The I2C interface for inter-configuration(and host)-communication should be removed from the board. USB should be used instead.&lt;br /&gt;
* When the final hardware configuration for the knee has been decided upon, a revision 1 of a PCB layout should be made. Upverter holds the schematic, but footprints for layout should be carefully checked (or made).&lt;br /&gt;
&lt;br /&gt;
==Body hardware design==&lt;br /&gt;
The design of the body hardware has not been started yet. A few ideas have been discussed bot nothing final has been decided upon. The body hardware design will first be relevant in mid/late autumn.&lt;br /&gt;
A few discussed ideas of what the body hardware design should include are listed below:&lt;br /&gt;
* An Intel Nuc i7 configuration: https://www.intel.com/content/www/us/en/products/boards-kits/nuc/kits.html&lt;br /&gt;
* A USB hub or at least enough connections to connect all Teensy &amp;amp;mu;-processor boards. This will sum up to 8 &amp;amp;mu;-processor boards (2 on each leg).&lt;br /&gt;
* A main power supply. Should be 24V obtained from LiPo batteries or other mobile source.&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_parts_list&amp;diff=3075</id>
		<title>Flexbot parts list</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_parts_list&amp;diff=3075"/>
		<updated>2017-07-16T12:04:55Z</updated>

		<summary type="html">&lt;p&gt;S130074: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Flexbot]] main page&lt;br /&gt;
&lt;br /&gt;
=Parts list=&lt;br /&gt;
This page should hold the complete parts list for Flexbot. &lt;br /&gt;
&lt;br /&gt;
==Leg==&lt;br /&gt;
&lt;br /&gt;
===Knee section===&lt;br /&gt;
&lt;br /&gt;
* [https://www.transmotec.se/produkt/dla-12-20-a-250-hs2-ip65/ DLA-12-20-A-250-HS2-ip65] - Transmotec actuator 12V, 500N, 25cm stroke, with magnetic encoder.&lt;br /&gt;
*           - fjederben&lt;br /&gt;
&lt;br /&gt;
===Foot===&lt;br /&gt;
&lt;br /&gt;
* Firgelli L12-50-210-12-l - steering actuator (12V) 5cm stroke, with controller&lt;br /&gt;
* [https://www.superdroidrobots.com/shop/item.aspx/ig42-24vdc-right-angle-240-rpm-gear-motor-with-encoder/1832/ IG42CR0024x00020R] - 24V drive motor with 20 pulse encoder&lt;br /&gt;
* TE-098-110 - SyRen 10A motor driver (24V)&lt;br /&gt;
* [http://ams.com/eng/Products/Magnetic-Position-Sensors/Angle-Position-On-Axis/AS5047P as5047] - angle encoder for damper position&lt;br /&gt;
&lt;br /&gt;
===Mechanics===&lt;br /&gt;
&lt;br /&gt;
* FIDRacing DBXL front hub (FIDXL032) steering parts, including axle (but no wheel nut)&lt;br /&gt;
* RovalLosi LT Wheel nut&lt;br /&gt;
* RovanLosi LT tyre inner foam&lt;br /&gt;
* -tire?&lt;br /&gt;
* (link) - flex coupling between motor and wheel&lt;br /&gt;
* (link) - 6mm axle&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Repository&amp;diff=3074</id>
		<title>Repository</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Repository&amp;diff=3074"/>
		<updated>2017-07-16T12:00:28Z</updated>

		<summary type="html">&lt;p&gt;S130074: /* Git repository */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
Back to [[Flexbot]] main page&lt;br /&gt;
&lt;br /&gt;
=Git repository=&lt;br /&gt;
&lt;br /&gt;
The git repository holds all project files. This includes:&lt;br /&gt;
* 3D files (*.stl)&lt;br /&gt;
* Schematics (exported from and available through Upverter)&lt;br /&gt;
* Datasheets and documentation for all hardware components&lt;br /&gt;
* Software for the Flexbot&lt;br /&gt;
&lt;br /&gt;
Use this page to browse: https://repos.gbar.dtu.dk/gitweb/?p=jcan/flexbot.git;a=tree &lt;br /&gt;
&lt;br /&gt;
== Read only access==&lt;br /&gt;
&lt;br /&gt;
Get a copy of all&lt;br /&gt;
&lt;br /&gt;
 git clone git://repos.gbar.dtu.dk/git/jcan/flexbot.git&lt;br /&gt;
&lt;br /&gt;
This should not ask for a username/password&lt;br /&gt;
&lt;br /&gt;
== Read write access ==&lt;br /&gt;
&lt;br /&gt;
First get a copy of the repository (will be in a subdirectory called &#039;flexbot&#039;.&lt;br /&gt;
&lt;br /&gt;
 git clone https://repos.gbar.dtu.dk/git/jcan/flexbot.git&lt;br /&gt;
&lt;br /&gt;
Then to refresh the copy, go to the flexbot directory and say:&lt;br /&gt;
&lt;br /&gt;
 git pull&lt;br /&gt;
&lt;br /&gt;
Adding new files&lt;br /&gt;
&lt;br /&gt;
 git add foo.cpp bar.h&lt;br /&gt;
 git commit -m &amp;quot;commit message (i.e. what was changed)&amp;quot;&lt;br /&gt;
 git push&lt;br /&gt;
&lt;br /&gt;
After modifying files, this may be easier (there may be simpler ways, but then I don&#039;t know)&lt;br /&gt;
&lt;br /&gt;
 git add *.h *.cpp&lt;br /&gt;
 git commit -m &amp;quot;commit message (i.e. what was changed)&amp;quot;&lt;br /&gt;
 git push&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Repository&amp;diff=3073</id>
		<title>Repository</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Repository&amp;diff=3073"/>
		<updated>2017-07-16T12:00:10Z</updated>

		<summary type="html">&lt;p&gt;S130074: /* Git repository */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
Back to [[Flexbot]] main page&lt;br /&gt;
&lt;br /&gt;
=Git repository=&lt;br /&gt;
&lt;br /&gt;
The git repository includes all project files. This includes:&lt;br /&gt;
* 3D files (*.stl)&lt;br /&gt;
* Schematics (exported from and available through Upverter)&lt;br /&gt;
* Datasheets and documentation for all hardware components&lt;br /&gt;
* Software for the Flexbot&lt;br /&gt;
&lt;br /&gt;
Use this page to browse: https://repos.gbar.dtu.dk/gitweb/?p=jcan/flexbot.git;a=tree &lt;br /&gt;
&lt;br /&gt;
== Read only access==&lt;br /&gt;
&lt;br /&gt;
Get a copy of all&lt;br /&gt;
&lt;br /&gt;
 git clone git://repos.gbar.dtu.dk/git/jcan/flexbot.git&lt;br /&gt;
&lt;br /&gt;
This should not ask for a username/password&lt;br /&gt;
&lt;br /&gt;
== Read write access ==&lt;br /&gt;
&lt;br /&gt;
First get a copy of the repository (will be in a subdirectory called &#039;flexbot&#039;.&lt;br /&gt;
&lt;br /&gt;
 git clone https://repos.gbar.dtu.dk/git/jcan/flexbot.git&lt;br /&gt;
&lt;br /&gt;
Then to refresh the copy, go to the flexbot directory and say:&lt;br /&gt;
&lt;br /&gt;
 git pull&lt;br /&gt;
&lt;br /&gt;
Adding new files&lt;br /&gt;
&lt;br /&gt;
 git add foo.cpp bar.h&lt;br /&gt;
 git commit -m &amp;quot;commit message (i.e. what was changed)&amp;quot;&lt;br /&gt;
 git push&lt;br /&gt;
&lt;br /&gt;
After modifying files, this may be easier (there may be simpler ways, but then I don&#039;t know)&lt;br /&gt;
&lt;br /&gt;
 git add *.h *.cpp&lt;br /&gt;
 git commit -m &amp;quot;commit message (i.e. what was changed)&amp;quot;&lt;br /&gt;
 git push&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Flexbot&amp;diff=3072</id>
		<title>Flexbot</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Flexbot&amp;diff=3072"/>
		<updated>2017-07-16T11:54:42Z</updated>

		<summary type="html">&lt;p&gt;S130074: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
[[flexbot_design|Hardware design overview]] and open items (to-do).&lt;br /&gt;
&lt;br /&gt;
[[To do | Mechanical design modification to do list]] - design change request list (please amend when you note a problem / and delete when solved)&lt;br /&gt;
&lt;br /&gt;
[[Flexbot_parts_list | Flexbot parts list]] (please note, when you know)&lt;br /&gt;
&lt;br /&gt;
[[Repository | Documents, drawings and software]] (git repository)&lt;br /&gt;
&lt;br /&gt;
[[ProjectPlan | Project plan]] notes&lt;br /&gt;
&lt;br /&gt;
[[Importing_models_from_OnShape| Importing model from OnShape ]] being written.&lt;br /&gt;
&lt;br /&gt;
[[File:underben-screenshot.png]]&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Flexbot&amp;diff=3071</id>
		<title>Flexbot</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Flexbot&amp;diff=3071"/>
		<updated>2017-07-16T11:53:26Z</updated>

		<summary type="html">&lt;p&gt;S130074: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
[[flexbot_design|Hardware design overview]] and open items (to-do) can be found here.&lt;br /&gt;
&lt;br /&gt;
[[To do | Mechanical design modification to do list]] - design change request list (please amend when you note a problem / and delete when solved)&lt;br /&gt;
&lt;br /&gt;
[[Flexbot_parts_list | Flexbot parts list]] (please note, when you know)&lt;br /&gt;
&lt;br /&gt;
[[Repository | Documents, drawings and software]] (git repository)&lt;br /&gt;
&lt;br /&gt;
[[ProjectPlan | Project plan]] notes&lt;br /&gt;
&lt;br /&gt;
[[Importing_models_from_OnShape| Importing model from OnShape ]] being written.&lt;br /&gt;
&lt;br /&gt;
[[File:underben-screenshot.png]]&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Flexbot&amp;diff=3070</id>
		<title>Flexbot</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Flexbot&amp;diff=3070"/>
		<updated>2017-07-16T11:52:51Z</updated>

		<summary type="html">&lt;p&gt;S130074: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
[[flexbot_design|Hardware design overview]] can be found here.&lt;br /&gt;
&lt;br /&gt;
[[To do | Design modification to do list]] - design change request list (please amend when you note a problem / and delete when solved)&lt;br /&gt;
&lt;br /&gt;
[[Flexbot_parts_list | Flexbot parts list]] (please note, when you know)&lt;br /&gt;
&lt;br /&gt;
[[Repository | Documents, drawings and software]] (git repository)&lt;br /&gt;
&lt;br /&gt;
[[ProjectPlan | Project plan]] notes&lt;br /&gt;
&lt;br /&gt;
[[Importing_models_from_OnShape| Importing model from OnShape ]] being written.&lt;br /&gt;
&lt;br /&gt;
[[File:underben-screenshot.png]]&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_design&amp;diff=3069</id>
		<title>Flexbot design</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_design&amp;diff=3069"/>
		<updated>2017-07-16T11:50:49Z</updated>

		<summary type="html">&lt;p&gt;S130074: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Flexbot]] main page&lt;br /&gt;
&lt;br /&gt;
==Design overview hardware==&lt;br /&gt;
Each &amp;quot;leg&amp;quot; of the flexbot consists of 4 actuators. &lt;br /&gt;
* An angled DC motor to control the wheel.&lt;br /&gt;
* Two linear actuators to control the motion of the robot&#039;s body.&lt;br /&gt;
* A linear actuator to adjust heading angle on the wheel.&lt;br /&gt;
Each of the legs are interfaced and controlled by two &amp;amp;mu;-processor boards (Teensy 3.2 and 3.5). The boards are currently placed on matrix boards where other hardware components (IMU, motor driver, etc.) are accessible from.&lt;br /&gt;
Each leg is split up in two parts which are presented as the [[#Ankle hardware design|ankle configuration]] and the [[#Knee hardware design|knee configuration]]. The hardware design for robot&#039;s body is presented  [[#Body hardware design|here]].&lt;br /&gt;
&lt;br /&gt;
A complete 3D model of the robot is available using the online CAD software Onshape.com - JCA should be contacted for sharing and editing the model.&lt;br /&gt;
&lt;br /&gt;
==Ankle hardware design==&lt;br /&gt;
The ankle configuration currently includes:&lt;br /&gt;
* Angled DC motor to run the wheel - model IG42-CRGM&lt;br /&gt;
* SyRen 10 motor driver&lt;br /&gt;
* Teensy 3.2 &amp;amp;mu;-processor board&lt;br /&gt;
* Pololu 24V to 5V voltage regulator - model D24V22F5&lt;br /&gt;
* Firgelli L12-50-210-12-I linear actuator&lt;br /&gt;
* 14-bit rotary encoder - model AS5048A&lt;br /&gt;
&lt;br /&gt;
The schematic for the ankle configuration is shown in Figure 1 and can be accessed using Upverter, a free online e-CAD design tool. Link to the project on Upverter is given [https://upverter.com/DTUAutomationControlFlexbot/97591cdad92a1840/Teensy_Wheel_Configuration/ here] - contact JCA for editorial access.&lt;br /&gt;
&lt;br /&gt;
In addition to the schematic shown it can be mentioned that a ferrite core has been introduced on the power supply wires for the DC motor. This reduces EMI which was found to greatly interfere with the encoder signals from the motor. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Teensy Wheel Configuration.png|970px]]&lt;br /&gt;
&lt;br /&gt;
Figure 1: Schematic for the ankle configuration for the Flexbot. (Click on picture for full resolution)&lt;br /&gt;
&lt;br /&gt;
===Open items (to-do list)===&lt;br /&gt;
This list includes items that needs to be done, but have not been finished (or started) yet. This serves as reference for where to start when catching up on the project. This list should be updated as items are finished and finished items should be moved to the list which represents the current configuration of the ankle. The responsibility of updating the schematic and git repository falls to the person responsible for carrying out the open item. This way the documentation both here and on git reflects the current state of the ankle configuration.&lt;br /&gt;
* The rotary encoder has been wired and tested. Connections in the schematic from the Teensy to the encoder are missing. The encoder still needs to be fixed to correct position on the wheel configuration and magnets needs to be attached to bolt fastening the spring dampener.&lt;br /&gt;
* A Pololu 24V to 12V needs to implemented on the matrix board to supply the small linear actuator. They are of model D24V22F12 (link to product is on git) and should be ordered but have not been received. &lt;br /&gt;
* The I2C interface for inter-configuration(and host)-communication should be removed from the board. USB should be used instead.&lt;br /&gt;
* When the final hardware configuration for the ankle has been decided upon, a revision 1 of a PCB layout should be made. Upverter holds the schematic, but footprints for layout should be carefully checked(or made). &lt;br /&gt;
&lt;br /&gt;
==Knee hardware design==&lt;br /&gt;
The knee configuration currently includes:&lt;br /&gt;
* A linear actuator to control the height (tilt) of the configuration - model DLA-12-10-A-200-POT-IP66&lt;br /&gt;
* Cytron 10A DC Motor Driver - model RB-Cyt-132&lt;br /&gt;
* MPU to obtain tilt - model MPU-9250/6500&lt;br /&gt;
* Teensy 3.5 &amp;amp;mu;-processor board&lt;br /&gt;
&lt;br /&gt;
The schematic for the knee configuration is shown in Figure 2 and can be accessed using the free online e-CAD design tool Upverter. Link to the project on Upverter is given [https://upverter.com/DTUAutomationControlFlexbot/09ebc8887ee10a31/Teensy_Knee_Configuration/ here] - contact JCA for editorial access.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Flexbot Knee Configuration.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
Figure 2: Schematic for the knee configuration for the Flexbot. (Click on picture for full resolution)&lt;br /&gt;
&lt;br /&gt;
===Open items (to-do list)===&lt;br /&gt;
This list includes items that needs to be done, but have not been finished (or started) yet. This serves as reference for where to start when catching up on the project. This list should be updated as items are finished and finished items should be moved to the list which represents the current configuration of the knee. The responsibility of updating the schematic and git repository falls to the person responsible for carrying out the open item. This way the documentation both here and on git reflects the current state of the ankle configuration.&lt;br /&gt;
* A Pololu 24V to 5V needs to inserted onto the matrix board. Wiring has been made, only thing missing is the component and to solder pin headers onto the component. They are of model D24V22F5 (link to product is on git) and should be ordered but have not been received. &lt;br /&gt;
* A second motor driver needs to be fitted to the knee. Wiring has been made and the driver is on stock and are found in one of the two boxes containing parts for the project. &lt;br /&gt;
* The interface for linear actuator 1 supports the linear actuator with potentiometer feedback. This should at some point be changed to the ordered actuators with hall sensor feedback and the configuration on the matrix should be changed to reflect this as well (should be same as linear actuator 2). &lt;br /&gt;
* The matrix board needs to support a second MPU. It has not been investigated whether or not it can be connected to the same bus by changing the address. Maybe it would be easier to simply connect to its own I2C bus. Teensy 3.5 holds 3 I2C interfaces and currently uses 1. &lt;br /&gt;
* A second linear actuator should be connected to the knee. This relies on the mechanics to be finished. &lt;br /&gt;
* When the final hardware configuration for the knee has been decided upon, a revision 1 of a PCB layout should be made. Upverter holds the schematic, but footprints for layout should be carefully checked (or made).&lt;br /&gt;
&lt;br /&gt;
==Body hardware design==&lt;br /&gt;
The design of the body hardware has not been started yet. A few ideas have been discussed bot nothing final has been decided upon. The body hardware design will first be relevant in mid/late autumn.&lt;br /&gt;
A few discussed ideas of what the body hardware design should include are listed below:&lt;br /&gt;
* An Intel Nuc i7 configuration: https://www.intel.com/content/www/us/en/products/boards-kits/nuc/kits.html&lt;br /&gt;
* A USB hub or at least enough connections to connect all Teensy &amp;amp;mu;-processor boards. This will sum up to 8 &amp;amp;mu;-processor boards (2 on each leg).&lt;br /&gt;
* A main power supply. Should be 24V obtained from LiPo batteries or other mobile source.&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
	<entry>
		<id>https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_design&amp;diff=3068</id>
		<title>Flexbot design</title>
		<link rel="alternate" type="text/html" href="https://rsewiki.electro.dtu.dk/index.php?title=Flexbot_design&amp;diff=3068"/>
		<updated>2017-07-16T11:50:10Z</updated>

		<summary type="html">&lt;p&gt;S130074: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Back to [[Flexbot]] main page&lt;br /&gt;
&lt;br /&gt;
==Design overview hardware==&lt;br /&gt;
Each &amp;quot;leg&amp;quot; of the flexbot consists of 4 actuators. &lt;br /&gt;
* An angled DC motor to control the wheel.&lt;br /&gt;
* Two linear actuators to control the motion of the robot&#039;s body.&lt;br /&gt;
* A linear actuator to adjust heading angle on the wheel.&lt;br /&gt;
Each of the legs are interfaced and controlled by two &amp;amp;mu;-processor boards (Teensy 3.2 and 3.5). The boards are currently placed on matrix boards where other hardware components (IMU, motor driver, etc.) are accessible from.&lt;br /&gt;
Each leg is split up in two parts which are presented as the [[#Ankle hardware design|ankle configuration]] and the [[#Knee hardware design|knee configuration]]. The hardware design for robot&#039;s body is presented  [[#Body hardware design|here]].&lt;br /&gt;
&lt;br /&gt;
A complete 3D model of the robot is available using the online CAD software Onshape.com - JCA should be contacted for sharing and editing the model.&lt;br /&gt;
&lt;br /&gt;
==Ankle hardware design==&lt;br /&gt;
The ankle configuration currently includes:&lt;br /&gt;
* Angled DC motor to run the wheel - model IG42-CRGM&lt;br /&gt;
* SyRen 10 motor driver&lt;br /&gt;
* Teensy 3.2 &amp;amp;mu;-processor board&lt;br /&gt;
* Pololu 24V to 5V voltage regulator - model D24V22F5&lt;br /&gt;
* Firgelli L12-50-210-12-I linear actuator&lt;br /&gt;
* 14-bit rotary encoder - model AS5048A&lt;br /&gt;
&lt;br /&gt;
The schematic for the ankle configuration is shown in Figure 1 and can be accessed using Upverter, a free online e-CAD design tool. Link to the project on Upverter is given [https://upverter.com/DTUAutomationControlFlexbot/97591cdad92a1840/Teensy_Wheel_Configuration/ here] - contact JCA for editorial access.&lt;br /&gt;
&lt;br /&gt;
In addition to the schematic shown it can be mentioned that a ferrite core has been introduced on the power supply wires for the DC motor. This reduces EMI which was found to greatly interfere with the encoder signals from the motor. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Teensy Wheel Configuration.png|970px]]&lt;br /&gt;
&lt;br /&gt;
Figure 1: Schematic for the ankle configuration for the Flexbot.&lt;br /&gt;
&lt;br /&gt;
===Open items (to-do list)===&lt;br /&gt;
This list includes items that needs to be done, but have not been finished (or started) yet. This serves as reference for where to start when catching up on the project. This list should be updated as items are finished and finished items should be moved to the list which represents the current configuration of the ankle. The responsibility of updating the schematic and git repository falls to the person responsible for carrying out the open item. This way the documentation both here and on git reflects the current state of the ankle configuration.&lt;br /&gt;
* The rotary encoder has been wired and tested. Connections in the schematic from the Teensy to the encoder are missing. The encoder still needs to be fixed to correct position on the wheel configuration and magnets needs to be attached to bolt fastening the spring dampener.&lt;br /&gt;
* A Pololu 24V to 12V needs to implemented on the matrix board to supply the small linear actuator. They are of model D24V22F12 (link to product is on git) and should be ordered but have not been received. &lt;br /&gt;
* The I2C interface for inter-configuration(and host)-communication should be removed from the board. USB should be used instead.&lt;br /&gt;
* When the final hardware configuration for the ankle has been decided upon, a revision 1 of a PCB layout should be made. Upverter holds the schematic, but footprints for layout should be carefully checked(or made). &lt;br /&gt;
&lt;br /&gt;
==Knee hardware design==&lt;br /&gt;
The knee configuration currently includes:&lt;br /&gt;
* A linear actuator to control the height (tilt) of the configuration - model DLA-12-10-A-200-POT-IP66&lt;br /&gt;
* Cytron 10A DC Motor Driver - model RB-Cyt-132&lt;br /&gt;
* MPU to obtain tilt - model MPU-9250/6500&lt;br /&gt;
* Teensy 3.5 &amp;amp;mu;-processor board&lt;br /&gt;
&lt;br /&gt;
The schematic for the knee configuration is shown in Figure 2 and can be accessed using the free online e-CAD design tool Upverter. Link to the project on Upverter is given [https://upverter.com/DTUAutomationControlFlexbot/09ebc8887ee10a31/Teensy_Knee_Configuration/ here] - contact JCA for editorial access.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Flexbot Knee Configuration.png|1000px]]&lt;br /&gt;
&lt;br /&gt;
Figure 2: Schematic for the knee configuration for the Flexbot.&lt;br /&gt;
&lt;br /&gt;
===Open items (to-do list)===&lt;br /&gt;
This list includes items that needs to be done, but have not been finished (or started) yet. This serves as reference for where to start when catching up on the project. This list should be updated as items are finished and finished items should be moved to the list which represents the current configuration of the knee. The responsibility of updating the schematic and git repository falls to the person responsible for carrying out the open item. This way the documentation both here and on git reflects the current state of the ankle configuration.&lt;br /&gt;
* A Pololu 24V to 5V needs to inserted onto the matrix board. Wiring has been made, only thing missing is the component and to solder pin headers onto the component. They are of model D24V22F5 (link to product is on git) and should be ordered but have not been received. &lt;br /&gt;
* A second motor driver needs to be fitted to the knee. Wiring has been made and the driver is on stock and are found in one of the two boxes containing parts for the project. &lt;br /&gt;
* The interface for linear actuator 1 supports the linear actuator with potentiometer feedback. This should at some point be changed to the ordered actuators with hall sensor feedback and the configuration on the matrix should be changed to reflect this as well (should be same as linear actuator 2). &lt;br /&gt;
* The matrix board needs to support a second MPU. It has not been investigated whether or not it can be connected to the same bus by changing the address. Maybe it would be easier to simply connect to its own I2C bus. Teensy 3.5 holds 3 I2C interfaces and currently uses 1. &lt;br /&gt;
* A second linear actuator should be connected to the knee. This relies on the mechanics to be finished. &lt;br /&gt;
* When the final hardware configuration for the knee has been decided upon, a revision 1 of a PCB layout should be made. Upverter holds the schematic, but footprints for layout should be carefully checked (or made).&lt;br /&gt;
&lt;br /&gt;
==Body hardware design==&lt;br /&gt;
The design of the body hardware has not been started yet. A few ideas have been discussed bot nothing final has been decided upon. The body hardware design will first be relevant in mid/late autumn.&lt;br /&gt;
A few discussed ideas of what the body hardware design should include are listed below:&lt;br /&gt;
* An Intel Nuc i7 configuration: https://www.intel.com/content/www/us/en/products/boards-kits/nuc/kits.html&lt;br /&gt;
* A USB hub or at least enough connections to connect all Teensy &amp;amp;mu;-processor boards. This will sum up to 8 &amp;amp;mu;-processor boards (2 on each leg).&lt;br /&gt;
* A main power supply. Should be 24V obtained from LiPo batteries or other mobile source.&lt;/div&gt;</summary>
		<author><name>S130074</name></author>
	</entry>
</feed>