|
From: <tf...@us...> - 2008-04-18 01:29:59
|
Revision: 130
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=130&view=rev
Author: tfoote
Date: 2008-04-17 18:30:07 -0700 (Thu, 17 Apr 2008)
Log Message:
-----------
a few more api cleanups
Modified Paths:
--------------
pkg/trunk/libTF/simple/libTF.cc
pkg/trunk/libTF/simple/libTF.hh
pkg/trunk/libTF/simple/main.cc
Modified: pkg/trunk/libTF/simple/libTF.cc
===================================================================
--- pkg/trunk/libTF/simple/libTF.cc 2008-04-18 01:22:06 UTC (rev 129)
+++ pkg/trunk/libTF/simple/libTF.cc 2008-04-18 01:30:07 UTC (rev 130)
@@ -51,7 +51,7 @@
}
-void TransformReference::set(unsigned int frameID, unsigned int parentID, double a,double b,double c,double d,double e,double f, unsigned long long time)
+void TransformReference::setWithEulers(unsigned int frameID, unsigned int parentID, double a,double b,double c,double d,double e,double f, unsigned long long time)
{
if (frameID > MAX_NUM_FRAMES || parentID > MAX_NUM_FRAMES || frameID == NO_PARENT || frameID == ROOT_FRAME)
throw InvalidFrame;
@@ -63,7 +63,7 @@
getFrame(frameID)->fromEuler(a,b,c,d,e,f,time);
}
-void TransformReference::set(unsigned int frameID, unsigned int parentID, double a,double b,double c,double d, unsigned long long time)
+void TransformReference::setWithDH(unsigned int frameID, unsigned int parentID, double a,double b,double c,double d, unsigned long long time)
{
if (frameID > MAX_NUM_FRAMES || parentID > MAX_NUM_FRAMES || frameID == NO_PARENT || frameID == ROOT_FRAME)
throw InvalidFrame;
Modified: pkg/trunk/libTF/simple/libTF.hh
===================================================================
--- pkg/trunk/libTF/simple/libTF.hh 2008-04-18 01:22:06 UTC (rev 129)
+++ pkg/trunk/libTF/simple/libTF.hh 2008-04-18 01:30:07 UTC (rev 130)
@@ -92,8 +92,8 @@
/********** Mutators **************/
/* Set a new frame or update an old one. */
- void set(unsigned int framid, unsigned int parentid, double,double,double,double,double,double,unsigned long long time);
- void set(unsigned int framid, unsigned int parentid, double,double,double,double,unsigned long long time);
+ void setWithEulers(unsigned int framid, unsigned int parentid, double,double,double,double,double,double,unsigned long long time);
+ void setWithDH(unsigned int framid, unsigned int parentid, double,double,double,double,unsigned long long time);
// Possible exceptions TransformReference::LookupException
/*********** Accessors *************/
Modified: pkg/trunk/libTF/simple/main.cc
===================================================================
--- pkg/trunk/libTF/simple/main.cc 2008-04-18 01:22:06 UTC (rev 129)
+++ pkg/trunk/libTF/simple/main.cc 2008-04-18 01:30:07 UTC (rev 130)
@@ -18,19 +18,19 @@
//Fill in some transforms
- // mTR.set(10,2,1,1,1,dyaw,dp,dr,atime); //Switching out for DH params below
- mTR.set(10,2,1,1,1,dyaw,atime);
- //mTR.set(2,3,1-1,1,1,dyaw,dp,dr,atime-1000);
- mTR.set(2,3,1,1,1,dyaw,dp,dr,atime-100);
- mTR.set(2,3,1,1,1,dyaw,dp,dr,atime-50);
- mTR.set(2,3,1,1,1,dyaw,dp,dr,atime-1000);
- //mTR.set(2,3,1+1,1,1,dyaw,dp,dr,atime+1000);
- mTR.set(3,5,dx,dy,dz,dyaw,dp,dr,atime);
- mTR.set(5,1,dx,dy,dz,dyaw,dp,dr,atime);
- mTR.set(6,5,dx,dy,dz,dyaw,dp,dr,atime);
- mTR.set(7,6,1,1,1,dyaw,dp,dr,atime);
- mTR.set(8,7,1,1,1,dyaw,atime);
- //mTR.set(8,7,1,1,1,dyaw,dp,dr,atime); //Switching out for DH params above
+ // mTR.setWithEulers(10,2,1,1,1,dyaw,dp,dr,atime); //Switching out for DH params below
+ mTR.setWithDH(10,2,1,1,1,dyaw,atime);
+ //mTR.setWithEulers(2,3,1-1,1,1,dyaw,dp,dr,atime-1000);
+ mTR.setWithEulers(2,3,1,1,1,dyaw,dp,dr,atime-100);
+ mTR.setWithEulers(2,3,1,1,1,dyaw,dp,dr,atime-50);
+ mTR.setWithEulers(2,3,1,1,1,dyaw,dp,dr,atime-1000);
+ //mTR.setWithEulers(2,3,1+1,1,1,dyaw,dp,dr,atime+1000);
+ mTR.setWithEulers(3,5,dx,dy,dz,dyaw,dp,dr,atime);
+ mTR.setWithEulers(5,1,dx,dy,dz,dyaw,dp,dr,atime);
+ mTR.setWithEulers(6,5,dx,dy,dz,dyaw,dp,dr,atime);
+ mTR.setWithEulers(7,6,1,1,1,dyaw,dp,dr,atime);
+ mTR.setWithDH(8,7,1,1,1,dyaw,atime);
+ //mTR.setWithEulers(8,7,1,1,1,dyaw,dp,dr,atime); //Switching out for DH params above
//Demonstrate InvalidFrame LookupException
@@ -59,7 +59,7 @@
//Break the graph, making it loop and demonstrate catching MaxDepthException
- mTR.set(6,7,dx,dy,dz,dyaw,dp,dr,atime);
+ mTR.setWithEulers(6,7,dx,dy,dz,dyaw,dp,dr,atime);
try {
std::cout<<mTR.viewChain(10,8);
@@ -70,7 +70,7 @@
}
//Break the graph, making it disconnected, and demonstrate catching ConnectivityException
- mTR.set(6,0,dx,dy,dz,dyaw,dp,dr,atime);
+ mTR.setWithEulers(6,0,dx,dy,dz,dyaw,dp,dr,atime);
try {
std::cout<<mTR.viewChain(10,8);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|