3 #ifndef ROBOWFLEX_IO_VISUALIZATION_
4 #define ROBOWFLEX_IO_VISUALIZATION_
6 #include <moveit/planning_interface/planning_interface.h>
11 #include <sensor_msgs/PointCloud2.h>
125 void updatePCD(
const sensor_msgs::PointCloud2 &msg);
160 const RobotPose &pose,
double scale = 1);
182 const Eigen::Vector4d &color,
const Eigen::Vector3d &scale);
245 const RobotPose &pose,
const Eigen::Vector4d &color,
246 const Eigen::Vector3d &scale)
const;
#define ROBOWFLEX_CLASS_FORWARD(C)
Macro that forward declares a class and defines two shared ptrs types:
A const shared pointer wrapper for robowflex::Geometry.
RVIZ visualization helper. See Live Visualization with RViz for more information.
void addMarker(const visualization_msgs::Marker &marker, const std::string &name="")
Add a marker message (under the name "name") to the scene.
void removeMarker(const std::string &name)
Removes a marker that was added through addMarker().
void removeAllMarkers()
Removes all markers that were added through addMarker().
ros::Publisher marker_pub_
Marker publisher.
void addLineMarker(const std::string &name, const std::vector< Eigen::Vector3d > &points, const std::vector< Eigen::Vector4d > &colors, double scale)
Add a set of lines as markers.
std::multimap< std::string, visualization_msgs::Marker > markers_
Markers to publish.
ros::Publisher pcd_pub_
Pointcloud publisher.
void updateTrajectories(const std::vector< robot_trajectory::RobotTrajectoryPtr > &trajectories)
Updates the trajectory being visualized to a list of trajectories.
ros::Publisher scene_pub_
Scene publisher.
ros::Publisher trajectory_pub_
Trajectory publisher.
ros::NodeHandle nh_
Handle for publishing.
void visualizeState(const robot_state::RobotStatePtr &state)
Visualizes a robot state.
RobotConstPtr robot_
Robot being visualized.
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.
RVIZHelper(const RobotConstPtr &robot, const std::string &name="robowflex")
Constructor. All parameters are placed under /name. This helper puts trajectories under /name/traject...
void visualizeCurrentState()
Visualize the current state of the robot.
void addArrowMarker(const std::string &name, const std::string &base_frame, const RobotPose &pose, const Eigen::Vector4d &color, const Eigen::Vector3d &scale)
Adds an arrow marker to the managed list of markers. Displayed after an updateMarkers() call.
void fillMarker(visualization_msgs::Marker &marker, const std::string &base_frame, const RobotPose &pose, const Eigen::Vector4d &color, const Eigen::Vector3d &scale) const
Fills a marker in with some common default information.
ros::Publisher state_pub_
State publisher.
void updatePCD(const sensor_msgs::PointCloud2 &msg)
Updates the pointcloud being visualized.
void updateScene(const SceneConstPtr &scene)
Updates the scene being visualized.
void addGeometryMarker(const std::string &name, const GeometryConstPtr &geometry, const std::string &base_frame, const RobotPose &pose, const Eigen::Vector4d &color=color::WHITE)
Add a marker to the managed list of markers. Displayed after an updateMarkers() call.
void addGoalMarker(const std::string &name, const MotionRequestBuilder &request)
Adds the current goal of the motion request builder as a set of markers in the marker array.
void addTextMarker(const std::string &name, const std::string &text, const std::string &base_frame, const RobotPose &pose, double height, const Eigen::Vector4d &color=color::WHITE)
Adds a text marker to the managed list of markers. Displayed after updateMarkers().
void updateTrajectory(const planning_interface::MotionPlanResponse &response)
Updates the trajectory being visualized.
void addTransformMarker(const std::string &name, const std::string &base_frame, const RobotPose &pose, double scale=1)
Add a transform marker to the managed list of markers. Displayed after an updateMarkers() call.
A helper class to build motion planning requests for a robowflex::Planner.
A const shared pointer wrapper for robowflex::Robot.
A const shared pointer wrapper for robowflex::Scene.
The Trajectory class is a wrapper around MoveIt!'s robot_trajectory::RobotTrajectory,...
Functions for loading and animating robots in Blender.
static const Eigen::Vector4d WHITE
Main namespace. Contains all library classes and functions.
std::decay< decltype(std::declval< moveit::core::Transforms >().getTransform("")) >::type RobotPose
A pose (point in SE(3)) used in various functions. Defined from what MoveIt! uses.
Functions for loading and animating scenes in Blender.
robot_trajectory::RobotTrajectory trajectory(rmodel,"right_arm")