ActuatorPlugin.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015-2016 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 
18 #ifndef _GAZEBO_ACTUATOR_PLUGIN_
19 #define _GAZEBO_ACTUATOR_PLUGIN_
20 
21 #include <vector>
22 #include <string>
23 #include <gazebo/common/Events.hh>
24 #include <gazebo/physics/physics.hh>
25 #include <gazebo/gazebo.hh>
26 
53 
54 namespace gazebo
55 {
58  {
60  public: std::string name;
61 
63  public: int jointIndex;
64 
66  public: float power;
67 
69  public: float maximumVelocity;
70 
72  public: float maximumTorque;
73 
79  public: boost::function<float (float, float, const ActuatorProperties&)>
81  };
82 
85  {
87  public: void Load(physics::ModelPtr _parent, sdf::ElementPtr _sdf);
88 
90  private: void WorldUpdateCallback();
91 
93  private: std::vector<physics::JointPtr> joints;
94 
96  private: std::vector<ActuatorProperties> actuators;
97 
99  private: std::vector<event::ConnectionPtr> connections;
100  };
101 
102  // Register this plugin with the simulator
104 }
105 
106 #endif
Forward declarations for the common classes.
Definition: Animation.hh:33
Plugin for simulating a torque-speed curve for actuators.
Definition: ActuatorPlugin.hh:84
#define GZ_REGISTER_MODEL_PLUGIN(classname)
Plugin registration function for model plugin.
Definition: Plugin.hh:376
float power
Mechanical power output of the actuator (Watts)
Definition: ActuatorPlugin.hh:66
float maximumTorque
Maximum torque of the actuator (Newton-meters)
Definition: ActuatorPlugin.hh:72
Properties for a model of a rotational actuator.
Definition: ActuatorPlugin.hh:57
std::string name
An identifier for the actuator.
Definition: ActuatorPlugin.hh:60
int jointIndex
Which joint index is actuated by this actuator.
Definition: ActuatorPlugin.hh:63
float maximumVelocity
Maximum velocity of the actuator (radians per second)
Definition: ActuatorPlugin.hh:69
boost::shared_ptr< Model > ModelPtr
Definition: PhysicsTypes.hh:93
A plugin with access to physics::Model.
Definition: Plugin.hh:260
boost::function< float(float, float, const ActuatorProperties &)> modelFunction
Function used to calculate motor output.
Definition: ActuatorPlugin.hh:80
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:58