RobotInfo implements Comparable<RobotInfo>, Savable { public RobotInfo() { name = "Robot" + robotCount++; masterUriString = "http: joystickTopic = "/joy_teleop/cmd_vel"; cameraTopic = "/image_raw/compressed"; laserTopic = "/scan"; navsatTopic = "/navsat/fix"; odometryTopic = "/odometry/filtered"; poseTopic = "/pose"; reverseLaserScan = false; invertX = false; invertY = false; invertAngularVelocity = false; } RobotInfo();  RobotInfo(UUID id, String name, String masterUriString, String joystickTopic,
                     String laserTopic, String cameraTopic,String navsatTopic,
                     String odometryTopic, String poseTopic, boolean reverseLaserScan,
                     boolean invertX, boolean invertY, boolean invertAngularVelocity); UUID getId(); void setId(UUID id); String getPoseTopic(); void setPoseTopic(String poseTopic); String getOdometryTopic(); void setOdometryTopic(String odometryTopic); String getNavSatTopic(); void setNavSatTopic(String navsatTopic); String getJoystickTopic(); void setJoystickTopic(String joystickTopic); String getCameraTopic(); void setCameraTopic(String cameraTopic); String getLaserTopic(); void setLaserTopic(String laserTopic); String getMasterUri(); void setMasterUri(String mMasterUri); String getName(); void setName(String mName); URI getUri(); boolean isReverseLaserScan(); void setReverseLaserScan(boolean reverseLaserScan); boolean isInvertX(); void setInvertX(boolean invertX); boolean isInvertY(); void setInvertY(boolean invertY); boolean isInvertAngularVelocity(); void setInvertAngularVelocity(boolean invertAngularVelocity); @Override int compareTo(@NonNull RobotInfo another); static void resolveRobotCount(List<RobotInfo> list); @Override void load(@NonNull Bundle bundle); void load(@NonNull SharedPreferences prefs); @Override void save(@NonNull Bundle bundle); void save(@NonNull SharedPreferences.Editor prefs); static final String UUID_KEY; static final String ROBOT_NAME_KEY; static final String MASTER_URI_KEY; static final String JOYSTICK_TOPIC_KEY; static final String LASER_SCAN_TOPIC_KEY; static final String CAMERA_TOPIC_KEY; static final String NAVSAT_TOPIC_KEY; static final String ODOMETRY_TOPIC_KEY; static final String POSE_TOPIC_KEY; static final String REVERSE_LASER_SCAN_KEY; static final String INVERT_X_KEY; static final String INVERT_Y_KEY; static final String INVERT_ANGULAR_VELOCITY_KEY; }
@Test public void testRobotInfo() throws Exception{ RobotInfo robot1 = new RobotInfo(); assertEquals(robot1.getName(), "Robot" + (RobotInfo.getRobotCount() - 1)); assertEquals(robot1.getMasterUri(), "http: assertEquals(robot1.getJoystickTopic(), "/joy_teleop/cmd_vel"); assertEquals(robot1.getCameraTopic(), "/image_raw/compressed"); assertEquals(robot1.getLaserTopic(), "/scan"); RobotInfo robot2 = new RobotInfo(null, "robot2", "http: assertEquals(robot2.getMasterUri(), robot1.getMasterUri()); }