Classes | Public Member Functions | Private Member Functions | Private Attributes
gazebo::GazeboRosApiPlugin Class Reference

#include <gazebo_ros_api_plugin.h>

List of all members.

Classes

class  ForceJointJob
class  WrenchBodyJob

Public Member Functions

void AdvertiseServices ()
 advertise services
bool applyBodyWrench (gazebo_msgs::ApplyBodyWrench::Request &req, gazebo_msgs::ApplyBodyWrench::Response &res)
bool applyJointEffort (gazebo_msgs::ApplyJointEffort::Request &req, gazebo_msgs::ApplyJointEffort::Response &res)
bool clearBodyWrenches (gazebo_msgs::BodyRequest::Request &req, gazebo_msgs::BodyRequest::Response &res)
bool clearBodyWrenches (std::string body_name)
bool clearJointForces (gazebo_msgs::JointRequest::Request &req, gazebo_msgs::JointRequest::Response &res)
bool clearJointForces (std::string joint_name)
bool deleteModel (gazebo_msgs::DeleteModel::Request &req, gazebo_msgs::DeleteModel::Response &res)
 delete model given name
void gazeboQueueThread ()
 ros queue thread for this node
 GazeboRosApiPlugin ()
bool getJointProperties (gazebo_msgs::GetJointProperties::Request &req, gazebo_msgs::GetJointProperties::Response &res)
bool getLinkProperties (gazebo_msgs::GetLinkProperties::Request &req, gazebo_msgs::GetLinkProperties::Response &res)
bool getLinkState (gazebo_msgs::GetLinkState::Request &req, gazebo_msgs::GetLinkState::Response &res)
bool getModelProperties (gazebo_msgs::GetModelProperties::Request &req, gazebo_msgs::GetModelProperties::Response &res)
bool getModelState (gazebo_msgs::GetModelState::Request &req, gazebo_msgs::GetModelState::Response &res)
bool getPhysicsProperties (gazebo_msgs::GetPhysicsProperties::Request &req, gazebo_msgs::GetPhysicsProperties::Response &res)
bool getWorldProperties (gazebo_msgs::GetWorldProperties::Request &req, gazebo_msgs::GetWorldProperties::Response &res)
void Load (int argc, char **argv)
void onLinkStatesConnect ()
void onLinkStatesDisconnect ()
void onModelStatesConnect ()
void onModelStatesDisconnect ()
bool pausePhysics (std_srvs::Empty::Request &req, std_srvs::Empty::Response &res)
bool resetSimulation (std_srvs::Empty::Request &req, std_srvs::Empty::Response &res)
bool resetWorld (std_srvs::Empty::Request &req, std_srvs::Empty::Response &res)
bool setJointProperties (gazebo_msgs::SetJointProperties::Request &req, gazebo_msgs::SetJointProperties::Response &res)
bool setLinkProperties (gazebo_msgs::SetLinkProperties::Request &req, gazebo_msgs::SetLinkProperties::Response &res)
bool setLinkState (gazebo_msgs::SetLinkState::Request &req, gazebo_msgs::SetLinkState::Response &res)
bool setModelConfiguration (gazebo_msgs::SetModelConfiguration::Request &req, gazebo_msgs::SetModelConfiguration::Response &res)
bool setModelState (gazebo_msgs::SetModelState::Request &req, gazebo_msgs::SetModelState::Response &res)
bool setPhysicsProperties (gazebo_msgs::SetPhysicsProperties::Request &req, gazebo_msgs::SetPhysicsProperties::Response &res)
bool spawnGazeboModel (gazebo_msgs::SpawnModel::Request &req, gazebo_msgs::SpawnModel::Response &res)
bool spawnURDFModel (gazebo_msgs::SpawnModel::Request &req, gazebo_msgs::SpawnModel::Response &res)
void spin ()
bool unpausePhysics (std_srvs::Empty::Request &req, std_srvs::Empty::Response &res)
void updateLinkState (const gazebo_msgs::LinkState::ConstPtr &link_state)
void updateModelState (const gazebo_msgs::ModelState::ConstPtr &model_state)
 ~GazeboRosApiPlugin ()

Private Member Functions

