Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
GeolocateTests Class Reference

Unit test class for the Geolocate utility. More...

Inheritance diagram for GeolocateTests:
Collaboration diagram for GeolocateTests:

Public Member Functions

 GeolocateTests ()
 Construct a new Geolocate Tests object.
 ~GeolocateTests ()
 Destroy the Geolocate Tests object.
void TestSetup () override
 Set up the Geolocate Tests object.
void TestTeardown () override
 Teardown the Geolocate Tests object.
Public Member Functions inherited from TestingBase< GeolocateTests >
 TestingBase ()=default
 Construct a new Testing Base object.
virtual ~TestingBase ()=default
 Destroy the Testing Base object.

Protected Attributes

cv::Mat m_cvTestPointcloud
geoops::RoverPose m_stRoverPose
const double EPSILON = 0.0001

Additional Inherited Members

Static Public Member Functions inherited from TestingBase< GeolocateTests >
static void SetCommandLineArgs (int argc, char **argv)
 Mutator for the Command Line Args private member.
Protected Member Functions inherited from TestingBase< GeolocateTests >
void RequiredSetup ()
 Required setup for all tests.
void RequiredTeardown ()
 Required teardown for all tests.
void SetupRoveComm ()
 Setup RoveComm for testing.
void TeardownRoveComm ()
 Teardown RoveComm for testing.

Detailed Description

Unit test class for the Geolocate utility.

Author
clayjay3 (clayt.nosp@m.onra.nosp@m.ycowe.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om)
Date
2025-04-27

Constructor & Destructor Documentation

◆ GeolocateTests()

GeolocateTests::GeolocateTests ( )
inline

Construct a new Geolocate Tests object.

Author
clayjay3 (clayt.nosp@m.onra.nosp@m.ycowe.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om)
Date
2025-04-27
47{}

◆ ~GeolocateTests()

GeolocateTests::~GeolocateTests ( )
inline

Destroy the Geolocate Tests object.

Author
clayjay3 (clayt.nosp@m.onra.nosp@m.ycowe.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om)
Date
2025-04-27
56{}

Member Function Documentation

◆ TestSetup()

void GeolocateTests::TestSetup ( )
inlineoverridevirtual

Set up the Geolocate Tests object.

Author
clayjay3 (clayt.nosp@m.onra.nosp@m.ycowe.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om)
Date
2025-04-27

Reimplemented from TestingBase< GeolocateTests >.

66 {
67 // Create a test pointcloud with known values. (10x10 matrix)
68 m_cvTestPointcloud = cv::Mat(10, 10, CV_32FC4, cv::Scalar(0, 0, 0, 0));
69
70 // Set some known values in the pointcloud
71 // Point at (5,5) is 3 meters in front of camera, 1 meter to right, 0 meters up.
72 m_cvTestPointcloud.at<cv::Vec4f>(5, 5) = cv::Vec4f(1.0f, 0.0f, 3.0f, 1.0f);
73
74 // Point at (2,2) is 5 meters in front of camera, 2 meters to left, 1 meter up.
75 m_cvTestPointcloud.at<cv::Vec4f>(2, 2) = cv::Vec4f(-2.0f, 1.0f, 5.0f, 1.0f);
76
77 // Point at (8,8) is 4 meters in front of camera, 3 meters to right, 2 meters down.
78 m_cvTestPointcloud.at<cv::Vec4f>(8, 8) = cv::Vec4f(3.0f, -2.0f, 4.0f, 1.0f);
79
80 // Create a test rover pose (at UTM coordinates 500000, 4000000, zone 15, northern hemisphere)
81 // with heading 0. (north)
82 geoops::UTMCoordinate stRoverUTM(500000.0, 4000000.0, 15, true, 100.0);
83 m_stRoverPose = geoops::RoverPose(stRoverUTM, 0.0);
84 }
Vec< float, 4 > Vec4f
Scalar_< double > Scalar

◆ TestTeardown()

void GeolocateTests::TestTeardown ( )
inlineoverridevirtual

Teardown the Geolocate Tests object.

Author
clayjay3 (clayt.nosp@m.onra.nosp@m.ycowe.nosp@m.n@gm.nosp@m.ail.c.nosp@m.om)
Date
2025-04-27

Reimplemented from TestingBase< GeolocateTests >.

94 {
95 // Release the test pointcloud.
96 m_cvTestPointcloud.release();
97 }

The documentation for this class was generated from the following file: