⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gazebo.h

📁 机器人人3D仿真工具,可以加入到Simbad仿真环境下应用。
💻 H
📖 第 1 页 / 共 4 页
字号:
extern int gz_sonar_create(gz_sonar_t *self, gz_server_t *server, const char *id,                           const char *model_type, int model_id, int parent_model_id);/// @internal Destroy the interface (server)extern int gz_sonar_destroy(gz_sonar_t *self);/// Open an existing interface (used by Gazebo clients)extern int gz_sonar_open(gz_sonar_t *self, gz_client_t *client, const char *id);/// Close the interface (client)extern int gz_sonar_close(gz_sonar_t *self);/// Lock the interface.  Set blocking to 1 if the caller should block/// until the lock is acquired.  Returns 0 if the lock is acquired.extern int gz_sonar_lock(gz_sonar_t *self, int blocking);/// Unlock the interfaceextern void gz_sonar_unlock(gz_sonar_t *self);/** @} *//// @}///***************************************************************************//// @addtogroup libgazebo/// @{/** @defgroup ir irThe IR interface allows the positions and range values for IRsto be read.@{*/#define GZ_IR_MAX_RANGES 48/// Ir data interfacetypedef struct gz_ir_data{  /// Common data structures  gz_data_t head;  /// Data timestamp  double time;  /// Max range value  double max_range;  /// Number of ir  int ir_count;  /// Position of each ir (x, y, z)  double ir_pos[GZ_IR_MAX_RANGES][3];  /// Orientation of each ir (roll, pitch, yaw)  double ir_rot[GZ_IR_MAX_RANGES][3];  /// Range readings (m)  double ir_ranges[GZ_IR_MAX_RANGES];    /// Enable the IRs  int cmd_enable_ir;} gz_ir_data_t;/// The ir interfacetypedef struct gz_ir{  /// General interface info  gz_iface_t *iface;  /// Pointer to interface data area  gz_ir_data_t *data;} gz_ir_t;/// Create an interfaceextern gz_ir_t *gz_ir_alloc();/// Destroy an interfaceextern void gz_ir_free(gz_ir_t *self);/// @internal Create the interface (used by Gazebo server)extern int gz_ir_create(gz_ir_t *self, gz_server_t *server, const char *id,                           const char *model_type, int model_id, int parent_model_id);/// @internal Destroy the interface (server)extern int gz_ir_destroy(gz_ir_t *self);/// Open an existing interface (used by Gazebo clients)extern int gz_ir_open(gz_ir_t *self, gz_client_t *client, const char *id);/// Close the interface (client)extern int gz_ir_close(gz_ir_t *self);/// Lock the interface.  Set blocking to 1 if the caller should block/// until the lock is acquired.  Returns 0 if the lock is acquired.extern int gz_ir_lock(gz_ir_t *self, int blocking);/// Unlock the interfaceextern void gz_ir_unlock(gz_ir_t *self);/** @} *//// @}/***************************************************************************//// @addtogroup libgazebo/// @{/** @defgroup stereo stereo The stereo interface allows clients to read images from a simulatedstereo cameras.  It provides regular camera images and simulated depthimages (the latter may include occlusion and texture effects).@{*//// Constants#define GAZEBO_STEREO_MAX_RGB_SIZE 640 * 480 * 3#define GAZEBO_STEREO_MAX_DISPARITY_SIZE 640 * 480/// Stereo interface datatypedef struct gz_stereo_data{  /// Common data structure  gz_data_t head;  /// Data timestamp  double time;  /// Image dimensions (in pixels)  unsigned int width, height;  /// Left image (packed RGB888)  unsigned int left_image_size;  unsigned char left_image[GAZEBO_STEREO_MAX_RGB_SIZE];  /// Right image (packed RGB888)  unsigned int right_image_size;  unsigned char right_image[GAZEBO_STEREO_MAX_RGB_SIZE];  /// Left disparity image (packed float)  unsigned int left_disparity_size;  float left_disparity[GAZEBO_STEREO_MAX_DISPARITY_SIZE];  /// Right disparity image (packed float)  unsigned int right_disparity_size;  float right_disparity[GAZEBO_STEREO_MAX_DISPARITY_SIZE];} gz_stereo_data_t;/// The stereo interfacetypedef struct gz_stereo{  /// General interface info  gz_iface_t *iface;  /// Pointer to interface data area  gz_stereo_data_t *data;  } gz_stereo_t;/// Create an interfaceextern gz_stereo_t *gz_stereo_alloc();/// Destroy an interfaceextern void gz_stereo_free(gz_stereo_t *self);/// @internal Create the interface (used by Gazebo server)extern int gz_stereo_create(gz_stereo_t *self, gz_server_t *server, const char *id,                            const char *model_type, int model_id, int parent_model_id);/// @internal Destroy the interface (server)extern int gz_stereo_destroy(gz_stereo_t *self);/// Open an existing interface (used by Gazebo clients)extern int gz_stereo_open(gz_stereo_t *self, gz_client_t *client, const char *id);/// Close the interface (client)extern int gz_stereo_close(gz_stereo_t *self);/// Lock the interface.  Set blocking to 1 if the caller should block/// until the lock is acquired.  Returns 0 if the lock is acquired.extern int gz_stereo_lock(gz_stereo_t *self, int blocking);/// Unlock the interfaceextern void gz_stereo_unlock(gz_stereo_t *self);/// Tell clients that new data is availableextern int gz_stereo_post(gz_stereo_t *self);/** @} *//// @}/***************************************************************************//// @addtogroup libgazebo/// @{/** @defgroup truth truthThe truth interface is useful for getting and setting the ground-truthpose of objects in the world; currently, it is supported only by theTruthWidget model.@{*//// Truth datatypedef struct gz_truth_data{  /// Common data structures  gz_data_t head;  /// Data timestamp  double time;  /// True object position (x, y, z)  double pos[3];  /// True object rotation (quaternion: u,x,y,z)  double rot[4];  /// New command (0 or 1)?  int cmd_new;    /// Commanded object position (x, y, z)  double cmd_pos[3];  /// Commanded object rotation (quaternion: u,x,y,z)  double cmd_rot[4];   } gz_truth_data_t;/// The truth interfacetypedef struct gz_truth{  /// General interface info  gz_iface_t *iface;  /// Pointer to interface data area  gz_truth_data_t *data;  } gz_truth_t;/// Create an interfaceextern gz_truth_t *gz_truth_alloc();/// Destroy an interfaceextern void gz_truth_free(gz_truth_t *self);/// @internal Create the interface (used by Gazebo server)extern int gz_truth_create(gz_truth_t *self, gz_server_t *server, const char *id,                           const char *model_type, int model_id, int parent_model_id);/// @internal Destroy the interface (server)extern int gz_truth_destroy(gz_truth_t *self);/// Open an existing interface (used by Gazebo clients)extern int gz_truth_open(gz_truth_t *self, gz_client_t *client, const char *id);/// Close the interface (client)extern int gz_truth_close(gz_truth_t *self);/// Lock the interface.  Set blocking to 1 if the caller should block/// until the lock is acquired.  Returns 0 if the lock is acquired.extern int gz_truth_lock(gz_truth_t *self, int blocking);/// Unlock the interfaceextern void gz_truth_unlock(gz_truth_t *self);/// Tell clients that new data is availableextern int gz_truth_post(gz_truth_t *self);/// Convenience function that converts to Euler(roll,pitch,yaw) from quaternextern void gz_truth_euler_from_quatern(gz_truth_t *self, double *e, double *q);/// Convenience function that converts to quatern from Euler(roll,pitch,yaw)extern void gz_truth_quatern_from_euler(gz_truth_t *self, double *q, double *e);/** @} *//// @}/***************************************************************************//// @addtogroup libgazebo/// @{/** @defgroup wifi wifiData on simulated WiFi link quality.@{*/#define GAZEBO_WIFI_MAX_LINKS 16/// link quality is in dBm#define GAZEBO_WIFI_QUAL_DBM		1/// Individual link propertiestypedef struct gz_wifi_link{  /// IP address of destination.  char ip[32];  /// Link quality, level and noise information  /// these could be uint8_t instead, <linux/wireless.h> will only  /// return that much.  maybe some other architecture needs larger??  uint16_t qual, level, noise;  } gz_wifi_link_t;typedef struct gz_wifi_data{  /// Common data structures  gz_data_t head;  /// Data timestamp  double time;  /// @{  /// A list of links  gz_wifi_link_t links[GAZEBO_WIFI_MAX_LINKS];  uint16_t link_count;  /// @}} gz_wifi_data_t;/// The truth interfacetypedef struct gz_wifi{  /// General interface info  gz_iface_t *iface;  /// Pointer to interface data area  gz_wifi_data_t *data;  } gz_wifi_t;/// Create an interfaceextern gz_wifi_t *gz_wifi_alloc();/// Destroy an interfaceextern void gz_wifi_free(gz_wifi_t *self);/// @internal Create the interface (used by Gazebo server)extern int gz_wifi_create(gz_wifi_t *self, gz_server_t *server, const char *id,                          const char *model_type, int model_id, int parent_model_id);/// @internal Destroy the interface (server)extern int gz_wifi_destroy(gz_wifi_t *self);/// Open an existing interface (used by Gazebo clients)extern int gz_wifi_open(gz_wifi_t *self, gz_client_t *client, const char *id);/// Close the interface (client)extern int gz_wifi_close(gz_wifi_t *self);/// Lock the interface.  Set blocking to 1 if the caller should block/// until the lock is acquired.  Returns 0 if the lock is acquired.extern int gz_wifi_lock(gz_wifi_t *self, int blocking);/// Unlock the interfaceextern void gz_wifi_unlock(gz_wifi_t *self);/** @} *///// @}/***************************************************************************//// @addtogroup libgazebo/// @{/** @defgroup joint jointThe joint interface allows clients to send commands to and readjoint data from simulated articulated joints. This is usuful for arbitraryjoint chains. @{*/#define GAZEBO_JOINT_MAX_JOINTS 20/// Individual joint datatypedef struct gz_joint_data{  /// Joint type  int type;   /// Anchor vector  double anchor[3];  /// First axis   double axis[3];  /// Second axis, for Universal and Hinge2 joints  double axis2[3];  /// Angular velocity about first axis  double angular_velocity;  /// Angular velocity about second axis  double angular_velocity2;  /// Angle of first axis  double angle;  /// Angle of second axis  double angle2;  /// Commanded angle for the first axis  double cmd_angle;  /// Commanded angle for the second axis  double cmd_angle2;} gz_joint_data_t;/// Joints interfacetypedef struct gz_joints{  /// Common data structures  gz_data_t head;  /// Data timestamp  double time;  gz_joint_data_t joints[GAZEBO_JOINT_MAX_JOINTS];  int joint_count;} gz_joints_t;/// The joint interfacetypedef struct gz_joint{  /// General interface info  gz_iface_t *iface;  /// Pointer to interface data area  gz_joints_t *data;  } gz_joint_t;/// Create an interfaceextern gz_joint_t *gz_joint_alloc();/// Destroy an interfaceextern void gz_joint_free(gz_joint_t *self);/// @internal Create the interface (used by Gazebo server)extern int gz_joint_create(gz_joint_t *self, gz_server_t *server, const char *id, const char *model_type, int model_id, int parent_model_id);/// @internal Destroy the interface (server)extern int gz_joint_destroy(gz_joint_t *self);/// Open an existing interface (used by Gazebo clients)extern int gz_joint_open(gz_joint_t *self, gz_client_t *client, const char *id);/// Close the interface (client)extern int gz_joint_close(gz_joint_t *self);/// Lock the interface.  Set blocking to 1 if the caller should block/// until the lock is acquired.  Returns 0 if the lock is acquired.extern int gz_joint_lock(gz_joint_t *self, int blocking);/// Unlock the interfaceextern void gz_joint_unlock(gz_joint_t *self);/// Tell clients that new data is availableextern int gz_joint_post(gz_joint_t *self);/** @} *//// @}#ifdef __cplusplus}#endif#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -