Tesseract
Motion Planning Environment
Loading...
Searching...
No Matches
Functions | Variables
trajectory_player_unit.cpp File Reference
#include <tesseract_common/macros.h>
#include <gtest/gtest.h>
#include <tesseract_visualization/trajectory_player.h>
#include <tesseract_visualization/trajectory_interpolator.h>
Include dependency graph for trajectory_player_unit.cpp:

Functions

 for (long i=0;i< 10;++i)
 
player setTrajectory (trajectory)
 
 EXPECT_NEAR (player.trajectoryDuration(), 9, 1e-5)
 
 EXPECT_NEAR (player.currentDuration(), 0, 1e-5)
 
 EXPECT_NEAR (s.time, 9, 1e-5)
 
 EXPECT_NEAR (s.position(0), 9, 1e-5)
 
 EXPECT_TRUE (player.isFinished())
 
player setCurrentDuration (0)
 
 EXPECT_FALSE (player.isFinished())
 
 EXPECT_NEAR (s.time, 0, 1e-5)
 
 EXPECT_NEAR (s.position(0), 0, 1e-5)
 
TrajectoryInterpolator interpolator (trajectory)
 
 EXPECT_EQ (interpolator.getStateCount(), 10)
 
int main (int argc, char **argv)
 

Variables

TESSERACT_COMMON_IGNORE_WARNINGS_PUSH TESSERACT_COMMON_IGNORE_WARNINGS_POP
 
std::vector< std::string > joint_names = { "joint_1", "joint_2", "joint_3", "joint_4", "joint_5", "joint_6" }
 
JointTrajectory trajectory
 
TrajectoryPlayer player
 
JointState s = interpolator.getState(10)
 

Function Documentation

◆ EXPECT_EQ()

EXPECT_EQ ( interpolator.  getStateCount(),
10   
)

◆ EXPECT_FALSE()

EXPECT_FALSE ( player.  isFinished())

◆ EXPECT_NEAR() [1/6]

EXPECT_NEAR ( player.  currentDuration(),
,
1e-  5 
)

◆ EXPECT_NEAR() [2/6]

EXPECT_NEAR ( player.  trajectoryDuration(),
,
1e-  5 
)

◆ EXPECT_NEAR() [3/6]

EXPECT_NEAR ( s.  position0,
,
1e-  5 
)

◆ EXPECT_NEAR() [4/6]

EXPECT_NEAR ( s.  position0,
,
1e-  5 
)

◆ EXPECT_NEAR() [5/6]

EXPECT_NEAR ( s.  time,
,
1e-  5 
)
Initial value:
{
JointState s = player.setCurrentDuration(-1)
Definition: joint_state.h:39
JointState s
Definition: trajectory_player_unit.cpp:137
TrajectoryPlayer player
Definition: trajectory_player_unit.cpp:52

◆ EXPECT_NEAR() [6/6]

EXPECT_NEAR ( s.  time,
,
1e-  5 
)
Initial value:
{
JointState s = player.setCurrentDuration(10)

◆ EXPECT_TRUE()

EXPECT_TRUE ( player.  isFinished())

◆ for()

for ( )

◆ interpolator()

TrajectoryInterpolator interpolator ( trajectory  )

◆ main()

int main ( int  argc,
char **  argv 
)

◆ setCurrentDuration()

player setCurrentDuration ( )

◆ setTrajectory()

player setTrajectory ( trajectory  )

Variable Documentation

◆ joint_names

std::vector<std::string> joint_names = { "joint_1", "joint_2", "joint_3", "joint_4", "joint_5", "joint_6" }

◆ player

TrajectoryPlayer player

◆ s

JointState s = interpolator.getState(10)

◆ TESSERACT_COMMON_IGNORE_WARNINGS_POP

TESSERACT_COMMON_IGNORE_WARNINGS_PUSH TESSERACT_COMMON_IGNORE_WARNINGS_POP
Initial value:
{
using namespace tesseract_visualization
Definition: conversions.h:39

◆ trajectory

JointTrajectory trajectory