Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 23 of file fetch_scenes_visualize.cpp.
29 auto fetch = std::make_shared<FetchRobot>();
32 fetch->initialize(
false);
38 RBX_INFO(
"RViz Initialized! Press enter to continue (after your RViz is setup)...");
43 for (
int i = start; i <=
end; i++)
46 const auto &index =
std::string(4 - is.size(),
'0') + is;
48 const auto &scene_file =
49 "package://robowflex_library/yaml/fetch_scenes/scene_vicon" + index +
".yaml";
50 const auto &request_file =
"package://robowflex_library/yaml/fetch_scenes/request" + index +
".yaml";
54 if (not
scene->fromYAMLFile(scene_file))
56 RBX_ERROR(
"Failed to read file: %s for scene", scene_file);
61 auto planner = std::make_shared<OMPL::FetchOMPLPipelinePlanner>(
fetch,
"default");
62 planner->initialize();
65 auto request = std::make_shared<robowflex::MotionRequestBuilder>(planner,
GROUP);
66 if (not request->fromYAMLFile(request_file))
68 RBX_ERROR(
"Failed to read file: %s for request", request_file);
73 rviz.updateScene(
scene);
76 RBX_INFO(
"Scene displayed! Press enter to plan...");
81 if (res.
error_code_.val != moveit_msgs::MoveItErrorCodes::SUCCESS)
85 rviz.updateTrajectory(res);
87 RBX_INFO(
"Press enter to remove the scene.");
RVIZ visualization helper. See Live Visualization with RViz for more information.
RAII-pattern for starting up ROS.
static const std::string GROUP
#define RBX_ERROR(fmt,...)
Output a error logging message.
#define RBX_INFO(fmt,...)
Output a info logging message.
Functions for loading and animating scenes in Blender.
moveit_msgs::MoveItErrorCodes error_code_
◆ GROUP