Revision: 8518 http://playerstage.svn.sourceforge.net/playerstage/?rev=8518&view=rev Author: rtv Date: 2010-01-19 23:31:03 +0000 (Tue, 19 Jan 2010)
Log Message: ----------- fixed rotation of model_actuator, thanks to patch #2927791 from RAZOR Modified Paths: -------------- code/stage/trunk/libstage/canvas.cc code/stage/trunk/libstage/model_actuator.cc code/stage/trunk/libstage/model_blinkenlight.cc code/stage/trunk/libstage/model_blobfinder.cc code/stage/trunk/libstage/model_fiducial.cc code/stage/trunk/libstage/model_gripper.cc code/stage/trunk/libstage/model_laser.cc code/stage/trunk/libstage/model_position.cc code/stage/trunk/libstage/model_ranger.cc code/stage/trunk/libstage/model_wifi.cc code/stage/trunk/libstage/option.hh code/stage/trunk/libstage/stage.hh code/stage/trunk/libstage/stagecpp.cc code/stage/trunk/libstage/texture_manager.cc code/stage/trunk/libstage/world.cc code/stage/trunk/libstage/worldfile.cc code/stage/trunk/libstage/worldfile.hh code/stage/trunk/libstage/worldgui.cc Property Changed: ---------------- code/stage/trunk/libstage/ancestor.cc code/stage/trunk/libstage/block.cc code/stage/trunk/libstage/blockgroup.cc code/stage/trunk/libstage/camera.cc code/stage/trunk/libstage/canvas.cc code/stage/trunk/libstage/canvas.hh code/stage/trunk/libstage/charger.cc code/stage/trunk/libstage/color.cc code/stage/trunk/libstage/file_manager.cc code/stage/trunk/libstage/file_manager.hh code/stage/trunk/libstage/gl.cc code/stage/trunk/libstage/glutgraphics.cc code/stage/trunk/libstage/logentry.cc code/stage/trunk/libstage/logo.cc code/stage/trunk/libstage/main.cc code/stage/trunk/libstage/model.cc code/stage/trunk/libstage/model_blinkenlight.cc code/stage/trunk/libstage/model_blobfinder.cc code/stage/trunk/libstage/model_callbacks.cc code/stage/trunk/libstage/model_camera.cc code/stage/trunk/libstage/model_draw.cc code/stage/trunk/libstage/model_fiducial.cc code/stage/trunk/libstage/model_getset.cc code/stage/trunk/libstage/model_gripper.cc code/stage/trunk/libstage/model_laser.cc code/stage/trunk/libstage/model_lightindicator.cc code/stage/trunk/libstage/model_load.cc code/stage/trunk/libstage/model_position.cc code/stage/trunk/libstage/model_props.cc code/stage/trunk/libstage/model_ranger.cc code/stage/trunk/libstage/model_wifi.cc code/stage/trunk/libstage/option.cc code/stage/trunk/libstage/option.hh code/stage/trunk/libstage/options_dlg.cc code/stage/trunk/libstage/options_dlg.hh code/stage/trunk/libstage/powerpack.cc code/stage/trunk/libstage/puck.cc code/stage/trunk/libstage/region.cc code/stage/trunk/libstage/region.hh code/stage/trunk/libstage/stage.cc code/stage/trunk/libstage/stage.hh code/stage/trunk/libstage/stagecpp.cc code/stage/trunk/libstage/texture_manager.cc code/stage/trunk/libstage/texture_manager.hh code/stage/trunk/libstage/typetable.cc code/stage/trunk/libstage/vis_strip.cc code/stage/trunk/libstage/world.cc code/stage/trunk/libstage/worldfile.cc code/stage/trunk/libstage/worldfile.hh code/stage/trunk/libstage/worldgui.cc Property changes on: code/stage/trunk/libstage/ancestor.cc ___________________________________________________________________ Added: svn:keywords + Revision Property changes on: code/stage/trunk/libstage/block.cc ___________________________________________________________________ Added: svn:keywords + Revision Property changes on: code/stage/trunk/libstage/blockgroup.cc ___________________________________________________________________ Added: svn:keywords + Revision Property changes on: code/stage/trunk/libstage/camera.cc ___________________________________________________________________ Added: svn:keywords + Revision Modified: code/stage/trunk/libstage/canvas.cc =================================================================== --- code/stage/trunk/libstage/canvas.cc 2010-01-19 23:07:26 UTC (rev 8517) +++ code/stage/trunk/libstage/canvas.cc 2010-01-19 23:31:03 UTC (rev 8518) @@ -7,7 +7,7 @@ Alex Couture-Beil (as...@sfu.ca) Jeremy Asher (jr...@sfu.ca) - $Id$ + $Id: canvas.cc 8330 2009-10-27 19:13:58Z rtv $ */ #include "stage.hh" Property changes on: code/stage/trunk/libstage/canvas.cc ___________________________________________________________________ Modified: svn:keywords - Id + Revision Property changes on: code/stage/trunk/libstage/canvas.hh ___________________________________________________________________ Added: svn:keywords + Revision Property changes on: code/stage/trunk/libstage/charger.cc ___________________________________________________________________ Added: svn:keywords + Revision Property changes on: code/stage/trunk/libstage/color.cc ___________________________________________________________________ Added: svn:keywords + Revision Property changes on: code/stage/trunk/libstage/file_manager.cc ___________________________________________________________________ Added: svn:keywords + Revision Property changes on: code/stage/trunk/libstage/file_manager.hh ___________________________________________________________________ Added: svn:keywords + Revision Property changes on: code/stage/trunk/libstage/gl.cc ___________________________________________________________________ Added: svn:keywords + Revision Property changes on: code/stage/trunk/libstage/glutgraphics.cc ___________________________________________________________________ Added: svn:keywords + Revision Property changes on: code/stage/trunk/libstage/logentry.cc ___________________________________________________________________ Added: svn:keywords + Revision Property changes on: code/stage/trunk/libstage/logo.cc ___________________________________________________________________ Added: svn:keywords + Revision Property changes on: code/stage/trunk/libstage/main.cc ___________________________________________________________________ Added: svn:keywords + Revision Property changes on: code/stage/trunk/libstage/model.cc ___________________________________________________________________ Added: svn:keywords + Revision Modified: code/stage/trunk/libstage/model_actuator.cc =================================================================== --- code/stage/trunk/libstage/model_actuator.cc 2010-01-19 23:07:26 UTC (rev 8517) +++ code/stage/trunk/libstage/model_actuator.cc 2010-01-19 23:31:03 UTC (rev 8518) @@ -89,8 +89,7 @@ void ModelActuator::Load( void ) { Model::Load(); - InitialPose = GetPose(); - + // load steering mode if( wf->PropertyExists( wf_entity, "type" ) ) { @@ -151,25 +150,25 @@ { start_position = wf->ReadFloat ( wf_entity, "start_position", 0 ); - Pose desired_pose = InitialPose; + Pose DesiredPose = InitialPose; switch (actuator_type) { case TYPE_LINEAR: { - double cosa = cos(desired_pose.a); - double sina = sin(desired_pose.a); + double cosa = cos(DesiredPose.a); + double sina = sin(DesiredPose.a); - desired_pose.x += (axis.x * cosa - axis.y * sina) * start_position; - desired_pose.y += (axis.x * sina + axis.y * cosa) * start_position; - desired_pose.z += axis.z * start_position; - SetPose( desired_pose ); + DesiredPose.x += (axis.x * cosa - axis.y * sina) * start_position; + DesiredPose.y += (axis.x * sina + axis.y * cosa) * start_position; + DesiredPose.z += axis.z * start_position; + SetPose( DesiredPose ); } break; case TYPE_ROTATIONAL: { - desired_pose.a += start_position; - SetPose( desired_pose); + DesiredPose.a += start_position; + SetPose( DesiredPose); }break; default: PRINT_ERR1( "unrecognized actuator type %d", actuator_type ); @@ -197,7 +196,9 @@ { case TYPE_LINEAR: { - pos = PoseDiff.x * axis.x + PoseDiff.y * axis.y + PoseDiff.z * axis.z; // Dot product to find distance along axis + // When the velocity is applied, it will automatically be rotated by the angle the model is at + // So, rotate the axis of movement by the model angle before doing a dot product to find the actuator position + pos = (PoseDiff.x * cosa - PoseDiff.y * sina)*axis.x + (PoseDiff.x * sina+ PoseDiff.y * cosa)* axis.y + PoseDiff.z * axis.z; } break; case TYPE_ROTATIONAL: { Modified: code/stage/trunk/libstage/model_blinkenlight.cc =================================================================== --- code/stage/trunk/libstage/model_blinkenlight.cc 2010-01-19 23:07:26 UTC (rev 8517) +++ code/stage/trunk/libstage/model_blinkenlight.cc 2010-01-19 23:31:03 UTC (rev 8518) @@ -7,7 +7,7 @@ // CVS info: // $Source: /home/tcollett/stagecvs/playerstage-cvs/code/stage/libstage/model_blinkenlight.cc,v $ // $Author: rtv $ -// $Revision: 1.1 $ +// $Revision$ // /////////////////////////////////////////////////////////////////////////// Property changes on: code/stage/trunk/libstage/model_blinkenlight.cc ___________________________________________________________________ Added: svn:keywords + Revision Modified: code/stage/trunk/libstage/model_blobfinder.cc =================================================================== --- code/stage/trunk/libstage/model_blobfinder.cc 2010-01-19 23:07:26 UTC (rev 8517) +++ code/stage/trunk/libstage/model_blobfinder.cc 2010-01-19 23:31:03 UTC (rev 8518) @@ -7,7 +7,7 @@ // CVS info: // $Source: /home/tcollett/stagecvs/playerstage-cvs/code/stage/libstage/model_blobfinder.cc,v $ // $Author: rtv $ -// $Revision: 1.3 $ +// $Revision$ // /////////////////////////////////////////////////////////////////////////// Property changes on: code/stage/trunk/libstage/model_blobfinder.cc ___________________________________________________________________ Added: svn:keywords + Revision Property changes on: code/stage/trunk/libstage/model_callbacks.cc ___________________________________________________________________ Added: svn:keywords + Revision Property changes on: code/stage/trunk/libstage/model_camera.cc ___________________________________________________________________ Added: svn:keywords + Revision Property changes on: code/stage/trunk/libstage/model_draw.cc ___________________________________________________________________ Added: svn:keywords + Revision Modified: code/stage/trunk/libstage/model_fiducial.cc =================================================================== --- code/stage/trunk/libstage/model_fiducial.cc 2010-01-19 23:07:26 UTC (rev 8517) +++ code/stage/trunk/libstage/model_fiducial.cc 2010-01-19 23:31:03 UTC (rev 8518) @@ -7,7 +7,7 @@ // CVS info: // $Source: /home/tcollett/stagecvs/playerstage-cvs/code/stage/libstage/model_fiducial.cc,v $ // $Author: rtv $ -// $Revision: 1.4 $ +// $Revision$ // /////////////////////////////////////////////////////////////////////////// Property changes on: code/stage/trunk/libstage/model_fiducial.cc ___________________________________________________________________ Added: svn:keywords + Revision Property changes on: code/stage/trunk/libstage/model_getset.cc ___________________________________________________________________ Added: svn:keywords + Revision Modified: code/stage/trunk/libstage/model_gripper.cc =================================================================== --- code/stage/trunk/libstage/model_gripper.cc 2010-01-19 23:07:26 UTC (rev 8517) +++ code/stage/trunk/libstage/model_gripper.cc 2010-01-19 23:31:03 UTC (rev 8518) @@ -8,7 +8,7 @@ // CVS info: // $Source: /home/tcollett/stagecvs/playerstage-cvs/code/stage/src/model_gripper.c,v $ // $Author: thjc $ -// $Revision: 1.26.8.1 $ +// $Revision$ // /////////////////////////////////////////////////////////////////////////// Property changes on: code/stage/trunk/libstage/model_gripper.cc ___________________________________________________________________ Added: svn:keywords + Revision Modified: code/stage/trunk/libstage/model_laser.cc =================================================================== --- code/stage/trunk/libstage/model_laser.cc 2010-01-19 23:07:26 UTC (rev 8517) +++ code/stage/trunk/libstage/model_laser.cc 2010-01-19 23:31:03 UTC (rev 8518) @@ -5,7 +5,7 @@ // CVS info: // $Source: /home/tcollett/stagecvs/playerstage-cvs/code/stage/libstage/model_laser.cc,v $ // $Author: rtv $ -// $Revision: 1.7 $ +// $Revision$ // /////////////////////////////////////////////////////////////////////////// Property changes on: code/stage/trunk/libstage/model_laser.cc ___________________________________________________________________ Added: svn:keywords + Revision Property changes on: code/stage/trunk/libstage/model_lightindicator.cc ___________________________________________________________________ Added: svn:keywords + Revision Property changes on: code/stage/trunk/libstage/model_load.cc ___________________________________________________________________ Added: svn:keywords + Revision Modified: code/stage/trunk/libstage/model_position.cc =================================================================== --- code/stage/trunk/libstage/model_position.cc 2010-01-19 23:07:26 UTC (rev 8517) +++ code/stage/trunk/libstage/model_position.cc 2010-01-19 23:31:03 UTC (rev 8518) @@ -7,7 +7,7 @@ // CVS info: // $Source: /home/tcollett/stagecvs/playerstage-cvs/code/stage/libstage/model_position.cc,v $ // $Author: rtv $ -// $Revision: 1.5 $ +// $Revision$ // /////////////////////////////////////////////////////////////////////////// Property changes on: code/stage/trunk/libstage/model_position.cc ___________________________________________________________________ Added: svn:keywords + Revision Property changes on: code/stage/trunk/libstage/model_props.cc ___________________________________________________________________ Added: svn:keywords + Revision Modified: code/stage/trunk/libstage/model_ranger.cc =================================================================== --- code/stage/trunk/libstage/model_ranger.cc 2010-01-19 23:07:26 UTC (rev 8517) +++ code/stage/trunk/libstage/model_ranger.cc 2010-01-19 23:31:03 UTC (rev 8518) @@ -7,7 +7,7 @@ // CVS info: // $Source: /home/tcollett/stagecvs/playerstage-cvs/code/stage/libstage/model_ranger.cc,v $ // $Author: rtv $ -// $Revision: 1.4 $ +// $Revision$ // /////////////////////////////////////////////////////////////////////////// Property changes on: code/stage/trunk/libstage/model_ranger.cc ___________________________________________________________________ Added: svn:keywords + Revision Modified: code/stage/trunk/libstage/model_wifi.cc =================================================================== --- code/stage/trunk/libstage/model_wifi.cc 2010-01-19 23:07:26 UTC (rev 8517) +++ code/stage/trunk/libstage/model_wifi.cc 2010-01-19 23:31:03 UTC (rev 8518) @@ -7,7 +7,7 @@ // CVS info: // $Source: /home/tcollett/stagecvs/playerstage-cvs/code/stage/libstage/model_wifi.cc,v $ // $Author: rtv $ -// $Revision: 1.2 $ +// $Revision$ // /////////////////////////////////////////////////////////////////////////// Property changes on: code/stage/trunk/libstage/model_wifi.cc ___________________________________________________________________ Added: svn:keywords + Revision Property changes on: code/stage/trunk/libstage/option.cc ___________________________________________________________________ Added: svn:keywords + Revision Modified: code/stage/trunk/libstage/option.hh =================================================================== --- code/stage/trunk/libstage/option.hh 2010-01-19 23:07:26 UTC (rev 8517) +++ code/stage/trunk/libstage/option.hh 2010-01-19 23:31:03 UTC (rev 8518) @@ -14,7 +14,7 @@ Used to pass settings between the GUI and the drawing classes Author: Jeremy Asher, Richard Vaughan - SVN: $Id$ + SVN: $Id: option.hh 8061 2009-07-21 01:49:26Z rtv $ */ class Option { private: Property changes on: code/stage/trunk/libstage/option.hh ___________________________________________________________________ Modified: svn:keywords - Id + Revision Property changes on: code/stage/trunk/libstage/options_dlg.cc ___________________________________________________________________ Added: svn:keywords + Revision Property changes on: code/stage/trunk/libstage/options_dlg.hh ___________________________________________________________________ Added: svn:keywords + Revision Property changes on: code/stage/trunk/libstage/powerpack.cc ___________________________________________________________________ Added: svn:keywords + Revision Property changes on: code/stage/trunk/libstage/puck.cc ___________________________________________________________________ Added: svn:keywords + Revision Property changes on: code/stage/trunk/libstage/region.cc ___________________________________________________________________ Added: svn:keywords + Revision Property changes on: code/stage/trunk/libstage/region.hh ___________________________________________________________________ Added: svn:keywords + Revision Property changes on: code/stage/trunk/libstage/stage.cc ___________________________________________________________________ Added: svn:keywords + Revision Modified: code/stage/trunk/libstage/stage.hh =================================================================== --- code/stage/trunk/libstage/stage.hh 2010-01-19 23:07:26 UTC (rev 8517) +++ code/stage/trunk/libstage/stage.hh 2010-01-19 23:31:03 UTC (rev 8518) @@ -28,7 +28,7 @@ * Desc: External header file for the Stage library * Author: Richard Vaughan (vaug...@sfu.ca) * Date: 1 June 2003 - * SVN: $Id$ + * SVN: $Id: stage.hh 8516 2010-01-19 22:57:20Z rtv $ */ // C libs @@ -2930,6 +2930,8 @@ double min_position; double max_position; double start_position; + double cosa; + double sina; ControlMode control_mode; ActuatorType actuator_type; stg_point3_t axis; Property changes on: code/stage/trunk/libstage/stage.hh ___________________________________________________________________ Modified: svn:keywords - Id + Revision Modified: code/stage/trunk/libstage/stagecpp.cc =================================================================== --- code/stage/trunk/libstage/stagecpp.cc 2010-01-19 23:07:26 UTC (rev 8517) +++ code/stage/trunk/libstage/stagecpp.cc 2010-01-19 23:31:03 UTC (rev 8518) @@ -1,6 +1,6 @@ // Thin-as-possible C Wrappers for C++ worldfile calls, using a single static worldfile. // This is a hacky use of the old C++ worldfile code. -// $Id$ +// $Id: stagecpp.cc 7151 2008-11-15 03:11:20Z rtv $ #include "stage_internal.h" #include "gui.h" Property changes on: code/stage/trunk/libstage/stagecpp.cc ___________________________________________________________________ Modified: svn:keywords - Id + Revision Modified: code/stage/trunk/libstage/texture_manager.cc =================================================================== --- code/stage/trunk/libstage/texture_manager.cc 2010-01-19 23:07:26 UTC (rev 8517) +++ code/stage/trunk/libstage/texture_manager.cc 2010-01-19 23:31:03 UTC (rev 8518) @@ -3,7 +3,7 @@ * Stage * * Created by Alex Couture-Beil on 03/06/08. - * $Id$ + * $Id: texture_manager.cc 8070 2009-07-22 06:41:10Z rtv $ */ #include <sstream> Property changes on: code/stage/trunk/libstage/texture_manager.cc ___________________________________________________________________ Modified: svn:keywords - Id + Revision Property changes on: code/stage/trunk/libstage/texture_manager.hh ___________________________________________________________________ Added: svn:keywords + Revision Property changes on: code/stage/trunk/libstage/typetable.cc ___________________________________________________________________ Added: svn:keywords + Revision Property changes on: code/stage/trunk/libstage/vis_strip.cc ___________________________________________________________________ Added: svn:keywords + Revision Modified: code/stage/trunk/libstage/world.cc =================================================================== --- code/stage/trunk/libstage/world.cc 2010-01-19 23:07:26 UTC (rev 8517) +++ code/stage/trunk/libstage/world.cc 2010-01-19 23:31:03 UTC (rev 8518) @@ -1,3 +1,8 @@ + +/** + $Id$ + **/ + /** @defgroup world World Stage simulates a 'world' composed of `models', defined in a `world Property changes on: code/stage/trunk/libstage/world.cc ___________________________________________________________________ Added: svn:keywords + Revision Modified: code/stage/trunk/libstage/worldfile.cc =================================================================== --- code/stage/trunk/libstage/worldfile.cc 2010-01-19 23:07:26 UTC (rev 8517) +++ code/stage/trunk/libstage/worldfile.cc 2010-01-19 23:31:03 UTC (rev 8518) @@ -24,7 +24,7 @@ * Douglas S. Blank <dbl...@brynmawr.edu> * * Date: 15 Nov 2001 - * CVS info: $Id$ + * CVS info: $Id: worldfile.cc 8313 2009-10-20 16:55:31Z rtv $ */ #include <assert.h> Property changes on: code/stage/trunk/libstage/worldfile.cc ___________________________________________________________________ Modified: svn:keywords - Id + Revision Modified: code/stage/trunk/libstage/worldfile.hh =================================================================== --- code/stage/trunk/libstage/worldfile.hh 2010-01-19 23:07:26 UTC (rev 8517) +++ code/stage/trunk/libstage/worldfile.hh 2010-01-19 23:31:03 UTC (rev 8518) @@ -21,7 +21,7 @@ * Desc: A class for reading in the world file. * Author: Andrew Howard, Richard Vaughan * Date: 15 Nov 2001 - * CVS info: $Id$ + * CVS info: $Id: worldfile.hh 8264 2009-09-26 01:28:12Z rtv $ */ #ifndef WORLDFILE_HH Property changes on: code/stage/trunk/libstage/worldfile.hh ___________________________________________________________________ Modified: svn:keywords - Id + Revision Modified: code/stage/trunk/libstage/worldgui.cc =================================================================== --- code/stage/trunk/libstage/worldgui.cc 2010-01-19 23:07:26 UTC (rev 8517) +++ code/stage/trunk/libstage/worldgui.cc 2010-01-19 23:31:03 UTC (rev 8518) @@ -3,7 +3,7 @@ Authors: Richard Vaughan (vaug...@sfu.ca) Alex Couture-Beil (as...@sfu.ca) Jeremy Asher (jr...@sfu.ca) - SVN: $Id$ + SVN: $Id: worldgui.cc 8329 2009-10-27 06:30:39Z rtv $ */ /** @defgroup worldgui World with Graphical User Interface Property changes on: code/stage/trunk/libstage/worldgui.cc ___________________________________________________________________ Modified: svn:keywords - Id + Revision This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev _______________________________________________ Playerstage-commit mailing list Playerstage-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/playerstage-commit