Closed tdrone993 closed 6 years ago
Flask is the python webserver that MAVCesium uses and the version you have installed may not support the root_path argument.
Can you please tell me what version of Flask you have installed / are using?
Name: Flask Version: 0.10.1 Summary: A microframework based on Werkzeug, Jinja2 and good intentions Home-page: http://github.com/mitsuhiko/flask/ Author: Armin Ronacher Author-email: armin.ronacher@active-4.com License: BSD Location: /usr/lib/python2.7/dist-packages Requires: Werkzeug, Jinja2, itsdangerous
Looking at the Flask docs the minimum version required is 0.11 so I'll update the requirements.txt file to reflect this. Current version installed from pip is 0.11.1 so try the following and see if the issue is fixed:
pip install Flask --upgrade
This site can’t be reached 127.0.0.1 refused to connect.
Flask v9 seemed to fire up the webapp but the websocket wasn't pushing anything except 1 frame of data.
This will most likely be linked to autobahn rather than flask. Did you install autobahn[twisted] via pip?
yes same problem one frame per chrome debug then nothing (Home should be US). No icon or anything just the default view {defines: {,…}} defines : {,…} frame_enum : {0: "Abs", 3: "Rel", 10: "AGL"} 0 : "Abs" 3 : "Rel" 10 : "AGL" mission_commands : {16: "NAV_WAYPOINT", 17: "NAV_LOITER_UNLIM", 18: "NAV_LOITER_TURNS", 19: "NAV_LOITER_TIME",…} 16 : "NAV_WAYPOINT" 17 : "NAV_LOITER_UNLIM" 18 : "NAV_LOITER_TURNS" 19 : "NAV_LOITER_TIME" 20 : "NAV_RETURN_TO_LAUNCH" 21 : "NAV_LAND" 22 : "NAV_TAKEOFF" 23 : "NAV_LAND_LOCAL" 24 : "NAV_TAKEOFF_LOCAL" 25 : "NAV_FOLLOW" 30 : "NAV_CONTINUE_AND_CHANGE_ALT" 31 : "NAV_LOITER_TO_ALT" 32 : "DO_FOLLOW" 33 : "DO_FOLLOW_REPOSITION" 80 : "NAV_ROI" 81 : "NAV_PATHPLANNING" 82 : "NAV_SPLINE_WAYPOINT" 83 : "NAV_ALTITUDE_WAIT" 84 : "NAV_VTOL_TAKEOFF" 85 : "NAV_VTOL_LAND" 92 : "NAV_GUIDED_ENABLE" 93 : "NAV_DELAY" 95 : "NAV_LAST" 112 : "CONDITION_DELAY" 113 : "CONDITION_CHANGE_ALT" 114 : "CONDITION_DISTANCE" 115 : "CONDITION_YAW" 159 : "CONDITION_LAST" 176 : "DO_SET_MODE" 177 : "DO_JUMP" 178 : "DO_CHANGE_SPEED" 179 : "DO_SET_HOME" 180 : "DO_SET_PARAMETER" 181 : "DO_SET_RELAY" 182 : "DO_REPEAT_RELAY" 183 : "DO_SET_SERVO" 184 : "DO_REPEAT_SERVO" 185 : "DO_FLIGHTTERMINATION" 186 : "DO_CHANGE_ALTITUDE" 189 : "DO_LAND_START" 190 : "DO_RALLY_LAND" 191 : "DO_GO_AROUND" 192 : "DO_REPOSITION" 193 : "DO_PAUSE_CONTINUE" 194 : "DO_SET_REVERSE" 200 : "DO_CONTROL_VIDEO" 201 : "DO_SET_ROI" 202 : "DO_DIGICAM_CONFIGURE" 203 : "DO_DIGICAM_CONTROL" 204 : "DO_MOUNT_CONFIGURE" 205 : "DO_MOUNT_CONTROL" 206 : "DO_SET_CAM_TRIGG_DIST" 207 : "DO_FENCE_ENABLE" 208 : "DO_PARACHUTE" 209 : "DO_MOTOR_TEST" 210 : "DO_INVERTED_FLIGHT" 211 : "DO_GRIPPER" 212 : "DO_AUTOTUNE_ENABLE" 220 : "DO_MOUNT_CONTROL_QUAT" 221 : "DO_GUIDED_MASTER" 222 : "DO_GUIDED_LIMITS" 223 : "DO_ENGINE_CONTROL" 240 : "DO_LAST" 241 : "PREFLIGHT_CALIBRATION" 242 : "PREFLIGHT_SET_SENSOR_OFFSETS" 243 : "PREFLIGHT_UAVCAN" 245 : "PREFLIGHT_STORAGE" 246 : "PREFLIGHT_REBOOT_SHUTDOWN" 252 : "OVERRIDE_GOTO" 300 : "MISSION_START" 400 : "COMPONENT_ARM_DISARM" 410 : "GET_HOME_POSITION" 500 : "START_RX_PAIR" 510 : "GET_MESSAGE_INTERVAL" 511 : "SET_MESSAGE_INTERVAL" 520 : "REQUEST_AUTOPILOT_CAPABILITIES" 2000 : "IMAGE_START_CAPTURE" 2001 : "IMAGE_STOP_CAPTURE" 2003 : "DO_TRIGGER_CONTROL" 2500 : "VIDEO_START_CAPTURE" 2501 : "VIDEO_STOP_CAPTURE" 2800 : "PANORAMA_CREATE" 3000 : "DO_VTOL_TRANSITION" 4000 : "SET_GUIDED_SUBMODE_STANDARD" 4001 : "SET_GUIDED_SUBMODE_CIRCLE" 30001 : "PAYLOAD_PREPARE_DEPLOY" 30002 : "PAYLOAD_CONTROL_DEPLOY" 31000 : "WAYPOINT_USER_1" 31001 : "WAYPOINT_USER_2" 31002 : "WAYPOINT_USER_3" 31003 : "WAYPOINT_USER_4" 31004 : "WAYPOINT_USER_5" 31005 : "SPATIAL_USER_1" 31006 : "SPATIAL_USER_2" 31007 : "SPATIAL_USER_3" 31008 : "SPATIAL_USER_4" 31009 : "SPATIAL_USER_5" 31010 : "USER_1" 31011 : "USER_2" 31012 : "USER_3" 31013 : "USER_4" 31014 : "USER_5" 42000 : "POWER_OFF_INITIATED" 42001 : "SOLO_BTN_FLY_CLICK" 42002 : "SOLO_BTN_FLY_HOLD" 42003 : "SOLO_BTN_PAUSE_CLICK" 42424 : "DO_START_MAG_CAL" 42425 : "DO_ACCEPT_MAG_CAL" 42426 : "DO_CANCEL_MAG_CAL" 42427 : "SET_FACTORY_TEST_MODE" 42428 : "DO_SEND_BANNER" 42501 : "GIMBAL_RESET" 42502 : "GIMBAL_AXIS_CALIBRATION_STATUS" 42503 : "GIMBAL_REQUEST_AXIS_CALIBRATION" 42505 : "GIMBAL_FULL_RESET"
So it's sending the mavlink defines (first thing that occurs when you start a new connection) but isn't streaming continuous data past that point? I'm just trying to work out if this is browser side or an issue with the websocket server and trying to come up with a way to help you debug this.
can you share the script you use to automate the flight loop, maybe its something with my sitl not working correctly?
I was having a bit more of a think about this and it might be a Cross-origin Resource Sharing (CORS) issue unique to your setup. Is there any info in the chrome debug to provide any hints?
Traceback (most recent call last): File "/usr/local/bin/mavproxy.py", line 491, in process_stdin fn(args[1:]) File "/usr/local/bin/mavproxy.py", line 319, in cmd_module load_module(args[1]) File "/usr/local/bin/mavproxy.py", line 277, in load_module module = m.init(mpstate) File "build/bdist.linux-x86_64/egg/MAVProxy/modules/mavproxy_cesium/init.py", line 266, in init return CesiumModule(mpstate) File "build/bdist.linux-x86_64/egg/MAVProxy/modules/mavproxy_cesium/init.py", line 72, in init self.run_web_server() File "build/bdist.linux-x86_64/egg/MAVProxy/modules/mavproxy_cesium/init.py", line 97, in run_web_server from app import cesium_web_server File "build/bdist.linux-x86_64/egg/MAVProxy/modules/mavproxy_cesium/app/cesium_web_server.py", line 26, in
TypeError: init() got an unexpected keyword argument 'root_path'