ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Home
    2. labkit
    L
    • Profile
    • Following 0
    • Followers 1
    • Topics 3
    • Posts 13
    • Best 0
    • Controversial 0
    • Groups 0

    labkit

    @labkit

    0
    Reputation
    5
    Profile views
    13
    Posts
    1
    Followers
    0
    Following
    Joined Last Online

    labkit Unfollow Follow

    Latest posts made by labkit

    • RE: Using Mocap with ROS 2 for Starling 2

      @Zachary-Lowell-0 I said yesterday that echoing the /fmu/out topics only worked if voxl-px4 was disabled on startup and run in a terminal with voxl-px4. This no longer appears to be the case, although I don't know what changed from yesterday to cause this. Now ros2 topic echo can print those topics when px4 is launched at startup. However, the topics still don't print the data I would expect if the drone were correctly reading the data I publish to /fmu/in/visual_odometry, unchanged from yesterday.

      The qvio server was on. I disabled it, but that didn't fix the issue of the drone not using the data from /fmu/in/vehicle_visual_odometry. I believe that shutting down this server should disable VIO, correct? This is the output after disabling qvio server and having px4 enabled to launch at startup.
      a73ed027-db6e-4892-ae6d-13dca2712780-image.png

      Here is the output of /fmu/out/vehicle odometry when I am not publishing to /fmu/in/vehicle_visual_odometry
      6de15cf0-ea0d-4103-b0b1-3f4790418efc-image.png

      And here is the output when I am publishing to it using the command topic pub /fmu/in/vehicle_visual_odometry px4_msgs/msg/VehicleOdometry '{timestamp: 1234567890, timestamp_sample: 1, pose_frame: 1, position: [1.23, 4.56, 7.89], q: [0.707, 0.707, 0.0, 0.0], velocity_frame: 1, velocity: [0.5, 1.0, -2.3], angular_velocity: [0.1, 0.2, -0.3], position_variance: [0.01, 0.02, 0.03], orientation_variance: [0.001, 0.002, 0.003], velocity_variance: [0.005, 0.01, 0.02], reset_counter: 0, quality: 1}' which is supposed to provide it with test mocap data.

      90d37817-3739-4f43-ac8b-cd45656ec2cb-image.png

      This is the value of ekf2_ev_ctrl from QGroundControl.
      d29e0b89-eb6c-4a6d-988c-523f3b63b663-image.png

      posted in Starling & Starling 2
      L
      labkit
    • Using Mocap with ROS 2 for Starling 2

      The flight cage I am using has an Optitrack motion capture camera system installed that communicates my Starling 2 drone's position data on the LAN using NatNet protocol. I have a ROS 2 package on my computer that can receive this data. I plan to transmit this data to the drone after it has been converted to the appropriate format. By referencing this guide, I see that mocap data should be published to the vehicle_visual_odometry topic. When PX4 is running on the drone, I can access the ROS 2 topic /fmu/in/vehicle_visual_odometry. However,when I publish test data to this topic it does not have any obvious effect. By using the ros2 topic echo command I can see that the data is indeed getting published. However, echoing the /fmu/out commands return nothing, including the commands that are supposed to return the drone's position.

      Publishing to /fmu/in/vehicle_visual_odometry
      02df36e2-67e4-4f42-816d-8c10fe9f589d-image.png

      Listening to /fmu/in/vehicle_visual_odometry while publishing topic
      da3eb454-a2d3-47c0-b8c7-9b04b7fb1d0e-image.png

      Attempting to listen to /fmu/out topics
      e85822f3-0373-459e-bc12-df7999476f03-image.png

      When I disable PX4 with systemctl disable voxl-px4 I am able to view the data from these /fmu/out topics. But still, publishing to vehicle_visual_odometry does not change the /fmu/out readings that display vehicle position.

      Images of /fmu/out commands when not publishing to /fmu/in/vehicle_visual_odometry
      86d3c2e7-4285-414b-b1c0-3a750fc59d0e-image.png

      b5bd5c26-ffee-4646-acf9-f37be9ecb945-image.png

      when publishing to /fmu/in/vehicle_visual_odometry
      72af74a1-9b31-4fa1-9001-1bdb4e017309-image.png

      42fa3eb3-7974-47d5-be38-e7a0afe6dbdc-image.png

      posted in Starling & Starling 2
      L
      labkit
    • RE: "Serial Port Closed!" and other HITL Errors

      @Eric-Katzfey Issue is mostly resolved. There were two main errors to fix. The first was that the cable that I was using needed to have its RX and TX wires swapped as Vinny pointed out. The second was that Docker Desktop needed to be uninstalled and replaced with only the core Docker CE Engine. After doing this, the HITL seems to be up and running on the alternate Linux computer I tested with. On the original computer, the "Serial port closed error" is no longer present although there does seem to be a graphics issue when attempting to run the Gazebo image with graphics.

      8d0e6ab0-9969-4fb4-853c-4879b46992bf-image.png

      Once this is fixed I think it should be all ready to perform simulations.

      posted in Starling & Starling 2
      L
      labkit
    • RE: "Serial Port Closed!" and other HITL Errors

      @Eric-Katzfey I will look into trying this.

      posted in Starling & Starling 2
      L
      labkit
    • RE: "Serial Port Closed!" and other HITL Errors

      Also, ignore my earlier post that said I had fixed things by performing the tutorial steps in a different order. I was mistaken in thinking I had resolved the original issue. The next message explained why I made that mistake.

      posted in Starling & Starling 2
      L
      labkit
    • RE: "Serial Port Closed!" and other HITL Errors

      @Eric-Katzfey I rewired the cable but the issue hasn't changed at all. It's still reporting "Serial port not found!" and the /dev/ttyUSB0 that you mentioned still isn't available from the Gazebo Docker command line.

      posted in Starling & Starling 2
      L
      labkit
    • RE: "Serial Port Closed!" and other HITL Errors

      @Vinny I swapped pins 2&3 so that the former pin 2 is now pin 3 and vice versa. The swap occurred with no damage to the pins as far as I am aware, but the "Serial port closed" issue is still present. This image shows the correct rewiring, right? The RX and TX wires (white and green) are switched and the USB to JST is in J18 on the VOXL 2. The ESC is unplugged from VOXL 2.

      9232cc3f-40c4-4b01-9af2-7f714c5f9b26-image.png

      posted in Starling & Starling 2
      L
      labkit
    • RE: "Serial Port Closed!" and other HITL Errors

      @Eric-Katzfey I have figured out why I thought that the drone wasn't giving me a "Serial port closed!" error a couple of days ago but has been doing so yesterday and today. When the gazebo docker container has not been created, the first attempt to create it will result in a "Serial port closed!" error. However, when the container is already running, future attempts to create it will not display the error, they will simply show the following message rather than creating a new container. At first I thought that this message meant that the connection to the drone had successfully avoided the "serial port closed" message.
      708d8de9-27a5-40fb-993a-bb68b0248fff-image.png

      The bad news is that this means that there may never have been a successful connection between the laptop and drone at all. A hardware misconfiguration can't be ruled out in this case. As I said, I had to remove a connection to the ESC 4 in 1 in order to connect the cable to the JST port on the VOXL2. If the connection's in the right place, it might be a permissions issue like you mentioned, although docker was run as privileged and I'm already in dialout.

      7d80004c-f34b-41fb-8e3f-3a17e6194dcb-image.png

      posted in Starling & Starling 2
      L
      labkit
    • RE: "Serial Port Closed!" and other HITL Errors

      I got Docker to avoid the error by doing the steps in the tutorial in a different order with setup on the drone coming first. This must have been why I didn't receive the "serial port closed" error when I first tried to set up the simulation two days ago. However, I don't think the simulation is in shape to run yet, all I've managed is to get back to where I was originally....

      posted in Starling & Starling 2
      L
      labkit
    • RE: "Serial Port Closed!" and other HITL Errors

      @Eric-Katzfey Here are my results with the same commands.
      3813ac9f-e1a7-4cf5-b0ad-676ba54ddae4-image.png
      I ran docker in the dialout group but it didn't seem to make a difference. I was already in root.
      afc14ddb-b217-4e86-a6b5-65ea8a3edcab-image.png
      As you can see, much of the contents of /dev is missing in docker compared to what's available from the linux command line. It's not only ttyUSB0.

      posted in Starling & Starling 2
      L
      labkit