moveit2
The MoveIt Motion Planning Framework for ROS 2.
Loading...
Searching...
No Matches
test_trajectory_cache.cpp File Reference
#include <rclcpp/executors/single_threaded_executor.hpp>
#include <rclcpp/rclcpp.hpp>
#include <moveit/robot_state/conversions.hpp>
#include <moveit/robot_state/robot_state.hpp>
#include <moveit/trajectory_cache/trajectory_cache.hpp>
#include <moveit/trajectory_cache/utils/utils.hpp>
#include <atomic>
#include <thread>
Include dependency graph for test_trajectory_cache.cpp:

Go to the source code of this file.

Classes

class  MoveGroupInterface
 Client class to conveniently use the ROS interfaces provided by the move_group node. More...
class  TrajectoryCache
 Trajectory Cache manager for MoveIt. More...

Functions

void checkAndEmit (bool predicate, const std::string &test_case, const std::string &label)
moveit_msgs::msg::RobotTrajectory getDummyPandaTraj ()
std::vector< geometry_msgs::msg::Pose > getDummyWaypoints ()
void testGettersAndSetters (const std::shared_ptr< TrajectoryCache > &cache)
void testMotionTrajectories (const std::shared_ptr< MoveGroupInterface > &move_group, const std::shared_ptr< TrajectoryCache > &cache)
void testCartesianTrajectories (const std::shared_ptr< MoveGroupInterface > &move_group, const std::shared_ptr< TrajectoryCache > &cache)
int main (int argc, char **argv)
moveit_msgs::srv::GetCartesianPath::Request constructGetCartesianPathRequest (moveit::planning_interface::MoveGroupInterface &move_group, const std::vector< geometry_msgs::msg::Pose > &waypoints, double max_step, double jump_threshold, bool avoid_collisions=true)
 Constructs a GetCartesianPath request.

Variables

const std::string ROBOT_NAME = "panda"
const std::string ROBOT_FRAME = "world"

Detailed Description

Author
methylDragon

Definition in file test_trajectory_cache.cpp.

Function Documentation

◆ checkAndEmit()

void checkAndEmit ( bool predicate,
const std::string & test_case,
const std::string & label )

Definition at line 39 of file test_trajectory_cache.cpp.

Here is the caller graph for this function:

◆ constructGetCartesianPathRequest()

GetCartesianPath::Request moveit_ros::trajectory_cache::constructGetCartesianPathRequest ( moveit::planning_interface::MoveGroupInterface & move_group,
const std::vector< geometry_msgs::msg::Pose > & waypoints,
double max_step,
double jump_threshold,
bool avoid_collisions = true )

Constructs a GetCartesianPath request.

This is a convenience function. This mimics the move group computeCartesianPath signature (without path constraints).

WARNING: The following fields are not supported, if you want to specify them, add them in yourself.

  • prismatic_jump_threshold
  • revolute_jump_threshold
  • cartesian_speed_limited_link
  • max_cartesian_speed
Parameters
[in]move_group.The manipulator move group, used to get its state, frames, and link.
[in]waypoints.The cartesian waypoints to request the path for.
[in]max_step.The value to populate into the GetCartesianPath request's max_step field.
[in]jump_threshold.The value to populate into the GetCartesianPath request's jump_threshold field.
[in]avoid_collisions.The value to populate into the GetCartesianPath request's avoid_collisions field.
Returns

Definition at line 161 of file utils.cpp.

Here is the caller graph for this function:

◆ getDummyPandaTraj()

moveit_msgs::msg::RobotTrajectory getDummyPandaTraj ( )

Definition at line 51 of file test_trajectory_cache.cpp.

Here is the caller graph for this function:

◆ getDummyWaypoints()

std::vector< geometry_msgs::msg::Pose > getDummyWaypoints ( )

Definition at line 78 of file test_trajectory_cache.cpp.

Here is the caller graph for this function:

◆ main()

int main ( int argc,
char ** argv )

Definition at line 1029 of file test_trajectory_cache.cpp.

Here is the call graph for this function:

◆ testCartesianTrajectories()

void testCartesianTrajectories ( const std::shared_ptr< MoveGroupInterface > & move_group,
const std::shared_ptr< TrajectoryCache > & cache )

First, test if construction even works...

GetCartesianPath::Request

RobotTrajectory

Definition at line 577 of file test_trajectory_cache.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ testGettersAndSetters()

void testGettersAndSetters ( const std::shared_ptr< TrajectoryCache > & cache)

Definition at line 98 of file test_trajectory_cache.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ testMotionTrajectories()

void testMotionTrajectories ( const std::shared_ptr< MoveGroupInterface > & move_group,
const std::shared_ptr< TrajectoryCache > & cache )

MotionPlanRequest

RobotTrajectory

Definition at line 116 of file test_trajectory_cache.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ ROBOT_FRAME

const std::string ROBOT_FRAME = "world"

Definition at line 35 of file test_trajectory_cache.cpp.

◆ ROBOT_NAME

const std::string ROBOT_NAME = "panda"

Definition at line 34 of file test_trajectory_cache.cpp.