void forceJointSchedulerSlot ()
bool IsGazeboModelXML (std::string model_xml)
bool IsSDF (std::string model_xml)
bool IsURDF (std::string model_xml)
 utilites for checking incoming string URDF/XML/Param
void LoadGazeboRosApiPlugin (std::string _worldName)
void OnResponse (ConstResponsePtr &_response)
void PhysicsReconfigureCallback (gazebo::PhysicsConfig &config, uint32_t level)
void PhysicsReconfigureNode ()
void publishLinkStates ()
void publishModelStates ()
void publishSimTime (const boost::shared_ptr< gazebo::msgs::WorldStatistics const > &msg)
void publishSimTime ()
void SetupTransform (btTransform &transform, urdf::Pose pose)
 utility for transforming in SetModelConfiguration
void SetupTransform (btTransform &transform, geometry_msgs::Pose pose)
void transformWrench (gazebo::math::Vector3 &target_force, gazebo::math::Vector3 &target_torque, gazebo::math::Vector3 reference_force, gazebo::math::Vector3 reference_torque, gazebo::math::Pose target_to_reference)
 shift wrench from reference frame to target frame assume wrench is defined in
void wrenchBodySchedulerSlot ()

Private Attributes

ros::ServiceServer apply_body_wrench_service_
ros::ServiceServer apply_joint_effort_service_
ros::ServiceServer clear_body_wrenches_service_
ros::ServiceServer clear_joint_forces_service_
ros::ServiceServer delete_model_service_
gazebo::transport::PublisherPtr factory_pub_
std::vector
< GazeboRosApiPlugin::ForceJointJob * > 
force_joint_jobs
gazebo::event::ConnectionPtr force_update_event_
boost::thread * gazebo_callback_queue_thread_
ros::CallbackQueue gazebo_queue_
gazebo::transport::NodePtr gazebonode_
ros::ServiceServer get_joint_properties_service_
ros::ServiceServer get_link_properties_service_
ros::ServiceServer get_link_state_service_
ros::ServiceServer get_model_properties_service_
ros::ServiceServer get_model_state_service_
ros::ServiceServer get_physics_properties_service_
ros::ServiceServer get_world_properties_service_
gazebo::event::ConnectionPtr load_gazebo_ros_api_plugin_event_
boost::mutex lock_
 A mutex to lock access to fields that are used in ROS message callbacks.
ros::ServiceServer pause_physics_service_
ros::ServiceClient physics_reconfigure_get_client_
bool physics_reconfigure_initialized_
ros::ServiceClient physics_reconfigure_set_client_
boost::thread * physics_reconfigure_thread_
ros::Publisher pub_clock_
ros::Publisher pub_link_states_
int pub_link_states_connection_count_
gazebo::event::ConnectionPtr pub_link_states_event_
ros::Publisher pub_model_states_
int pub_model_states_connection_count_
gazebo::event::ConnectionPtr pub_model_states_event_
gazebo::transport::PublisherPtr request_pub_
ros::ServiceServer reset_simulation_service_
ros::ServiceServer reset_world_service_
gazebo::transport::SubscriberPtr response_sub_
boost::thread * ros_spin_thread_
ros::NodeHandlerosnode_
ros::ServiceServer set_joint_properties_service_
ros::ServiceServer set_link_properties_service_
ros::ServiceServer set_link_state_service_
ros::Subscriber set_link_state_topic_
ros::ServiceServer set_model_configuration_service_
ros::ServiceServer set_model_state_service_
ros::Subscriber set_model_state_topic_
ros::ServiceServer set_physics_properties_service_
ros::ServiceServer spawn_urdf_gazebo_service_
ros::ServiceServer spawn_urdf_model_service_
gazebo::transport::SubscriberPtr stat_sub_
gazebo::event::ConnectionPtr time_update_event_
ros::ServiceServer unpause_physics_service_
gazebo::physics::WorldPtr world
bool world_created_
std::vector
< GazeboRosApiPlugin::WrenchBodyJob * > 
wrench_body_jobs
gazebo::event::ConnectionPtr wrench_update_event_
std::string xmlPrefix_
std::string xmlSuffix_

Detailed Description

Definition at line 127 of file gazebo_ros_api_plugin.h.


Constructor & Destructor Documentation

Definition at line 35 of file gazebo_ros_api_plugin.cpp.

Definition at line 40 of file gazebo_ros_api_plugin.cpp.


