23 int main(
int argc,
char **argv)
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);
76 RBX_INFO(
"Scene displayed! Press enter to plan...");
81 if (res.
error_code_.val != moveit_msgs::MoveItErrorCodes::SUCCESS)
87 RBX_INFO(
"Press enter to remove the scene.");
RVIZ visualization helper. See Live Visualization with RViz for more information.
void updateMarkers()
Displays the managed list of markers. Keeps track of whether markers have already been displayed and ...
void removeScene()
Removes the scene being visualized.
void updateScene(const SceneConstPtr &scene)
Updates the scene being visualized.
void updateTrajectory(const planning_interface::MotionPlanResponse &response)
Updates the trajectory being visualized.
RAII-pattern for starting up ROS.
int main(int argc, char **argv)
static const std::string GROUP
#define RBX_ERROR(fmt,...)
Output a error logging message.
#define RBX_INFO(fmt,...)
Output a info logging message.
Main namespace. Contains all library classes and functions.
Functions for loading and animating scenes in Blender.
moveit_msgs::MoveItErrorCodes error_code_