moveit2
The MoveIt Motion Planning Framework for ROS 2.
Loading...
Searching...
No Matches
Protected Member Functions | Protected Attributes | List of all members
TrajectoryFunctionsTestBase Class Reference

test fixtures base class More...

Inheritance diagram for TrajectoryFunctionsTestBase:
Inheritance graph
[legend]
Collaboration diagram for TrajectoryFunctionsTestBase:
Collaboration graph
[legend]

Protected Member Functions

void SetUp () override
 Create test scenario for trajectory functions.
 
void TearDown () override
 
bool tfNear (const Eigen::Isometry3d &pose1, const Eigen::Isometry3d &pose2, double epsilon)
 check if two transformations are close
 
bool jointsNear (const std::vector< double > &joints1, const std::vector< double > &joints2, double epsilon)
 check if two sets of joint positions are close
 
std::vector< double > getJoints (const moveit::core::JointModelGroup *jmg, const moveit::core::RobotState &state)
 get the current joint values of the robot state
 
void attachToLink (moveit::core::RobotState &state, const moveit::core::LinkModel *link, const std::string &object_name, const Eigen::Isometry3d &object_pose, const moveit::core::FixedTransformsMap &subframes)
 attach a collision object and subframes to a link
 

Protected Attributes

rclcpp::Node::SharedPtr node_
 
moveit::core::RobotModelConstPtr robot_model_
 
moveit::core::RobotStatePtr robot_state_
 
std::unique_ptr< robot_model_loader::RobotModelLoaderrm_loader_
 
planning_scene::PlanningSceneConstPtr planning_scene_
 
std::string planning_group_
 
std::string group_tip_link_
 
std::string tcp_link_
 
std::string ik_fast_link_
 
int random_test_number_
 
std::vector< std::string > joint_names_
 
std::map< std::string, double > zero_state_
 
uint32_t random_seed_ { 100 }
 
random_numbers::RandomNumberGenerator rng_ { random_seed_ }
 

Detailed Description

test fixtures base class

Definition at line 81 of file unittest_trajectory_functions.cpp.

Member Function Documentation

◆ attachToLink()

void TrajectoryFunctionsTestBase::attachToLink ( moveit::core::RobotState state,
const moveit::core::LinkModel link,
const std::string &  object_name,
const Eigen::Isometry3d &  object_pose,
const moveit::core::FixedTransformsMap subframes 
)
protected

attach a collision object and subframes to a link

Parameters
statethe state we are updating
linkthe link we are attaching the collision object to
object_namea unique name for the collision object
object_posethe pose of the object relative to the parent link
subframessubframe names and poses relative to the object they attach to

Definition at line 227 of file unittest_trajectory_functions.cpp.

Here is the call graph for this function:

◆ getJoints()

std::vector< double > TrajectoryFunctionsTestBase::getJoints ( const moveit::core::JointModelGroup jmg,
const moveit::core::RobotState state 
)
protected

get the current joint values of the robot state

Parameters
jmgthe joint model group whose joints we are interested in
statethe robot state to fetch the current joint positions for
Returns
the joint positions for joints from jmg, set to the positions determined from state

Definition at line 216 of file unittest_trajectory_functions.cpp.

Here is the call graph for this function:

◆ jointsNear()

bool TrajectoryFunctionsTestBase::jointsNear ( const std::vector< double > &  joints1,
const std::vector< double > &  joints2,
double  epsilon 
)
protected

check if two sets of joint positions are close

Parameters
joints1the first set of joint positions to compare
joints2the second set of joint positions to compare
epsilonthe tolerance a all joint position diffs must satisfy
Returns
false if any joint diff exceeds tolerance. true otherwise

Definition at line 199 of file unittest_trajectory_functions.cpp.

◆ SetUp()

void TrajectoryFunctionsTestBase::SetUp ( )
inlineoverrideprotected

Create test scenario for trajectory functions.

Definition at line 88 of file unittest_trajectory_functions.cpp.

Here is the call graph for this function:

◆ TearDown()

void TrajectoryFunctionsTestBase::TearDown ( )
inlineoverrideprotected

Definition at line 124 of file unittest_trajectory_functions.cpp.

◆ tfNear()

bool TrajectoryFunctionsTestBase::tfNear ( const Eigen::Isometry3d &  pose1,
const Eigen::Isometry3d &  pose2,
double  epsilon 
)
protected

check if two transformations are close

Parameters
pose1
pose2
epsilon
Returns

Definition at line 186 of file unittest_trajectory_functions.cpp.

Member Data Documentation

◆ group_tip_link_

std::string TrajectoryFunctionsTestBase::group_tip_link_
protected

Definition at line 176 of file unittest_trajectory_functions.cpp.

◆ ik_fast_link_

std::string TrajectoryFunctionsTestBase::ik_fast_link_
protected

Definition at line 176 of file unittest_trajectory_functions.cpp.

◆ joint_names_

std::vector<std::string> TrajectoryFunctionsTestBase::joint_names_
protected

Definition at line 178 of file unittest_trajectory_functions.cpp.

◆ node_

rclcpp::Node::SharedPtr TrajectoryFunctionsTestBase::node_
protected

Definition at line 169 of file unittest_trajectory_functions.cpp.

◆ planning_group_

std::string TrajectoryFunctionsTestBase::planning_group_
protected

Definition at line 176 of file unittest_trajectory_functions.cpp.

◆ planning_scene_

planning_scene::PlanningSceneConstPtr TrajectoryFunctionsTestBase::planning_scene_
protected

Definition at line 173 of file unittest_trajectory_functions.cpp.

◆ random_seed_

uint32_t TrajectoryFunctionsTestBase::random_seed_ { 100 }
protected

Definition at line 182 of file unittest_trajectory_functions.cpp.

◆ random_test_number_

int TrajectoryFunctionsTestBase::random_test_number_
protected

Definition at line 177 of file unittest_trajectory_functions.cpp.

◆ rm_loader_

std::unique_ptr<robot_model_loader::RobotModelLoader> TrajectoryFunctionsTestBase::rm_loader_
protected

Definition at line 172 of file unittest_trajectory_functions.cpp.

◆ rng_

random_numbers::RandomNumberGenerator TrajectoryFunctionsTestBase::rng_ { random_seed_ }
protected

Definition at line 183 of file unittest_trajectory_functions.cpp.

◆ robot_model_

moveit::core::RobotModelConstPtr TrajectoryFunctionsTestBase::robot_model_
protected

Definition at line 170 of file unittest_trajectory_functions.cpp.

◆ robot_state_

moveit::core::RobotStatePtr TrajectoryFunctionsTestBase::robot_state_
protected

Definition at line 171 of file unittest_trajectory_functions.cpp.

◆ tcp_link_

std::string TrajectoryFunctionsTestBase::tcp_link_
protected

Definition at line 176 of file unittest_trajectory_functions.cpp.

◆ zero_state_

std::map<std::string, double> TrajectoryFunctionsTestBase::zero_state_
protected

Definition at line 179 of file unittest_trajectory_functions.cpp.


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