├── README.md ├── ROSTango ├── .catkin_workspace ├── .gitignore ├── README.md └── src │ ├── CMakeLists.txt │ ├── rostango │ ├── .gitignore │ ├── .navigation │ │ └── raw │ │ │ └── main.nvg.xml │ ├── CMakeLists.txt │ ├── Mavlink │ │ ├── .gitignore │ │ ├── AndroidManifest.xml │ │ ├── build.gradle │ │ ├── libs │ │ │ └── android-support-v4.jar │ │ ├── mavlinkGenerator │ │ │ ├── .gitignore │ │ │ ├── README.txt │ │ │ ├── generateMessages.py │ │ │ ├── message_definitions │ │ │ │ ├── ardupilotmega.xml │ │ │ │ └── common.xml │ │ │ └── pymavlink │ │ │ │ ├── dialects │ │ │ │ ├── __init__.py │ │ │ │ ├── v09 │ │ │ │ │ └── __init__.py │ │ │ │ └── v10 │ │ │ │ │ └── __init__.py │ │ │ │ └── generator │ │ │ │ ├── mavgen.py │ │ │ │ └── mavgen_java.py │ │ ├── proguard-project.txt │ │ ├── project.properties │ │ ├── res │ │ │ └── .gitignore │ │ └── src │ │ │ └── com │ │ │ └── MAVLink │ │ │ ├── Messages │ │ │ ├── ApmCommands.java │ │ │ ├── ApmModes.java │ │ │ ├── CRC.java │ │ │ ├── MAVLinkMessage.java │ │ │ ├── MAVLinkPacket.java │ │ │ ├── MAVLinkPayload.java │ │ │ ├── MAVLinkStats.java │ │ │ ├── ardupilotmega │ │ │ │ ├── msg_ahrs.java │ │ │ │ ├── msg_ap_adc.java │ │ │ │ ├── msg_attitude.java │ │ │ │ ├── msg_attitude_quaternion.java │ │ │ │ ├── msg_auth_key.java │ │ │ │ ├── msg_battery_status.java │ │ │ │ ├── msg_change_operator_control.java │ │ │ │ ├── msg_change_operator_control_ack.java │ │ │ │ ├── msg_command_ack.java │ │ │ │ ├── msg_command_long.java │ │ │ │ ├── msg_data16.java │ │ │ │ ├── msg_data32.java │ │ │ │ ├── msg_data64.java │ │ │ │ ├── msg_data96.java │ │ │ │ ├── msg_data_stream.java │ │ │ │ ├── msg_data_transmission_handshake.java │ │ │ │ ├── msg_debug.java │ │ │ │ ├── msg_debug_vect.java │ │ │ │ ├── msg_digicam_configure.java │ │ │ │ ├── msg_digicam_control.java │ │ │ │ ├── msg_encapsulated_data.java │ │ │ │ ├── msg_fence_fetch_point.java │ │ │ │ ├── msg_fence_point.java │ │ │ │ ├── msg_fence_status.java │ │ │ │ ├── msg_file_transfer_dir_list.java │ │ │ │ ├── msg_file_transfer_res.java │ │ │ │ ├── msg_file_transfer_start.java │ │ │ │ ├── msg_global_position_int.java │ │ │ │ ├── msg_global_position_setpoint_int.java │ │ │ │ ├── msg_global_vision_position_estimate.java │ │ │ │ ├── msg_gps2_raw.java │ │ │ │ ├── msg_gps_global_origin.java │ │ │ │ ├── msg_gps_inject_data.java │ │ │ │ ├── msg_gps_raw_int.java │ │ │ │ ├── msg_gps_status.java │ │ │ │ ├── msg_heartbeat.java │ │ │ │ ├── msg_highres_imu.java │ │ │ │ ├── msg_hil_controls.java │ │ │ │ ├── msg_hil_gps.java │ │ │ │ ├── msg_hil_optical_flow.java │ │ │ │ ├── msg_hil_rc_inputs_raw.java │ │ │ │ ├── msg_hil_sensor.java │ │ │ │ ├── msg_hil_state.java │ │ │ │ ├── msg_hil_state_quaternion.java │ │ │ │ ├── msg_hwstatus.java │ │ │ │ ├── msg_limits_status.java │ │ │ │ ├── msg_local_position_ned.java │ │ │ │ ├── msg_local_position_ned_system_global_offset.java │ │ │ │ ├── msg_local_position_setpoint.java │ │ │ │ ├── msg_log_data.java │ │ │ │ ├── msg_log_entry.java │ │ │ │ ├── msg_log_erase.java │ │ │ │ ├── msg_log_request_data.java │ │ │ │ ├── msg_log_request_end.java │ │ │ │ ├── msg_log_request_list.java │ │ │ │ ├── msg_manual_control.java │ │ │ │ ├── msg_manual_setpoint.java │ │ │ │ ├── msg_meminfo.java │ │ │ │ ├── msg_memory_vect.java │ │ │ │ ├── msg_mission_ack.java │ │ │ │ ├── msg_mission_clear_all.java │ │ │ │ ├── msg_mission_count.java │ │ │ │ ├── msg_mission_current.java │ │ │ │ ├── msg_mission_item.java │ │ │ │ ├── msg_mission_item_reached.java │ │ │ │ ├── msg_mission_request.java │ │ │ │ ├── msg_mission_request_list.java │ │ │ │ ├── msg_mission_request_partial_list.java │ │ │ │ ├── msg_mission_set_current.java │ │ │ │ ├── msg_mission_write_partial_list.java │ │ │ │ ├── msg_mount_configure.java │ │ │ │ ├── msg_mount_control.java │ │ │ │ ├── msg_mount_status.java │ │ │ │ ├── msg_named_value_float.java │ │ │ │ ├── msg_named_value_int.java │ │ │ │ ├── msg_nav_controller_output.java │ │ │ │ ├── msg_omnidirectional_flow.java │ │ │ │ ├── msg_optical_flow.java │ │ │ │ ├── msg_param_request_list.java │ │ │ │ ├── msg_param_request_read.java │ │ │ │ ├── msg_param_set.java │ │ │ │ ├── msg_param_value.java │ │ │ │ ├── msg_ping.java │ │ │ │ ├── msg_power_status.java │ │ │ │ ├── msg_radio.java │ │ │ │ ├── msg_radio_status.java │ │ │ │ ├── msg_raw_imu.java │ │ │ │ ├── msg_raw_pressure.java │ │ │ │ ├── msg_rc_channels.java │ │ │ │ ├── msg_rc_channels_override.java │ │ │ │ ├── msg_rc_channels_raw.java │ │ │ │ ├── msg_rc_channels_scaled.java │ │ │ │ ├── msg_request_data_stream.java │ │ │ │ ├── msg_roll_pitch_yaw_rates_thrust_setpoint.java │ │ │ │ ├── msg_roll_pitch_yaw_speed_thrust_setpoint.java │ │ │ │ ├── msg_roll_pitch_yaw_thrust_setpoint.java │ │ │ │ ├── msg_safety_allowed_area.java │ │ │ │ ├── msg_safety_set_allowed_area.java │ │ │ │ ├── msg_scaled_imu.java │ │ │ │ ├── msg_scaled_imu2.java │ │ │ │ ├── msg_scaled_pressure.java │ │ │ │ ├── msg_sensor_offsets.java │ │ │ │ ├── msg_serial_control.java │ │ │ │ ├── msg_servo_output_raw.java │ │ │ │ ├── msg_set_global_position_setpoint_int.java │ │ │ │ ├── msg_set_gps_global_origin.java │ │ │ │ ├── msg_set_local_position_setpoint.java │ │ │ │ ├── msg_set_mag_offsets.java │ │ │ │ ├── msg_set_mode.java │ │ │ │ ├── msg_set_quad_motors_setpoint.java │ │ │ │ ├── msg_set_quad_swarm_led_roll_pitch_yaw_thrust.java │ │ │ │ ├── msg_set_quad_swarm_roll_pitch_yaw_thrust.java │ │ │ │ ├── msg_set_roll_pitch_yaw_speed_thrust.java │ │ │ │ ├── msg_set_roll_pitch_yaw_thrust.java │ │ │ │ ├── msg_setpoint_6dof.java │ │ │ │ ├── msg_setpoint_8dof.java │ │ │ │ ├── msg_sim_state.java │ │ │ │ ├── msg_simstate.java │ │ │ │ ├── msg_state_correction.java │ │ │ │ ├── msg_statustext.java │ │ │ │ ├── msg_sys_status.java │ │ │ │ ├── msg_system_time.java │ │ │ │ ├── msg_vfr_hud.java │ │ │ │ ├── msg_vicon_position_estimate.java │ │ │ │ ├── msg_vision_position_estimate.java │ │ │ │ ├── msg_vision_speed_estimate.java │ │ │ │ └── msg_wind.java │ │ │ └── enums │ │ │ │ ├── FENCE_ACTION.java │ │ │ │ ├── FENCE_BREACH.java │ │ │ │ ├── LIMITS_STATE.java │ │ │ │ ├── LIMIT_MODULE.java │ │ │ │ ├── MAVLINK_DATA_STREAM_TYPE.java │ │ │ │ ├── MAV_AUTOPILOT.java │ │ │ │ ├── MAV_CMD.java │ │ │ │ ├── MAV_CMD_ACK.java │ │ │ │ ├── MAV_COMPONENT.java │ │ │ │ ├── MAV_DATA_STREAM.java │ │ │ │ ├── MAV_FRAME.java │ │ │ │ ├── MAV_GOTO.java │ │ │ │ ├── MAV_MISSION_RESULT.java │ │ │ │ ├── MAV_MODE.java │ │ │ │ ├── MAV_MODE_FLAG.java │ │ │ │ ├── MAV_MODE_FLAG_DECODE_POSITION.java │ │ │ │ ├── MAV_MOUNT_MODE.java │ │ │ │ ├── MAV_PARAM_TYPE.java │ │ │ │ ├── MAV_POWER_STATUS.java │ │ │ │ ├── MAV_RESULT.java │ │ │ │ ├── MAV_ROI.java │ │ │ │ ├── MAV_SEVERITY.java │ │ │ │ ├── MAV_STATE.java │ │ │ │ ├── MAV_SYS_STATUS_SENSOR.java │ │ │ │ ├── MAV_TYPE.java │ │ │ │ ├── SERIAL_CONTROL_DEV.java │ │ │ │ └── SERIAL_CONTROL_FLAG.java │ │ │ └── Parser.java │ ├── TangoNodes │ │ ├── build.gradle │ │ ├── libs │ │ │ └── androidvioclient.jar │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── ologicinc │ │ │ │ └── rostango │ │ │ │ └── TangoNodes │ │ │ │ ├── depth │ │ │ │ ├── DepthPublisher.java │ │ │ │ ├── DepthViewSurface.java │ │ │ │ ├── RawImageListener.java │ │ │ │ ├── RosDepthViewSurface.java │ │ │ │ └── SuperFrame.java │ │ │ │ └── vio │ │ │ │ ├── TangoOdomPublisher.java │ │ │ │ ├── TangoPosePublisher.java │ │ │ │ ├── TangoTfPublisher.java │ │ │ │ └── VioNode.java │ │ │ └── res │ │ │ ├── drawable-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── drawable-ldpi │ │ │ └── ic_launcher.png │ │ │ ├── drawable-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── drawable-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── layout │ │ │ └── main.xml │ │ │ └── values │ │ │ └── strings.xml │ ├── build.gradle │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── package.xml │ ├── settings.gradle │ ├── tango_depthimage │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── ologicinc │ │ │ │ └── rostango │ │ │ │ └── tango_depthimage │ │ │ │ └── DepthScanActivity.java │ │ │ └── res │ │ │ ├── layout │ │ │ ├── layoutdepth.xml │ │ │ └── main.xml │ │ │ └── values │ │ │ ├── colors.xml │ │ │ ├── dimens.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ ├── tango_pub │ │ ├── build.gradle │ │ ├── libs │ │ │ └── androidvioclient.jar │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── ologicinc │ │ │ │ └── rostango │ │ │ │ └── tango_pub │ │ │ │ └── TangoPub.java │ │ │ └── res │ │ │ ├── drawable-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── drawable-ldpi │ │ │ └── ic_launcher.png │ │ │ ├── drawable-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── drawable-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── layout │ │ │ └── main.xml │ │ │ └── values │ │ │ └── strings.xml │ ├── tango_serial │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── ologicinc │ │ │ │ └── rostango │ │ │ │ └── tango_serial │ │ │ │ ├── MainActivity.java │ │ │ │ ├── TangoHeartbeat.java │ │ │ │ ├── TangoSerial.java │ │ │ │ └── VioListenerNode.java │ │ │ └── res │ │ │ ├── layout │ │ │ ├── activity_main.xml │ │ │ └── main.xml │ │ │ ├── values │ │ │ └── strings.xml │ │ │ └── xml │ │ │ └── device_filter.xml │ ├── tango_vio │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── ologicinc │ │ │ │ └── rostango │ │ │ │ └── tango_vio │ │ │ │ └── TangoVio.java │ │ │ └── res │ │ │ ├── layout │ │ │ └── main.xml │ │ │ └── values │ │ │ └── strings.xml │ └── usbserial │ │ ├── build.gradle │ │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── github │ │ └── ologic │ │ └── android_ologic │ │ └── usbserial │ │ ├── driver │ │ ├── CdcAcmSerialDriver.java │ │ ├── CommonUsbSerialDriver.java │ │ ├── FtdiSerialDriver.java │ │ ├── UsbId.java │ │ ├── UsbSerialDriver.java │ │ ├── UsbSerialProber.java │ │ └── UsbSerialRuntimeException.java │ │ └── util │ │ └── HexDump.java │ ├── tango_bringup │ ├── CMakeLists.txt │ ├── launch │ │ ├── tango_depth.launch │ │ ├── tango_urdf.launch │ │ ├── tango_vio.launch │ │ └── tango_vio_map.launch │ ├── package.xml │ ├── rviz │ │ ├── tango_depth.rviz │ │ ├── tango_vio.rviz │ │ └── tango_vio_map.rviz │ └── urdf │ │ ├── tango_phone.dae │ │ └── tango_phone.urdf │ └── tf2_android │ ├── .gitignore │ ├── CMakeLists.txt │ ├── LICENSE │ ├── README.md │ ├── build.gradle │ ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── insert_benchmark │ ├── build.gradle │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── org │ │ │ └── ros │ │ │ └── tf2 │ │ │ └── insert_benchmark │ │ │ └── BenchmarkActivity.java │ │ └── res │ │ ├── drawable-hdpi │ │ └── ic_launcher.png │ │ ├── drawable-ldpi │ │ └── ic_launcher.png │ │ ├── drawable-mdpi │ │ └── ic_launcher.png │ │ ├── drawable-xhdpi │ │ └── ic_launcher.png │ │ ├── layout │ │ └── main.xml │ │ └── values │ │ └── strings.xml │ ├── lookup_benchmark │ ├── build.gradle │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── org │ │ │ └── ros │ │ │ └── tf2 │ │ │ └── lookup_benchmark │ │ │ └── BenchmarkActivity.java │ │ └── res │ │ ├── drawable-hdpi │ │ └── ic_launcher.png │ │ ├── drawable-ldpi │ │ └── ic_launcher.png │ │ ├── drawable-mdpi │ │ └── ic_launcher.png │ │ ├── drawable-xhdpi │ │ └── ic_launcher.png │ │ ├── layout │ │ └── main.xml │ │ └── values │ │ └── strings.xml │ ├── ndk_library_scripts │ ├── README.md │ ├── build_boost.sh │ ├── build_catkin.sh │ ├── build_console_bridge.sh │ ├── build_tf2.sh │ ├── config.sh │ ├── do_everything.sh │ ├── files │ │ ├── android.toolchain.cmake.addendum │ │ ├── boost │ │ │ ├── 0001-fix-android-endianness.patch │ │ │ ├── 0002-filesystem-v2-vfs.patch │ │ │ ├── 0003-filesystem-v3-vfs.patch │ │ │ ├── 0004-boost-build-no-rt.patch │ │ │ └── user-config.jam.partial │ │ ├── sample_app │ │ │ ├── AndroidManifest.xml.in │ │ │ ├── custom_rules.xml.in │ │ │ ├── ic_launcher.png │ │ │ └── jni │ │ │ │ ├── Android.mk.in │ │ │ │ ├── Application.mk │ │ │ │ └── src │ │ │ │ └── test.cpp │ │ └── tfa │ │ │ ├── Android.mk │ │ │ └── Application.mk │ ├── get_boost.sh │ ├── get_catkin.sh │ ├── get_console_bridge.sh │ ├── get_ndk.sh │ ├── get_ros_stuff.sh │ ├── patch_boost.sh │ ├── prepare_boost.sh │ ├── sample_app.sh │ ├── setup_ndk_project.sh │ └── utils.sh │ ├── package.xml │ ├── settings.gradle │ ├── tf2_ros │ ├── build.gradle │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── org │ │ │ └── ros │ │ │ └── tf2_ros │ │ │ ├── Buffer.java │ │ │ ├── StaticTransformBroadcaster.java │ │ │ ├── TransformBroadcaster.java │ │ │ └── TransformListener.java │ │ ├── jni │ │ ├── Android.mk │ │ ├── Application.mk │ │ └── src │ │ │ ├── org_ros_tf2_ros_Buffer.cpp │ │ │ └── org_ros_tf2_ros_Buffer.h │ │ └── res │ │ ├── drawable │ │ └── icon.png │ │ ├── layout │ │ └── main.xml │ │ └── values │ │ └── strings.xml │ ├── tf2_test │ ├── build.gradle │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── org │ │ │ └── ros │ │ │ └── tf2 │ │ │ └── tf2_test │ │ │ ├── PermuteOption.java │ │ │ ├── Permuter.java │ │ │ ├── Tf2RunTests.java │ │ │ ├── Tf2SetupTests.java │ │ │ └── Tf2Test.java │ │ └── res │ │ ├── drawable-hdpi │ │ └── ic_launcher.png │ │ ├── drawable-ldpi │ │ └── ic_launcher.png │ │ ├── drawable-mdpi │ │ └── ic_launcher.png │ │ ├── drawable-xhdpi │ │ └── ic_launcher.png │ │ ├── layout │ │ └── main.xml │ │ └── values │ │ └── strings.xml │ ├── tf_broadcaster_app │ ├── build.gradle │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── org │ │ │ └── ros │ │ │ └── tf2 │ │ │ └── tf_broadcaster_app │ │ │ └── TfBroadcasterApp.java │ │ └── res │ │ ├── drawable-hdpi │ │ └── ic_launcher.png │ │ ├── drawable-ldpi │ │ └── ic_launcher.png │ │ ├── drawable-mdpi │ │ └── ic_launcher.png │ │ ├── drawable-xhdpi │ │ └── ic_launcher.png │ │ ├── layout │ │ └── main.xml │ │ └── values │ │ └── strings.xml │ └── tf_echo │ ├── build.gradle │ └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── org │ │ └── ros │ │ └── tf │ │ └── tf_echo │ │ └── TFEchoActivity.java │ └── res │ ├── drawable-hdpi │ └── ic_launcher.png │ ├── drawable-ldpi │ └── ic_launcher.png │ ├── drawable-mdpi │ └── ic_launcher.png │ ├── layout │ └── main.xml │ └── values │ └── strings.xml ├── commands.txt ├── ologic_680_x_400.pgm └── ologic_680_x_400.yaml /README.md: -------------------------------------------------------------------------------- 1 | ROSTango - ROS on Project Tango 2 | ===== 3 | 4 | Everything related to Google Project Tango and open software OLogic has released to the public. Most of this work is related to ROS on Project Tango. Be sure to read the Wiki for instructions on working with ROS, ROSJava, and Tango. 5 | 6 | 7 | https://github.com/ologic/Tango/wiki 8 | 9 | Obviously this repo is a work-in-progress. We are making changes daily to everything here, improving the documentation, and working toward making the examples more complete. Please be patient and don't hesitate to message us if we have broken something along the way and you are trying to build or having trouble with the code. 10 | -------------------------------------------------------------------------------- /ROSTango/.catkin_workspace: -------------------------------------------------------------------------------- 1 | # This file currently only serves to mark the location of a catkin workspace for tool integration 2 | -------------------------------------------------------------------------------- /ROSTango/.gitignore: -------------------------------------------------------------------------------- 1 | # catkin 2 | build/ 3 | devel/ 4 | 5 | #built application files 6 | *.apk 7 | *.ap_ 8 | 9 | #files for the dex VM 10 | *.dex 11 | 12 | # Java class files 13 | *.class 14 | 15 | # generated files 16 | bin/ 17 | gen/ 18 | 19 | # local configuration files (sdk path, etc) 20 | local.properties 21 | 22 | # OSX files 23 | .DS_Store 24 | 25 | #Eclipse project files 26 | .classpath 27 | .project 28 | 29 | #Android Studio 30 | .idea 31 | .gradle 32 | build/ 33 | *.iml 34 | 35 | 36 | -------------------------------------------------------------------------------- /ROSTango/README.md: -------------------------------------------------------------------------------- 1 | This is a catkin workspace. 2 | 3 | To build the projects type: 4 | 5 | ``` 6 | catkin_make 7 | ``` 8 | 9 | 10 | -------------------------------------------------------------------------------- /ROSTango/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | /opt/ros/hydro/share/catkin/cmake/toplevel.cmake -------------------------------------------------------------------------------- /ROSTango/src/rostango/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | 3 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/.navigation/raw/main.nvg.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ologic/Tango/938c38f70dd289a91ade9fad2fa0846cbf5bf911/ROSTango/src/rostango/.navigation/raw/main.nvg.xml -------------------------------------------------------------------------------- /ROSTango/src/rostango/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ############################################################################## 2 | # CMake 3 | ############################################################################## 4 | 5 | cmake_minimum_required(VERSION 2.8.3) 6 | project(rostango) 7 | 8 | ############################################################################## 9 | # Catkin 10 | ############################################################################## 11 | 12 | find_package(catkin REQUIRED rosjava_build_tools) 13 | # Set the gradle targets you want catkin's make to run by default 14 | catkin_android_setup(assembleRelease uploadArchives) 15 | catkin_package() 16 | 17 | 18 | ############################################################################## 19 | # Installation 20 | ############################################################################## 21 | 22 | # If you are deploying android libraries (.aar's) uncomment this and 23 | # change this to match the maven group name you have specified in the 24 | # allprojects closure the root build.gradle 25 | #install(DIRECTORY ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_MAVEN_DESTINATION}/com/github/rosjava/${PROJECT_NAME}/ 26 | # DESTINATION ${CATKIN_GLOBAL_MAVEN_DESTINATION}/com/github/rosjava/${PROJECT_NAME}) 27 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/.gitignore: -------------------------------------------------------------------------------- 1 | # built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # files for the dex VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # generated files 12 | bin/ 13 | gen/ 14 | build/ 15 | 16 | # Local configuration file (sdk path, etc) 17 | local.properties 18 | 19 | # Eclipse project files 20 | .classpath 21 | 22 | # Proguard folder generated by Eclipse 23 | proguard/ 24 | 25 | # Intellij project files 26 | *.iml 27 | *.ipr 28 | *.iws 29 | .idea/ 30 | 31 | *.pydevproject 32 | .metadata 33 | bin/** 34 | tmp/** 35 | tmp/**/* 36 | *.tmp 37 | *.bak 38 | *.swp 39 | *~.nib 40 | local.properties 41 | .classpath 42 | .settings/ 43 | .loadpath 44 | 45 | # External tool builders 46 | .externalToolBuilders/ 47 | 48 | # Locally stored "Eclipse launch configurations" 49 | *.launch 50 | 51 | # CDT-specific 52 | .cproject 53 | 54 | # PDT-specific 55 | .buildpath 56 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'android-library' 2 | 3 | dependencies { 4 | compile 'com.android.support:support-v4:20.+' 5 | } 6 | 7 | android { 8 | compileSdkVersion 19 9 | buildToolsVersion "19.1.0" 10 | 11 | sourceSets { 12 | main { 13 | manifest.srcFile 'AndroidManifest.xml' 14 | java.srcDirs = ['src'] 15 | resources.srcDirs = ['src'] 16 | aidl.srcDirs = ['src'] 17 | renderscript.srcDirs = ['src'] 18 | res.srcDirs = ['res'] 19 | assets.srcDirs = ['assets'] 20 | } 21 | 22 | // Move the tests to tests/java, tests/res, etc... 23 | androidTest.setRoot('tests') 24 | 25 | // Move the build types to build-types/ 26 | // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ... 27 | // This moves them out of them default location under src//... which would 28 | // conflict with src/ being used by the main source set. 29 | // Adding new build types or product flavors should be accompanied 30 | // by a similar customization. 31 | debug.setRoot('build-types/debug') 32 | release.setRoot('build-types/release') 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/libs/android-support-v4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ologic/Tango/938c38f70dd289a91ade9fad2fa0846cbf5bf911/ROSTango/src/rostango/Mavlink/libs/android-support-v4.jar -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/mavlinkGenerator/.gitignore: -------------------------------------------------------------------------------- 1 | pymavlink/tools/ 2 | pymavlink/examples/ 3 | pymavlink/generator/C/ 4 | pymavlink/generator/lib/ 5 | pymavlink/generator/javascript/ 6 | pymavlink/generator/CS/ 7 | pymavlink/generator/javascriptMakefile 8 | pymavlink/generator/*.* 9 | !pymavlink/generator/mavgen.py 10 | !pymavlink/generator/mavgen_java.py 11 | 12 | pymavlink/APM_Mavtest 13 | pymavlink/*.* 14 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/mavlinkGenerator/README.txt: -------------------------------------------------------------------------------- 1 | The mavlink generator files (pymavlink) must be copied to the folder pymavlink. The files can be downloaded from: 2 | https://github.com/mavlink/mavlink/ 3 | 4 | To generate the MAVlink java files run generateMessages.py -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/mavlinkGenerator/generateMessages.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import os 4 | import re 5 | import pprint 6 | 7 | # Python 2.x and 3.x compatability 8 | try: 9 | from tkinter import * 10 | import tkinter.filedialog 11 | import tkinter.messagebox 12 | except ImportError as ex: 13 | # Must be using Python 2.x, import and rename 14 | from Tkinter import * 15 | import tkFileDialog 16 | import tkMessageBox 17 | 18 | tkinter.filedialog = tkFileDialog 19 | del tkFileDialog 20 | tkinter.messagebox = tkMessageBox 21 | del tkMessageBox 22 | 23 | sys.path.append(os.path.join('pymavlink','generator')) 24 | from mavgen import * 25 | 26 | class MavgenOptions: 27 | def __init__(self,language,protocol,output,error_limit): 28 | self.language = language 29 | self.wire_protocol = protocol 30 | self.output = output 31 | self.error_limit = error_limit; 32 | 33 | 34 | if __name__ == '__main__': 35 | # Generate headers 36 | opts = MavgenOptions('Java', '1.0', '../src/com/MAVLink/Messages', '200'); 37 | args = ['./message_definitions/ardupilotmega.xml'] 38 | mavgen(opts,args) 39 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/mavlinkGenerator/pymavlink/dialects/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ologic/Tango/938c38f70dd289a91ade9fad2fa0846cbf5bf911/ROSTango/src/rostango/Mavlink/mavlinkGenerator/pymavlink/dialects/__init__.py -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/mavlinkGenerator/pymavlink/dialects/v09/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ologic/Tango/938c38f70dd289a91ade9fad2fa0846cbf5bf911/ROSTango/src/rostango/Mavlink/mavlinkGenerator/pymavlink/dialects/v09/__init__.py -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/mavlinkGenerator/pymavlink/dialects/v10/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ologic/Tango/938c38f70dd289a91ade9fad2fa0846cbf5bf911/ROSTango/src/rostango/Mavlink/mavlinkGenerator/pymavlink/dialects/v10/__init__.py -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-19 15 | android.library=true 16 | 17 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/res/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything in this directory 2 | * 3 | # Except this file 4 | !.gitignore 5 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/MAVLinkMessage.java: -------------------------------------------------------------------------------- 1 | 2 | package com.MAVLink.Messages; 3 | 4 | import java.io.Serializable; 5 | 6 | public abstract class MAVLinkMessage implements Serializable { 7 | private static final long serialVersionUID = -7754622750478538539L; 8 | // The MAVLink message classes have been changed to implement Serializable, 9 | // this way is possible to pass a mavlink message trought the Service-Acctivity interface 10 | 11 | /** 12 | * Simply a common interface for all MAVLink Messages 13 | */ 14 | 15 | public int sysid; 16 | public int compid; 17 | public int msgid; 18 | public abstract MAVLinkPacket pack(); 19 | public abstract void unpack(MAVLinkPayload payload); 20 | } 21 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/MAVLinkStats.java: -------------------------------------------------------------------------------- 1 | package com.MAVLink.Messages; 2 | 3 | /** 4 | * Storage for MAVLink Packet and Error statistics 5 | * 6 | */ 7 | public class MAVLinkStats /* implements Serializable */{ 8 | 9 | public int receivedPacketCount; 10 | 11 | public int crcErrorCount; 12 | 13 | public int lostPacketCount; 14 | 15 | private int lastPacketSeq; 16 | 17 | /** 18 | * Check the new received packet to see if has lost someone between this and 19 | * the last packet 20 | * 21 | * @param packet 22 | * Packet that should be checked 23 | */ 24 | public void newPacket(MAVLinkPacket packet) { 25 | advanceLastPacketSequence(); 26 | if (hasLostPackets(packet)) { 27 | updateLostPacketCount(packet); 28 | } 29 | lastPacketSeq = packet.seq; 30 | receivedPacketCount++; 31 | } 32 | 33 | private void updateLostPacketCount(MAVLinkPacket packet) { 34 | int lostPackets; 35 | if (packet.seq - lastPacketSeq < 0) { 36 | lostPackets = (packet.seq - lastPacketSeq) + 255; 37 | } else { 38 | lostPackets = (packet.seq - lastPacketSeq); 39 | } 40 | lostPacketCount += lostPackets; 41 | } 42 | 43 | private boolean hasLostPackets(MAVLinkPacket packet) { 44 | return lastPacketSeq > 0 && packet.seq != lastPacketSeq; 45 | } 46 | 47 | private void advanceLastPacketSequence() { 48 | // wrap from 255 to 0 if necessary 49 | lastPacketSeq = (lastPacketSeq + 1) & 0xFF; 50 | } 51 | 52 | /** 53 | * Called when a CRC error happens on the parser 54 | */ 55 | public void crcError() { 56 | crcErrorCount++; 57 | } 58 | 59 | /** 60 | * Resets statistics for this MAVLink. 61 | */ 62 | public void mavlinkResetStats() { 63 | lastPacketSeq = -1; 64 | lostPacketCount = 0; 65 | crcErrorCount = 0; 66 | receivedPacketCount = 0; 67 | } 68 | 69 | } -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/ardupilotmega/msg_command_ack.java: -------------------------------------------------------------------------------- 1 | // MESSAGE COMMAND_ACK PACKING 2 | package com.MAVLink.Messages.ardupilotmega; 3 | 4 | import com.MAVLink.Messages.MAVLinkMessage; 5 | import com.MAVLink.Messages.MAVLinkPacket; 6 | import com.MAVLink.Messages.MAVLinkPayload; 7 | //import android.util.Log; 8 | 9 | /** 10 | * Report status of a command. Includes feedback wether the command was executed. 11 | */ 12 | public class msg_command_ack extends MAVLinkMessage{ 13 | 14 | public static final int MAVLINK_MSG_ID_COMMAND_ACK = 77; 15 | public static final int MAVLINK_MSG_LENGTH = 3; 16 | private static final long serialVersionUID = MAVLINK_MSG_ID_COMMAND_ACK; 17 | 18 | 19 | /** 20 | * Command ID, as defined by MAV_CMD enum. 21 | */ 22 | public short command; 23 | /** 24 | * See MAV_RESULT enum 25 | */ 26 | public byte result; 27 | 28 | /** 29 | * Generates the payload for a mavlink message for a message of this type 30 | * @return 31 | */ 32 | public MAVLinkPacket pack(){ 33 | MAVLinkPacket packet = new MAVLinkPacket(); 34 | packet.len = MAVLINK_MSG_LENGTH; 35 | packet.sysid = 255; 36 | packet.compid = 190; 37 | packet.msgid = MAVLINK_MSG_ID_COMMAND_ACK; 38 | packet.payload.putShort(command); 39 | packet.payload.putByte(result); 40 | return packet; 41 | } 42 | 43 | /** 44 | * Decode a command_ack message into this class fields 45 | * 46 | * @param payload The message to decode 47 | */ 48 | public void unpack(MAVLinkPayload payload) { 49 | payload.resetIndex(); 50 | command = payload.getShort(); 51 | result = payload.getByte(); 52 | } 53 | 54 | /** 55 | * Constructor for a new message, just initializes the msgid 56 | */ 57 | public msg_command_ack(){ 58 | msgid = MAVLINK_MSG_ID_COMMAND_ACK; 59 | } 60 | 61 | /** 62 | * Constructor for a new message, initializes the message with the payload 63 | * from a mavlink packet 64 | * 65 | */ 66 | public msg_command_ack(MAVLinkPacket mavLinkPacket){ 67 | this.sysid = mavLinkPacket.sysid; 68 | this.compid = mavLinkPacket.compid; 69 | this.msgid = MAVLINK_MSG_ID_COMMAND_ACK; 70 | unpack(mavLinkPacket.payload); 71 | //Log.d("MAVLink", "COMMAND_ACK"); 72 | //Log.d("MAVLINK_MSG_ID_COMMAND_ACK", toString()); 73 | } 74 | 75 | 76 | /** 77 | * Returns a string with the MSG name and data 78 | */ 79 | public String toString(){ 80 | return "MAVLINK_MSG_ID_COMMAND_ACK -"+" command:"+command+" result:"+result+""; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/ardupilotmega/msg_data16.java: -------------------------------------------------------------------------------- 1 | // MESSAGE DATA16 PACKING 2 | package com.MAVLink.Messages.ardupilotmega; 3 | 4 | import com.MAVLink.Messages.MAVLinkMessage; 5 | import com.MAVLink.Messages.MAVLinkPacket; 6 | import com.MAVLink.Messages.MAVLinkPayload; 7 | //import android.util.Log; 8 | 9 | /** 10 | * Data packet, size 16 11 | */ 12 | public class msg_data16 extends MAVLinkMessage{ 13 | 14 | public static final int MAVLINK_MSG_ID_DATA16 = 169; 15 | public static final int MAVLINK_MSG_LENGTH = 18; 16 | private static final long serialVersionUID = MAVLINK_MSG_ID_DATA16; 17 | 18 | 19 | /** 20 | * data type 21 | */ 22 | public byte type; 23 | /** 24 | * data length 25 | */ 26 | public byte len; 27 | /** 28 | * raw data 29 | */ 30 | public byte data[] = new byte[16]; 31 | 32 | /** 33 | * Generates the payload for a mavlink message for a message of this type 34 | * @return 35 | */ 36 | public MAVLinkPacket pack(){ 37 | MAVLinkPacket packet = new MAVLinkPacket(); 38 | packet.len = MAVLINK_MSG_LENGTH; 39 | packet.sysid = 255; 40 | packet.compid = 190; 41 | packet.msgid = MAVLINK_MSG_ID_DATA16; 42 | packet.payload.putByte(type); 43 | packet.payload.putByte(len); 44 | for (int i = 0; i < data.length; i++) { 45 | packet.payload.putByte(data[i]); 46 | } 47 | return packet; 48 | } 49 | 50 | /** 51 | * Decode a data16 message into this class fields 52 | * 53 | * @param payload The message to decode 54 | */ 55 | public void unpack(MAVLinkPayload payload) { 56 | payload.resetIndex(); 57 | type = payload.getByte(); 58 | len = payload.getByte(); 59 | for (int i = 0; i < data.length; i++) { 60 | data[i] = payload.getByte(); 61 | } 62 | } 63 | 64 | /** 65 | * Constructor for a new message, just initializes the msgid 66 | */ 67 | public msg_data16(){ 68 | msgid = MAVLINK_MSG_ID_DATA16; 69 | } 70 | 71 | /** 72 | * Constructor for a new message, initializes the message with the payload 73 | * from a mavlink packet 74 | * 75 | */ 76 | public msg_data16(MAVLinkPacket mavLinkPacket){ 77 | this.sysid = mavLinkPacket.sysid; 78 | this.compid = mavLinkPacket.compid; 79 | this.msgid = MAVLINK_MSG_ID_DATA16; 80 | unpack(mavLinkPacket.payload); 81 | //Log.d("MAVLink", "DATA16"); 82 | //Log.d("MAVLINK_MSG_ID_DATA16", toString()); 83 | } 84 | 85 | 86 | /** 87 | * Returns a string with the MSG name and data 88 | */ 89 | public String toString(){ 90 | return "MAVLINK_MSG_ID_DATA16 -"+" type:"+type+" len:"+len+" data:"+data+""; 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/ardupilotmega/msg_data32.java: -------------------------------------------------------------------------------- 1 | // MESSAGE DATA32 PACKING 2 | package com.MAVLink.Messages.ardupilotmega; 3 | 4 | import com.MAVLink.Messages.MAVLinkMessage; 5 | import com.MAVLink.Messages.MAVLinkPacket; 6 | import com.MAVLink.Messages.MAVLinkPayload; 7 | //import android.util.Log; 8 | 9 | /** 10 | * Data packet, size 32 11 | */ 12 | public class msg_data32 extends MAVLinkMessage{ 13 | 14 | public static final int MAVLINK_MSG_ID_DATA32 = 170; 15 | public static final int MAVLINK_MSG_LENGTH = 34; 16 | private static final long serialVersionUID = MAVLINK_MSG_ID_DATA32; 17 | 18 | 19 | /** 20 | * data type 21 | */ 22 | public byte type; 23 | /** 24 | * data length 25 | */ 26 | public byte len; 27 | /** 28 | * raw data 29 | */ 30 | public byte data[] = new byte[32]; 31 | 32 | /** 33 | * Generates the payload for a mavlink message for a message of this type 34 | * @return 35 | */ 36 | public MAVLinkPacket pack(){ 37 | MAVLinkPacket packet = new MAVLinkPacket(); 38 | packet.len = MAVLINK_MSG_LENGTH; 39 | packet.sysid = 255; 40 | packet.compid = 190; 41 | packet.msgid = MAVLINK_MSG_ID_DATA32; 42 | packet.payload.putByte(type); 43 | packet.payload.putByte(len); 44 | for (int i = 0; i < data.length; i++) { 45 | packet.payload.putByte(data[i]); 46 | } 47 | return packet; 48 | } 49 | 50 | /** 51 | * Decode a data32 message into this class fields 52 | * 53 | * @param payload The message to decode 54 | */ 55 | public void unpack(MAVLinkPayload payload) { 56 | payload.resetIndex(); 57 | type = payload.getByte(); 58 | len = payload.getByte(); 59 | for (int i = 0; i < data.length; i++) { 60 | data[i] = payload.getByte(); 61 | } 62 | } 63 | 64 | /** 65 | * Constructor for a new message, just initializes the msgid 66 | */ 67 | public msg_data32(){ 68 | msgid = MAVLINK_MSG_ID_DATA32; 69 | } 70 | 71 | /** 72 | * Constructor for a new message, initializes the message with the payload 73 | * from a mavlink packet 74 | * 75 | */ 76 | public msg_data32(MAVLinkPacket mavLinkPacket){ 77 | this.sysid = mavLinkPacket.sysid; 78 | this.compid = mavLinkPacket.compid; 79 | this.msgid = MAVLINK_MSG_ID_DATA32; 80 | unpack(mavLinkPacket.payload); 81 | //Log.d("MAVLink", "DATA32"); 82 | //Log.d("MAVLINK_MSG_ID_DATA32", toString()); 83 | } 84 | 85 | 86 | /** 87 | * Returns a string with the MSG name and data 88 | */ 89 | public String toString(){ 90 | return "MAVLINK_MSG_ID_DATA32 -"+" type:"+type+" len:"+len+" data:"+data+""; 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/ardupilotmega/msg_data64.java: -------------------------------------------------------------------------------- 1 | // MESSAGE DATA64 PACKING 2 | package com.MAVLink.Messages.ardupilotmega; 3 | 4 | import com.MAVLink.Messages.MAVLinkMessage; 5 | import com.MAVLink.Messages.MAVLinkPacket; 6 | import com.MAVLink.Messages.MAVLinkPayload; 7 | //import android.util.Log; 8 | 9 | /** 10 | * Data packet, size 64 11 | */ 12 | public class msg_data64 extends MAVLinkMessage{ 13 | 14 | public static final int MAVLINK_MSG_ID_DATA64 = 171; 15 | public static final int MAVLINK_MSG_LENGTH = 66; 16 | private static final long serialVersionUID = MAVLINK_MSG_ID_DATA64; 17 | 18 | 19 | /** 20 | * data type 21 | */ 22 | public byte type; 23 | /** 24 | * data length 25 | */ 26 | public byte len; 27 | /** 28 | * raw data 29 | */ 30 | public byte data[] = new byte[64]; 31 | 32 | /** 33 | * Generates the payload for a mavlink message for a message of this type 34 | * @return 35 | */ 36 | public MAVLinkPacket pack(){ 37 | MAVLinkPacket packet = new MAVLinkPacket(); 38 | packet.len = MAVLINK_MSG_LENGTH; 39 | packet.sysid = 255; 40 | packet.compid = 190; 41 | packet.msgid = MAVLINK_MSG_ID_DATA64; 42 | packet.payload.putByte(type); 43 | packet.payload.putByte(len); 44 | for (int i = 0; i < data.length; i++) { 45 | packet.payload.putByte(data[i]); 46 | } 47 | return packet; 48 | } 49 | 50 | /** 51 | * Decode a data64 message into this class fields 52 | * 53 | * @param payload The message to decode 54 | */ 55 | public void unpack(MAVLinkPayload payload) { 56 | payload.resetIndex(); 57 | type = payload.getByte(); 58 | len = payload.getByte(); 59 | for (int i = 0; i < data.length; i++) { 60 | data[i] = payload.getByte(); 61 | } 62 | } 63 | 64 | /** 65 | * Constructor for a new message, just initializes the msgid 66 | */ 67 | public msg_data64(){ 68 | msgid = MAVLINK_MSG_ID_DATA64; 69 | } 70 | 71 | /** 72 | * Constructor for a new message, initializes the message with the payload 73 | * from a mavlink packet 74 | * 75 | */ 76 | public msg_data64(MAVLinkPacket mavLinkPacket){ 77 | this.sysid = mavLinkPacket.sysid; 78 | this.compid = mavLinkPacket.compid; 79 | this.msgid = MAVLINK_MSG_ID_DATA64; 80 | unpack(mavLinkPacket.payload); 81 | //Log.d("MAVLink", "DATA64"); 82 | //Log.d("MAVLINK_MSG_ID_DATA64", toString()); 83 | } 84 | 85 | 86 | /** 87 | * Returns a string with the MSG name and data 88 | */ 89 | public String toString(){ 90 | return "MAVLINK_MSG_ID_DATA64 -"+" type:"+type+" len:"+len+" data:"+data+""; 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/ardupilotmega/msg_data96.java: -------------------------------------------------------------------------------- 1 | // MESSAGE DATA96 PACKING 2 | package com.MAVLink.Messages.ardupilotmega; 3 | 4 | import com.MAVLink.Messages.MAVLinkMessage; 5 | import com.MAVLink.Messages.MAVLinkPacket; 6 | import com.MAVLink.Messages.MAVLinkPayload; 7 | //import android.util.Log; 8 | 9 | /** 10 | * Data packet, size 96 11 | */ 12 | public class msg_data96 extends MAVLinkMessage{ 13 | 14 | public static final int MAVLINK_MSG_ID_DATA96 = 172; 15 | public static final int MAVLINK_MSG_LENGTH = 98; 16 | private static final long serialVersionUID = MAVLINK_MSG_ID_DATA96; 17 | 18 | 19 | /** 20 | * data type 21 | */ 22 | public byte type; 23 | /** 24 | * data length 25 | */ 26 | public byte len; 27 | /** 28 | * raw data 29 | */ 30 | public byte data[] = new byte[96]; 31 | 32 | /** 33 | * Generates the payload for a mavlink message for a message of this type 34 | * @return 35 | */ 36 | public MAVLinkPacket pack(){ 37 | MAVLinkPacket packet = new MAVLinkPacket(); 38 | packet.len = MAVLINK_MSG_LENGTH; 39 | packet.sysid = 255; 40 | packet.compid = 190; 41 | packet.msgid = MAVLINK_MSG_ID_DATA96; 42 | packet.payload.putByte(type); 43 | packet.payload.putByte(len); 44 | for (int i = 0; i < data.length; i++) { 45 | packet.payload.putByte(data[i]); 46 | } 47 | return packet; 48 | } 49 | 50 | /** 51 | * Decode a data96 message into this class fields 52 | * 53 | * @param payload The message to decode 54 | */ 55 | public void unpack(MAVLinkPayload payload) { 56 | payload.resetIndex(); 57 | type = payload.getByte(); 58 | len = payload.getByte(); 59 | for (int i = 0; i < data.length; i++) { 60 | data[i] = payload.getByte(); 61 | } 62 | } 63 | 64 | /** 65 | * Constructor for a new message, just initializes the msgid 66 | */ 67 | public msg_data96(){ 68 | msgid = MAVLINK_MSG_ID_DATA96; 69 | } 70 | 71 | /** 72 | * Constructor for a new message, initializes the message with the payload 73 | * from a mavlink packet 74 | * 75 | */ 76 | public msg_data96(MAVLinkPacket mavLinkPacket){ 77 | this.sysid = mavLinkPacket.sysid; 78 | this.compid = mavLinkPacket.compid; 79 | this.msgid = MAVLINK_MSG_ID_DATA96; 80 | unpack(mavLinkPacket.payload); 81 | //Log.d("MAVLink", "DATA96"); 82 | //Log.d("MAVLINK_MSG_ID_DATA96", toString()); 83 | } 84 | 85 | 86 | /** 87 | * Returns a string with the MSG name and data 88 | */ 89 | public String toString(){ 90 | return "MAVLINK_MSG_ID_DATA96 -"+" type:"+type+" len:"+len+" data:"+data+""; 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/ardupilotmega/msg_debug.java: -------------------------------------------------------------------------------- 1 | // MESSAGE DEBUG PACKING 2 | package com.MAVLink.Messages.ardupilotmega; 3 | 4 | import com.MAVLink.Messages.MAVLinkMessage; 5 | import com.MAVLink.Messages.MAVLinkPacket; 6 | import com.MAVLink.Messages.MAVLinkPayload; 7 | //import android.util.Log; 8 | 9 | /** 10 | * Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N. 11 | */ 12 | public class msg_debug extends MAVLinkMessage{ 13 | 14 | public static final int MAVLINK_MSG_ID_DEBUG = 254; 15 | public static final int MAVLINK_MSG_LENGTH = 9; 16 | private static final long serialVersionUID = MAVLINK_MSG_ID_DEBUG; 17 | 18 | 19 | /** 20 | * Timestamp (milliseconds since system boot) 21 | */ 22 | public int time_boot_ms; 23 | /** 24 | * DEBUG value 25 | */ 26 | public float value; 27 | /** 28 | * index of debug variable 29 | */ 30 | public byte ind; 31 | 32 | /** 33 | * Generates the payload for a mavlink message for a message of this type 34 | * @return 35 | */ 36 | public MAVLinkPacket pack(){ 37 | MAVLinkPacket packet = new MAVLinkPacket(); 38 | packet.len = MAVLINK_MSG_LENGTH; 39 | packet.sysid = 255; 40 | packet.compid = 190; 41 | packet.msgid = MAVLINK_MSG_ID_DEBUG; 42 | packet.payload.putInt(time_boot_ms); 43 | packet.payload.putFloat(value); 44 | packet.payload.putByte(ind); 45 | return packet; 46 | } 47 | 48 | /** 49 | * Decode a debug message into this class fields 50 | * 51 | * @param payload The message to decode 52 | */ 53 | public void unpack(MAVLinkPayload payload) { 54 | payload.resetIndex(); 55 | time_boot_ms = payload.getInt(); 56 | value = payload.getFloat(); 57 | ind = payload.getByte(); 58 | } 59 | 60 | /** 61 | * Constructor for a new message, just initializes the msgid 62 | */ 63 | public msg_debug(){ 64 | msgid = MAVLINK_MSG_ID_DEBUG; 65 | } 66 | 67 | /** 68 | * Constructor for a new message, initializes the message with the payload 69 | * from a mavlink packet 70 | * 71 | */ 72 | public msg_debug(MAVLinkPacket mavLinkPacket){ 73 | this.sysid = mavLinkPacket.sysid; 74 | this.compid = mavLinkPacket.compid; 75 | this.msgid = MAVLINK_MSG_ID_DEBUG; 76 | unpack(mavLinkPacket.payload); 77 | //Log.d("MAVLink", "DEBUG"); 78 | //Log.d("MAVLINK_MSG_ID_DEBUG", toString()); 79 | } 80 | 81 | 82 | /** 83 | * Returns a string with the MSG name and data 84 | */ 85 | public String toString(){ 86 | return "MAVLINK_MSG_ID_DEBUG -"+" time_boot_ms:"+time_boot_ms+" value:"+value+" ind:"+ind+""; 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/ardupilotmega/msg_file_transfer_res.java: -------------------------------------------------------------------------------- 1 | // MESSAGE FILE_TRANSFER_RES PACKING 2 | package com.MAVLink.Messages.ardupilotmega; 3 | 4 | import com.MAVLink.Messages.MAVLinkMessage; 5 | import com.MAVLink.Messages.MAVLinkPacket; 6 | import com.MAVLink.Messages.MAVLinkPayload; 7 | //import android.util.Log; 8 | 9 | /** 10 | * File transfer result 11 | */ 12 | public class msg_file_transfer_res extends MAVLinkMessage{ 13 | 14 | public static final int MAVLINK_MSG_ID_FILE_TRANSFER_RES = 112; 15 | public static final int MAVLINK_MSG_LENGTH = 9; 16 | private static final long serialVersionUID = MAVLINK_MSG_ID_FILE_TRANSFER_RES; 17 | 18 | 19 | /** 20 | * Unique transfer ID 21 | */ 22 | public long transfer_uid; 23 | /** 24 | * 0: OK, 1: not permitted, 2: bad path / file name, 3: no space left on device 25 | */ 26 | public byte result; 27 | 28 | /** 29 | * Generates the payload for a mavlink message for a message of this type 30 | * @return 31 | */ 32 | public MAVLinkPacket pack(){ 33 | MAVLinkPacket packet = new MAVLinkPacket(); 34 | packet.len = MAVLINK_MSG_LENGTH; 35 | packet.sysid = 255; 36 | packet.compid = 190; 37 | packet.msgid = MAVLINK_MSG_ID_FILE_TRANSFER_RES; 38 | packet.payload.putLong(transfer_uid); 39 | packet.payload.putByte(result); 40 | return packet; 41 | } 42 | 43 | /** 44 | * Decode a file_transfer_res message into this class fields 45 | * 46 | * @param payload The message to decode 47 | */ 48 | public void unpack(MAVLinkPayload payload) { 49 | payload.resetIndex(); 50 | transfer_uid = payload.getLong(); 51 | result = payload.getByte(); 52 | } 53 | 54 | /** 55 | * Constructor for a new message, just initializes the msgid 56 | */ 57 | public msg_file_transfer_res(){ 58 | msgid = MAVLINK_MSG_ID_FILE_TRANSFER_RES; 59 | } 60 | 61 | /** 62 | * Constructor for a new message, initializes the message with the payload 63 | * from a mavlink packet 64 | * 65 | */ 66 | public msg_file_transfer_res(MAVLinkPacket mavLinkPacket){ 67 | this.sysid = mavLinkPacket.sysid; 68 | this.compid = mavLinkPacket.compid; 69 | this.msgid = MAVLINK_MSG_ID_FILE_TRANSFER_RES; 70 | unpack(mavLinkPacket.payload); 71 | //Log.d("MAVLink", "FILE_TRANSFER_RES"); 72 | //Log.d("MAVLINK_MSG_ID_FILE_TRANSFER_RES", toString()); 73 | } 74 | 75 | 76 | /** 77 | * Returns a string with the MSG name and data 78 | */ 79 | public String toString(){ 80 | return "MAVLINK_MSG_ID_FILE_TRANSFER_RES -"+" transfer_uid:"+transfer_uid+" result:"+result+""; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/ardupilotmega/msg_hwstatus.java: -------------------------------------------------------------------------------- 1 | // MESSAGE HWSTATUS PACKING 2 | package com.MAVLink.Messages.ardupilotmega; 3 | 4 | import com.MAVLink.Messages.MAVLinkMessage; 5 | import com.MAVLink.Messages.MAVLinkPacket; 6 | import com.MAVLink.Messages.MAVLinkPayload; 7 | //import android.util.Log; 8 | 9 | /** 10 | * Status of key hardware 11 | */ 12 | public class msg_hwstatus extends MAVLinkMessage{ 13 | 14 | public static final int MAVLINK_MSG_ID_HWSTATUS = 165; 15 | public static final int MAVLINK_MSG_LENGTH = 3; 16 | private static final long serialVersionUID = MAVLINK_MSG_ID_HWSTATUS; 17 | 18 | 19 | /** 20 | * board voltage (mV) 21 | */ 22 | public short Vcc; 23 | /** 24 | * I2C error count 25 | */ 26 | public byte I2Cerr; 27 | 28 | /** 29 | * Generates the payload for a mavlink message for a message of this type 30 | * @return 31 | */ 32 | public MAVLinkPacket pack(){ 33 | MAVLinkPacket packet = new MAVLinkPacket(); 34 | packet.len = MAVLINK_MSG_LENGTH; 35 | packet.sysid = 255; 36 | packet.compid = 190; 37 | packet.msgid = MAVLINK_MSG_ID_HWSTATUS; 38 | packet.payload.putShort(Vcc); 39 | packet.payload.putByte(I2Cerr); 40 | return packet; 41 | } 42 | 43 | /** 44 | * Decode a hwstatus message into this class fields 45 | * 46 | * @param payload The message to decode 47 | */ 48 | public void unpack(MAVLinkPayload payload) { 49 | payload.resetIndex(); 50 | Vcc = payload.getShort(); 51 | I2Cerr = payload.getByte(); 52 | } 53 | 54 | /** 55 | * Constructor for a new message, just initializes the msgid 56 | */ 57 | public msg_hwstatus(){ 58 | msgid = MAVLINK_MSG_ID_HWSTATUS; 59 | } 60 | 61 | /** 62 | * Constructor for a new message, initializes the message with the payload 63 | * from a mavlink packet 64 | * 65 | */ 66 | public msg_hwstatus(MAVLinkPacket mavLinkPacket){ 67 | this.sysid = mavLinkPacket.sysid; 68 | this.compid = mavLinkPacket.compid; 69 | this.msgid = MAVLINK_MSG_ID_HWSTATUS; 70 | unpack(mavLinkPacket.payload); 71 | //Log.d("MAVLink", "HWSTATUS"); 72 | //Log.d("MAVLINK_MSG_ID_HWSTATUS", toString()); 73 | } 74 | 75 | 76 | /** 77 | * Returns a string with the MSG name and data 78 | */ 79 | public String toString(){ 80 | return "MAVLINK_MSG_ID_HWSTATUS -"+" Vcc:"+Vcc+" I2Cerr:"+I2Cerr+""; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/ardupilotmega/msg_log_erase.java: -------------------------------------------------------------------------------- 1 | // MESSAGE LOG_ERASE PACKING 2 | package com.MAVLink.Messages.ardupilotmega; 3 | 4 | import com.MAVLink.Messages.MAVLinkMessage; 5 | import com.MAVLink.Messages.MAVLinkPacket; 6 | import com.MAVLink.Messages.MAVLinkPayload; 7 | //import android.util.Log; 8 | 9 | /** 10 | * Erase all logs 11 | */ 12 | public class msg_log_erase extends MAVLinkMessage{ 13 | 14 | public static final int MAVLINK_MSG_ID_LOG_ERASE = 121; 15 | public static final int MAVLINK_MSG_LENGTH = 2; 16 | private static final long serialVersionUID = MAVLINK_MSG_ID_LOG_ERASE; 17 | 18 | 19 | /** 20 | * System ID 21 | */ 22 | public byte target_system; 23 | /** 24 | * Component ID 25 | */ 26 | public byte target_component; 27 | 28 | /** 29 | * Generates the payload for a mavlink message for a message of this type 30 | * @return 31 | */ 32 | public MAVLinkPacket pack(){ 33 | MAVLinkPacket packet = new MAVLinkPacket(); 34 | packet.len = MAVLINK_MSG_LENGTH; 35 | packet.sysid = 255; 36 | packet.compid = 190; 37 | packet.msgid = MAVLINK_MSG_ID_LOG_ERASE; 38 | packet.payload.putByte(target_system); 39 | packet.payload.putByte(target_component); 40 | return packet; 41 | } 42 | 43 | /** 44 | * Decode a log_erase message into this class fields 45 | * 46 | * @param payload The message to decode 47 | */ 48 | public void unpack(MAVLinkPayload payload) { 49 | payload.resetIndex(); 50 | target_system = payload.getByte(); 51 | target_component = payload.getByte(); 52 | } 53 | 54 | /** 55 | * Constructor for a new message, just initializes the msgid 56 | */ 57 | public msg_log_erase(){ 58 | msgid = MAVLINK_MSG_ID_LOG_ERASE; 59 | } 60 | 61 | /** 62 | * Constructor for a new message, initializes the message with the payload 63 | * from a mavlink packet 64 | * 65 | */ 66 | public msg_log_erase(MAVLinkPacket mavLinkPacket){ 67 | this.sysid = mavLinkPacket.sysid; 68 | this.compid = mavLinkPacket.compid; 69 | this.msgid = MAVLINK_MSG_ID_LOG_ERASE; 70 | unpack(mavLinkPacket.payload); 71 | //Log.d("MAVLink", "LOG_ERASE"); 72 | //Log.d("MAVLINK_MSG_ID_LOG_ERASE", toString()); 73 | } 74 | 75 | 76 | /** 77 | * Returns a string with the MSG name and data 78 | */ 79 | public String toString(){ 80 | return "MAVLINK_MSG_ID_LOG_ERASE -"+" target_system:"+target_system+" target_component:"+target_component+""; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/ardupilotmega/msg_log_request_end.java: -------------------------------------------------------------------------------- 1 | // MESSAGE LOG_REQUEST_END PACKING 2 | package com.MAVLink.Messages.ardupilotmega; 3 | 4 | import com.MAVLink.Messages.MAVLinkMessage; 5 | import com.MAVLink.Messages.MAVLinkPacket; 6 | import com.MAVLink.Messages.MAVLinkPayload; 7 | //import android.util.Log; 8 | 9 | /** 10 | * Stop log transfer and resume normal logging 11 | */ 12 | public class msg_log_request_end extends MAVLinkMessage{ 13 | 14 | public static final int MAVLINK_MSG_ID_LOG_REQUEST_END = 122; 15 | public static final int MAVLINK_MSG_LENGTH = 2; 16 | private static final long serialVersionUID = MAVLINK_MSG_ID_LOG_REQUEST_END; 17 | 18 | 19 | /** 20 | * System ID 21 | */ 22 | public byte target_system; 23 | /** 24 | * Component ID 25 | */ 26 | public byte target_component; 27 | 28 | /** 29 | * Generates the payload for a mavlink message for a message of this type 30 | * @return 31 | */ 32 | public MAVLinkPacket pack(){ 33 | MAVLinkPacket packet = new MAVLinkPacket(); 34 | packet.len = MAVLINK_MSG_LENGTH; 35 | packet.sysid = 255; 36 | packet.compid = 190; 37 | packet.msgid = MAVLINK_MSG_ID_LOG_REQUEST_END; 38 | packet.payload.putByte(target_system); 39 | packet.payload.putByte(target_component); 40 | return packet; 41 | } 42 | 43 | /** 44 | * Decode a log_request_end message into this class fields 45 | * 46 | * @param payload The message to decode 47 | */ 48 | public void unpack(MAVLinkPayload payload) { 49 | payload.resetIndex(); 50 | target_system = payload.getByte(); 51 | target_component = payload.getByte(); 52 | } 53 | 54 | /** 55 | * Constructor for a new message, just initializes the msgid 56 | */ 57 | public msg_log_request_end(){ 58 | msgid = MAVLINK_MSG_ID_LOG_REQUEST_END; 59 | } 60 | 61 | /** 62 | * Constructor for a new message, initializes the message with the payload 63 | * from a mavlink packet 64 | * 65 | */ 66 | public msg_log_request_end(MAVLinkPacket mavLinkPacket){ 67 | this.sysid = mavLinkPacket.sysid; 68 | this.compid = mavLinkPacket.compid; 69 | this.msgid = MAVLINK_MSG_ID_LOG_REQUEST_END; 70 | unpack(mavLinkPacket.payload); 71 | //Log.d("MAVLink", "LOG_REQUEST_END"); 72 | //Log.d("MAVLINK_MSG_ID_LOG_REQUEST_END", toString()); 73 | } 74 | 75 | 76 | /** 77 | * Returns a string with the MSG name and data 78 | */ 79 | public String toString(){ 80 | return "MAVLINK_MSG_ID_LOG_REQUEST_END -"+" target_system:"+target_system+" target_component:"+target_component+""; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/ardupilotmega/msg_meminfo.java: -------------------------------------------------------------------------------- 1 | // MESSAGE MEMINFO PACKING 2 | package com.MAVLink.Messages.ardupilotmega; 3 | 4 | import com.MAVLink.Messages.MAVLinkMessage; 5 | import com.MAVLink.Messages.MAVLinkPacket; 6 | import com.MAVLink.Messages.MAVLinkPayload; 7 | //import android.util.Log; 8 | 9 | /** 10 | * state of APM memory 11 | */ 12 | public class msg_meminfo extends MAVLinkMessage{ 13 | 14 | public static final int MAVLINK_MSG_ID_MEMINFO = 152; 15 | public static final int MAVLINK_MSG_LENGTH = 4; 16 | private static final long serialVersionUID = MAVLINK_MSG_ID_MEMINFO; 17 | 18 | 19 | /** 20 | * heap top 21 | */ 22 | public short brkval; 23 | /** 24 | * free memory 25 | */ 26 | public short freemem; 27 | 28 | /** 29 | * Generates the payload for a mavlink message for a message of this type 30 | * @return 31 | */ 32 | public MAVLinkPacket pack(){ 33 | MAVLinkPacket packet = new MAVLinkPacket(); 34 | packet.len = MAVLINK_MSG_LENGTH; 35 | packet.sysid = 255; 36 | packet.compid = 190; 37 | packet.msgid = MAVLINK_MSG_ID_MEMINFO; 38 | packet.payload.putShort(brkval); 39 | packet.payload.putShort(freemem); 40 | return packet; 41 | } 42 | 43 | /** 44 | * Decode a meminfo message into this class fields 45 | * 46 | * @param payload The message to decode 47 | */ 48 | public void unpack(MAVLinkPayload payload) { 49 | payload.resetIndex(); 50 | brkval = payload.getShort(); 51 | freemem = payload.getShort(); 52 | } 53 | 54 | /** 55 | * Constructor for a new message, just initializes the msgid 56 | */ 57 | public msg_meminfo(){ 58 | msgid = MAVLINK_MSG_ID_MEMINFO; 59 | } 60 | 61 | /** 62 | * Constructor for a new message, initializes the message with the payload 63 | * from a mavlink packet 64 | * 65 | */ 66 | public msg_meminfo(MAVLinkPacket mavLinkPacket){ 67 | this.sysid = mavLinkPacket.sysid; 68 | this.compid = mavLinkPacket.compid; 69 | this.msgid = MAVLINK_MSG_ID_MEMINFO; 70 | unpack(mavLinkPacket.payload); 71 | //Log.d("MAVLink", "MEMINFO"); 72 | //Log.d("MAVLINK_MSG_ID_MEMINFO", toString()); 73 | } 74 | 75 | 76 | /** 77 | * Returns a string with the MSG name and data 78 | */ 79 | public String toString(){ 80 | return "MAVLINK_MSG_ID_MEMINFO -"+" brkval:"+brkval+" freemem:"+freemem+""; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/ardupilotmega/msg_mission_clear_all.java: -------------------------------------------------------------------------------- 1 | // MESSAGE MISSION_CLEAR_ALL PACKING 2 | package com.MAVLink.Messages.ardupilotmega; 3 | 4 | import com.MAVLink.Messages.MAVLinkMessage; 5 | import com.MAVLink.Messages.MAVLinkPacket; 6 | import com.MAVLink.Messages.MAVLinkPayload; 7 | //import android.util.Log; 8 | 9 | /** 10 | * Delete all mission items at once. 11 | */ 12 | public class msg_mission_clear_all extends MAVLinkMessage{ 13 | 14 | public static final int MAVLINK_MSG_ID_MISSION_CLEAR_ALL = 45; 15 | public static final int MAVLINK_MSG_LENGTH = 2; 16 | private static final long serialVersionUID = MAVLINK_MSG_ID_MISSION_CLEAR_ALL; 17 | 18 | 19 | /** 20 | * System ID 21 | */ 22 | public byte target_system; 23 | /** 24 | * Component ID 25 | */ 26 | public byte target_component; 27 | 28 | /** 29 | * Generates the payload for a mavlink message for a message of this type 30 | * @return 31 | */ 32 | public MAVLinkPacket pack(){ 33 | MAVLinkPacket packet = new MAVLinkPacket(); 34 | packet.len = MAVLINK_MSG_LENGTH; 35 | packet.sysid = 255; 36 | packet.compid = 190; 37 | packet.msgid = MAVLINK_MSG_ID_MISSION_CLEAR_ALL; 38 | packet.payload.putByte(target_system); 39 | packet.payload.putByte(target_component); 40 | return packet; 41 | } 42 | 43 | /** 44 | * Decode a mission_clear_all message into this class fields 45 | * 46 | * @param payload The message to decode 47 | */ 48 | public void unpack(MAVLinkPayload payload) { 49 | payload.resetIndex(); 50 | target_system = payload.getByte(); 51 | target_component = payload.getByte(); 52 | } 53 | 54 | /** 55 | * Constructor for a new message, just initializes the msgid 56 | */ 57 | public msg_mission_clear_all(){ 58 | msgid = MAVLINK_MSG_ID_MISSION_CLEAR_ALL; 59 | } 60 | 61 | /** 62 | * Constructor for a new message, initializes the message with the payload 63 | * from a mavlink packet 64 | * 65 | */ 66 | public msg_mission_clear_all(MAVLinkPacket mavLinkPacket){ 67 | this.sysid = mavLinkPacket.sysid; 68 | this.compid = mavLinkPacket.compid; 69 | this.msgid = MAVLINK_MSG_ID_MISSION_CLEAR_ALL; 70 | unpack(mavLinkPacket.payload); 71 | //Log.d("MAVLink", "MISSION_CLEAR_ALL"); 72 | //Log.d("MAVLINK_MSG_ID_MISSION_CLEAR_ALL", toString()); 73 | } 74 | 75 | 76 | /** 77 | * Returns a string with the MSG name and data 78 | */ 79 | public String toString(){ 80 | return "MAVLINK_MSG_ID_MISSION_CLEAR_ALL -"+" target_system:"+target_system+" target_component:"+target_component+""; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/ardupilotmega/msg_mission_current.java: -------------------------------------------------------------------------------- 1 | // MESSAGE MISSION_CURRENT PACKING 2 | package com.MAVLink.Messages.ardupilotmega; 3 | 4 | import com.MAVLink.Messages.MAVLinkMessage; 5 | import com.MAVLink.Messages.MAVLinkPacket; 6 | import com.MAVLink.Messages.MAVLinkPayload; 7 | //import android.util.Log; 8 | 9 | /** 10 | * Message that announces the sequence number of the current active mission item. The MAV will fly towards this mission item. 11 | */ 12 | public class msg_mission_current extends MAVLinkMessage{ 13 | 14 | public static final int MAVLINK_MSG_ID_MISSION_CURRENT = 42; 15 | public static final int MAVLINK_MSG_LENGTH = 2; 16 | private static final long serialVersionUID = MAVLINK_MSG_ID_MISSION_CURRENT; 17 | 18 | 19 | /** 20 | * Sequence 21 | */ 22 | public short seq; 23 | 24 | /** 25 | * Generates the payload for a mavlink message for a message of this type 26 | * @return 27 | */ 28 | public MAVLinkPacket pack(){ 29 | MAVLinkPacket packet = new MAVLinkPacket(); 30 | packet.len = MAVLINK_MSG_LENGTH; 31 | packet.sysid = 255; 32 | packet.compid = 190; 33 | packet.msgid = MAVLINK_MSG_ID_MISSION_CURRENT; 34 | packet.payload.putShort(seq); 35 | return packet; 36 | } 37 | 38 | /** 39 | * Decode a mission_current message into this class fields 40 | * 41 | * @param payload The message to decode 42 | */ 43 | public void unpack(MAVLinkPayload payload) { 44 | payload.resetIndex(); 45 | seq = payload.getShort(); 46 | } 47 | 48 | /** 49 | * Constructor for a new message, just initializes the msgid 50 | */ 51 | public msg_mission_current(){ 52 | msgid = MAVLINK_MSG_ID_MISSION_CURRENT; 53 | } 54 | 55 | /** 56 | * Constructor for a new message, initializes the message with the payload 57 | * from a mavlink packet 58 | * 59 | */ 60 | public msg_mission_current(MAVLinkPacket mavLinkPacket){ 61 | this.sysid = mavLinkPacket.sysid; 62 | this.compid = mavLinkPacket.compid; 63 | this.msgid = MAVLINK_MSG_ID_MISSION_CURRENT; 64 | unpack(mavLinkPacket.payload); 65 | //Log.d("MAVLink", "MISSION_CURRENT"); 66 | //Log.d("MAVLINK_MSG_ID_MISSION_CURRENT", toString()); 67 | } 68 | 69 | 70 | /** 71 | * Returns a string with the MSG name and data 72 | */ 73 | public String toString(){ 74 | return "MAVLINK_MSG_ID_MISSION_CURRENT -"+" seq:"+seq+""; 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/ardupilotmega/msg_mission_item_reached.java: -------------------------------------------------------------------------------- 1 | // MESSAGE MISSION_ITEM_REACHED PACKING 2 | package com.MAVLink.Messages.ardupilotmega; 3 | 4 | import com.MAVLink.Messages.MAVLinkMessage; 5 | import com.MAVLink.Messages.MAVLinkPacket; 6 | import com.MAVLink.Messages.MAVLinkPayload; 7 | //import android.util.Log; 8 | 9 | /** 10 | * A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next MISSION. 11 | */ 12 | public class msg_mission_item_reached extends MAVLinkMessage{ 13 | 14 | public static final int MAVLINK_MSG_ID_MISSION_ITEM_REACHED = 46; 15 | public static final int MAVLINK_MSG_LENGTH = 2; 16 | private static final long serialVersionUID = MAVLINK_MSG_ID_MISSION_ITEM_REACHED; 17 | 18 | 19 | /** 20 | * Sequence 21 | */ 22 | public short seq; 23 | 24 | /** 25 | * Generates the payload for a mavlink message for a message of this type 26 | * @return 27 | */ 28 | public MAVLinkPacket pack(){ 29 | MAVLinkPacket packet = new MAVLinkPacket(); 30 | packet.len = MAVLINK_MSG_LENGTH; 31 | packet.sysid = 255; 32 | packet.compid = 190; 33 | packet.msgid = MAVLINK_MSG_ID_MISSION_ITEM_REACHED; 34 | packet.payload.putShort(seq); 35 | return packet; 36 | } 37 | 38 | /** 39 | * Decode a mission_item_reached message into this class fields 40 | * 41 | * @param payload The message to decode 42 | */ 43 | public void unpack(MAVLinkPayload payload) { 44 | payload.resetIndex(); 45 | seq = payload.getShort(); 46 | } 47 | 48 | /** 49 | * Constructor for a new message, just initializes the msgid 50 | */ 51 | public msg_mission_item_reached(){ 52 | msgid = MAVLINK_MSG_ID_MISSION_ITEM_REACHED; 53 | } 54 | 55 | /** 56 | * Constructor for a new message, initializes the message with the payload 57 | * from a mavlink packet 58 | * 59 | */ 60 | public msg_mission_item_reached(MAVLinkPacket mavLinkPacket){ 61 | this.sysid = mavLinkPacket.sysid; 62 | this.compid = mavLinkPacket.compid; 63 | this.msgid = MAVLINK_MSG_ID_MISSION_ITEM_REACHED; 64 | unpack(mavLinkPacket.payload); 65 | //Log.d("MAVLink", "MISSION_ITEM_REACHED"); 66 | //Log.d("MAVLINK_MSG_ID_MISSION_ITEM_REACHED", toString()); 67 | } 68 | 69 | 70 | /** 71 | * Returns a string with the MSG name and data 72 | */ 73 | public String toString(){ 74 | return "MAVLINK_MSG_ID_MISSION_ITEM_REACHED -"+" seq:"+seq+""; 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/ardupilotmega/msg_param_request_list.java: -------------------------------------------------------------------------------- 1 | // MESSAGE PARAM_REQUEST_LIST PACKING 2 | package com.MAVLink.Messages.ardupilotmega; 3 | 4 | import com.MAVLink.Messages.MAVLinkMessage; 5 | import com.MAVLink.Messages.MAVLinkPacket; 6 | import com.MAVLink.Messages.MAVLinkPayload; 7 | //import android.util.Log; 8 | 9 | /** 10 | * Request all parameters of this component. After his request, all parameters are emitted. 11 | */ 12 | public class msg_param_request_list extends MAVLinkMessage{ 13 | 14 | public static final int MAVLINK_MSG_ID_PARAM_REQUEST_LIST = 21; 15 | public static final int MAVLINK_MSG_LENGTH = 2; 16 | private static final long serialVersionUID = MAVLINK_MSG_ID_PARAM_REQUEST_LIST; 17 | 18 | 19 | /** 20 | * System ID 21 | */ 22 | public byte target_system; 23 | /** 24 | * Component ID 25 | */ 26 | public byte target_component; 27 | 28 | /** 29 | * Generates the payload for a mavlink message for a message of this type 30 | * @return 31 | */ 32 | public MAVLinkPacket pack(){ 33 | MAVLinkPacket packet = new MAVLinkPacket(); 34 | packet.len = MAVLINK_MSG_LENGTH; 35 | packet.sysid = 255; 36 | packet.compid = 190; 37 | packet.msgid = MAVLINK_MSG_ID_PARAM_REQUEST_LIST; 38 | packet.payload.putByte(target_system); 39 | packet.payload.putByte(target_component); 40 | return packet; 41 | } 42 | 43 | /** 44 | * Decode a param_request_list message into this class fields 45 | * 46 | * @param payload The message to decode 47 | */ 48 | public void unpack(MAVLinkPayload payload) { 49 | payload.resetIndex(); 50 | target_system = payload.getByte(); 51 | target_component = payload.getByte(); 52 | } 53 | 54 | /** 55 | * Constructor for a new message, just initializes the msgid 56 | */ 57 | public msg_param_request_list(){ 58 | msgid = MAVLINK_MSG_ID_PARAM_REQUEST_LIST; 59 | } 60 | 61 | /** 62 | * Constructor for a new message, initializes the message with the payload 63 | * from a mavlink packet 64 | * 65 | */ 66 | public msg_param_request_list(MAVLinkPacket mavLinkPacket){ 67 | this.sysid = mavLinkPacket.sysid; 68 | this.compid = mavLinkPacket.compid; 69 | this.msgid = MAVLINK_MSG_ID_PARAM_REQUEST_LIST; 70 | unpack(mavLinkPacket.payload); 71 | //Log.d("MAVLink", "PARAM_REQUEST_LIST"); 72 | //Log.d("MAVLINK_MSG_ID_PARAM_REQUEST_LIST", toString()); 73 | } 74 | 75 | 76 | /** 77 | * Returns a string with the MSG name and data 78 | */ 79 | public String toString(){ 80 | return "MAVLINK_MSG_ID_PARAM_REQUEST_LIST -"+" target_system:"+target_system+" target_component:"+target_component+""; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/ardupilotmega/msg_wind.java: -------------------------------------------------------------------------------- 1 | // MESSAGE WIND PACKING 2 | package com.MAVLink.Messages.ardupilotmega; 3 | 4 | import com.MAVLink.Messages.MAVLinkMessage; 5 | import com.MAVLink.Messages.MAVLinkPacket; 6 | import com.MAVLink.Messages.MAVLinkPayload; 7 | //import android.util.Log; 8 | 9 | /** 10 | * Wind estimation 11 | */ 12 | public class msg_wind extends MAVLinkMessage{ 13 | 14 | public static final int MAVLINK_MSG_ID_WIND = 168; 15 | public static final int MAVLINK_MSG_LENGTH = 12; 16 | private static final long serialVersionUID = MAVLINK_MSG_ID_WIND; 17 | 18 | 19 | /** 20 | * wind direction that wind is coming from (degrees) 21 | */ 22 | public float direction; 23 | /** 24 | * wind speed in ground plane (m/s) 25 | */ 26 | public float speed; 27 | /** 28 | * vertical wind speed (m/s) 29 | */ 30 | public float speed_z; 31 | 32 | /** 33 | * Generates the payload for a mavlink message for a message of this type 34 | * @return 35 | */ 36 | public MAVLinkPacket pack(){ 37 | MAVLinkPacket packet = new MAVLinkPacket(); 38 | packet.len = MAVLINK_MSG_LENGTH; 39 | packet.sysid = 255; 40 | packet.compid = 190; 41 | packet.msgid = MAVLINK_MSG_ID_WIND; 42 | packet.payload.putFloat(direction); 43 | packet.payload.putFloat(speed); 44 | packet.payload.putFloat(speed_z); 45 | return packet; 46 | } 47 | 48 | /** 49 | * Decode a wind message into this class fields 50 | * 51 | * @param payload The message to decode 52 | */ 53 | public void unpack(MAVLinkPayload payload) { 54 | payload.resetIndex(); 55 | direction = payload.getFloat(); 56 | speed = payload.getFloat(); 57 | speed_z = payload.getFloat(); 58 | } 59 | 60 | /** 61 | * Constructor for a new message, just initializes the msgid 62 | */ 63 | public msg_wind(){ 64 | msgid = MAVLINK_MSG_ID_WIND; 65 | } 66 | 67 | /** 68 | * Constructor for a new message, initializes the message with the payload 69 | * from a mavlink packet 70 | * 71 | */ 72 | public msg_wind(MAVLinkPacket mavLinkPacket){ 73 | this.sysid = mavLinkPacket.sysid; 74 | this.compid = mavLinkPacket.compid; 75 | this.msgid = MAVLINK_MSG_ID_WIND; 76 | unpack(mavLinkPacket.payload); 77 | //Log.d("MAVLink", "WIND"); 78 | //Log.d("MAVLINK_MSG_ID_WIND", toString()); 79 | } 80 | 81 | 82 | /** 83 | * Returns a string with the MSG name and data 84 | */ 85 | public String toString(){ 86 | return "MAVLINK_MSG_ID_WIND -"+" direction:"+direction+" speed:"+speed+" speed_z:"+speed_z+""; 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/enums/FENCE_ACTION.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package com.MAVLink.Messages.enums; 4 | 5 | public class FENCE_ACTION { 6 | public static final int FENCE_ACTION_NONE = 0; /* Disable fenced mode | */ 7 | public static final int FENCE_ACTION_GUIDED = 1; /* Switched to guided mode to return point (fence point 0) | */ 8 | public static final int FENCE_ACTION_REPORT = 2; /* Report fence breach, but don't take action | */ 9 | public static final int FENCE_ACTION_ENUM_END = 3; /* | */ 10 | } 11 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/enums/FENCE_BREACH.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package com.MAVLink.Messages.enums; 4 | 5 | public class FENCE_BREACH { 6 | public static final int FENCE_BREACH_NONE = 0; /* No last fence breach | */ 7 | public static final int FENCE_BREACH_MINALT = 1; /* Breached minimum altitude | */ 8 | public static final int FENCE_BREACH_MAXALT = 2; /* Breached minimum altitude | */ 9 | public static final int FENCE_BREACH_BOUNDARY = 3; /* Breached fence boundary | */ 10 | public static final int FENCE_BREACH_ENUM_END = 4; /* | */ 11 | } 12 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/enums/LIMITS_STATE.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package com.MAVLink.Messages.enums; 4 | 5 | public class LIMITS_STATE { 6 | public static final int LIMITS_INIT = 0; /* pre-initialization | */ 7 | public static final int LIMITS_DISABLED = 1; /* disabled | */ 8 | public static final int LIMITS_ENABLED = 2; /* checking limits | */ 9 | public static final int LIMITS_TRIGGERED = 3; /* a limit has been breached | */ 10 | public static final int LIMITS_RECOVERING = 4; /* taking action eg. RTL | */ 11 | public static final int LIMITS_RECOVERED = 5; /* we're no longer in breach of a limit | */ 12 | public static final int LIMITS_STATE_ENUM_END = 6; /* | */ 13 | } 14 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/enums/LIMIT_MODULE.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package com.MAVLink.Messages.enums; 4 | 5 | public class LIMIT_MODULE { 6 | public static final int LIMIT_GPSLOCK = 1; /* pre-initialization | */ 7 | public static final int LIMIT_GEOFENCE = 2; /* disabled | */ 8 | public static final int LIMIT_ALTITUDE = 4; /* checking limits | */ 9 | public static final int LIMIT_MODULE_ENUM_END = 5; /* | */ 10 | } 11 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/enums/MAVLINK_DATA_STREAM_TYPE.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package com.MAVLink.Messages.enums; 4 | 5 | public class MAVLINK_DATA_STREAM_TYPE { 6 | public static final int MAVLINK_DATA_STREAM_IMG_JPEG = 1; /* | */ 7 | public static final int MAVLINK_DATA_STREAM_IMG_BMP = 2; /* | */ 8 | public static final int MAVLINK_DATA_STREAM_IMG_RAW8U = 3; /* | */ 9 | public static final int MAVLINK_DATA_STREAM_IMG_RAW32U = 4; /* | */ 10 | public static final int MAVLINK_DATA_STREAM_IMG_PGM = 5; /* | */ 11 | public static final int MAVLINK_DATA_STREAM_IMG_PNG = 6; /* | */ 12 | public static final int MAVLINK_DATA_STREAM_TYPE_ENUM_END = 7; /* | */ 13 | } 14 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/enums/MAV_AUTOPILOT.java: -------------------------------------------------------------------------------- 1 | /** Micro air vehicle / autopilot classes. This identifies the individual model. 2 | */ 3 | package com.MAVLink.Messages.enums; 4 | 5 | public class MAV_AUTOPILOT { 6 | public static final int MAV_AUTOPILOT_GENERIC = 0; /* Generic autopilot, full support for everything | */ 7 | public static final int MAV_AUTOPILOT_PIXHAWK = 1; /* PIXHAWK autopilot, http://pixhawk.ethz.ch | */ 8 | public static final int MAV_AUTOPILOT_SLUGS = 2; /* SLUGS autopilot, http://slugsuav.soe.ucsc.edu | */ 9 | public static final int MAV_AUTOPILOT_ARDUPILOTMEGA = 3; /* ArduPilotMega / ArduCopter, http://diydrones.com | */ 10 | public static final int MAV_AUTOPILOT_OPENPILOT = 4; /* OpenPilot, http://openpilot.org | */ 11 | public static final int MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5; /* Generic autopilot only supporting simple waypoints | */ 12 | public static final int MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6; /* Generic autopilot supporting waypoints and other simple navigation commands | */ 13 | public static final int MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7; /* Generic autopilot supporting the full mission command set | */ 14 | public static final int MAV_AUTOPILOT_INVALID = 8; /* No valid autopilot, e.g. a GCS or other MAVLink component | */ 15 | public static final int MAV_AUTOPILOT_PPZ = 9; /* PPZ UAV - http://nongnu.org/paparazzi | */ 16 | public static final int MAV_AUTOPILOT_UDB = 10; /* UAV Dev Board | */ 17 | public static final int MAV_AUTOPILOT_FP = 11; /* FlexiPilot | */ 18 | public static final int MAV_AUTOPILOT_PX4 = 12; /* PX4 Autopilot - http://pixhawk.ethz.ch/px4/ | */ 19 | public static final int MAV_AUTOPILOT_SMACCMPILOT = 13; /* SMACCMPilot - http://smaccmpilot.org | */ 20 | public static final int MAV_AUTOPILOT_AUTOQUAD = 14; /* AutoQuad -- http://autoquad.org | */ 21 | public static final int MAV_AUTOPILOT_ARMAZILA = 15; /* Armazila -- http://armazila.com | */ 22 | public static final int MAV_AUTOPILOT_AEROB = 16; /* Aerob -- http://aerob.ru | */ 23 | public static final int MAV_AUTOPILOT_ENUM_END = 17; /* | */ 24 | } 25 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/enums/MAV_CMD_ACK.java: -------------------------------------------------------------------------------- 1 | /** ACK / NACK / ERROR values as a result of MAV_CMDs and for mission item transmission. 2 | */ 3 | package com.MAVLink.Messages.enums; 4 | 5 | public class MAV_CMD_ACK { 6 | public static final int MAV_CMD_ACK_OK = 1; /* Command / mission item is ok. | */ 7 | public static final int MAV_CMD_ACK_ERR_FAIL = 2; /* Generic error message if none of the other reasons fails or if no detailed error reporting is implemented. | */ 8 | public static final int MAV_CMD_ACK_ERR_ACCESS_DENIED = 3; /* The system is refusing to accept this command from this source / communication partner. | */ 9 | public static final int MAV_CMD_ACK_ERR_NOT_SUPPORTED = 4; /* Command or mission item is not supported, other commands would be accepted. | */ 10 | public static final int MAV_CMD_ACK_ERR_COORDINATE_FRAME_NOT_SUPPORTED = 5; /* The coordinate frame of this command / mission item is not supported. | */ 11 | public static final int MAV_CMD_ACK_ERR_COORDINATES_OUT_OF_RANGE = 6; /* The coordinate frame of this command is ok, but he coordinate values exceed the safety limits of this system. This is a generic error, please use the more specific error messages below if possible. | */ 12 | public static final int MAV_CMD_ACK_ERR_X_LAT_OUT_OF_RANGE = 7; /* The X or latitude value is out of range. | */ 13 | public static final int MAV_CMD_ACK_ERR_Y_LON_OUT_OF_RANGE = 8; /* The Y or longitude value is out of range. | */ 14 | public static final int MAV_CMD_ACK_ERR_Z_ALT_OUT_OF_RANGE = 9; /* The Z or altitude value is out of range. | */ 15 | public static final int MAV_CMD_ACK_ENUM_END = 10; /* | */ 16 | } 17 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/enums/MAV_COMPONENT.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package com.MAVLink.Messages.enums; 4 | 5 | public class MAV_COMPONENT { 6 | public static final int MAV_COMP_ID_ALL = 0; /* | */ 7 | public static final int MAV_COMP_ID_CAMERA = 100; /* | */ 8 | public static final int MAV_COMP_ID_SERVO1 = 140; /* | */ 9 | public static final int MAV_COMP_ID_SERVO2 = 141; /* | */ 10 | public static final int MAV_COMP_ID_SERVO3 = 142; /* | */ 11 | public static final int MAV_COMP_ID_SERVO4 = 143; /* | */ 12 | public static final int MAV_COMP_ID_SERVO5 = 144; /* | */ 13 | public static final int MAV_COMP_ID_SERVO6 = 145; /* | */ 14 | public static final int MAV_COMP_ID_SERVO7 = 146; /* | */ 15 | public static final int MAV_COMP_ID_SERVO8 = 147; /* | */ 16 | public static final int MAV_COMP_ID_SERVO9 = 148; /* | */ 17 | public static final int MAV_COMP_ID_SERVO10 = 149; /* | */ 18 | public static final int MAV_COMP_ID_SERVO11 = 150; /* | */ 19 | public static final int MAV_COMP_ID_SERVO12 = 151; /* | */ 20 | public static final int MAV_COMP_ID_SERVO13 = 152; /* | */ 21 | public static final int MAV_COMP_ID_SERVO14 = 153; /* | */ 22 | public static final int MAV_COMP_ID_MAPPER = 180; /* | */ 23 | public static final int MAV_COMP_ID_MISSIONPLANNER = 190; /* | */ 24 | public static final int MAV_COMP_ID_PATHPLANNER = 195; /* | */ 25 | public static final int MAV_COMP_ID_IMU = 200; /* | */ 26 | public static final int MAV_COMP_ID_IMU_2 = 201; /* | */ 27 | public static final int MAV_COMP_ID_IMU_3 = 202; /* | */ 28 | public static final int MAV_COMP_ID_GPS = 220; /* | */ 29 | public static final int MAV_COMP_ID_UDP_BRIDGE = 240; /* | */ 30 | public static final int MAV_COMP_ID_UART_BRIDGE = 241; /* | */ 31 | public static final int MAV_COMP_ID_SYSTEM_CONTROL = 250; /* | */ 32 | public static final int MAV_COMPONENT_ENUM_END = 251; /* | */ 33 | } 34 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/enums/MAV_DATA_STREAM.java: -------------------------------------------------------------------------------- 1 | /** Data stream IDs. A data stream is not a fixed set of messages, but rather a 2 | recommendation to the autopilot software. Individual autopilots may or may not obey 3 | the recommended messages. 4 | */ 5 | package com.MAVLink.Messages.enums; 6 | 7 | public class MAV_DATA_STREAM { 8 | public static final int MAV_DATA_STREAM_ALL = 0; /* Enable all data streams | */ 9 | public static final int MAV_DATA_STREAM_RAW_SENSORS = 1; /* Enable IMU_RAW, GPS_RAW, GPS_STATUS packets. | */ 10 | public static final int MAV_DATA_STREAM_EXTENDED_STATUS = 2; /* Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS | */ 11 | public static final int MAV_DATA_STREAM_RC_CHANNELS = 3; /* Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW | */ 12 | public static final int MAV_DATA_STREAM_RAW_CONTROLLER = 4; /* Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT. | */ 13 | public static final int MAV_DATA_STREAM_POSITION = 6; /* Enable LOCAL_POSITION, GLOBAL_POSITION/GLOBAL_POSITION_INT messages. | */ 14 | public static final int MAV_DATA_STREAM_EXTRA1 = 10; /* Dependent on the autopilot | */ 15 | public static final int MAV_DATA_STREAM_EXTRA2 = 11; /* Dependent on the autopilot | */ 16 | public static final int MAV_DATA_STREAM_EXTRA3 = 12; /* Dependent on the autopilot | */ 17 | public static final int MAV_DATA_STREAM_ENUM_END = 13; /* | */ 18 | } 19 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/enums/MAV_FRAME.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package com.MAVLink.Messages.enums; 4 | 5 | public class MAV_FRAME { 6 | public static final int MAV_FRAME_GLOBAL = 0; /* Global coordinate frame, WGS84 coordinate system. First value / x: latitude, second value / y: longitude, third value / z: positive altitude over mean sea level (MSL) | */ 7 | public static final int MAV_FRAME_LOCAL_NED = 1; /* Local coordinate frame, Z-up (x: north, y: east, z: down). | */ 8 | public static final int MAV_FRAME_MISSION = 2; /* NOT a coordinate frame, indicates a mission command. | */ 9 | public static final int MAV_FRAME_GLOBAL_RELATIVE_ALT = 3; /* Global coordinate frame, WGS84 coordinate system, relative altitude over ground with respect to the home position. First value / x: latitude, second value / y: longitude, third value / z: positive altitude with 0 being at the altitude of the home location. | */ 10 | public static final int MAV_FRAME_LOCAL_ENU = 4; /* Local coordinate frame, Z-down (x: east, y: north, z: up) | */ 11 | public static final int MAV_FRAME_ENUM_END = 5; /* | */ 12 | } 13 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/enums/MAV_GOTO.java: -------------------------------------------------------------------------------- 1 | /** Override command, pauses current mission execution and moves immediately to a position 2 | */ 3 | package com.MAVLink.Messages.enums; 4 | 5 | public class MAV_GOTO { 6 | public static final int MAV_GOTO_DO_HOLD = 0; /* Hold at the current position. | */ 7 | public static final int MAV_GOTO_DO_CONTINUE = 1; /* Continue with the next item in mission execution. | */ 8 | public static final int MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2; /* Hold at the current position of the system | */ 9 | public static final int MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3; /* Hold at the position specified in the parameters of the DO_HOLD action | */ 10 | public static final int MAV_GOTO_ENUM_END = 4; /* | */ 11 | } 12 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/enums/MAV_MISSION_RESULT.java: -------------------------------------------------------------------------------- 1 | /** result in a mavlink mission ack 2 | */ 3 | package com.MAVLink.Messages.enums; 4 | 5 | public class MAV_MISSION_RESULT { 6 | public static final int MAV_MISSION_ACCEPTED = 0; /* mission accepted OK | */ 7 | public static final int MAV_MISSION_ERROR = 1; /* generic error / not accepting mission commands at all right now | */ 8 | public static final int MAV_MISSION_UNSUPPORTED_FRAME = 2; /* coordinate frame is not supported | */ 9 | public static final int MAV_MISSION_UNSUPPORTED = 3; /* command is not supported | */ 10 | public static final int MAV_MISSION_NO_SPACE = 4; /* mission item exceeds storage space | */ 11 | public static final int MAV_MISSION_INVALID = 5; /* one of the parameters has an invalid value | */ 12 | public static final int MAV_MISSION_INVALID_PARAM1 = 6; /* param1 has an invalid value | */ 13 | public static final int MAV_MISSION_INVALID_PARAM2 = 7; /* param2 has an invalid value | */ 14 | public static final int MAV_MISSION_INVALID_PARAM3 = 8; /* param3 has an invalid value | */ 15 | public static final int MAV_MISSION_INVALID_PARAM4 = 9; /* param4 has an invalid value | */ 16 | public static final int MAV_MISSION_INVALID_PARAM5_X = 10; /* x/param5 has an invalid value | */ 17 | public static final int MAV_MISSION_INVALID_PARAM6_Y = 11; /* y/param6 has an invalid value | */ 18 | public static final int MAV_MISSION_INVALID_PARAM7 = 12; /* param7 has an invalid value | */ 19 | public static final int MAV_MISSION_INVALID_SEQUENCE = 13; /* received waypoint out of sequence | */ 20 | public static final int MAV_MISSION_DENIED = 14; /* not accepting any mission commands from this communication partner | */ 21 | public static final int MAV_MISSION_RESULT_ENUM_END = 15; /* | */ 22 | } 23 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/enums/MAV_MODE.java: -------------------------------------------------------------------------------- 1 | /** These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it 2 | simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override. 3 | */ 4 | package com.MAVLink.Messages.enums; 5 | 6 | public class MAV_MODE { 7 | public static final int MAV_MODE_PREFLIGHT = 0; /* System is not ready to fly, booting, calibrating, etc. No flag is set. | */ 8 | public static final int MAV_MODE_MANUAL_DISARMED = 64; /* System is allowed to be active, under manual (RC) control, no stabilization | */ 9 | public static final int MAV_MODE_TEST_DISARMED = 66; /* UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only. | */ 10 | public static final int MAV_MODE_STABILIZE_DISARMED = 80; /* System is allowed to be active, under assisted RC control. | */ 11 | public static final int MAV_MODE_GUIDED_DISARMED = 88; /* System is allowed to be active, under autonomous control, manual setpoint | */ 12 | public static final int MAV_MODE_AUTO_DISARMED = 92; /* System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by MISSIONs) | */ 13 | public static final int MAV_MODE_MANUAL_ARMED = 192; /* System is allowed to be active, under manual (RC) control, no stabilization | */ 14 | public static final int MAV_MODE_TEST_ARMED = 194; /* UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only. | */ 15 | public static final int MAV_MODE_STABILIZE_ARMED = 208; /* System is allowed to be active, under assisted RC control. | */ 16 | public static final int MAV_MODE_GUIDED_ARMED = 216; /* System is allowed to be active, under autonomous control, manual setpoint | */ 17 | public static final int MAV_MODE_AUTO_ARMED = 220; /* System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by MISSIONs) | */ 18 | public static final int MAV_MODE_ENUM_END = 221; /* | */ 19 | } 20 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/enums/MAV_MODE_FLAG.java: -------------------------------------------------------------------------------- 1 | /** These flags encode the MAV mode. 2 | */ 3 | package com.MAVLink.Messages.enums; 4 | 5 | public class MAV_MODE_FLAG { 6 | public static final int MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1; /* 0b00000001 Reserved for future use. | */ 7 | public static final int MAV_MODE_FLAG_TEST_ENABLED = 2; /* 0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations. | */ 8 | public static final int MAV_MODE_FLAG_AUTO_ENABLED = 4; /* 0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation. | */ 9 | public static final int MAV_MODE_FLAG_GUIDED_ENABLED = 8; /* 0b00001000 guided mode enabled, system flies MISSIONs / mission items. | */ 10 | public static final int MAV_MODE_FLAG_STABILIZE_ENABLED = 16; /* 0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around. | */ 11 | public static final int MAV_MODE_FLAG_HIL_ENABLED = 32; /* 0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational. | */ 12 | public static final int MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64; /* 0b01000000 remote control input is enabled. | */ 13 | public static final int MAV_MODE_FLAG_SAFETY_ARMED = 128; /* 0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. | */ 14 | public static final int MAV_MODE_FLAG_ENUM_END = 129; /* | */ 15 | } 16 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/enums/MAV_MODE_FLAG_DECODE_POSITION.java: -------------------------------------------------------------------------------- 1 | /** These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not. 2 | */ 3 | package com.MAVLink.Messages.enums; 4 | 5 | public class MAV_MODE_FLAG_DECODE_POSITION { 6 | public static final int MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1; /* Eighth bit: 00000001 | */ 7 | public static final int MAV_MODE_FLAG_DECODE_POSITION_TEST = 2; /* Seventh bit: 00000010 | */ 8 | public static final int MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4; /* Sixt bit: 00000100 | */ 9 | public static final int MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8; /* Fifth bit: 00001000 | */ 10 | public static final int MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16; /* Fourth bit: 00010000 | */ 11 | public static final int MAV_MODE_FLAG_DECODE_POSITION_HIL = 32; /* Third bit: 00100000 | */ 12 | public static final int MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64; /* Second bit: 01000000 | */ 13 | public static final int MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128; /* First bit: 10000000 | */ 14 | public static final int MAV_MODE_FLAG_DECODE_POSITION_ENUM_END = 129; /* | */ 15 | } 16 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/enums/MAV_MOUNT_MODE.java: -------------------------------------------------------------------------------- 1 | /** Enumeration of possible mount operation modes 2 | */ 3 | package com.MAVLink.Messages.enums; 4 | 5 | public class MAV_MOUNT_MODE { 6 | public static final int MAV_MOUNT_MODE_RETRACT = 0; /* Load and keep safe position (Roll,Pitch,Yaw) from EEPROM and stop stabilization | */ 7 | public static final int MAV_MOUNT_MODE_NEUTRAL = 1; /* Load and keep neutral position (Roll,Pitch,Yaw) from EEPROM. | */ 8 | public static final int MAV_MOUNT_MODE_MAVLINK_TARGETING = 2; /* Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization | */ 9 | public static final int MAV_MOUNT_MODE_RC_TARGETING = 3; /* Load neutral position and start RC Roll,Pitch,Yaw control with stabilization | */ 10 | public static final int MAV_MOUNT_MODE_GPS_POINT = 4; /* Load neutral position and start to point to Lat,Lon,Alt | */ 11 | public static final int MAV_MOUNT_MODE_ENUM_END = 5; /* | */ 12 | } 13 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/enums/MAV_PARAM_TYPE.java: -------------------------------------------------------------------------------- 1 | /** Specifies the datatype of a MAVLink parameter. 2 | */ 3 | package com.MAVLink.Messages.enums; 4 | 5 | public class MAV_PARAM_TYPE { 6 | public static final int MAV_PARAM_TYPE_UINT8 = 1; /* 8-bit unsigned integer | */ 7 | public static final int MAV_PARAM_TYPE_INT8 = 2; /* 8-bit signed integer | */ 8 | public static final int MAV_PARAM_TYPE_UINT16 = 3; /* 16-bit unsigned integer | */ 9 | public static final int MAV_PARAM_TYPE_INT16 = 4; /* 16-bit signed integer | */ 10 | public static final int MAV_PARAM_TYPE_UINT32 = 5; /* 32-bit unsigned integer | */ 11 | public static final int MAV_PARAM_TYPE_INT32 = 6; /* 32-bit signed integer | */ 12 | public static final int MAV_PARAM_TYPE_UINT64 = 7; /* 64-bit unsigned integer | */ 13 | public static final int MAV_PARAM_TYPE_INT64 = 8; /* 64-bit signed integer | */ 14 | public static final int MAV_PARAM_TYPE_REAL32 = 9; /* 32-bit floating-point | */ 15 | public static final int MAV_PARAM_TYPE_REAL64 = 10; /* 64-bit floating-point | */ 16 | public static final int MAV_PARAM_TYPE_ENUM_END = 11; /* | */ 17 | } 18 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/enums/MAV_POWER_STATUS.java: -------------------------------------------------------------------------------- 1 | /** Power supply status flags (bitmask) 2 | */ 3 | package com.MAVLink.Messages.enums; 4 | 5 | public class MAV_POWER_STATUS { 6 | public static final int MAV_POWER_STATUS_BRICK_VALID = 1; /* main brick power supply valid | */ 7 | public static final int MAV_POWER_STATUS_SERVO_VALID = 2; /* main servo power supply valid for FMU | */ 8 | public static final int MAV_POWER_STATUS_USB_CONNECTED = 4; /* USB power is connected | */ 9 | public static final int MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8; /* peripheral supply is in over-current state | */ 10 | public static final int MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16; /* hi-power peripheral supply is in over-current state | */ 11 | public static final int MAV_POWER_STATUS_CHANGED = 32; /* Power status has changed since boot | */ 12 | public static final int MAV_POWER_STATUS_ENUM_END = 33; /* | */ 13 | } 14 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/enums/MAV_RESULT.java: -------------------------------------------------------------------------------- 1 | /** result from a mavlink command 2 | */ 3 | package com.MAVLink.Messages.enums; 4 | 5 | public class MAV_RESULT { 6 | public static final int MAV_RESULT_ACCEPTED = 0; /* Command ACCEPTED and EXECUTED | */ 7 | public static final int MAV_RESULT_TEMPORARILY_REJECTED = 1; /* Command TEMPORARY REJECTED/DENIED | */ 8 | public static final int MAV_RESULT_DENIED = 2; /* Command PERMANENTLY DENIED | */ 9 | public static final int MAV_RESULT_UNSUPPORTED = 3; /* Command UNKNOWN/UNSUPPORTED | */ 10 | public static final int MAV_RESULT_FAILED = 4; /* Command executed, but failed | */ 11 | public static final int MAV_RESULT_ENUM_END = 5; /* | */ 12 | } 13 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/enums/MAV_ROI.java: -------------------------------------------------------------------------------- 1 | /** The ROI (region of interest) for the vehicle. This can be 2 | be used by the vehicle for camera/vehicle attitude alignment (see 3 | MAV_CMD_NAV_ROI). 4 | */ 5 | package com.MAVLink.Messages.enums; 6 | 7 | public class MAV_ROI { 8 | public static final int MAV_ROI_NONE = 0; /* No region of interest. | */ 9 | public static final int MAV_ROI_WPNEXT = 1; /* Point toward next MISSION. | */ 10 | public static final int MAV_ROI_WPINDEX = 2; /* Point toward given MISSION. | */ 11 | public static final int MAV_ROI_LOCATION = 3; /* Point toward fixed location. | */ 12 | public static final int MAV_ROI_TARGET = 4; /* Point toward of given id. | */ 13 | public static final int MAV_ROI_ENUM_END = 5; /* | */ 14 | } 15 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/enums/MAV_SEVERITY.java: -------------------------------------------------------------------------------- 1 | /** Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: http://www.kiwisyslog.com/kb/info:-syslog-message-levels/. 2 | */ 3 | package com.MAVLink.Messages.enums; 4 | 5 | public class MAV_SEVERITY { 6 | public static final int MAV_SEVERITY_EMERGENCY = 0; /* System is unusable. This is a "panic" condition. | */ 7 | public static final int MAV_SEVERITY_ALERT = 1; /* Action should be taken immediately. Indicates error in non-critical systems. | */ 8 | public static final int MAV_SEVERITY_CRITICAL = 2; /* Action must be taken immediately. Indicates failure in a primary system. | */ 9 | public static final int MAV_SEVERITY_ERROR = 3; /* Indicates an error in secondary/redundant systems. | */ 10 | public static final int MAV_SEVERITY_WARNING = 4; /* Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning. | */ 11 | public static final int MAV_SEVERITY_NOTICE = 5; /* An unusual event has occured, though not an error condition. This should be investigated for the root cause. | */ 12 | public static final int MAV_SEVERITY_INFO = 6; /* Normal operational messages. Useful for logging. No action is required for these messages. | */ 13 | public static final int MAV_SEVERITY_DEBUG = 7; /* Useful non-operational messages that can assist in debugging. These should not occur during normal operation. | */ 14 | public static final int MAV_SEVERITY_ENUM_END = 8; /* | */ 15 | } 16 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/enums/MAV_STATE.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package com.MAVLink.Messages.enums; 4 | 5 | public class MAV_STATE { 6 | public static final int MAV_STATE_UNINIT = 0; /* Uninitialized system, state is unknown. | */ 7 | public static final int MAV_STATE_BOOT = 1; /* System is booting up. | */ 8 | public static final int MAV_STATE_CALIBRATING = 2; /* System is calibrating and not flight-ready. | */ 9 | public static final int MAV_STATE_STANDBY = 3; /* System is grounded and on standby. It can be launched any time. | */ 10 | public static final int MAV_STATE_ACTIVE = 4; /* System is active and might be already airborne. Motors are engaged. | */ 11 | public static final int MAV_STATE_CRITICAL = 5; /* System is in a non-normal flight mode. It can however still navigate. | */ 12 | public static final int MAV_STATE_EMERGENCY = 6; /* System is in a non-normal flight mode. It lost control over parts or over the whole airframe. It is in mayday and going down. | */ 13 | public static final int MAV_STATE_POWEROFF = 7; /* System just initialized its power-down sequence, will shut down now. | */ 14 | public static final int MAV_STATE_ENUM_END = 8; /* | */ 15 | } 16 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/enums/MAV_SYS_STATUS_SENSOR.java: -------------------------------------------------------------------------------- 1 | /** These encode the sensors whose status is sent as part of the SYS_STATUS message. 2 | */ 3 | package com.MAVLink.Messages.enums; 4 | 5 | public class MAV_SYS_STATUS_SENSOR { 6 | public static final int MAV_SYS_STATUS_SENSOR_3D_GYRO = 1; /* 0x01 3D gyro | */ 7 | public static final int MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2; /* 0x02 3D accelerometer | */ 8 | public static final int MAV_SYS_STATUS_SENSOR_3D_MAG = 4; /* 0x04 3D magnetometer | */ 9 | public static final int MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8; /* 0x08 absolute pressure | */ 10 | public static final int MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16; /* 0x10 differential pressure | */ 11 | public static final int MAV_SYS_STATUS_SENSOR_GPS = 32; /* 0x20 GPS | */ 12 | public static final int MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64; /* 0x40 optical flow | */ 13 | public static final int MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128; /* 0x80 computer vision position | */ 14 | public static final int MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256; /* 0x100 laser based position | */ 15 | public static final int MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512; /* 0x200 external ground truth (Vicon or Leica) | */ 16 | public static final int MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024; /* 0x400 3D angular rate control | */ 17 | public static final int MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048; /* 0x800 attitude stabilization | */ 18 | public static final int MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096; /* 0x1000 yaw position | */ 19 | public static final int MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192; /* 0x2000 z/altitude control | */ 20 | public static final int MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384; /* 0x4000 x/y position control | */ 21 | public static final int MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768; /* 0x8000 motor outputs / control | */ 22 | public static final int MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536; /* 0x10000 rc receiver | */ 23 | public static final int MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072; /* 0x20000 2nd 3D gyro | */ 24 | public static final int MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144; /* 0x40000 2nd 3D accelerometer | */ 25 | public static final int MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288; /* 0x80000 2nd 3D magnetometer | */ 26 | public static final int MAV_SYS_STATUS_GEOFENCE = 1048576; /* 0x100000 geofence | */ 27 | public static final int MAV_SYS_STATUS_SENSOR_ENUM_END = 1048577; /* | */ 28 | } 29 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/enums/MAV_TYPE.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package com.MAVLink.Messages.enums; 4 | 5 | public class MAV_TYPE { 6 | public static final int MAV_TYPE_GENERIC = 0; /* Generic micro air vehicle. | */ 7 | public static final int MAV_TYPE_FIXED_WING = 1; /* Fixed wing aircraft. | */ 8 | public static final int MAV_TYPE_QUADROTOR = 2; /* Quadrotor | */ 9 | public static final int MAV_TYPE_COAXIAL = 3; /* Coaxial helicopter | */ 10 | public static final int MAV_TYPE_HELICOPTER = 4; /* Normal helicopter with tail rotor. | */ 11 | public static final int MAV_TYPE_ANTENNA_TRACKER = 5; /* Ground installation | */ 12 | public static final int MAV_TYPE_GCS = 6; /* Operator control unit / ground control station | */ 13 | public static final int MAV_TYPE_AIRSHIP = 7; /* Airship, controlled | */ 14 | public static final int MAV_TYPE_FREE_BALLOON = 8; /* Free balloon, uncontrolled | */ 15 | public static final int MAV_TYPE_ROCKET = 9; /* Rocket | */ 16 | public static final int MAV_TYPE_GROUND_ROVER = 10; /* Ground rover | */ 17 | public static final int MAV_TYPE_SURFACE_BOAT = 11; /* Surface vessel, boat, ship | */ 18 | public static final int MAV_TYPE_SUBMARINE = 12; /* Submarine | */ 19 | public static final int MAV_TYPE_HEXAROTOR = 13; /* Hexarotor | */ 20 | public static final int MAV_TYPE_OCTOROTOR = 14; /* Octorotor | */ 21 | public static final int MAV_TYPE_TRICOPTER = 15; /* Octorotor | */ 22 | public static final int MAV_TYPE_FLAPPING_WING = 16; /* Flapping wing | */ 23 | public static final int MAV_TYPE_KITE = 17; /* Flapping wing | */ 24 | public static final int MAV_TYPE_ONBOARD_CONTROLLER = 18; /* Onboard companion controller | */ 25 | public static final int MAV_TYPE_ENUM_END = 19; /* | */ 26 | } 27 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/enums/SERIAL_CONTROL_DEV.java: -------------------------------------------------------------------------------- 1 | /** SERIAL_CONTROL device types 2 | */ 3 | package com.MAVLink.Messages.enums; 4 | 5 | public class SERIAL_CONTROL_DEV { 6 | public static final int SERIAL_CONTROL_DEV_TELEM1 = 0; /* First telemetry port | */ 7 | public static final int SERIAL_CONTROL_DEV_TELEM2 = 1; /* Second telemetry port | */ 8 | public static final int SERIAL_CONTROL_DEV_GPS1 = 2; /* First GPS port | */ 9 | public static final int SERIAL_CONTROL_DEV_GPS2 = 3; /* Second GPS port | */ 10 | public static final int SERIAL_CONTROL_DEV_ENUM_END = 4; /* | */ 11 | } 12 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/Mavlink/src/com/MAVLink/Messages/enums/SERIAL_CONTROL_FLAG.java: -------------------------------------------------------------------------------- 1 | /** SERIAL_CONTROL flags (bitmask) 2 | */ 3 | package com.MAVLink.Messages.enums; 4 | 5 | public class SERIAL_CONTROL_FLAG { 6 | public static final int SERIAL_CONTROL_FLAG_REPLY = 1; /* Set if this is a reply | */ 7 | public static final int SERIAL_CONTROL_FLAG_RESPOND = 2; /* Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message | */ 8 | public static final int SERIAL_CONTROL_FLAG_EXCLUSIVE = 4; /* Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set | */ 9 | public static final int SERIAL_CONTROL_FLAG_BLOCKING = 8; /* Block on writes to the serial port | */ 10 | public static final int SERIAL_CONTROL_FLAG_MULTI = 16; /* Send multiple replies until port is drained | */ 11 | public static final int SERIAL_CONTROL_FLAG_ENUM_END = 17; /* | */ 12 | } 13 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/TangoNodes/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Brandon Blodget. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | /* 18 | Examples of 19 | 1) dependencies from another project in this gradle stack. 20 | 2,3) open ranged dependencies from a maven repository. 21 | 22 | It's a good idea to restrict the open ranged dependency to 23 | the patch version to avoid breakages due to api changes 24 | which usually occur on minor and major version numbers. 25 | */ 26 | /* 27 | dependencies { 28 | compile project(':local_android_library_dependency') 29 | compile 'org.ros.android_core:android_gingerbread_mr1:[0.1,)' 30 | compile 'com.github.rosjava.android_extras:gingerbread:[0.1,0.2)' 31 | } 32 | */ 33 | 34 | repositories { 35 | maven { 36 | url 'https://github.com/rosjava/rosjava_mvn_repo/raw/master' 37 | } 38 | mavenCentral() 39 | } 40 | 41 | dependencies { 42 | //compile project(':local_android_library_dependency') 43 | compile 'org.ros.android_core:android_gingerbread_mr1:[0.1,0.2)' 44 | compile 'org.ros.android_core:android_honeycomb_mr2:[0.1,0.2)' 45 | compile 'com.github.rosjava.android_extras:gingerbread:[0.1,0.2)' 46 | compile files ('libs/androidvioclient.jar') 47 | } 48 | 49 | 50 | apply plugin: 'android-library' 51 | 52 | android { 53 | packagingOptions { 54 | /* https://github.com/rosjava/android_core/issues/194 */ 55 | exclude 'META-INF/LICENSE.txt' 56 | exclude 'META-INF/NOTICE.txt' 57 | } 58 | compileSdkVersion 18 59 | } 60 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/TangoNodes/libs/androidvioclient.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ologic/Tango/938c38f70dd289a91ade9fad2fa0846cbf5bf911/ROSTango/src/rostango/TangoNodes/libs/androidvioclient.jar -------------------------------------------------------------------------------- /ROSTango/src/rostango/TangoNodes/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/TangoNodes/src/main/java/com/ologicinc/rostango/TangoNodes/depth/RawImageListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 OLogic, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.ologicinc.rostango.TangoNodes.depth; 18 | 19 | /** 20 | * Created by Rohan Agrawal on 7/3/14. 21 | */ 22 | 23 | interface RawImageListener { 24 | void onNewRawImage(int[] data, int width, int height); 25 | } 26 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/TangoNodes/src/main/java/com/ologicinc/rostango/TangoNodes/depth/RosDepthViewSurface.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 OLogic, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.ologicinc.rostango.TangoNodes.depth; 18 | 19 | import android.content.Context; 20 | import android.util.AttributeSet; 21 | 22 | import org.ros.namespace.GraphName; 23 | import org.ros.node.ConnectedNode; 24 | import org.ros.node.Node; 25 | import org.ros.node.NodeMain; 26 | 27 | /** 28 | * Created by Rohan Agrawal on 7/3/14. 29 | */ 30 | public class RosDepthViewSurface extends DepthViewSurface implements NodeMain{ 31 | public RosDepthViewSurface(Context context) { 32 | super(context); 33 | } 34 | 35 | public RosDepthViewSurface(Context context, AttributeSet attrs) { 36 | super(context, attrs); 37 | } 38 | 39 | @Override 40 | public GraphName getDefaultNodeName() { 41 | return GraphName.of("ros_depth_preview_view"); 42 | } 43 | 44 | @Override 45 | public void onStart(ConnectedNode connectedNode) { 46 | setRawImageListener(new DepthPublisher(connectedNode)); 47 | } 48 | 49 | @Override 50 | public void onShutdown(Node node) { 51 | } 52 | 53 | @Override 54 | public void onShutdownComplete(Node node) { 55 | } 56 | 57 | @Override 58 | public void onError(Node node, Throwable throwable) { 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/TangoNodes/src/main/java/com/ologicinc/rostango/TangoNodes/vio/TangoPosePublisher.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 OLogic, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.ologicinc.rostango.TangoNodes.vio; 18 | 19 | import org.ros.message.Time; 20 | import org.ros.node.ConnectedNode; 21 | import org.ros.node.topic.Publisher; 22 | 23 | import geometry_msgs.Point; 24 | import geometry_msgs.PoseStamped; 25 | import geometry_msgs.Quaternion; 26 | 27 | /** 28 | * Created by Rohan Agrawal on 6/18/14. 29 | */ 30 | class TangoPosePublisher{ 31 | private PoseStamped pose; 32 | private Publisher publisher; 33 | 34 | public TangoPosePublisher(ConnectedNode connectedNode){ 35 | pose = connectedNode.getTopicMessageFactory().newFromType(PoseStamped._TYPE); 36 | publisher = connectedNode.newPublisher("/tango_pose", PoseStamped._TYPE); 37 | } 38 | 39 | public void setQuat(double x, double y, double z, double w) { 40 | Quaternion q = pose.getPose().getOrientation(); 41 | q.setW(w); 42 | q.setX(x); 43 | q.setY(y); 44 | q.setZ(z); 45 | pose.getPose().setOrientation(q); 46 | } 47 | 48 | public void setPoint(double x, double y, double z) { 49 | Point p = pose.getPose().getPosition(); 50 | p.setX(x); 51 | p.setY(y); 52 | p.setZ(z); 53 | pose.getPose().setPosition(p); 54 | } 55 | 56 | public void publishPose(){ 57 | long lt = System.currentTimeMillis(); 58 | Time t = new Time((int) (lt / 1e3), (int) ((lt % 1e3) * 1e6)); 59 | pose.getHeader().setStamp(t); 60 | pose.getHeader().setFrameId("/global"); 61 | publisher.publish(pose); 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/TangoNodes/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ologic/Tango/938c38f70dd289a91ade9fad2fa0846cbf5bf911/ROSTango/src/rostango/TangoNodes/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /ROSTango/src/rostango/TangoNodes/src/main/res/drawable-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ologic/Tango/938c38f70dd289a91ade9fad2fa0846cbf5bf911/ROSTango/src/rostango/TangoNodes/src/main/res/drawable-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /ROSTango/src/rostango/TangoNodes/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ologic/Tango/938c38f70dd289a91ade9fad2fa0846cbf5bf911/ROSTango/src/rostango/TangoNodes/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /ROSTango/src/rostango/TangoNodes/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ologic/Tango/938c38f70dd289a91ade9fad2fa0846cbf5bf911/ROSTango/src/rostango/TangoNodes/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ROSTango/src/rostango/TangoNodes/src/main/res/layout/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/TangoNodes/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ACTIVITY_ENTRY_NAME 4 | 5 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Brandon Blodget 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | task wrapper(type: Wrapper) { 18 | gradleVersion = '1.12' 19 | } 20 | 21 | buildscript { 22 | def rosMavenPath = "$System.env.ROS_MAVEN_PATH".split(':').collect { 'file://' + it } 23 | def rosMavenRepository = "$System.env.ROS_MAVEN_REPOSITORY" 24 | repositories { 25 | rosMavenPath.each { p -> 26 | maven { 27 | url p 28 | } 29 | } 30 | mavenLocal() 31 | maven { 32 | url rosMavenRepository 33 | } 34 | } 35 | dependencies { 36 | classpath group: 'org.ros.rosjava_bootstrap', name: 'gradle_plugins', version: '0.1.22' 37 | // compile 'org.ros.tf2:tf2_ros:0.0.0-SNAPSHOT' 38 | } 39 | } 40 | 41 | apply plugin: 'catkin' 42 | 43 | 44 | allprojects { 45 | /* A github url provides a good standard unique name for your project */ 46 | group 'com.github.rosjava.rostango' 47 | version = project.catkin.pkg.version 48 | } 49 | 50 | subprojects { 51 | /* See https://github.com/rosjava/rosjava_bootstrap (look for gradle_plugins) 52 | to see what is going on under the hood. */ 53 | apply plugin: 'ros-android' 54 | } 55 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ologic/Tango/938c38f70dd289a91ade9fad2fa0846cbf5bf911/ROSTango/src/rostango/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /ROSTango/src/rostango/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Jun 18 15:27:30 PDT 2014 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip 7 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | rostango 4 | 0.1.0 5 | The rostango package 6 | 7 | 8 | 9 | 10 | brandonb 11 | 12 | 13 | 14 | 15 | 16 | Apache 2.0 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | catkin 43 | android_core 44 | android_exras 45 | rosjava_build_tools 46 | rosjava_core 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/settings.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Brandon Blodget 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | /* Uncomment these and add your own packages to be gradled 18 | include 'my_android_project' 19 | include 'my_android_library_project' 20 | */ 21 | include 'tango_vio' 22 | //include 'android_tutorial_image_transport' 23 | //include 'android_tutorial_pubsub' 24 | include 'tango_depthimage' 25 | include 'TangoNodes' 26 | include 'tango_pub' 27 | include 'usbserial' 28 | include 'tango_serial' 29 | include 'Mavlink' 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/tango_depthimage/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Rohan Agrawal. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | /* 18 | Examples of 19 | 1) dependencies from another project in this gradle stack. 20 | 2,3) open ranged dependencies from a maven repository. 21 | 22 | It's a good idea to restrict the open ranged dependency to 23 | the patch version to avoid breakages due to api changes 24 | which usually occur on minor and major version numbers. 25 | */ 26 | 27 | repositories { 28 | maven { 29 | url 'https://github.com/rosjava/rosjava_mvn_repo/raw/master' 30 | } 31 | mavenCentral() 32 | } 33 | 34 | dependencies { 35 | //compile project(':local_android_library_dependency') 36 | compile 'org.ros.android_core:android_gingerbread_mr1:[0.1,0.2)' 37 | compile 'org.ros.android_core:android_honeycomb_mr2:[0.1,0.2)' 38 | compile 'com.github.rosjava.android_extras:gingerbread:[0.1,0.2)' 39 | compile project(':TangoNodes') 40 | } 41 | 42 | 43 | apply plugin: 'android' 44 | 45 | android { 46 | packagingOptions { 47 | /* https://github.com/rosjava/android_core/issues/194 */ 48 | exclude 'META-INF/LICENSE.txt' 49 | exclude 'META-INF/NOTICE.txt' 50 | } 51 | compileSdkVersion 18 52 | } 53 | 54 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/tango_depthimage/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/tango_depthimage/src/main/res/layout/layoutdepth.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 15 | 16 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/tango_depthimage/src/main/res/layout/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/tango_depthimage/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #ffffff00 4 | #ff64ff00 5 | #7764ff00 6 | 7 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/tango_depthimage/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16dp 5 | 16dp 6 | 7 | 8 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/tango_depthimage/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | TangoDepthimage 4 | 5 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/tango_depthimage/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 14 | 15 | 16 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/tango_pub/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Rohan Agrawal. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | /* 18 | Examples of 19 | 1) dependencies from another project in this gradle stack. 20 | 2,3) open ranged dependencies from a maven repository. 21 | 22 | It's a good idea to restrict the open ranged dependency to 23 | the patch version to avoid breakages due to api changes 24 | which usually occur on minor and major version numbers. 25 | */ 26 | /* 27 | dependencies { 28 | compile project(':local_android_library_dependency') 29 | compile 'org.ros.android_core:android_gingerbread_mr1:[0.1,)' 30 | compile 'com.github.rosjava.android_extras:gingerbread:[0.1,0.2)' 31 | } 32 | */ 33 | repositories { 34 | maven { 35 | url 'https://github.com/rosjava/rosjava_mvn_repo/raw/master' 36 | } 37 | mavenCentral() 38 | } 39 | 40 | dependencies { 41 | //compile project(':local_android_library_dependency') 42 | compile 'org.ros.android_core:android_gingerbread_mr1:[0.1,0.2)' 43 | compile 'org.ros.android_core:android_honeycomb_mr2:[0.1,0.2)' 44 | compile 'com.github.rosjava.android_extras:gingerbread:[0.1,0.2)' 45 | // compile files ('libs/androidvioclient.jar') 46 | compile project(':TangoNodes') 47 | } 48 | 49 | apply plugin: 'android' 50 | 51 | android { 52 | packagingOptions { 53 | /* https://github.com/rosjava/android_core/issues/194 */ 54 | exclude 'META-INF/LICENSE.txt' 55 | exclude 'META-INF/NOTICE.txt' 56 | } 57 | compileSdkVersion 18 58 | } 59 | 60 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/tango_pub/libs/androidvioclient.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ologic/Tango/938c38f70dd289a91ade9fad2fa0846cbf5bf911/ROSTango/src/rostango/tango_pub/libs/androidvioclient.jar -------------------------------------------------------------------------------- /ROSTango/src/rostango/tango_pub/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/tango_pub/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ologic/Tango/938c38f70dd289a91ade9fad2fa0846cbf5bf911/ROSTango/src/rostango/tango_pub/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /ROSTango/src/rostango/tango_pub/src/main/res/drawable-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ologic/Tango/938c38f70dd289a91ade9fad2fa0846cbf5bf911/ROSTango/src/rostango/tango_pub/src/main/res/drawable-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /ROSTango/src/rostango/tango_pub/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ologic/Tango/938c38f70dd289a91ade9fad2fa0846cbf5bf911/ROSTango/src/rostango/tango_pub/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /ROSTango/src/rostango/tango_pub/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ologic/Tango/938c38f70dd289a91ade9fad2fa0846cbf5bf911/ROSTango/src/rostango/tango_pub/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ROSTango/src/rostango/tango_pub/src/main/res/layout/main.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 22 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/tango_pub/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | TangoPub 4 | 5 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/tango_serial/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Brandon Blodget. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | /* 18 | Examples of 19 | 1) dependencies from another project in this gradle stack. 20 | 2,3) open ranged dependencies from a maven repository. 21 | 22 | It's a good idea to restrict the open ranged dependency to 23 | the patch version to avoid breakages due to api changes 24 | which usually occur on minor and major version numbers. 25 | */ 26 | 27 | repositories { 28 | maven { 29 | url 'https://github.com/rosjava/rosjava_mvn_repo/raw/master' 30 | } 31 | mavenCentral() 32 | } 33 | 34 | dependencies { 35 | /* compile project(':local_android_library_dependency') */ 36 | compile 'org.ros.android_core:android_gingerbread_mr1:[0.1,)' 37 | compile 'org.ros.android_core:android_honeycomb_mr2:[0.1,0.2)' 38 | compile 'com.github.rosjava.android_extras:gingerbread:[0.1,0.2)' 39 | compile('org.ros.tf2:tf2_ros:0.0.0-SNAPSHOT@aar') { 40 | transitive=true 41 | } 42 | compile files ('libs/androidvioclient.jar') 43 | compile project(':TangoNodes') 44 | compile project(':usbserial') 45 | compile project(':Mavlink') 46 | /* org/ros/tf2/tf2_ros/0.0.0-SNAPSHOT/tf2_ros-0.0.0-20140618.182828-2.aar */ 47 | } 48 | 49 | apply plugin: 'android' 50 | 51 | android { 52 | packagingOptions { 53 | /* https://github.com/rosjava/android_core/issues/194 */ 54 | exclude 'META-INF/LICENSE.txt' 55 | exclude 'META-INF/NOTICE.txt' 56 | } 57 | compileSdkVersion 18 58 | } 59 | 60 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/tango_serial/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/tango_serial/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 15 | 16 | 25 | 26 | 35 | 36 | 43 | 44 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/tango_serial/src/main/res/layout/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/tango_serial/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | TangoSerial 4 | TangoSerial 5 | USB device Connected 6 | Refreshing… 7 | 8 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/tango_serial/src/main/res/xml/device_filter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/tango_vio/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Brandon Blodget. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | /* 18 | Examples of 19 | 1) dependencies from another project in this gradle stack. 20 | 2,3) open ranged dependencies from a maven repository. 21 | 22 | It's a good idea to restrict the open ranged dependency to 23 | the patch version to avoid breakages due to api changes 24 | which usually occur on minor and major version numbers. 25 | */ 26 | 27 | repositories { 28 | maven { 29 | url 'https://github.com/rosjava/rosjava_mvn_repo/raw/master' 30 | } 31 | mavenCentral() 32 | } 33 | 34 | dependencies { 35 | /* compile project(':local_android_library_dependency') */ 36 | compile 'org.ros.android_core:android_gingerbread_mr1:[0.1,)' 37 | compile 'org.ros.android_core:android_honeycomb_mr2:[0.1,0.2)' 38 | compile 'com.github.rosjava.android_extras:gingerbread:[0.1,0.2)' 39 | compile('org.ros.tf2:tf2_ros:0.0.0-SNAPSHOT@aar') { 40 | transitive=true 41 | } 42 | compile files ('libs/androidvioclient.jar') 43 | compile project(':TangoNodes') 44 | /* org/ros/tf2/tf2_ros/0.0.0-SNAPSHOT/tf2_ros-0.0.0-20140618.182828-2.aar */ 45 | } 46 | 47 | apply plugin: 'android' 48 | 49 | android { 50 | packagingOptions { 51 | /* https://github.com/rosjava/android_core/issues/194 */ 52 | exclude 'META-INF/LICENSE.txt' 53 | exclude 'META-INF/NOTICE.txt' 54 | } 55 | compileSdkVersion 18 56 | } 57 | 58 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/tango_vio/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/tango_vio/src/main/java/com/ologicinc/rostango/tango_vio/TangoVio.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 OLogic, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.ologicinc.rostango.tango_vio; 18 | 19 | import android.os.Bundle; 20 | 21 | import com.motorola.atap.androidvioservice.VinsServiceHelper; 22 | import com.ologicinc.rostango.TangoNodes.vio.VioNode; 23 | 24 | import org.ros.address.InetAddressFactory; 25 | import org.ros.android.RosActivity; 26 | import org.ros.node.NodeConfiguration; 27 | import org.ros.node.NodeMainExecutor; 28 | 29 | public class TangoVio extends RosActivity { 30 | private VinsServiceHelper mVinsServiceHelper; 31 | 32 | public TangoVio() { 33 | super("TangoVio", "TangoVio"); 34 | } 35 | 36 | @Override 37 | public void onCreate(Bundle savedInstanceState) { 38 | super.onCreate(savedInstanceState); 39 | /* Read VIO data from VINs service helper */ 40 | mVinsServiceHelper = new VinsServiceHelper(this); 41 | 42 | setContentView(R.layout.main); 43 | } 44 | 45 | @Override 46 | protected void init(NodeMainExecutor nodeMainExecutor) { 47 | VioNode vioNode = new VioNode(mVinsServiceHelper); 48 | 49 | NodeConfiguration nodeConfiguration = 50 | NodeConfiguration.newPublic(InetAddressFactory.newNonLoopback().getHostAddress(), getMasterUri()); 51 | nodeConfiguration.setMasterUri(getMasterUri()); 52 | nodeMainExecutor.execute(vioNode, nodeConfiguration); 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/tango_vio/src/main/res/layout/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/tango_vio/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | TangoVio 4 | 5 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/usbserial/build.gradle: -------------------------------------------------------------------------------- 1 | /* Copyright 2011 Google Inc. 2 | * 3 | * This library is free software; you can redistribute it and/or 4 | * modify it under the terms of the GNU Lesser General Public 5 | * License as published by the Free Software Foundation; either 6 | * version 2.1 of the License, or (at your option) any later version. 7 | * 8 | * This library is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | * Lesser General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU Lesser General Public 14 | * License along with this library; if not, write to the Free Software 15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 16 | * USA. 17 | * 18 | * Project home page: http://code.google.com/p/usb-serial-for-android/ 19 | */ 20 | 21 | dependencies { 22 | compile 'org.ros.android_core:android_gingerbread_mr1:[0.1,)' 23 | } 24 | 25 | apply plugin: 'android-library' 26 | 27 | android { 28 | compileSdkVersion 17 29 | } 30 | 31 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/usbserial/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ROSTango/src/rostango/usbserial/src/main/java/com/github/ologic/android_ologic/usbserial/driver/UsbSerialRuntimeException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Google Inc. 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with this library; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 17 | * USA. 18 | */ 19 | 20 | package com.github.ologic.android_ologic.usbserial.driver; 21 | 22 | /** 23 | * Generic unchecked exception for the usbserial package. 24 | * 25 | * @author mike wakerly (opensource@hoho.com) 26 | */ 27 | @SuppressWarnings("serial") 28 | public class UsbSerialRuntimeException extends RuntimeException { 29 | 30 | public UsbSerialRuntimeException() { 31 | super(); 32 | } 33 | 34 | public UsbSerialRuntimeException(String detailMessage, Throwable throwable) { 35 | super(detailMessage, throwable); 36 | } 37 | 38 | public UsbSerialRuntimeException(String detailMessage) { 39 | super(detailMessage); 40 | } 41 | 42 | public UsbSerialRuntimeException(Throwable throwable) { 43 | super(throwable); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /ROSTango/src/tango_bringup/launch/tango_depth.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /ROSTango/src/tango_bringup/launch/tango_urdf.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /ROSTango/src/tango_bringup/launch/tango_vio.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ROSTango/src/tango_bringup/launch/tango_vio_map.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ROSTango/src/tango_bringup/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | tango_bringup 4 | 0.0.0 5 | The tango_bringup package 6 | 7 | 8 | 9 | 10 | Rohan Agrawal 11 | 12 | 13 | 14 | 15 | 16 | TODO 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | catkin 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /ROSTango/src/tango_bringup/urdf/tango_phone.urdf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | --> 7 | 8 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /ROSTango/src/tf2_android/.gitignore: -------------------------------------------------------------------------------- 1 | bin 2 | gen 3 | libs 4 | build.xml 5 | local.properties 6 | proguard-project.txt 7 | .gradle 8 | build 9 | .project 10 | .classpath 11 | 12 | # These are Android Studio files, might be worth including these later. 13 | .idea 14 | *.iml 15 | build.log 16 | build-log.xml 17 | docs.iml 18 | -------------------------------------------------------------------------------- /ROSTango/src/tf2_android/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(tf2_android) 3 | 4 | find_package(catkin REQUIRED rosjava_build_tools) 5 | 6 | catkin_android_setup(assembleRelease publishToMavenLocal) 7 | 8 | catkin_package() 9 | 10 | -------------------------------------------------------------------------------- /ROSTango/src/tf2_android/README.md: -------------------------------------------------------------------------------- 1 | tf2_android 2 | =========== 3 | 4 | Android NDK Wrapper of tf2 5 | 6 | How to use tf2_android: 7 | 8 | Install ROSJava using these instructions: 9 | http://wiki.ros.org/android/Tutorials/hydro/Installation%20-%20Ros%20Development%20Environment 10 | 11 | Now chain the tf2 workspace to the android workspace: 12 | 13 | mkdir -p ~/tf2a/src 14 | cd ~/tf2a/src 15 | git clone [this_repo] 16 | cd .. 17 | source ~/android/devel/setup.bash 18 | catkin_make 19 | 20 | Now make your own workspace: 21 | mkdir -p ~/my_app_wksp/src 22 | cd ~/my_app_wksp/src 23 | 24 | (Run catkin_create_android_project and catkin_create_android_pkg): 25 | http://wiki.ros.org/rosjava_build_tools 26 | 27 | cd .. 28 | catkin_make 29 | 30 | To use tf2_ros as a dependency, edit the build.gradle of your android_pkg and update 31 | depdencies to be the following: 32 | 33 | dependencies { 34 | compile 'org.ros.tf2:tf2_ros:0.0.0-SNAPSHOT' 35 | } 36 | 37 | Now you should be able to use the tf2 rosjava classes in your app. 38 | 39 | Updating the NDK Lib 40 | -------------------- 41 | 42 | Advanced users only: 43 | 44 | If for some reason you need to update the NDK lib or change the JNI interface, 45 | these are instructions for doing so. YOU DO NOT NEED TO DO THIS TO USE TF2 46 | IN ROSJAVA. A precompiled ndk_library is already included in tf2_ros. 47 | 48 | In some non-catkin folder, checkout the ndk_library_scripts version of this repo. 49 | Follow all of its directions and make sure that the sample app starts on your device 50 | or emulator. 51 | 52 | Now, back in your rosjava tf2 workspace, copy the 'tf2_ndk' folder from your 53 | scripts workspace to '[this_repo]/tf2_ros/src/main/jni/tf2_ndk.' 54 | 55 | To rebuild the library: 56 | 57 | cd [my_workspace] 58 | cd src/tf2_android/tf2_ros/src/main 59 | export NDK_MODULE_PATH=$PWD/jni 60 | ndk-build 61 | 62 | This regenerated libs/armeabi/libtf2_ros.so for you using the jni/src files. Note that if you need to regenerate the org_ros_tf2_ros_Buffer.h file: 63 | 64 | cd [my_workspace] 65 | cd src/tf2_android/tf2_ros/build/classes/release 66 | javah org.ros.tf2_ros.Buffer 67 | cp org_ros_tf2_ros_Buffer.h ../../../src/main/jni/src/org_ros_tf2_ros_Buffer.h 68 | 69 | -------------------------------------------------------------------------------- /ROSTango/src/tf2_android/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | task wrapper(type: Wrapper) { 18 | gradleVersion = '1.8' 19 | } 20 | 21 | allprojects { 22 | group 'org.ros.tf2' 23 | version = '0.0.0-SNAPSHOT' 24 | } 25 | 26 | ext.androidBuildToolsVersion = "17" 27 | 28 | subprojects { 29 | buildscript { 30 | repositories { 31 | mavenCentral() 32 | } 33 | dependencies { 34 | classpath 'com.android.tools.build:gradle:0.6.+' 35 | } 36 | } 37 | 38 | apply plugin: 'maven' 39 | 40 | repositories { 41 | mavenLocal() 42 | maven { 43 | url 'https://github.com/rosjava/rosjava_mvn_repo/raw/master' 44 | } 45 | } 46 | configurations.add('compile') { 47 | exclude group: 'junit' 48 | exclude group: 'xml-apis' 49 | } 50 | 51 | 52 | uploadArchives { 53 | repositories { 54 | mavenDeployer { 55 | repository url: 'file://' + new File(System.getProperty('user.home'), '.m2/repository').absolutePath 56 | } 57 | } 58 | } 59 | task publishToMavenLocal() << { 60 | description = 'installs .aar files to the local maven repository.' 61 | } 62 | afterEvaluate { Project project -> 63 | if (plugins.findPlugin('android-library')) { 64 | publishToMavenLocal.dependsOn('uploadArchives') 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /ROSTango/src/tf2_android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ologic/Tango/938c38f70dd289a91ade9fad2fa0846cbf5bf911/ROSTango/src/tf2_android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /ROSTango/src/tf2_android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Sep 25 14:10:30 PDT 2013 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-all.zip 7 | -------------------------------------------------------------------------------- /ROSTango/src/tf2_android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /ROSTango/src/tf2_android/insert_benchmark/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Chad Rockey. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | dependencies { 18 | compile project(':tf2_ros') 19 | } 20 | 21 | apply plugin: 'android' 22 | 23 | android { 24 | compileSdkVersion 10 25 | buildToolsVersion androidBuildToolsVersion 26 | } 27 | 28 | -------------------------------------------------------------------------------- /ROSTango/src/tf2_android/insert_benchmark/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 8 | 9 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /ROSTango/src/tf2_android/insert_benchmark/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ologic/Tango/938c38f70dd289a91ade9fad2fa0846cbf5bf911/ROSTango/src/tf2_android/insert_benchmark/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /ROSTango/src/tf2_android/insert_benchmark/src/main/res/drawable-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ologic/Tango/938c38f70dd289a91ade9fad2fa0846cbf5bf911/ROSTango/src/tf2_android/insert_benchmark/src/main/res/drawable-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /ROSTango/src/tf2_android/insert_benchmark/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ologic/Tango/938c38f70dd289a91ade9fad2fa0846cbf5bf911/ROSTango/src/tf2_android/insert_benchmark/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /ROSTango/src/tf2_android/insert_benchmark/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ologic/Tango/938c38f70dd289a91ade9fad2fa0846cbf5bf911/ROSTango/src/tf2_android/insert_benchmark/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ROSTango/src/tf2_android/insert_benchmark/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Insert Benchmark 4 | 5 | -------------------------------------------------------------------------------- /ROSTango/src/tf2_android/lookup_benchmark/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Chad Rockey. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | dependencies { 18 | compile project(':tf2_ros') 19 | } 20 | 21 | apply plugin: 'android' 22 | 23 | android { 24 | compileSdkVersion 10 25 | buildToolsVersion androidBuildToolsVersion 26 | } 27 | 28 | -------------------------------------------------------------------------------- /ROSTango/src/tf2_android/lookup_benchmark/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 8 | 9 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /ROSTango/src/tf2_android/lookup_benchmark/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ologic/Tango/938c38f70dd289a91ade9fad2fa0846cbf5bf911/ROSTango/src/tf2_android/lookup_benchmark/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /ROSTango/src/tf2_android/lookup_benchmark/src/main/res/drawable-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ologic/Tango/938c38f70dd289a91ade9fad2fa0846cbf5bf911/ROSTango/src/tf2_android/lookup_benchmark/src/main/res/drawable-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /ROSTango/src/tf2_android/lookup_benchmark/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ologic/Tango/938c38f70dd289a91ade9fad2fa0846cbf5bf911/ROSTango/src/tf2_android/lookup_benchmark/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /ROSTango/src/tf2_android/lookup_benchmark/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ologic/Tango/938c38f70dd289a91ade9fad2fa0846cbf5bf911/ROSTango/src/tf2_android/lookup_benchmark/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ROSTango/src/tf2_android/lookup_benchmark/src/main/res/layout/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 20 | 21 | 25 | 26 | 33 | 34 | 45 | 46 | 47 | 48 | 53 | 54 |