39 int main(
int argc,
char** argv)
41 ros::init(argc, argv,
"display_random_state");
45 for (
int i = 0; i < argc; ++i)
47 if (strcmp(argv[i],
"--valid") == 0)
52 if (strcmp(argv[i],
"--invalid") == 0)
77 ROS_ERROR(
"Planning scene did not load properly, exiting...");
81 std::cout <<
"Type a number and hit Enter. That number of ";
83 std::cout <<
"valid ";
85 std::cout <<
"invalid ";
86 std::cout <<
"states will be randomly generated at an interval of one second and published as a planning scene."
91 for (std::size_t i = 0; i < n; ++i)
96 unsigned int attempts = 0;
105 }
while (!found && attempts < 100);
108 std::cout <<
"Unable to find valid state" << std::endl;
115 unsigned int attempts = 0;
124 }
while (!found && attempts < 100);
127 std::cout <<
"Unable to find invalid state" << std::endl;
134 moveit_msgs::PlanningScene psmsg;