Member Function Documentation

advertise services

Definition at line 166 of file gazebo_ros_api_plugin.cpp.

shift wrench to body frame if a non-zero reference point is given

Todo:
: to be more general, should we make the reference point a reference pose?
Todo:
: FIXME map is really wrong, need to use tf here somehow

Definition at line 1501 of file gazebo_ros_api_plugin.cpp.

Definition at line 1235 of file gazebo_ros_api_plugin.cpp.

Definition at line 1328 of file gazebo_ros_api_plugin.cpp.

bool gazebo::GazeboRosApiPlugin::clearBodyWrenches ( std::string  body_name)

Definition at line 1332 of file gazebo_ros_api_plugin.cpp.

Definition at line 1299 of file gazebo_ros_api_plugin.cpp.

bool gazebo::GazeboRosApiPlugin::clearJointForces ( std::string  joint_name)

Definition at line 1303 of file gazebo_ros_api_plugin.cpp.

delete model given name

Definition at line 664 of file gazebo_ros_api_plugin.cpp.

Definition at line 1707 of file gazebo_ros_api_plugin.cpp.

ros queue thread for this node

Definition at line 157 of file gazebo_ros_api_plugin.cpp.

Todo:
: FIXME

Definition at line 880 of file gazebo_ros_api_plugin.cpp.

Todo:
: validate

Definition at line 917 of file gazebo_ros_api_plugin.cpp.

Todo:
: FIXME map is really wrong, need to use tf here somehow

Definition at line 958 of file gazebo_ros_api_plugin.cpp.

Definition at line 803 of file gazebo_ros_api_plugin.cpp.

Todo:
: FIXME map is really wrong, need to use tf here somehow

Definition at line 729 of file gazebo_ros_api_plugin.cpp.

Definition at line 1084 of file gazebo_ros_api_plugin.cpp.

Definition at line 865 of file gazebo_ros_api_plugin.cpp.

bool gazebo::GazeboRosApiPlugin::IsGazeboModelXML ( std::string  model_xml) [private]

Definition at line 1648 of file gazebo_ros_api_plugin.cpp.

bool gazebo::GazeboRosApiPlugin::IsSDF ( std::string  model_xml) [private]

Definition at line 1658 of file gazebo_ros_api_plugin.cpp.

bool gazebo::GazeboRosApiPlugin::IsURDF ( std::string  model_xml) [private]

utilites for checking incoming string URDF/XML/Param

Definition at line 1639 of file gazebo_ros_api_plugin.cpp.

void gazebo::GazeboRosApiPlugin::Load ( int  argc,
char **  argv 
)

setup custom callback queue

start a thread for the physics dynamic reconfigure node

Definition at line 81 of file gazebo_ros_api_plugin.cpp.

void gazebo::GazeboRosApiPlugin::LoadGazeboRosApiPlugin ( std::string  _worldName) [private]

advertise all services

Definition at line 102 of file gazebo_ros_api_plugin.cpp.

Definition at line 373 of file gazebo_ros_api_plugin.cpp.

Definition at line 385 of file gazebo_ros_api_plugin.cpp.

Definition at line 379 of file gazebo_ros_api_plugin.cpp.

Definition at line 395 of file gazebo_ros_api_plugin.cpp.

void gazebo::GazeboRosApiPlugin::OnResponse ( ConstResponsePtr &  _response) [private]

Definition at line 151 of file gazebo_ros_api_plugin.cpp.

bool gazebo::GazeboRosApiPlugin::pausePhysics ( std_srvs::Empty::Request &  req,
std_srvs::Empty::Response &  res 
)

Definition at line 1283 of file gazebo_ros_api_plugin.cpp.

void gazebo::GazeboRosApiPlugin::PhysicsReconfigureCallback ( gazebo::PhysicsConfig &  config,
uint32_t  level 
) [private]

Definition at line 1842 of file gazebo_ros_api_plugin.cpp.

Definition at line 1915 of file gazebo_ros_api_plugin.cpp.

Definition at line 1760 of file gazebo_ros_api_plugin.cpp.

Definition at line 1807 of file gazebo_ros_api_plugin.cpp.

void gazebo::GazeboRosApiPlugin::publishSimTime ( const boost::shared_ptr< gazebo::msgs::WorldStatistics const > &  msg) [private]

