Class to manage preset physics profiles.  
 More...
#include <gazebo/physics/PresetManager.hh>
Class to manage preset physics profiles. 
 
§ PresetManager()
Constructor. 
- Parameters
 - 
  
    | [in] | _physicsEngine | Pointer to the world physics engine.  | 
    | [in] | _sdf | Pointer to the world SDF element.  | 
  
   
 
 
§ ~PresetManager()
§ AllProfiles()
      
        
          | std::vector<std::string> AllProfiles  | 
          ( | 
           | ) | 
           const | 
        
      
 
Get the name of all profiles. 
- Returns
 - A vector containing all profile names. 
 
 
 
§ CreateProfile() [1/2]
      
        
          | bool CreateProfile  | 
          ( | 
          const std::string &  | 
          _name | ) | 
           | 
        
      
 
Create a new profile. 
A profile created in this way will store all of the current parameter values of the physics engine. 
- Parameters
 - 
  
    | [in] | _name | The name of the new profile.  | 
  
   
- Returns
 - True if the profile was successfully created. 
 
 
 
§ CreateProfile() [2/2]
      
        
          | std::string CreateProfile  | 
          ( | 
          const sdf::ElementPtr  | 
          _sdf | ) | 
           | 
        
      
 
Create a new profile from SDF. 
SDF determines the profile name 
- Parameters
 - 
  
    | [in] | _sdf | Pointer to a physics SDF element.  | 
  
   
- Returns
 - The name of the new profile, read from SDF. If the profile was not successfully created, return the empty string, which is an invalid profile name. 
 
 
 
§ CurrentProfile() [1/2]
      
        
          | bool CurrentProfile  | 
          ( | 
          const std::string &  | 
          _name | ) | 
           | 
        
      
 
Set the current profile. 
- Parameters
 - 
  
    | [in] | _name | The name of the new current profile.  | 
  
   
- Returns
 - True if the profile switch was successful. 
 
 
 
§ CurrentProfile() [2/2]
      
        
          | std::string CurrentProfile  | 
          ( | 
           | ) | 
           const | 
        
      
 
Get the name of the current profile. 
- Returns
 - The name of the current profile. 
 
 
 
§ GenerateSDFFromPreset()
      
        
          | void GenerateSDFFromPreset  | 
          ( | 
          const std::string &  | 
          _name,  | 
        
        
           | 
           | 
          sdf::ElementPtr &  | 
          _elem  | 
        
        
           | 
          ) | 
           |  const | 
        
      
 
Generate an SDF element from an Preset object. 
- Parameters
 - 
  
    | [in] | _name | The name of the profile to copy.  | 
    | [out] | _elem | The SDF physics element for the profile.  | 
  
   
 
 
§ GetCurrentProfileParam()
      
        
          | bool GetCurrentProfileParam  | 
          ( | 
          const std::string &  | 
          _key,  | 
        
        
           | 
           | 
          boost::any &  | 
          _value  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Get a parameter for the current profile. 
- Parameters
 - 
  
    | [in] | _key | The key of the accessed parameter.  | 
    | [out] | _value | The value of the accessed parameter.  | 
  
   
- Returns
 - True if the parameter existed in profile "_name". 
 
 
 
§ GetProfileParam()
      
        
          | bool GetProfileParam  | 
          ( | 
          const std::string &  | 
          _name,  | 
        
        
           | 
           | 
          const std::string &  | 
          _key,  | 
        
        
           | 
           | 
          boost::any &  | 
          _value  | 
        
        
           | 
          ) | 
           |  const | 
        
      
 
Get a parameter for a certain profile. 
- Parameters
 - 
  
    | [in] | _name | The name of the accessed profile.  | 
    | [in] | _key | The key of the accessed parameter.  | 
    | [out] | _value | The value of the accessed parameter.  | 
  
   
- Returns
 - True if the parameter existed in profile "_name". 
 
 
 
§ HasProfile()
      
        
          | bool HasProfile  | 
          ( | 
          const std::string &  | 
          _name | ) | 
           const | 
        
      
 
Determine if we have a profile. 
- Parameters
 - 
  
    | [in] | _name | The name of the profile to find.  | 
  
   
- Returns
 - True if we have the profile, false otherwise 
 
 
 
§ ProfileSDF() [1/2]
      
        
          | sdf::ElementPtr ProfileSDF  | 
          ( | 
          const std::string &  | 
          _name | ) | 
           const | 
        
      
 
Get the SDF for a profile. 
- Parameters
 - 
  
    | [in] | _name | The name of the profile to be accessed.  | 
  
   
- Returns
 - Pointer to the SDF physics element representing the profile. Can be NULL if no profile was found. 
 
 
 
§ ProfileSDF() [2/2]
      
        
          | bool ProfileSDF  | 
          ( | 
          const std::string &  | 
          _name,  | 
        
        
           | 
           | 
          const sdf::ElementPtr  | 
          _sdf  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Set the SDF for a profile. 
- Parameters
 - 
  
    | [in] | _name | The name of the profile to set.  | 
    | [in] | _sdf | The new SDF physics element for the profile.  | 
  
   
- Returns
 - True if setting the new SDF element was successful. 
 
 
 
§ RemoveProfile()
      
        
          | void RemoveProfile  | 
          ( | 
          const std::string &  | 
          _name | ) | 
           | 
        
      
 
Remove a profile. 
- Parameters
 - 
  
    | [in] | _name | The name of the profile to remove.  | 
  
   
 
 
§ SetCurrentProfileParam()
      
        
          | bool SetCurrentProfileParam  | 
          ( | 
          const std::string &  | 
          _key,  | 
        
        
           | 
           | 
          const boost::any &  | 
          _value  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Set a parameter for the current profile. 
- Parameters
 - 
  
    | [in] | _key | The key of the parameter to be set.  | 
    | [in] | _value | The value of the parameter to be set.  | 
  
   
- Returns
 - True if setting the parameter was successful. 
 
 
 
§ SetProfileParam()
      
        
          | bool SetProfileParam  | 
          ( | 
          const std::string &  | 
          _profileName,  | 
        
        
           | 
           | 
          const std::string &  | 
          _key,  | 
        
        
           | 
           | 
          const boost::any &  | 
          _value  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Set a parameter for a certain profile. 
- Parameters
 - 
  
    | [in] | _profileName | The name of the profile to change.  | 
    | [in] | _key | The key of the parameter to change.  | 
    | [in] | _value | The value of the parameter to change.  | 
  
   
- Returns
 - True if setting the parameter was successful. 
 
 
 
The documentation for this class was generated from the following file: