G
geekscape

  • Oct 24, 2023
  • Joined Sep 15, 2023
  • 0 best answers
  • hi @erik, in an earlier post, I expressed my security concerns, regarding a third-party web-site, e.g RobotHub, requesting my Wi-Fi SSID and password … see https://discuss.luxonis.com/d/2136-example-codes-for-rae/15 … even if to only produce a QR code. There are other, more secure and less complicated approaches for customers, e.g provide open-source code that they can inspect and run on their computer to produce the QR code for encoding their Wi-Fi credentials for their RAE. Or, just ssh in via the USB-C cable and run a small Wi-Fi configuration script (good for running my RAE at multiple different locations in the world … with different Wi-Fi credentials).

    My initial primary interest is running ROS2 on RAE, running SLAM and Depth AI ML Models a.s.a.p and developing that out further. I assume that RobotHub is not yet ready to help with using ROS2. Given that Luxonis instructions suggest shutting down RobotHub, before running ROS2, to prevent conflicts when accessing hardware … see https://github.com/luxonis/rae-ros#ssh (step 4). I'd like my RAE to (eventually) boot-up directly (or via an option) into ROS2 … and to minimize boot time and save scarce resources by not running local RobotHub processes at all (see next point).

    I also notice that when the RAE robot is powered up, there is an on-board RobotHub process (/app/controller/rae_motors) that is consuming over 80% of the CPU (> 40% user and 40% system) … and the first thing I do is stop that RobotHub related (?) process from consuming most of the precious available compute cycles.

    I did follow the Luxonis instructions for connecting my RAE robot to my RobotHub account. Didn't have any success. Hard to diagnose problems when the source code running on the RAE and the code running on the Luxonis backend RobotHub host is unavailable to help with diagnosis. Looks like I'm not alone with RobotHub set-up issues … and I'm sure you'll be sorting that out.

    So, I hope this explains why my current efforts are more directed at ROS2 on RAE, since there is source code to help figure things out (whilst the documentation is being completed), the end result is more capable, e.g running SLAM … and ROS2 is the de-facto open-source standard in the robotics industry.

    • The easiest way to get going (from my perspective) is to ssh into the RAE over the USB-C cable.
      This works at least using Ubuntu Linux on your host system … and perhaps other operating systems too.
      - Connect RAE to your host system via USB-C
      - Press RAE power button (underneath … once) … and you'll see the OLED screen background turn on (dark grey) and eventually show the connect to RobotHub message. I'm not worrying about RobotHub for the moment !
      - On your host system (using USB-C cable, not Wi-Fi) … ssh root@192.168.197.55 (no password required)
      - Set-up Wi-Fi (see https://github.com/luxonis/rae-app#enabling-internet-connection), but you probably need to type the command wpa_supplicant -B -i wlp1s0 -c /etc/wpa_supplicant.conf twice !
      - Test Wi-Fi connection from the RAE … ping 8.8.8.8
      - Follow instructions for running RAE ROS2 Docker container … https://github.com/luxonis/rae-ros#ssh
      - Download RAE ROS2 Docker container … much faster than trying to build it yourself
      - Prior experience with using ROS2 is really helpful

      • erik replied to this.
      • Doo likes this.
      • In the meantime, try here… https://github.com/luxonis
        Perhaps the two most relevant …
        - https://github.com/luxonis/rae-app#enabling-internet-connection # Setting up Wi-FI
        - https://github.com/luxonis/rae-ros # Download Rae ROS2 Docker image from DockerHub
        The ROS2 code has C++ code that shows how to interact with the peripherals.
        Running ROS2 enables interacting with the peripherals via ROS2 messages … using your favorite language (if supported by ROS2).

      • hi @erik, whilst the Luxonis RobotHub looks useful … it is a good thing for the rae (and all other products) to be able to operate independently of RobotHub in other cases. After all, it is running Linux … and Wi-Fi should just work 🙂

        I haven't figured out yet why the wpa_supplicant process is failing on my rae … the first time that the wpa_supplicant -B -i wlp1s0 -c /etc/wpa_supplicant.conf command is entered and then succeeds the second time, but will diagnose further.

        Regarding using the Luxonis RobotHub to configure Wi-Fi on the rae robot … entering one's personal Wi-Fi network SSID and password on a third-party web-site is a security risk, which some people may be comfortable with, but really is a poor security practice that should be avoided. At the very least, offering an open-source tool that can be reviewed and run locally to produce a QR-code on the desktop would be better … thanks !

        Note: I realize that completing a KickStarter hardware project … including all the software, firmware and documentation is a huge endeavor. Please don't take my comments as being overly critical … I like the Luxonis products, as well as the commitment to open-source.

        • hi @Wijay, I found that I needed to enter the command wpa_supplicant -B -i wlp1s0 -c /etc/wpa_supplicant.conf twice (fails the first time).

          The following sequence of commands works for my rae …
          systemctl stop systemd-networkd
          wpa_supplicant -B -i wlp1s0 -c /etc/wpa_supplicant.conf
          ps ax | grep wpa_supplicant # If process isn't running, try again
          wpa_supplicant -B -i wlp1s0 -c /etc/wpa_supplicant.conf
          systemctl status systemd-networkd # Network daemon should have restarted automatically
          ifconfig wlp1s0 # Interface should be up and have an IP address