一、前言
承接ROS常用库(三)API学习之常用common_msgs(上)。
二、sensor_msgs
1、sensor_msgs / BatteryState.msg
1 #电源状态 2 uint8 POWER_SUPPLY_STATUS_UNKNOWN=0 3 uint8 POWER_SUPPLY_STATUS_CHARGING=1 4 uint8 POWER_SUPPLY_STATUS_DISCHARGING=2 5 uint8 POWER_SUPPLY_STATUS_NOT_CHARGING=3 6 uint8 POWER_SUPPLY_STATUS_FULL=4 7 #电量 8 uint8 POWER_SUPPLY_HEALTH_UNKNOWN=0 9 uint8 POWER_SUPPLY_HEALTH_GOOD=1 10 uint8 POWER_SUPPLY_HEALTH_OVERHEAT=2 11 uint8 POWER_SUPPLY_HEALTH_DEAD=3 12 uint8 POWER_SUPPLY_HEALTH_OVERVOLTAGE=4 13 uint8 POWER_SUPPLY_HEALTH_UNSPEC_FAILURE=5 14 uint8 POWER_SUPPLY_HEALTH_COLD=6 15 uint8 POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE=7 16 uint8 POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE=8 17 #电源技术(化学)常数 18 uint8 POWER_SUPPLY_TECHNOLOGY_UNKNOWN=0 19 uint8 POWER_SUPPLY_TECHNOLOGY_NIMH=1 20 uint8 POWER_SUPPLY_TECHNOLOGY_LION=2 21 uint8 POWER_SUPPLY_TECHNOLOGY_LIPO=3 22 uint8 POWER_SUPPLY_TECHNOLOGY_LIFE=4 23 uint8 POWER_SUPPLY_TECHNOLOGY_NICD=5 24 uint8 POWER_SUPPLY_TECHNOLOGY_LIMN=6 25 std_msgs/Header header 26 float32 voltage电压 27 float32 current 28 float32 charge充入的电量 29 float32 capacity容量 30 float32 design_capacity 31 float32 percentage充电百分比0-1 32 uint8 power_supply_status 充电状态 33 uint8 power_supply_health电池运行状况 34 uint8 power_supply_technology电池化学成分 35 bool present如果存在电池则为true 36 float32[] cell_voltage单个电池数组电压 37 string location电池插入位置 38 string serial_number电池序列号
2、sensor_msgs/Imu.msg
1 std_msgs/Header header 2 geometry_msgs/Quaternion orientation 3 float64[9] orientation_covariance 4 geometry_msgs/Vector3 angular_velocity 5 float64[9] angular_velocity_covariance 6 geometry_msgs/Vector3 linear_acceleration 7 float64[9] linear_acceleration_covariance
3、sensor_msgs/JointState.msg机器人关节
1 std_msgs/Header header 2 string[] name 3 float64[] position 4 float64[] velocity 5 float64[] effort
5、sensor_msgs/Joy.msg手柄
1 std_msgs/Header header 2 float32[] axes#轴 3 int32[] buttons#按键
6、sensor_msgs/LaserScan.msg
1 std_msgs/Header header 2 float32 angle_min #起始角 3 float32 angle_max #结束角 4 float32 angle_increment #测量角 5 float32 time_increment #测量时间插值 6 float32 scan_time 7 float32 range_min 8 float32 range_max 9 float32[] ranges 10 float32[] intensities #强度
7、sensor_msgs/MultiDOFJointState.msg
1 std_msgs/Header header 2 string[] joint_names 3 geometry_msgs/Transform[] transforms 4 geometry_msgs/Twist[] twist 5 geometry_msgs/Wrench[] wrench
8、sensor_msgs/NavSatFix.msg
1 uint8 COVARIANCE_TYPE_UNKNOWN=0 2 uint8 COVARIANCE_TYPE_APPROXIMATED=1 3 uint8 COVARIANCE_TYPE_DIAGONAL_KNOWN=2 4 uint8 COVARIANCE_TYPE_KNOWN=3 5 std_msgs/Header header 6 sensor_msgs/NavSatStatus status 7 float64 latitude#纬度 8 float64 longitude#经度 9 float64 altitude#海拔 10 float64[9] position_covariance 11 uint8 position_covariance_type
9、sensor_msgs/PointCloud
1 std_msgs/Header header 2 geometry_msgs/Point32[] points 3 sensor_msgs/ChannelFloat32[] channels
10、sensor_msgs/PointCloud2.msg
1 std_msgs/Headerheader 2 uint32 height 3 uint32 width 4 sensor_msgs/PointField[]fields 5 bool is_bigendian 6 uint32 point_step 7 uint32 row_step 8 uint8[] data 9 bool is_dense
二、shape_msgs
1、shape_msgs/Mesh.msg
1 shape_msgs/MeshTriangle[] triangles 2 geometry_msgs/Point[] vertices
2、shape_msgs/MeshTriangle.msg
1 uint32[3] vertex_indices
3、shape_msgs / Plane.msg
1 Float64 [4] coef #使用平面方程ax + by + cz + d = 0表示平面 abcd分别为下标0123
4、shape_msgs / SolidPrimitive.msg
1 uint8 BOX=1 2 uint8 SPHERE=2 3 uint8 CYLINDER=3 4 uint8 CONE=4 5 uint8 BOX_X=0 6 uint8 BOX_Y=1 7 uint8 BOX_Z=2 8 uint8 SPHERE_RADIUS=0 9 uint8 CYLINDER_HEIGHT=0 10 uint8 CYLINDER_RADIUS=1 11 uint8 CONE_HEIGHT=0 12 uint8 CONE_RADIUS=1 13 uint8 type 14 float64[] dimensions
三、trajectory_msgs
1、trajectory_msgs/JointTrajectory.msg
1 std_msgs/Header header 2 string[] joint_names 3 trajectory_msgs/JointTrajectoryPoint[] points
2、trajectory_msgs/JointTrajectoryPoint.msg
1 float64[] positions 2 float64[] velocities 3 float64[] accelerations 4 float64[] effort 5 duration time_from_start
3、trajectory_msgs/MultiDOFJointTrajectory.msg
1 std_msgs/Header header 2 string[] joint_names 3 trajectory_msgs/MultiDOFJointTrajectoryPoint[] points
4、trajectory_msgs/MultiDOFJointTrajectoryPoint.msg
1 geometry_msgs/Transform[] transforms 2 geometry_msgs/Twist[] velocities 3 geometry_msgs/Twist[] accelerations 4 duration time_from_start
四、visualization_msgs
1、visualization_msgs/Marker.msg
1 uint8 ARROW=0 2 uint8 CUBE=1 3 uint8 SPHERE=2 4 uint8 CYLINDER=3 5 uint8 LINE_STRIP=4 6 uint8 LINE_LIST=5 7 uint8 CUBE_LIST=6 8 uint8 SPHERE_LIST=7 9 uint8 POINTS=8 10 uint8 TEXT_VIEW_FACING=9 11 uint8 MESH_RESOURCE=10 12 uint8 TRIANGLE_LIST=11 13 uint8 ADD=0 14 uint8 MODIFY=0 15 uint8 DELETE=2 16 uint8 DELETEALL=3 17 std_msgs/Header header 18 string ns 19 int32 id 20 int32 type 21 int32 action 22 geometry_msgs/Pose pose 23 geometry_msgs/Vector3 scale 24 std_msgs/ColorRGBA color 25 duration lifetime 26 bool frame_locked 27 geometry_msgs/Point[] points 28 std_msgs/ColorRGBA[] colors 29 string text 30 string mesh_resource 31 bool mesh_use_embedded_materials
其他运动相关msg基本都与它相关。