Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Copyright (C) 2012
- * Jonas Mellin & Zakiruz Zaman
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- /* Desc: Gazebo RFID Sensor
- * Author: Jonas Mellin & Zakiruz Zaman
- * Date: 6th December 2011
- */
- #ifndef GAZEBO_ROS_RFID_HH
- #define GAZEBO_ROS_RFID_HH
- #include <map>
- #include <string>
- #include <gazebo/sensors/SensorTypes.hh>
- #include <gazebo/sensors/Sensor.hh>
- #include <gazebo/physics/HingeJoint.hh>
- #include <gazebo/physics/Contact.hh>
- #include <sdf/sdf.hh>
- #include <sdf/Param.hh>
- #include <gazebo/math/Pose.hh>
- #include <gazebo/math/Quaternion.hh>
- #include <tf/tf.h>
- #include <gazebo/physics/World.hh>
- #include <gazebo/physics/Entity.hh>
- #include <gazebo/common/Exception.hh>
- #include <gazebo/transport/Node.hh>
- #include <gazebo/transport/Publisher.hh>
- #include <gazebo/msgs/msgs.hh>
- #include <gazebo/math/Vector3.hh>
- /*changer en rfid tag ros*/
- // #include <gazebo/sensors/RFIDTag.hh>
- /*changer en rfid tag ros*/
- #include <gazebo_plugins/gazebo_ros_rfid.h>
- #include <ros/ros.h>
- namespace gazebo
- {
- class RFIDTag;
- class GazeboRosRfidTag : public SensorPlugin
- {
- /// Constructor
- public: GazeboRosRfid();
- /// Destructor
- public: ~GazeboRosRfid();
- /// \brief Load the plugin
- /// \param take in SDF root element
- public: void Load(sensors::SensorPtr _parent, sdf::ElementPtr _sdf);
- /// Update the controller
- private: void OnScan();
- private: void GazeboRosRfid::EvaluateTags();
- private: bool GazeboRosRfid::CheckTagRange(const math::Pose &_pose);
- private: void GazeboRosRfid::AddTag(RFIDTag *_tag);
- /// \brief pointer to ros node
- private: ros::NodeHandle* rosnode_;
- private: ros::Publisher contact_pub_;
- private: sensors::RfidSensorPtr parentSensor;
- /// \brief set topic name of broadcast
- private: std::string scan_topic_name_;
- private: std::string frame_name_;
- /// \brief broadcast some string for now.
- private: msgs::Pose scan_pose_msg_;
- /// \brief for setting ROS name space
- private: std::string robot_namespace_;
- private: ros::CallbackQueue scan_queue_;
- private: void ScanQueueThread();
- private: boost::thread callback_queue_thread_;
- // Pointer to the update event connection
- private: event::ConnectionPtr update_connection_;
- };
- }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement