6 moving_flag_node_(
NULL), current_flag_property_(
NULL) {
23 ROS_ERROR(
"PlantWaypointTool: failed to load model resource '%s'.",
60 Ogre::Vector3 intersection;
61 Ogre::Plane ground_plane(Ogre::Vector3::UNIT_Z, 0.0
f);
63 event.
y, intersection)) {
75 }
else if (event.
type == QEvent::MouseMove && event.
left()
78 double angle =
atan2(intersection.y -
pos_.y,
79 intersection.x -
pos_.x);
84 Ogre::Quaternion(Ogre::Radian(angle),
85 Ogre::Vector3::UNIT_Z));
89 double angle =
atan2(intersection.y -
pos_.y,
90 intersection.x -
pos_.x);
101 rsm_msgs::AddWaypoint srv;
102 rsm_msgs::Waypoint waypoint;
103 waypoint.pose.position.x = position.x;
104 waypoint.pose.position.y = position.y;
105 waypoint.pose.position.z = position.z;
107 srv.request.waypoint = waypoint;
108 srv.request.position = -1;
110 ROS_ERROR(
"Failed to call Add Waypoint service");
ServiceClient serviceClient(const std::string &service_name, bool persistent=false, const M_string &header_values=M_string())
virtual bool setVector(const Ogre::Vector3 &vector)
Ogre::Viewport * viewport
bool call(MReq &req, MRes &res)
Ogre::MeshPtr loadMeshFromResource(const std::string &resource_path)
virtual void setReadOnly(bool read_only)
bool getPointOnPlaneFromWindowXY(Ogre::Viewport *viewport, Ogre::Plane &plane, int window_x, int window_y, Ogre::Vector3 &intersection_out)
static geometry_msgs::Quaternion createQuaternionMsgFromYaw(double yaw)
virtual void addChild(Property *child, int index=-1)
INLINE Rall1d< T, V, S > atan2(const Rall1d< T, V, S > &y, const Rall1d< T, V, S > &x)
#define PLUGINLIB_EXPORT_CLASS(class_type, base_class_type)