Definition at line 1739 of file gazebo_ros_api_plugin.cpp.

Definition at line 1748 of file gazebo_ros_api_plugin.cpp.

bool gazebo::GazeboRosApiPlugin::resetSimulation ( std_srvs::Empty::Request &  req,
std_srvs::Empty::Response &  res 
)

Definition at line 1267 of file gazebo_ros_api_plugin.cpp.

bool gazebo::GazeboRosApiPlugin::resetWorld ( std_srvs::Empty::Request &  req,
std_srvs::Empty::Response &  res 
)

Definition at line 1275 of file gazebo_ros_api_plugin.cpp.

Todo:
: current settings only allows for setting of 1DOF joints (e.g. HingeJoint and SliderJoint) correctly.

Definition at line 1113 of file gazebo_ros_api_plugin.cpp.

Definition at line 1025 of file gazebo_ros_api_plugin.cpp.

Todo:
: FIXME map is really wrong, unless using tf here somehow

Definition at line 1405 of file gazebo_ros_api_plugin.cpp.

Definition at line 1360 of file gazebo_ros_api_plugin.cpp.

Todo:
: FIXME map is really wrong, need to use tf here somehow

Definition at line 1160 of file gazebo_ros_api_plugin.cpp.

Definition at line 1052 of file gazebo_ros_api_plugin.cpp.

void gazebo::GazeboRosApiPlugin::SetupTransform ( btTransform &  transform,
urdf::Pose  pose 
) [private]

utility for transforming in SetModelConfiguration

Definition at line 1625 of file gazebo_ros_api_plugin.cpp.

void gazebo::GazeboRosApiPlugin::SetupTransform ( btTransform &  transform,
geometry_msgs::Pose  pose 
) [private]

Definition at line 1631 of file gazebo_ros_api_plugin.cpp.

Todo:
: map is really wrong, need to use tf here somehow

STRIP DECLARATION <? ... xml version="1.0" ... ?> from model_xml

Todo:
: does tinyxml have functionality for this?
Todo:
: should gazebo take care of the declaration?

FIXME: should change publish to direct invocation World::LoadModel() and/or change the poll for Model existence to common::Events based check.

poll and wait, verify that the model is spawned within Hardcoded 60 seconds

Definition at line 466 of file gazebo_ros_api_plugin.cpp.

STRIP DECLARATION <? ... xml version="1.0" ... ?> from model_xml

Todo:
: does tinyxml have functionality for this?
Todo:
: should gazebo take care of the declaration?

Definition at line 406 of file gazebo_ros_api_plugin.cpp.

Definition at line 1613 of file gazebo_ros_api_plugin.cpp.

void gazebo::GazeboRosApiPlugin::transformWrench ( gazebo::math::Vector3 &  target_force,
gazebo::math::Vector3 &  target_torque,
gazebo::math::Vector3  reference_force,
gazebo::math::Vector3  reference_torque,
gazebo::math::Pose  target_to_reference 
) [private]

shift wrench from reference frame to target frame assume wrench is defined in

Definition at line 1485 of file gazebo_ros_api_plugin.cpp.

bool gazebo::GazeboRosApiPlugin::unpausePhysics ( std_srvs::Empty::Request &  req,
std_srvs::Empty::Response &  res 
)

Definition at line 1291 of file gazebo_ros_api_plugin.cpp.

Definition at line 1473 of file gazebo_ros_api_plugin.cpp.

Definition at line 1225 of file gazebo_ros_api_plugin.cpp.

Definition at line 1671 of file gazebo_ros_api_plugin.cpp.


Member Data Documentation

Definition at line 284 of file gazebo_ros_api_plugin.h.

Definition at line 287 of file gazebo_ros_api_plugin.h.

Definition at line 295 of file gazebo_ros_api_plugin.h.

Definition at line 294 of file gazebo_ros_api_plugin.h.

Definition at line 274 of file gazebo_ros_api_plugin.h.

gazebo::transport::PublisherPtr gazebo::GazeboRosApiPlugin::factory_pub_ [private]

Definition at line 256 of file gazebo_ros_api_plugin.h.

Definition at line 354 of file gazebo_ros_api_plugin.h.

