46 random_pose.pose, 10, 0.1);
54 ROS_INFO(
"Did not find IK solution");
60 int main(
int argc,
char **argv)
62 ros::init(argc, argv,
"testing iksolvers");
66 int num_succeeded_positions = 0;
72 clock_t global_begin = clock();
75 int total_random_queries = 10000;
76 for (std::size_t i = 0; i < total_random_queries; i++)
78 clock_t begin = clock();
82 num_succeeded_positions++;
84 clock_t end = clock();
85 elapsed_secs =
static_cast<double>(end - begin) / CLOCKS_PER_SEC;
86 maximum = (elapsed_secs > maximum)?elapsed_secs:maximum;
87 minimum = (elapsed_secs < minimum)?elapsed_secs:minimum;
89 clock_t global_end = clock();
90 double global_elapsed_secs =
static_cast<double>(global_end - global_begin) / CLOCKS_PER_SEC;
91 ROS_INFO_STREAM(
"Number of valid ik plans " << num_succeeded_positions <<
"/" << total_random_queries);
93 ROS_INFO_STREAM(
"Average time per test " << global_elapsed_secs/total_random_queries);
int main(int argc, char **argv)
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
const std::string & getName() const
void setStartState(const moveit_msgs::RobotState &start_state)
geometry_msgs::PoseStamped getRandomPose(const std::string &end_effector_link="")
robot_state::RobotStatePtr getCurrentState(double wait=1)
void AddSceneObjects(void)
#define ROS_INFO_STREAM(args)
ROSCPP_DECL void shutdown()
bool TestRandomState(void)
moveit::planning_interface::MoveGroupInterface group