User Tools

Site Tools


drexel_lua_minihubo

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
drexel_lua_minihubo [2016/11/01 10:45] – created dwallacedrexel_lua_minihubo [2016/11/07 22:06] (current) – [Test it] dwallace
Line 1: Line 1:
 ====== Lua for miniHUBO ====== ====== Lua for miniHUBO ======
  
-==Upennalizers Github and Wiki== +===== Upennalizers Github and Wiki =====
-https://github.com/UPenn-RoboCup/UPennalizers+
  
-===Upennalizers Wiki Link=== +[[https://github.com/UPenn-RoboCup/UPennalizers|Github]]\\ 
-https://github.com/UPenn-RoboCup/UPennalizers/wiki+
  
-===Development Workstation Setup=== +[[https://github.com/UPenn-RoboCup/UPennalizers/wiki|Wiki]]\\ 
-Installers and Instructions:<br> +
-https://github.com/UPenn-RoboCup/UPennalizers/wiki/Setup-Development-Workstation+
  
-==Lua Documentation== +==== Development Workstation Setup ====
-http://www.lua.org/docs.html+
  
-==Webots Setup for DASL MiniHUBO Model==+Installers and Instructions: 
 + 
 +[[https://github.com/UPenn-RoboCup/UPennalizers/wiki/Setup-Development-Workstation|Setup]]\\  
 + 
 +===== Lua Documentation ===== 
 + 
 +[[http://www.lua.org/docs.html|Documentation]]\\  
 + 
 +===== Webots Setup for DASL MiniHUBO Model =====
  
 Please refer to the Upennalizers Development Workstation Setup guide for the github repository and necessary installs needed. Please refer to the Upennalizers Development Workstation Setup guide for the github repository and necessary installs needed.
-<br><br>+
 To compile the UPenn code for use with MiniHUBO, we need to compile for the generic version (not Darwin or Nao). To compile the UPenn code for use with MiniHUBO, we need to compile for the generic version (not Darwin or Nao).
-<syntaxhighlight lang="bash">~/UPennalizers/Libsudo make setup_webots_generic</syntaxhighlight> + 
-<br>+  cd ~/UPennalizers/Lib 
 +  sudo make setup_webots_generic 
 After that, for ease of use later, we will create a symbolic link between one of the default Darwin Controllers and the Webots default controllers folder  After that, for ease of use later, we will create a symbolic link between one of the default Darwin Controllers and the Webots default controllers folder 
  
-<syntaxhighlight lang="bash">$WEBOTS_HOME/resources/projects/default/controllers$ sudo ln -s ~/UPennalizers/WebotsController darwin-op_team_1</syntaxhighlight>+  cd $WEBOTS_HOME/resources/projects/default/controllers$  
 +  sudo ln -s ~/UPennalizers/WebotsController darwin-op_team_1
  
-where $WEBOTS_HOME likely resides in ''usr/local/''.+where $WEBOTS_HOME likely resides in **usr/local/**.
  
-==Some files need to be changed== +===== Some files need to be changed =====
-===start.lua=== +
-In UPennalizers/WebotsController/, edit ''start.lua'' by commenting out the line ''dofile("Player/player.lua");'' and uncommenting ''dofile("Player/Test/test_walk_webots_op.lua");''. Save it.<br> +
-'''NOTE:''' If you are unable to copy the code without the line numbers, try Firefox.<br> +
-<br> +
-'''Edited start.lua:'''+
  
-<syntaxhighlight lang="lua" line start="1" >+==== start.lua ==== 
 + 
 +In UPennalizers/WebotsController/, edit **start.lua** by commenting out the line **dofile("Player/player.lua");** and uncommenting **dofile("Player/Test/test_walk_webots_op.lua");**. Save it. 
 +**NOTE:** If you are unable to copy the code without the line numbers, try Firefox. 
 + 
 +**Edited start.lua:** 
 + 
 +<code lua>
  
 require('controller'); require('controller');
Line 49: Line 57:
  
 dofile("Player/Test/test_walk_webots_op.lua"); dofile("Player/Test/test_walk_webots_op.lua");
-</syntaxhighlight>+</code> 
 + 
 +==== test_walk_webots_op.lua ====
  
-===test_walk_webots_op.lua=== 
 test_walk_webots_op.lua is located in Upennalizers/Player/Test/. test_walk_webots_op.lua is located in Upennalizers/Player/Test/.
-Comment out the two lines (39 and 40).<br> +Comment out the two lines (39 and 40)
-<br> +
-'''Edited test_walk_webots_op.lua:''' +
-<syntaxhighlight lang="lua" line start="33">+
  
 +<code lua>
 ... ...
  
Line 75: Line 82:
  
 ... ...
-</syntaxhighlight>+</code>
  
-===GenericWebotsBody.lua=== +==== GenericWebotsBody.lua ====
-GenericWebotsBody.lua is located in  UPennalizers/Lib/Platform/WebotsGeneric/Body/.<br> +
-<br> +
-'''Edited GenericWebotsBody.lua:''' +
-       +
-<syntaxhighlight lang="lua" line start="1">+
  
 +GenericWebotsBody.lua is located in  UPennalizers/Lib/Platform/WebotsGeneric/Body/.
 +
 +**Edited GenericWebotsBody.lua:**
 +      
 +<code lua>
 module(..., package.seeall); module(..., package.seeall);
 require('controller'); require('controller');
Line 131: Line 138:
  
 ... ...
-</syntaxhighlight>+</code>
  
-==Test it==+===== Test it =====
  
 YOU MUST MAKE THE SYSTEM EVERY TIME YOU EDIT GENERIC WEBOTS BODY YOU MUST MAKE THE SYSTEM EVERY TIME YOU EDIT GENERIC WEBOTS BODY
Line 139: Line 146:
 you must now cd to the UPennalizers/Lib directory and make. you must now cd to the UPennalizers/Lib directory and make.
  
-make setup_webots_generic+  make setup_webots_generic
  
 This will copy the changed files into the Player/Lib directory. This will copy the changed files into the Player/Lib directory.
  
 Now, if you open up the world file for Penn's MiniHUBO model, he should start walking in place when you push play. Now, if you open up the world file for Penn's MiniHUBO model, he should start walking in place when you push play.
-The Penn MiniHUBO is available here: [[Media:Example.ogg]] 
drexel_lua_minihubo.txt · Last modified: 2016/11/07 22:06 by dwallace