ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Home
    2. Denver Bennett
    3. Posts
    D
    • Profile
    • Following 0
    • Followers 0
    • Topics 11
    • Posts 18
    • Best 1
    • Controversial 0
    • Groups 0

    Posts made by Denver Bennett

    • RE: tflite-server with custom model?

      Hello all,

      I was able to successfully train a MobileNet v2 (object detection mode), quantize it, and convert it into .tflite format.

      Basically, my custom model had to meet 3 criteria:

      1. The model is not too large (models should probably be below 17 KB)
      2. The model's input shape is [1 300 300 3] and the input data type is uint8 or numpy.uint8
      3. The model's has four outputs in THIS ORDER:
      • output one shape: [1 10 4]
      • output two shape: [1 10]
      • output three shape: [1 10]
      • output four shape: [1]
        all of these outputs in float32 or numpy.float32 format

      From what I can best understand, the model architecture doesn't have to be an exact match, so long as the inputs and outputs are compatible.

      Here is my code:

      import tensorflow as tf
      from tensorflow.keras import layers, models

      Load the MobileNetV2 feature vector model directly from TensorFlow

      base_model = tf.keras.applications.MobileNetV2(
      input_shape=(300, 300, 3), # Use 300x300 input shape as required
      include_top=False,
      weights='imagenet')

      Freezing the base model

      base_model.trainable = False

      Adjust input shape to 300x300x3 and use uint8 data type

      inputs = tf.keras.Input(shape=(300, 300, 3), dtype='uint8')

      Use Lambda layer to cast inputs to float32

      x = layers.Lambda(lambda image: tf.cast(image, tf.float32))(inputs)

      Pass the cast inputs through the base model

      x = base_model(x)
      x = layers.GlobalAveragePooling2D()(x)
      x = layers.Dense(1280, activation='relu')(x)

      Bounding box output (10 detections, 4 coordinates each)

      bbox_outputs = layers.Dense(40, activation='sigmoid')(x)
      bbox_outputs = layers.Lambda(lambda t: tf.reshape(t, [1, 10, 4]), name="bbox_outputs")(bbox_outputs)

      Class ID output (10 detections)

      class_outputs = layers.Dense(10, activation='softmax')(x)
      class_outputs = layers.Lambda(lambda t: tf.reshape(t, [1, 10]), name="class_outputs")(class_outputs)

      Confidence score output (10 detections)

      confidence_outputs = layers.Dense(10, activation='sigmoid')(x)
      confidence_outputs = layers.Lambda(lambda t: tf.reshape(t, [1, 10]), name="confidence_outputs")(confidence_outputs)

      Number of detections (single value)

      num_detections = layers.Lambda(lambda t: tf.constant([10], dtype=tf.float32))(x)
      num_detections = layers.Lambda(lambda t: tf.reshape(t, [1]), name="num_detections")(num_detections)

      Define the outputs explicitly in the order you want:

      1. Bounding boxes

      2. Class IDs

      3. Confidence scores

      4. Number of detections

      model = tf.keras.Model(inputs, [bbox_outputs, class_outputs, confidence_outputs, num_detections])

      Compile the model

      model.compile(optimizer='adam', loss='mean_squared_error')

      Define a ConcreteFunction for the model with explicit output signatures

      @tf.function(input_signature=[tf.TensorSpec([1, 300, 300, 3], tf.uint8)])
      def model_signature(input_tensor):
      outputs = model(input_tensor)
      return {
      'bbox_outputs': outputs[0],
      'class_outputs': outputs[1],
      'confidence_outputs': outputs[2],
      'num_detections': outputs[3]
      }

      Convert the model to TensorFlow Lite using signatures

      converter = tf.lite.TFLiteConverter.from_concrete_functions([model_signature.get_concrete_function()])

      Apply float16 quantization

      converter.optimizations = [tf.lite.Optimize.DEFAULT]
      converter.target_spec.supported_types = [tf.float16] # Use float16 quantization

      Convert the model

      tflite_model = converter.convert()

      Save the TensorFlow Lite model

      with open('/content/mobilenet_v2_custom_quantized.tflite', 'wb') as f:
      f.write(tflite_model)

      Load the TFLite model and check the input/output details to confirm correct mapping

      interpreter = tf.lite.Interpreter(model_content=tflite_model)
      interpreter.allocate_tensors()

      Get the input and output details to verify correct input/output structure

      input_details = interpreter.get_input_details()
      output_details = interpreter.get_output_details()

      print("Input Details:", input_details)
      print("Output Details:", output_details)

      posted in Ask your questions right here!
      D
      Denver Bennett
    • RE: tflite-server with custom model?

      Good morning @Chad-Sweet, @modaltb, and team,

      Following up on my post from yesterday, I created a back-up folder of dnn (located in /usr/bin/dnn), went into the new folder, renamed ssdlite_mobilenet_v2_coco.tflite to ssdlite_mobilenet_v2_coco.bak.tflite, renamed custom_net_01.tflite to ssdlite_mobilenet_v2_coco.tflite, and restarted voxl-tflite-server. When I opened the web-portal I was able to not only view the camera feed, tflite was also showing a camera feed (something which hadn't happened before), but it wasn't drawing new bounding boxes.

      Thankfully, it feels like I'm getting really close to cracking the code on this, but I am still just missing the last step of getting voxl-tflite-server to actually draw bounding boxes using my custom model. I look forward to hearing from you all!

      Best wishes,

      posted in Ask your questions right here!
      D
      Denver Bennett
    • tflite-server with custom model?

      Hi Chad and team,

      I am trying to load a custom object detection .tflite model on the VOXL 2 and get it to work on voxl-tflite-server to read in the object detection data. Should I

      1. modify the code for main.cpp and inference_helper.h for voxl-tflite-server
        or
      2. simply go into /etc/modalai/voxl-tflite-server.conf and ask it to read in my model?

      I went to TensorFlow Hub, downloaded 035-128 classification variation of mobilenet_v2, float16 quantized the model, and then converted it with the following code:

      `import os
      import tensorflow as tf

      Set name for the output .tflite file

      tf_lite_model_file_name = "custom_net_01.tflite"

      Provide the path to the directory where the saved model is located

      saved_model_dir = "./"

      Convert the model

      tflite_converter = tf.lite.TFLiteConverter.from_saved_model(saved_model_dir)
      print('Path successfully found!')
      tflite_model = tflite_converter.convert()

      Write the TFLite model to a file

      with open(tf_lite_model_file_name, "wb") as f:
      f.write(tflite_model)`

      Once I had custom_net_01.tflite, I put the model back on the VOXL 2. More specifically, I moved the model to /usr/bin/dnn/ where all the other .tflite models are located. I then went to etc/modalai/voxl-tflite-server.conf and edit the .conf files so that the input for "model": was "/usr/bin/dnn/custom_net_01.tflite",. I then ran the commands systemctl stop voxl-tflite-server, systemctl disable voxl-tflite-server, systemctl enable voxl-tflite-server, and systemctl start voxl-tflite-server, as a way to source voxl-configure-tflite. When I ran saw the camera feed on voxl-portal, I could seethe camera feed with no problem, but it said that tflite had an unknown source on the portal. When I then reconfigured voxl-tflite-server to us the mobilenet option, tflite was able to work perfectly fine and I was able to see the bounding boxes from the model.

      When I went to the Deep Learning with VOXL-TFLite-Server webpage I tried to run the tflite converstion and quantization code, but it did not work for me as that code is outdated (tensorflow v2.8 instead of 2.16 or 2.17). Then when I went down to the Implementing your Model in voxl-tflite-server section, clicked on the InferenceHelper GitLab page, read the file, but then wasn't sure what to do next. (To be fair, I write in Python, not C++).

      I on the voxl-tflite-server GitLab page for main.cpp it looks like assigns specific post-processing functions and sometimes normalization and label usage for each of the models already loaded on the VOXL 2 in /usr/bin/dnn. After looking at main.cpp, I felt like the correct thing to do was to edit main.cpp, inference_helper.h, and voxl-configure-tflite all to include my new model and tell main.cpp which post-processing and normalization to use until the model worked, but I was told that with C++ code you need to recompile the code.

      After having read the Implementing your Model in voxl-tflite-server section on the Deep Learning with VOXL-TFLite-Server webpage, I wasn't entirely sure what to do next.

      What should I do with inferencehelper.h? What next step can I take to get voxl-tflite-server to use my custom model?

      Thanks!

      posted in Ask your questions right here!
      D
      Denver Bennett
    • How do I connect MAVROS to PX4 with UDP ports?

      Hi,

      My end goal is to get PX4 on my drone to listen to MAVROS messages.

      I tried running the command roslaunch mavros px4.launch fcu_url:="udp://127.0.0.1:14560@127.0.0.1:14551" and then I run the command rostopic echo /mavros/state/ to see if the connection works. When I run rostopic echo /mavros/state/ sometimes I get either no response and I have to stop it with CTRL+C.

      In voxl-vision-hub.conf, I have "en_localhost_mavlink_udp": true,

      Do you guys know what I've done wrong? How can I get the roslaunch mavros px4.launch fcu_url:="udp://127.0.0.1:14560@127.0.0.1:14551" command to work?

      Here is what I get when I run roslaunch mavros px4.launch fcu_url:="udp://127.0.0.1:14560@127.0.0.1:14551". Maybe this can provide some guidance:

      `... logging to /home/root/.ros/log/587e1f04-3972-11ef-af96-00c0cab5aba2/roslaunch-m0054-3978.log
      Checking log directory for disk usage. This may take a while.
      Press Ctrl-C to interrupt
      Done checking log file disk usage. Usage is <1GB.

      started roslaunch server http://m0054:44561/

      SUMMARY

      CLEAR PARAMETERS

      • /mavros/

      PARAMETERS

      • /mavros/camera/frame_id: base_link
      • /mavros/cmd/use_comp_id_system_control: False
      • /mavros/conn/heartbeat_rate: 1.0
      • /mavros/conn/system_time_rate: 1.0
      • /mavros/conn/timeout: 10.0
      • /mavros/conn/timesync_rate: 10.0
      • /mavros/distance_sensor/hrlv_ez4_pub/field_of_view: 0.0
      • /mavros/distance_sensor/hrlv_ez4_pub/frame_id: hrlv_ez4_sonar
      • /mavros/distance_sensor/hrlv_ez4_pub/id: 0
      • /mavros/distance_sensor/hrlv_ez4_pub/orientation: PITCH_270
      • /mavros/distance_sensor/hrlv_ez4_pub/send_tf: True
      • /mavros/distance_sensor/hrlv_ez4_pub/sensor_position/x: 0.0
      • /mavros/distance_sensor/hrlv_ez4_pub/sensor_position/y: 0.0
      • /mavros/distance_sensor/hrlv_ez4_pub/sensor_position/z: -0.1
      • /mavros/distance_sensor/laser_1_sub/id: 3
      • /mavros/distance_sensor/laser_1_sub/orientation: PITCH_270
      • /mavros/distance_sensor/laser_1_sub/subscriber: True
      • /mavros/distance_sensor/lidarlite_pub/field_of_view: 0.0
      • /mavros/distance_sensor/lidarlite_pub/frame_id: lidarlite_laser
      • /mavros/distance_sensor/lidarlite_pub/id: 1
      • /mavros/distance_sensor/lidarlite_pub/orientation: PITCH_270
      • /mavros/distance_sensor/lidarlite_pub/send_tf: True
      • /mavros/distance_sensor/lidarlite_pub/sensor_position/x: 0.0
      • /mavros/distance_sensor/lidarlite_pub/sensor_position/y: 0.0
      • /mavros/distance_sensor/lidarlite_pub/sensor_position/z: -0.1
      • /mavros/distance_sensor/sonar_1_sub/horizontal_fov_ratio: 1.0
      • /mavros/distance_sensor/sonar_1_sub/id: 2
      • /mavros/distance_sensor/sonar_1_sub/orientation: PITCH_270
      • /mavros/distance_sensor/sonar_1_sub/subscriber: True
      • /mavros/distance_sensor/sonar_1_sub/vertical_fov_ratio: 1.0
      • /mavros/fake_gps/eph: 2.0
      • /mavros/fake_gps/epv: 2.0
      • /mavros/fake_gps/fix_type: 3
      • /mavros/fake_gps/geo_origin/alt: 408.0
      • /mavros/fake_gps/geo_origin/lat: 47.3667
      • /mavros/fake_gps/geo_origin/lon: 8.55
      • /mavros/fake_gps/gps_rate: 5.0
      • /mavros/fake_gps/mocap_transform: True
      • /mavros/fake_gps/satellites_visible: 5
      • /mavros/fake_gps/tf/child_frame_id: fix
      • /mavros/fake_gps/tf/frame_id: map
      • /mavros/fake_gps/tf/listen: False
      • /mavros/fake_gps/tf/rate_limit: 10.0
      • /mavros/fake_gps/tf/send: False
      • /mavros/fake_gps/use_mocap: True
      • /mavros/fake_gps/use_vision: False
      • /mavros/fcu_protocol: v2.0
      • /mavros/fcu_url: udp://127.0.0.1:1...
      • /mavros/gcs_url:
      • /mavros/global_position/child_frame_id: base_link
      • /mavros/global_position/frame_id: map
      • /mavros/global_position/gps_uere: 1.0
      • /mavros/global_position/rot_covariance: 99999.0
      • /mavros/global_position/tf/child_frame_id: base_link
      • /mavros/global_position/tf/frame_id: map
      • /mavros/global_position/tf/global_frame_id: earth
      • /mavros/global_position/tf/send: False
      • /mavros/global_position/use_relative_alt: True
      • /mavros/image/frame_id: px4flow
      • /mavros/imu/angular_velocity_stdev: 0.0003490659 // 0...
      • /mavros/imu/frame_id: base_link
      • /mavros/imu/linear_acceleration_stdev: 0.0003
      • /mavros/imu/magnetic_stdev: 0.0
      • /mavros/imu/orientation_stdev: 1.0
      • /mavros/landing_target/camera/fov_x: 2.0071286398
      • /mavros/landing_target/camera/fov_y: 2.0071286398
      • /mavros/landing_target/image/height: 480
      • /mavros/landing_target/image/width: 640
      • /mavros/landing_target/land_target_type: VISION_FIDUCIAL
      • /mavros/landing_target/listen_lt: False
      • /mavros/landing_target/mav_frame: LOCAL_NED
      • /mavros/landing_target/target_size/x: 0.3
      • /mavros/landing_target/target_size/y: 0.3
      • /mavros/landing_target/tf/child_frame_id: camera_center
      • /mavros/landing_target/tf/frame_id: landing_target
      • /mavros/landing_target/tf/listen: False
      • /mavros/landing_target/tf/rate_limit: 10.0
      • /mavros/landing_target/tf/send: True
      • /mavros/local_position/frame_id: map
      • /mavros/local_position/tf/child_frame_id: base_link
      • /mavros/local_position/tf/frame_id: map
      • /mavros/local_position/tf/send: False
      • /mavros/local_position/tf/send_fcu: False
      • /mavros/mission/pull_after_gcs: True
      • /mavros/mission/use_mission_item_int: True
      • /mavros/mocap/use_pose: True
      • /mavros/mocap/use_tf: False
      • /mavros/mount/debounce_s: 4.0
      • /mavros/mount/err_threshold_deg: 10.0
      • /mavros/mount/negate_measured_pitch: False
      • /mavros/mount/negate_measured_roll: False
      • /mavros/mount/negate_measured_yaw: False
      • /mavros/odometry/fcu/odom_child_id_des: base_link
      • /mavros/odometry/fcu/odom_parent_id_des: map
      • /mavros/plugin_blacklist: ['safety_area', '...
      • /mavros/plugin_whitelist: []
      • /mavros/px4flow/frame_id: px4flow
      • /mavros/px4flow/ranger_fov: 0.118682
      • /mavros/px4flow/ranger_max_range: 5.0
      • /mavros/px4flow/ranger_min_range: 0.3
      • /mavros/safety_area/p1/x: 1.0
      • /mavros/safety_area/p1/y: 1.0
      • /mavros/safety_area/p1/z: 1.0
      • /mavros/safety_area/p2/x: -1.0
      • /mavros/safety_area/p2/y: -1.0
      • /mavros/safety_area/p2/z: -1.0
      • /mavros/setpoint_accel/send_force: False
      • /mavros/setpoint_attitude/reverse_thrust: False
      • /mavros/setpoint_attitude/tf/child_frame_id: target_attitude
      • /mavros/setpoint_attitude/tf/frame_id: map
      • /mavros/setpoint_attitude/tf/listen: False
      • /mavros/setpoint_attitude/tf/rate_limit: 50.0
      • /mavros/setpoint_attitude/use_quaternion: False
      • /mavros/setpoint_position/mav_frame: LOCAL_NED
      • /mavros/setpoint_position/tf/child_frame_id: target_position
      • /mavros/setpoint_position/tf/frame_id: map
      • /mavros/setpoint_position/tf/listen: False
      • /mavros/setpoint_position/tf/rate_limit: 50.0
      • /mavros/setpoint_raw/thrust_scaling: 1.0
      • /mavros/setpoint_velocity/mav_frame: LOCAL_NED
      • /mavros/startup_px4_usb_quirk: False
      • /mavros/sys/disable_diag: False
      • /mavros/sys/min_voltage: 10.0
      • /mavros/target_component_id: 1
      • /mavros/target_system_id: 1
      • /mavros/tdr_radio/low_rssi: 40
      • /mavros/time/time_ref_source: fcu
      • /mavros/time/timesync_avg_alpha: 0.6
      • /mavros/time/timesync_mode: MAVLINK
      • /mavros/vibration/frame_id: base_link
      • /mavros/vision_pose/tf/child_frame_id: vision_estimate
      • /mavros/vision_pose/tf/frame_id: odom
      • /mavros/vision_pose/tf/listen: False
      • /mavros/vision_pose/tf/rate_limit: 10.0
      • /mavros/vision_speed/listen_twist: True
      • /mavros/vision_speed/twist_cov: True
      • /mavros/wheel_odometry/child_frame_id: base_link
      • /mavros/wheel_odometry/count: 2
      • /mavros/wheel_odometry/frame_id: odom
      • /mavros/wheel_odometry/send_raw: True
      • /mavros/wheel_odometry/send_twist: False
      • /mavros/wheel_odometry/tf/child_frame_id: base_link
      • /mavros/wheel_odometry/tf/frame_id: odom
      • /mavros/wheel_odometry/tf/send: False
      • /mavros/wheel_odometry/use_rpm: False
      • /mavros/wheel_odometry/vel_error: 0.1
      • /mavros/wheel_odometry/wheel0/radius: 0.05
      • /mavros/wheel_odometry/wheel0/x: 0.0
      • /mavros/wheel_odometry/wheel0/y: -0.15
      • /mavros/wheel_odometry/wheel1/radius: 0.05
      • /mavros/wheel_odometry/wheel1/x: 0.0
      • /mavros/wheel_odometry/wheel1/y: 0.15
      • /rosdistro: melodic
      • /rosversion: 1.14.13

      NODES
      /
      mavros (mavros/mavros_node)

      auto-starting new master
      process[master]: started with pid [3992]
      ROS_MASTER_URI=http://localhost:11311

      setting /run_id to 587e1f04-3972-11ef-af96-00c0cab5aba2
      process[rosout-1]: started with pid [4003]
      started core service [/rosout]
      process[mavros-2]: started with pid [4011]
      [ INFO] [1720034875.774184619]: FCU URL: udp://127.0.0.1:14560@127.0.0.1:14551
      [ INFO] [1720034875.778019723]: udp0: Bind address: 127.0.0.1:14560
      [ INFO] [1720034875.778069411]: udp0: Remote address: 127.0.0.1:14551
      [ INFO] [1720034875.778128421]: GCS bridge disabled
      [ INFO] [1720034875.786959775]: Plugin 3dr_radio loaded
      [ INFO] [1720034875.788031754]: Plugin 3dr_radio initialized
      [ INFO] [1720034875.788097223]: Plugin actuator_control loaded
      [ INFO] [1720034875.789775036]: Plugin actuator_control initialized
      [ INFO] [1720034875.793380088]: Plugin adsb loaded
      [ INFO] [1720034875.806434306]: Plugin adsb initialized
      [ INFO] [1720034875.806548786]: Plugin altitude loaded
      [ INFO] [1720034875.809585452]: Plugin altitude initialized
      [ INFO] [1720034875.809666286]: Plugin cam_imu_sync loaded
      [ INFO] [1720034875.817432015]: Plugin cam_imu_sync initialized
      [ INFO] [1720034875.818696858]: Plugin camera loaded
      [ INFO] [1720034875.820721442]: Plugin camera initialized
      [ INFO] [1720034875.820930088]: Plugin cellular_status loaded
      [ INFO] [1720034875.824257327]: Plugin cellular_status initialized
      [ INFO] [1720034875.824446442]: Plugin command loaded
      [ INFO] [1720034875.833272223]: Plugin command initialized
      [ INFO] [1720034875.833472744]: Plugin companion_process_status loaded
      [ INFO] [1720034875.837013525]: Plugin companion_process_status initialized
      [ INFO] [1720034875.837201858]: Plugin debug_value loaded
      [ INFO] [1720034875.844404150]: Plugin debug_value initialized
      [ INFO] [1720034875.844493213]: Plugin distance_sensor blacklisted
      [ INFO] [1720034875.844678890]: Plugin esc_status loaded
      [ INFO] [1720034875.846252796]: Plugin esc_status initialized
      [ INFO] [1720034875.846446494]: Plugin esc_telemetry loaded
      [ INFO] [1720034875.847439463]: Plugin esc_telemetry initialized
      [ INFO] [1720034875.847668629]: Plugin fake_gps loaded
      [ INFO] [1720034875.862576494]: Plugin fake_gps initialized
      [ INFO] [1720034875.862743108]: Plugin ftp loaded
      [ INFO] [1720034875.868335504]: Plugin ftp initialized
      [ INFO] [1720034875.868468942]: Plugin geofence loaded
      [ INFO] [1720034875.871055244]: Plugin geofence initialized
      [ INFO] [1720034875.871183890]: Plugin global_position loaded
      [ INFO] [1720034875.880378994]: Plugin global_position initialized
      [ INFO] [1720034875.880466598]: Plugin gps_input loaded
      [ INFO] [1720034875.881994671]: Plugin gps_input initialized
      [ INFO] [1720034875.882074463]: Plugin gps_rtk loaded
      [ INFO] [1720034875.883738733]: Plugin gps_rtk initialized
      [ INFO] [1720034875.883831702]: Plugin gps_status loaded
      [ INFO] [1720034875.885728942]: Plugin gps_status initialized
      [ INFO] [1720034875.885808056]: Plugin guided_target loaded
      [ INFO] [1720034875.888165296]: Plugin guided_target initialized
      [ INFO] [1720034875.888255608]: Plugin hil loaded
      [ INFO] [1720034875.894711494]: Plugin hil initialized
      [ INFO] [1720034875.895299931]: Plugin home_position loaded
      [ INFO] [1720034875.897735504]: Plugin home_position initialized
      [ INFO] [1720034875.897820765]: Plugin imu loaded
      [ INFO] [1720034875.905221233]: Plugin imu initialized
      [ INFO] [1720034875.905759567]: Plugin landing_target loaded
      [ INFO] [1720034875.914256806]: Plugin landing_target initialized
      [ INFO] [1720034875.914359515]: Plugin local_position loaded
      [ INFO] [1720034875.922657536]: Plugin local_position initialized
      [ INFO] [1720034875.923111806]: Plugin log_transfer loaded
      [ INFO] [1720034875.925616963]: Plugin log_transfer initialized
      [ INFO] [1720034875.925694515]: Plugin mag_calibration_status loaded
      [ INFO] [1720034875.928898369]: Plugin mag_calibration_status initialized
      [ INFO] [1720034875.928985556]: Plugin manual_control loaded
      [ INFO] [1720034875.931920036]: Plugin manual_control initialized
      [ INFO] [1720034875.932013577]: Plugin mocap_pose_estimate loaded
      [ INFO] [1720034875.934142744]: Plugin mocap_pose_estimate initialized
      [ INFO] [1720034875.934243317]: Plugin mount_control loaded
      [ WARN] [1720034875.937349463]: Could not retrive negate_measured_roll parameter value, using default (0)
      [ WARN] [1720034875.937620817]: Could not retrive negate_measured_pitch parameter value, using default (0)
      [ WARN] [1720034875.937873056]: Could not retrive negate_measured_yaw parameter value, using default (0)
      [ WARN] [1720034875.938745869]: Could not retrive debounce_s parameter value, using default (4.000000)
      [ WARN] [1720034875.939002744]: Could not retrive err_threshold_deg parameter value, using default (10.000000)
      [ INFO] [1720034875.939233629]: Plugin mount_control initialized
      [ INFO] [1720034875.939775088]: Plugin nav_controller_output loaded
      [ INFO] [1720034875.940403733]: Plugin nav_controller_output initialized
      [ INFO] [1720034875.940500869]: Plugin obstacle_distance loaded
      [ INFO] [1720034875.942063108]: Plugin obstacle_distance initialized
      [ INFO] [1720034875.942141806]: Plugin odom loaded
      [ INFO] [1720034875.944601129]: Plugin odom initialized
      [ INFO] [1720034875.944678733]: Plugin onboard_computer_status loaded
      [ INFO] [1720034875.945881442]: Plugin onboard_computer_status initialized
      [ INFO] [1720034875.945968317]: Plugin param loaded
      [ INFO] [1720034875.947392379]: Plugin param initialized
      [ INFO] [1720034875.947470713]: Plugin play_tune loaded
      [ INFO] [1720034875.948681077]: Plugin play_tune initialized
      [ INFO] [1720034875.948758421]: Plugin px4flow loaded
      [ INFO] [1720034875.952277119]: Plugin px4flow initialized
      [ INFO] [1720034875.952368317]: Plugin rallypoint loaded
      [ INFO] [1720034875.953838942]: Plugin rallypoint initialized
      [ INFO] [1720034875.953881963]: Plugin rangefinder blacklisted
      [ INFO] [1720034875.953956129]: Plugin rc_io loaded
      [ INFO] [1720034875.958129150]: Plugin rc_io initialized
      [ INFO] [1720034875.958164931]: Plugin safety_area blacklisted
      [ INFO] [1720034875.958345504]: Plugin setpoint_accel loaded
      [ INFO] [1720034875.960882744]: Plugin setpoint_accel initialized
      [ INFO] [1720034875.960975140]: Plugin setpoint_attitude loaded
      [ INFO] [1720034875.965657119]: Plugin setpoint_attitude initialized
      [ INFO] [1720034875.966128994]: Plugin setpoint_position loaded
      [ INFO] [1720034875.979281650]: Plugin setpoint_position initialized
      [ INFO] [1720034875.979597692]: Plugin setpoint_raw loaded
      [ INFO] [1720034875.988543421]: Plugin setpoint_raw initialized
      [ INFO] [1720034875.988656598]: Plugin setpoint_trajectory loaded
      [ INFO] [1720034875.996899358]: Plugin setpoint_trajectory initialized
      [ INFO] [1720034875.997014515]: Plugin setpoint_velocity loaded
      [ INFO] [1720034876.008902692]: Plugin setpoint_velocity initialized
      [ INFO] [1720034876.009045296]: Plugin sys_status loaded
      [ INFO] [1720034876.017746858]: Plugin sys_status initialized
      [ INFO] [1720034876.017867223]: Plugin sys_time loaded
      [ INFO] [1720034876.021094254]: TM: Timesync mode: MAVLINK
      [ INFO] [1720034876.025475400]: TM: Not publishing sim time
      [ INFO] [1720034876.026241963]: Plugin sys_time initialized
      [ INFO] [1720034876.026339723]: Plugin terrain loaded
      [ INFO] [1720034876.026709150]: Plugin terrain initialized
      [ INFO] [1720034876.026795921]: Plugin trajectory loaded
      [ INFO] [1720034876.029857275]: Plugin trajectory initialized
      [ INFO] [1720034876.029946442]: Plugin tunnel loaded
      [ INFO] [1720034876.031674567]: Plugin tunnel initialized
      [ INFO] [1720034876.031766702]: Plugin vfr_hud loaded
      [ INFO] [1720034876.032100765]: Plugin vfr_hud initialized
      [ INFO] [1720034876.032145713]: Plugin vibration blacklisted
      [ INFO] [1720034876.032214983]: Plugin vision_pose_estimate loaded
      [ INFO] [1720034876.036746598]: Plugin vision_pose_estimate initialized
      [ INFO] [1720034876.036831077]: Plugin vision_speed_estimate loaded
      [ INFO] [1720034876.038851233]: Plugin vision_speed_estimate initialized
      [ INFO] [1720034876.038944619]: Plugin waypoint loaded
      [ INFO] [1720034876.041435713]: Plugin waypoint initialized
      [ INFO] [1720034876.041480660]: Plugin wheel_odometry blacklisted
      [ INFO] [1720034876.041566233]: Plugin wind_estimation loaded
      [ INFO] [1720034876.044150296]: Plugin wind_estimation initialized
      [ INFO] [1720034876.044288838]: Built-in SIMD instructions: ARM NEON
      [ INFO] [1720034876.044343473]: Built-in MAVLink package version: 2022.12.30
      [ INFO] [1720034876.044360973]: Known MAVLink dialects: common ardupilotmega ASLUAV AVSSUAS all cubepilot development icarous matrixpilot paparazzi standard storm32 uAvionix ualberta
      [ INFO] [1720034876.044389983]: MAVROS started. MY ID 1.240, TARGET ID 1.1`

      posted in Ask your questions right here!
      D
      Denver Bennett
    • MAVLink and MAVROS NOT connecting to PX4

      Hello,

      I think I am having issues connecting MAVROS and MAVLink to PX4. I entered in voxl2:/$ rostopic echo /mavros/state and got the following result:
      `
      header:
      seq: 0
      stamp:
      secs: 1718964556
      nsecs: 273377842
      frame_id: ''
      connected: False
      armed: False
      guided: False
      manual_input: False
      mode: ''
      system_status: 0

      `

      What is the issue? Is this port related? Which configuration file do I need to edit? Thanks!

      posted in Ask your questions right here!
      D
      Denver Bennett
    • Issues with facilitating MAVROS communication between Jetson Orin and VOXL2

      Hi,
      I have been attempting to setup communication between a VOXL2 and a Jetson AGX Orin utilizing MAVROS and have had trouble doing so. I am running ROS2 Iron on the Jetson Orin. The Orin and VOXL are connected via USB-C, both devices are fully powered on and able to be configured. The VOXL2 also is attached to an IO board that allows it to connect to QGroundControl and an RC. The VOXL2 is using SDK version 1.1.3 with the according IO version and PWM8IO installed to allow for 8 motor functionality. I have the VOXL set to wifi mode softap and the Orin on this network, and in the px4 launch config file I have the urls set according dhcp addressing as follows:
      <arg name="fcu_url" default="udp://:14540@192.168.8.1:14540" />
      <arg name="gcs_url" default="udp://@192.168.8.10:14550" />
      When manually inspecting the MAVlink server on the VOXL2, it shows that there is a connection made, and in a separate terminal I can see the ROS2 topic list update accordingly when the node is launched via px4.launch. However, when attempting to echo these topics or view/change parameters, no information from the VOXL2 is being received. I am new to the VOXL and MAVROS systems, so any help would be appreciated in these efforts. Additionally, if this is a question better suited for the forums of MAVROS, I apologize for asking here and will move this question that way.
      Thanks.

      posted in Ask your questions right here!
      D
      Denver Bennett
    • RE: Voxl2 SDK 1.3.0

      To expand upon this a little with my setup,
      I am connecting 8 single esc's through the PWM board from the IO expander board.
      I also have a jeti receiver in SBUS connected to the IO.
      I have doodle labs connected and set up to where it can ping another computer but nothing shows on qgroundcontrol on that computer.
      The IO board is flashing orange so RC connection but there is no blue light so it is not receiving px4.

      Thank you

      posted in Ask your questions right here!
      D
      Denver Bennett
    • Voxl2 SDK 1.3.0

      Hello,

      I read that Voxl2 sdk 1.3.0 was out and I put it on my system. However, my voxl2 io and connection to qgroundcontrol no longer work.

      I am not receving px4 signals on the io. px4 in the foreground is constantly saying kill switch enabled with no way to turn it off.
      Doodle labs show that they are connected but also not sending packets to qgroundcontrol.

      Is there IO firmware for sdk 1.3.0?

      Thank you

      posted in Ask your questions right here!
      D
      Denver Bennett
    • MAVRS: offboard mode issues, ./run_mavros_test.sh

      Hello,

      I hope you are well. I am following the How to Run MAVROS tutorial. So far, I've been able to follow the entire tutorial without issues. I'm working on launching the simple-example demo by running the command ./run_mavros_test.sh.

      I'm currently running this command on a VOXL2, but it is not mounted on any drone. The VOXL2 only has some image sensors attached, but that's it. When I run the command ./run_mavros_test.sh, it runs, but then terminal stops printing at [ INFO] [1716998627.576438699]: waiting for offboard mode.

      What is the issue with offboard mode?

      Earlier, terminal printed some lines which read as follows:

      [ WARN] [1716998622.782124555]: Could not retrive negate_measured_roll parameter value, using default (0)
      [ WARN] [1716998622.782390009]: Could not retrive negate_measured_pitch parameter value, using default (0)
      [ WARN] [1716998622.784349536]: Could not retrive negate_measured_yaw parameter value, using default (0)
      [ WARN] [1716998622.786280367]: Could not retrive debounce_s parameter value, using default (4.000000)
      [ WARN] [1716998622.786552227]: Could not retrive err_threshold_deg parameter value, using default (10.000000)

      I then ran the commands
      roslaunch voxl_mpa_to_ros voxl_mpa_to_ros.launch,
      systemctl start voxl-px4-imu-server,
      systemctl enable voxl-px4-imu-server, and
      ./run_mavros_test.sh
      but I still have not fixed the issue with offboard mode.

      What am I doing wrong? How can I fix offboard mode?

      Thanks!

      posted in ROS
      D
      Denver Bennett
    • MAVROS: `waiting for offboard mode` still loading

      Hello,

      I hope you are well. I am following the How to Run MAVROS tutorial. So far, I've been able to follow the entire tutorial without issues. I'm working on launching the simple-example demo by running the command ./run_mavros_test.sh.

      I'm currently running this command on a VOXL2, but it is not mounted on any drone. The VOXL2 only has some image sensors attached, but that's it. Is the waiting for offboard mode still running because the VOXL2 is not connected to a drone?

      Thanks!

      posted in ROS
      D
      Denver Bennett
    • Output based on VOXL tflite live footage/bounding boxes

      Hello,

      I hope you are well. I am trying to make it so that I can take use the live output from the MobileNet and write a python script that uses that output. Where do I start? How can I do this?

      For example I would like to write a python script that each time a keyboard is detected, the python script prints "keyboard". I would also like to make it so that I could take the live outputs from a depth estimation model and have the python script print the estimated depth.

      Thank you!

      posted in Ask your questions right here! tflite tflite-server mobilenet
      D
      Denver Bennett
    • RE: Automatic syncing object models across multiple VOXL2s

      @Moderator So is voxl-tflite-server what is used to communicate and transfer the model across different voxls?

      posted in Ask your questions right here!
      D
      Denver Bennett
    • Automatic syncing object models across multiple VOXL2s

      Hello,

      I'm trying to get an object-detection-model-guided drone. I am also trying to get it so that I can have an object detection model (like the MobileNet) on one VOXL2 and then be able to sync that same model onto other VOXL2s. I would like to have it so that the modifications I make to the model (weights, parameters, training data, etc), can automatically be pushed or synchronized across all the other VOXL2s I am using.

      How can I do this?

      I typed voxl-{TAB}{TAB} in terminal, and it seems to me like voxl-configure-docker-support, voxl-configure-mavlink-server, voxl-configure-tflife, voxl-inspect-mavlink, voxl--mavcam-manager, voxl-mavlink-server, and voxl-tflife-server are the places to start, but I am not sure as I am new to this.

      Where should I start?

      Thank you!

      posted in Ask your questions right here!
      D
      Denver Bennett
    • RE: Doodle Labs Mini Integration with VOXL 2

      @Vinny Thank you so much! I was able to solder a wire that mimics the one in the link and it works perfectly! 🙂

      posted in Cellular Modems
      D
      Denver Bennett
    • Doodle Labs Mini Integration with VOXL 2

      Hello,

      I am trying to integrate a doodle labs mini to a voxl 2.

      My current setup:
      I have this doodle labs mini, it has a different cable system then the one shown in the modal ai documentation. https://techlibrary.doodlelabs.com/minioem-mesh-rider-radio-connector-descriptions-2023-update

      I am using the usb3.0 adapter: https://www.modalai.com/products/m0125?variant=47083939791152

      I have configured the modem in voxl to be doodle labs. Note: I did not get my doodle labs from the modal ai store.

      My issue is that the doodle labs gets power and connects to my other doodle labs but the voxl2 does not recognize it as an ethernet port (eth0 not showing up).

      I have soldered from the doodle labs port 5 to the first 4 slots in the usb 3.0 port on the adapter. I have also tried with a usb3.0 J port to usb3.0 female to usb2.0 male to usb2.0 J port.

      Do i need to get the usb 2.0 adapter? https://www.modalai.com/products/m0078

      Thank you for your help 🙂

      Denver

      posted in Cellular Modems
      D
      Denver Bennett
    • RE: S1000+ integration

      @Alex-Kushleyev Thank you! This worked perfectly, got all of the motors spinning 🙂

      posted in Ask your questions right here!
      D
      Denver Bennett
    • RE: S1000+ integration

      Thank you so much for the help @Alex-Kushleyev. I have made it much farther but it is not working yet.

      A list of things I have done:
      Updated the VOXL IO through the voxl-esc tools on this post https://forum.modalai.com/topic/2446/connecting-i2c-device-on-voxl2/19. Got a flashing blue light during install.
      Updated px4 to the beta IO version through the deb file from this post: https://forum.modalai.com/topic/3265/additional-voxl-2-pwm-ouputs/6.
      It didnt work the first time because of being 1.0.4 instead of 1.0.5 so I updated it along with slpi with this post https://forum.modalai.com/topic/3022/voxl2-mini-build/5.

      Here is some of the outputs I am getting:

      voxl2:/$ voxl-version
      dpkg-query: package 'voxl-suite' is not installed and no information is available
      Use dpkg --info (= dpkg-deb --info) to examine archive files,
      and dpkg --contents (= dpkg-deb --contents) to list their contents.
      --------------------------------------------------------------------------------
      system-image: 1.7.4-M0054-14.1a-perf
      kernel:       #1 SMP PREEMPT Fri Feb 9 21:59:24 UTC 2024 4.19.125
      --------------------------------------------------------------------------------
      hw platform:  M0054
      mach.var:     1.0
      --------------------------------------------------------------------------------
      voxl-suite:   
      --------------------------------------------------------------------------------
      Packages:
      Repo:  http://voxl-packages.modalai.com/ ./dists/qrb5165/sdk-1.1/binary-arm64/
      Last Updated: 2023-03-02 13:03:52
      List:
      dpkg-query: no packages found matching modalai
      kernel-module-voxl-fsync-mod-4.19.125     1.0-r0
      kernel-module-voxl-gpio-mod-4.19.125      1.0-r0
      kernel-module-voxl-platform-mod-4.19.125  1.0-r0
      libqrb5165-io                             0.4.2
      libvoxl-cci-direct                        0.2.1
      libvoxl-cutils                            0.1.1
      mv-voxl                                   0.1-r0
      qrb5165-bind                              0.1-r0
      qrb5165-dfs-server                        0.2.0
      qrb5165-imu-server                        1.0.1
      qrb5165-rangefinder-server                0.1.1
      qrb5165-slpi-test-sig                     01-r0
      qrb5165-system-tweaks                     0.2.6
      qrb5165-tflite                            2.8.0-2
      voxl-bind-spektrum                        0.1.0
      voxl-camera-calibration                   0.5.3
      voxl-camera-server                        1.8.9
      voxl-ceres-solver                         2:1.14.0-10
      voxl-configurator                         0.5.2
      voxl-cpu-monitor                          0.4.7
      voxl-docker-support                       1.3.0
      voxl-elrs                                 0.1.3
      voxl-esc                                  1.4.0
      voxl-feature-tracker                      0.3.2
      voxl-flow-server                          0.3.3
      voxl-fsync-mod                            1.0-r0
      voxl-gphoto2-server                       0.0.10
      voxl-gpio-mod                             1.0-r0
      voxl-jpeg-turbo                           2.1.3-5
      voxl-lepton-server                        1.2.0
      voxl-libgphoto2                           0.0.4
      voxl-libuvc                               1.0.7
      voxl-logger                               0.3.5
      voxl-mavcam-manager                       0.5.3
      voxl-mavlink                              0.1.1
      voxl-mavlink-server                       1.3.2
      voxl-modem                                1.0.8
      voxl-mongoose                             7.7.0-1
      voxl-mpa-to-ros                           0.3.7
      voxl-mpa-tools                            1.1.3
      voxl-neopixel-manager                     0.0.3
      voxl-open-vins                            0.4.4
      voxl-open-vins-server                     0.2.18
      voxl-opencv                               4.5.5-2
      voxl-platform-mod                         1.0-r0
      voxl-portal                               0.6.3
      voxl-px4                                  1.14.0-2.0.69-voxl2-io-cleanup
      voxl-px4-imu-server                       0.1.2
      voxl-px4-params                           0.3.3
      voxl-qvio-server                          1.0.0
      voxl-remote-id                            0.0.9
      voxl-streamer                             0.7.4
      voxl-tag-detector                         0.0.4
      voxl-tflite-server                        0.3.1
      voxl-utils                                1.3.8
      voxl-uvc-server                           0.1.6
      voxl-vision-hub                           1.7.3
      voxl2-system-image                        1.7.4-r0
      voxl2-wlan                                1.0-r0
      --------------------------------------------------------------------------------
      

      It does this after a fresh deb install:

      
      voxl2:/$ voxl-px4 -d | grep VOXL2_IO
      ERROR [parameters] Timeout waiting for parameter_client_set_value_response for VOXL2_IO_FUNC1
      ERROR [parameters] Timeout waiting for parameter_client_set_value_response for VOXL2_IO_FUNC2
      ERROR [parameters] Timeout waiting for parameter_client_set_value_response for VOXL2_IO_FUNC3
      ERROR [parameters] Timeout waiting for parameter_client_set_value_response for VOXL2_IO_FUNC4
      ERROR [parameters] Timeout waiting for parameter_client_set_value_response for VOXL2_IO_MIN
      

      and this every other time:

      voxl2:/$ voxl-px4 -d | grep VOXL2_IO
      Got topic data before configuration complete
      Got topic data before configuration complete
      Got topic data before configuration complete
      Got topic data before configuration complete
      Got topic data before configuration complete
      Got topic data before configuration complete
      Got topic data before configuration complete
      Got topic data before configuration complete
      Got topic data before configuration complete
      Got topic data before configuration complete
      Got topic data before configuration complete
      Got topic data before configuration complete
      Got topic data before configuration complete
      

      Do you know why VOXL_IO is not running? Thank you

      Denver

      posted in Ask your questions right here!
      D
      Denver Bennett
    • S1000+ integration

      Hello, I am trying to get the voxl 2 working with the DJI s1000+ frame but I am having difficulty with the 8 motors. voxl2 is 1.1.3

      I have the voxl2 connected to the voxl io board which then has a all 8 pwm ports going to the 8 esc on the s1000+. I just recently got the voxl io output to show in qground but there are only 4 options for pwm outputs. Also, the esc's do not detect the input from the io board.

      How do i allow for 8 pwm values in qground and is there a reason that there wouldnt be a signal to the esc's or is that because of an issue elsewhere?

      thank you

      denver

      posted in Ask your questions right here!
      D
      Denver Bennett