a year later

rolandash Hi Rolandash, I am having USB issue for this onboard computer again. Now my raspberry pi cannot detect the USB device(mindracer). I followed the configuration for onboard computer and used a USB cable to connect raspi and mindracer with USB2. But when I use ls /dev on Raspi, it cannot show USB0. Of course when I run roslaunch mavros .. fcu:URL:dev/ttyUSB0:921600, it shows no such file or directory.

I haven't used it for more than 7 months since last time I succeed. Then I purchased a new mindracer (because my last one was fired due to short circuit) and assembled them. I even soldered another USB cable, it still cannot detect the mindracer. And raspberry pi is powered from a 5V BEC not from USB. Do you have any idea what is the possible reason? Now I have TFmini on GPS port, PMW3901 on U2 port (as you instructed in another post). Will those sensors influence it?

    I think it might be the raspi-config. I don't remember it I enable serial communication or not. The operating system is a an image I saved before. I think it should enabled the serial. But I will double check tomorrow.

      zhanghaijason

      A straight way to separate the problem is to connect the MindRacer to QGC through USB2 port. If succeed then it shows the USB port works fine. The problem is mostly on Raspi side.

        rolandash Hi Thanks for the tip. It turns out it is the USB2 not working. Is it because of the expansion board or the mindracer? Which one do you think is more possible? And could you teach me the 2nd method using telem 1 if when you have time? Thanks.

          zhanghaijason
          But the problem now is Telem1 seems not working properly?
          I think better to make sure Telem1/2 not been already physically damaged first.

            rolandash As we talked before in the other post, when using mindracer to power the TFmini, Telem1 can work with TFmini (I would say 70% success rate) when only using USB to power the mindracer. But definitely not working when using battery and the MRPDB to power the mindracer.
            Then I followed your advice to use the MRPDB 5V BEC to power the TFmini.

            Now I use multimeter tested the output of Telem1 when mindracer is powered. VCC 5.08V, FMU_TX 3.23V, RX 3.23. Telem2 VCC 5.08V, TX 2.9V, RX 3.2V. Are there anything else I can do to test the Telems? And NO OUTPUT from USB2.

              zhanghaijason

              That should not happen. USB2 VCC can not be 0V, especially when you have Telem1 VCC as 5.08V, as they are all connected.
              If that is true, then must be something wrong with the expansion board. Check the contact of USB2 socket on expansion board. check the pin1 of USB2 and pin 2 of J3, make sure they are connected.

                rolandash pim 1 of USB2 and pin2 of J3 are connected. And I double checked the USB2. It is giving 5V on VCC. I think my last measurement was wrong.

                  zhanghaijason I tried method 2 and used /dev/ttyAMA0, not USB0, now it seems working, the ROS can get the FCU heartbeat. I will try offboard mode to see if it is really working or not.

                    zhanghaijason

                    To use Telem1 for onboard computer, make sure telem1 baud rate setting is the same as in Raspi side.
                    Seems in later px4 firmware version you do not need to change source code to set that. You can set in QGC through parameter:
                    SER_TEL1_BAUD
                    on the fly.

                      6 days later

                      rolandash Hi sorry for the delay. It worked once. I tried 3 or 4 times with offboard hovering. Only succeed once (Everytime, It could switch to offboard (If I publish the local position with ROS before switching mode), but only took off and hovered once.) I don't know it is because I am using raspi 3A+ (less powerful) or not. I will receive some raspi 3B+ tomorrow and will experiment more.

                        rolandash I can switch to offboard, because the green LED blinked when I switch. However, I use a mavros etpoint_position/local topic to publish desired local position (0,0,0.7). The drone won't take off and hover. And I saw a massage from mavros says "No local position". So I am wondering if the distance sensor and optical flow can publish local position or not (or may be not fast enough, it is only 10hz in GCS). I uploaded one of such logs: https://review.px4.io/plot_app?log=01cd4714-6b13-45f0-ad20-c65ca3478ce5 I also tried telem2, same result. I may need to ask mavros developers to see what should be the possible reason. Thanks.

                        I tried two more times and now it can take off. one crashed and one succeed. I am just confused why it is kind of unreliable.

                          is the uploaded log a successful takeoff or failure?

                          Do you always get "no local position" message even when success?

                            rolandash The log is a failure. The drone didn't take off at all on this log. When I succeed, I didn't see 'no local position'. I think it might be the problem of the optical flow and distance sensor positioning system. Because when I tried with Optitrack for positioning. It worked well.

                              zhanghaijason
                              As the discussion is more related to PMW3901 so I will move to that thread to continue instead of getting this unrelated post too long...