Permalink
Browse files

Conversion to Eigen with no known regressions

  • Loading branch information...
David Kyle authored and jredmondson committed Jun 15, 2018
1 parent 9aac4f5 commit 0cf7e6c975b8b8f908ef4c627dd89abf8d8b7c27
@@ -1617,7 +1617,7 @@ INCLUDE_FILE_PATTERNS =
# undefined via #undef or recursively expanded use the := operator
# instead of the = operator.
PREDEFINED =
PREDEFINED = DOXYGEN
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
# this tag can be used to specify a list of macro names that should be expanded.
@@ -2,6 +2,7 @@ project (gams) : build_files, using_madara, using_utm, using_ros, vrep_lib, ros_
libout = lib
sharedname = GAMS
includes += src
includes += $(EIGEN_ROOT)
dynamicflags += GAMS_BUILD_DLL _USE_MATH_DEFINES
staticflags += GAMS_BUILD_STATIC _USE_MATH_DEFINES
@@ -135,7 +135,7 @@ void gams::auctions::AuctionMinimumDistance::calculate_bids (void)
for (size_t i = 0; i < agents.size (); ++i)
{
// import the agents's location into the GAMS Pose system
gams::utility::Location location (platform_->get_frame ());
gams::pose::Position location (platform_->get_frame ());
location.from_container (agents[i].location);
double distance = location.distance_to (target_);
@@ -177,15 +177,15 @@ gams::auctions::AuctionMinimumDistance::set_target (
{
if (platform_)
{
target_ = utility::Location (
target_ = pose::Position (
platform_->get_frame (),
target.longitude (), target.latitude (), target.altitude ());
}
}
void
gams::auctions::AuctionMinimumDistance::set_target (
utility::Location target)
pose::Position target)
{
target_ = target;
}
@@ -65,7 +65,7 @@
#include "gams/platforms/BasePlatform.h"
#include "gams/groups/GroupFixedList.h"
#include "gams/utility/Location.h"
#include "gams/pose/Position.h"
namespace gams
{
@@ -104,7 +104,7 @@ namespace gams
* Sets the target of the distance calculations
* @param target the location that distance references are made to
**/
void set_target (utility::Location target);
void set_target (pose::Position target);
/**
* Sets the target of the distance calculations
@@ -128,7 +128,7 @@ namespace gams
/**
* The location that distance will be calculated to
**/
utility::Location target_;
pose::Position target_;
/**
* The platform is necessary to construct poses (we need frame)
@@ -196,7 +196,9 @@ gams::platforms::BasePlatform::orient (const pose::Orientation & target,
* moving and return 1 (moving to the new location)
**/
if (!*status_.paused_rotating && target != current &&
(!*status_.rotating || target != self_->agent.dest_orientation))
(!*status_.rotating ||
target != pose::Orientation(current.frame(),
self_->agent.dest_orientation)))
{
self_->agent.source_orientation = self_->agent.orientation;
target.to_container (self_->agent.dest_orientation);
@@ -91,8 +91,8 @@ gams::platforms::BasePlatform::get_pose () const
euler.b (self_->agent.orientation[1]);
euler.c (self_->agent.orientation[2]);
return pose::Pose (get_frame (), pose::LinearVector (self_->agent.location),
pose::AngularVector (euler.to_quat ()));
return pose::Pose (get_frame (), pose::Position (self_->agent.location),
pose::OrientationVector (euler.to_quat ()));
}
inline madara::knowledge::KnowledgeBase *
@@ -48,7 +48,7 @@
* @file Acceleration.h
* @author James Edmondson <jedmondson@gmail.com>
*
* This file contains the Acceleration and AccelerationVector classes
* This file is no longer needed, and is deprecated.
**/
#include "ReferenceFrame.h"
@@ -58,35 +58,4 @@
#include "Linear.h"
namespace gams
{
namespace pose
{
class ReferenceFrame;
/**
* Container for Acceleration information, not bound to a frame.
* Stores a 3-tuple, for x, y, and z.
*
* Provides accessor methods to support non-cartesian coordinate systems:
*
* lng/lat/alt for GPS-style systems
* rho/phi/r for Cylindrical systems
* theta/phi/r for Spherical systems
* northing/easting/zone/hemi/alt for UTM/USP systems
*
* Each of the above are bound to x/y/z respectively
**/
class Acceleration : public Linear<Acceleration>
{
public:public:
/// Inherit Linear's constructors
using Linear::Linear;
};
// helpful typedef for vector of positions
typedef std::vector <Acceleration> Accelerations;
}
}
#endif
Oops, something went wrong.

0 comments on commit 0cf7e6c

Please sign in to comment.