Skip to content
Snippets Groups Projects
Select Git revision
  • 2a3a9db5d7258adb0a4cc37db753dc2e2c1a5532
  • master default
  • simulated_grasping
  • v1.0
4 results

SafetyEnvironmentCreator.cpp

Blame
  • wing.h 1.01 KiB
    #ifndef WING_
    #define WING_
    
    #include "ros/ros.h"
    #include "impl/abstract_robot_element.h"
    
    class Wing  : public Abstract_robot_element{
        private:
        tf2::Vector3 size_;
        std::vector<tf2::Transform> bounds_;
    
        public:
        Wing(tf2::Transform tf, tf2::Vector3 size) : size_(size){ 
            relative_tf_ = tf;
            bounds_.push_back(tf2::Transform(tf2::Quaternion(0,0,0,1), tf2::Vector3(size_.getX()/2.f, size_.getY()/2.f,0))); //++
            bounds_.push_back(tf2::Transform(tf2::Quaternion(0,0,0,1), tf2::Vector3(size_.getX()/2.f, size_.getY()/-2.f,0))); //+-
            bounds_.push_back(tf2::Transform(tf2::Quaternion(0,0,0,1), tf2::Vector3(size_.getX()/-2.f, size_.getY()/-2.f,0))); //--
            bounds_.push_back(tf2::Transform(tf2::Quaternion(0,0,0,1), tf2::Vector3(size_.getX()/-2.f, size_.getY()/2.f,0))); //-+
            }
        inline tf2::Vector3 size(){ return size_;}
        inline std::vector<tf2::Transform>& bounds() {return bounds_;}
        void update(tf2::Transform& tf) override {this->calc_world_tf(tf);}
    };
    
    #endif