buzz_argos

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
buzz_argos [2018/03/18 23:19] – [Debugging Buzz Programs] rootbuzz_argos [2018/03/18 23:30] – [ARGoS + Buzz: Basic information] root
Line 34: Line 34:
  
 <code xml> <code xml>
 +<!-- 
 +     For a full example of an ARGoS configuration file, refer to
 +
 +     https://github.com/ilpincy/argos3-examples/blob/master/experiments/diffusion_1.argos
 +     
 +     and the other examples at
 +     
 +     https://github.com/ilpincy/argos3-examples/blob/master/experiments/
 +-->
 +
 +...
 +
 <controllers> <controllers>
  
Line 99: Line 111:
    </spiri>    </spiri>
 </arena> </arena>
 +
 +...
  
 </code> </code>
  
-To activate drawinguse ''buzz_qt'' to indicate that you want to use the Buzz QtOpenGL user functions:+If you want ARGoS to start with a Buzz script already loadedyou can specify that in the ''<params />'' tag of the robot controller. The above example for the foot-bot, for example, becomes:
  
 <code xml> <code xml>
 +  ...
 +
 +  <buzz_controller_footbot id="bcf">
 +    <actuators>
 +      <differential_steering implementation="default" />
 +      <leds                  implementation="default" medium="leds" />
 +      <range_and_bearing implementation="default" />
 +    </actuators>
 +    <sensors>
 +      <range_and_bearing implementation="medium" medium="rab" show_rays="true" noise_std_dev="0" />
 +    </sensors>
 +    
 +    <!-- This loads the specified files at startup -->
 +    <params bytecode_file="myscript.bo" debug_file="myscript.bdb" />
 +    
 +  </buzz_controller_footbot>
 +  
 +  ...
 +  
 +</code>
 +
 +To activate the Buzz editor and support debugging, use ''buzz_qt'' to indicate that you want to use the Buzz QtOpenGL user functions:
 +
 +<code xml>
 +<!-- For a full example of an ARGoS configuration file, refer to
 +     https://github.com/ilpincy/argos3-examples/blob/master/experiments/diffusion_1.argos
 +-->
 +
 <visualization> <visualization>
   <qt-opengl>   <qt-opengl>
Line 132: Line 174:
 == Writing Text on Top of a Robot == == Writing Text on Top of a Robot ==
  
-== Drawing the Trajectory of a Robot ==+  * ''debug.print(message)'' 
 +    * prints a message on top of the robot, after the robot id 
 +    * ''message'' can be combination of text and variables, such as ''"", x, " cm"''
  
-You can draw the trajectory of the robot as it moves.+== Drawing the Trajectory of a Robot ==
  
   * ''debug.trajectory.enable(maxpoints,r,g,b)''   * ''debug.trajectory.enable(maxpoints,r,g,b)''
     * enable trajectory tracking setting how many points should be stored and the drawing color     * enable trajectory tracking setting how many points should be stored and the drawing color
 +    * ''(r,g,b)'' is the drawing color of the trajectory (0-255 for each value)
   * ''debug.trajectory.enable(maxpoints)''   * ''debug.trajectory.enable(maxpoints)''
     * enable trajectory tracking setting how many points should be stored     * enable trajectory tracking setting how many points should be stored
   * ''debug.trajectory.enable(r,g,b)''   * ''debug.trajectory.enable(r,g,b)''
     * enable trajectory tracking keeping maxpoints' last value and setting the drawing color     * enable trajectory tracking keeping maxpoints' last value and setting the drawing color
 +    * ''(r,g,b)'' is the drawing color of the trajectory (0-255 for each value)
   * ''debug.trajectory.enable()''   * ''debug.trajectory.enable()''
     * enable trajectory tracking keeping maxpoints' last value (default is 30)     * enable trajectory tracking keeping maxpoints' last value (default is 30)
Line 154: Line 200:
     * draw a ray from the reference point of the robot to ''(x,y,z)''.     * draw a ray from the reference point of the robot to ''(x,y,z)''.
     * ''(x,y,z)'' is expressed wrt the robot reference frame     * ''(x,y,z)'' is expressed wrt the robot reference frame
 +    * ''(r,g,b)'' is the color of the vector (0-255 for each value)
   * ''debug.rays.add(r,g,b, x0,y0,z0, x1,y1,z1)''   * ''debug.rays.add(r,g,b, x0,y0,z0, x1,y1,z1)''
     * draw a ray from ''(x0,y0,z0)'' to ''(x1,y1,z1)''     * draw a ray from ''(x0,y0,z0)'' to ''(x1,y1,z1)''
     * ''(x0,y0,z0)'' and ''(x1,y1,z1)'' are expressed wrt the robot reference frame     * ''(x0,y0,z0)'' and ''(x1,y1,z1)'' are expressed wrt the robot reference frame
 +    * ''(r,g,b)'' is the color of the vector (0-255 for each value) 
 +  * debug.rays.clear() 
 +    * delete all the rays
  • buzz_argos.txt
  • Last modified: 2018/03/18 23:34
  • by root