Definition at line 266 of file gazebo_ros_api_plugin.h.

Definition at line 262 of file gazebo_ros_api_plugin.h.

Definition at line 261 of file gazebo_ros_api_plugin.h.

gazebo::transport::NodePtr gazebo::GazeboRosApiPlugin::gazebonode_ [private]

Definition at line 254 of file gazebo_ros_api_plugin.h.

Definition at line 278 of file gazebo_ros_api_plugin.h.

Definition at line 279 of file gazebo_ros_api_plugin.h.

Definition at line 280 of file gazebo_ros_api_plugin.h.

Definition at line 276 of file gazebo_ros_api_plugin.h.

Definition at line 275 of file gazebo_ros_api_plugin.h.

Definition at line 283 of file gazebo_ros_api_plugin.h.

Definition at line 277 of file gazebo_ros_api_plugin.h.

Definition at line 270 of file gazebo_ros_api_plugin.h.

boost::mutex gazebo::GazeboRosApiPlugin::lock_ [private]

A mutex to lock access to fields that are used in ROS message callbacks.

Definition at line 321 of file gazebo_ros_api_plugin.h.

Definition at line 292 of file gazebo_ros_api_plugin.h.

Definition at line 312 of file gazebo_ros_api_plugin.h.

Definition at line 310 of file gazebo_ros_api_plugin.h.

Definition at line 311 of file gazebo_ros_api_plugin.h.

Definition at line 309 of file gazebo_ros_api_plugin.h.

Definition at line 318 of file gazebo_ros_api_plugin.h.

Definition at line 298 of file gazebo_ros_api_plugin.h.

Definition at line 300 of file gazebo_ros_api_plugin.h.

Definition at line 268 of file gazebo_ros_api_plugin.h.

Definition at line 299 of file gazebo_ros_api_plugin.h.

Definition at line 301 of file gazebo_ros_api_plugin.h.

Definition at line 269 of file gazebo_ros_api_plugin.h.

gazebo::transport::PublisherPtr gazebo::GazeboRosApiPlugin::request_pub_ [private]

Definition at line 257 of file gazebo_ros_api_plugin.h.

Definition at line 290 of file gazebo_ros_api_plugin.h.

Definition at line 291 of file gazebo_ros_api_plugin.h.

gazebo::transport::SubscriberPtr gazebo::GazeboRosApiPlugin::response_sub_ [private]

Definition at line 258 of file gazebo_ros_api_plugin.h.

Definition at line 308 of file gazebo_ros_api_plugin.h.

Definition at line 260 of file gazebo_ros_api_plugin.h.

Definition at line 285 of file gazebo_ros_api_plugin.h.

Definition at line 281 of file gazebo_ros_api_plugin.h.

Definition at line 289 of file gazebo_ros_api_plugin.h.

Definition at line 296 of file gazebo_ros_api_plugin.h.

Definition at line 288 of file gazebo_ros_api_plugin.h.

Definition at line 286 of file gazebo_ros_api_plugin.h.

Definition at line 297 of file gazebo_ros_api_plugin.h.

Definition at line 282 of file gazebo_ros_api_plugin.h.

Definition at line 272 of file gazebo_ros_api_plugin.h.

Definition at line 273 of file gazebo_ros_api_plugin.h.

gazebo::transport::SubscriberPtr gazebo::GazeboRosApiPlugin::stat_sub_ [private]

Definition at line 255 of file gazebo_ros_api_plugin.h.

Definition at line 267 of file gazebo_ros_api_plugin.h.

Definition at line 293 of file gazebo_ros_api_plugin.h.

gazebo::physics::WorldPtr gazebo::GazeboRosApiPlugin::world [private]

Definition at line 264 of file gazebo_ros_api_plugin.h.

Definition at line 332 of file gazebo_ros_api_plugin.h.

Definition at line 353 of file gazebo_ros_api_plugin.h.

Definition at line 265 of file gazebo_ros_api_plugin.h.

Definition at line 304 of file gazebo_ros_api_plugin.h.

Definition at line 305 of file gazebo_ros_api_plugin.h.


The documentation for this class was generated from the following files:


gazebo
Author(s): Nate Koenig, Andrew Howard, with contributions from many others. See web page for a full credits llist.
autogenerated on Sun Jan 5 2014 11:34:52