sonarmessage.java
来自「卡内基梅隆大学(CMU)开发的移动机器人控制开发软件包。可对多种机器人进行控制」· Java 代码 · 共 35 行
JAVA
35 行
package Carmen;import IPC.*;/** Carmen SonarHandler's message */public class SonarMessage extends Message { public int num_sonars; /** width of sonar cone */ public double sensor_angle; /** for each sonar, the range reading */ public double range[]; /** location of each sonar with respect to robot as a Point */ public Point sonar_positions[]; /** robot state: point location */ public Point robot_pose; public double tv; public double rv; private static final String CARMEN_ROBOT_SONAR_NAME = "robot_sonar"; private static final String CARMEN_ROBOT_SONAR_FMT = "{int,double,<double:1>,<{double,double,double}:1>,{double,double,double},double,double,double,string}"; /** Application module calls this to subscribe to SonarMessage. * Application module must extend SonarHandler */ public static void subscribe(SonarHandler handler) { subscribe(CARMEN_ROBOT_SONAR_NAME, CARMEN_ROBOT_SONAR_FMT, handler, SonarMessage.class, "handle"); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?