ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Home
    2. Darshit Desai
    3. Posts
    • Profile
    • Following 0
    • Followers 0
    • Topics 37
    • Posts 187
    • Best 0
    • Controversial 0
    • Groups 0

    Posts made by Darshit Desai

    • RE: Unable to see rostopics published by mpatoros2 foxy in my humble docker container

      @Zachary-Lowell-0 I am not sure how I resolved this, but as far as I remember there was px4_msgs versioning issue where I wasn't using either the correct ones or something

      posted in Ask your questions right here!
      Darshit DesaiD
      Darshit Desai
    • Version control the Linux distro, ideas

      Hello Modal AI team,

      I have a general question on linux distro. How does the version control of a Linux distro happen? I know this is a simple Google search, but from what I have observed in voxl upgrade tarballs there are two folder voxl-suite and system-image, I was under the impression that to make a system image a person can just use the dd command and make a backup.img file but modal AI seems to be using something more complicated than that. This is coming from my very limited knowledge of making backup system images of raspberry pi 3.

      I have a bunch of drones and I am working on drone swarms and its always annoying to install the deb files one by one and revving up the versions, right now there hasn't been any changes in the rootfs or the core root drivers and stuff but I wanted to know if there is an architecture that I should follow just for my knowledge. I also have to change a number of bash files manually right now to make sure the dds servers start as I want in a similar fashion on all drones which is pretty annoying.

      Any tooling that you use like dockers, ci tools, cross compile etc

      posted in VOXL SDK
      Darshit DesaiD
      Darshit Desai
    • RE: Utilizing all CPUs on Voxl2

      @Mrunal-Sarvaiya voxl set cpu mode performance and than try running your experiment. By default some cpu cores are slower than the others even in perf mode

      posted in Ask your questions right here!
      Darshit DesaiD
      Darshit Desai
    • Unable to subscribe to vehicle_command_position topic

      Hi @Moderator I have been trying to subscribe to vehicle_local_position ROS2 PX4 topic in my code but that wasn't working so I checked by echoing the topic directly from the terminal and it shows this error?

      c39768a1-c454-4f6f-a893-6aca2dc148c2-image.png

      After doing some search online, I found that the PX4 and px4_msgs version might be different, since I am using voxl_ros2_foxy any ideas why this would be happening?

      Voxl version info

      voxl2:~/ros2_ws/src/Project_LegionAir(ROS2-port)$ voxl-version
      --------------------------------------------------------------------------------
      system-image: 1.7.1-M0054-14.1a-perf-nightly-20231025
      kernel:       #1 SMP PREEMPT Thu Oct 26 03:25:38 UTC 2023 4.19.125
      --------------------------------------------------------------------------------
      hw version:   M0054
      --------------------------------------------------------------------------------
      voxl-suite:   1.1.2
      --------------------------------------------------------------------------------
      Packages:
      Repo:  http://voxl-packages.modalai.com/ ./dists/qrb5165/sdk-1.1/binary-arm64/
      Last Updated: 2024-05-07 06:01:21
      List:
      	libmodal-cv                 0.4.0
      	libmodal-exposure           0.1.0
      	libmodal-journal            0.2.2
      	libmodal-json               0.4.3
      	libmodal-pipe               2.9.2
      	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.3
      	qrb5165-tflite              2.8.0-2
      	voxl-bind-spektrum          0.1.0
      	voxl-camera-calibration     0.5.3
      	voxl-camera-server          1.8.9.1
      	voxl-configurator           0.4.8
      	voxl-cpu-monitor            0.4.7
      	voxl-docker-support         1.3.0
      	voxl-elrs                   0.1.3
      	voxl-esc                    1.3.7
      	voxl-feature-tracker        0.3.2
      	voxl-flow-server            0.3.3
      	voxl-gphoto2-server         0.0.10
      	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-microdds-agent         2.4.1-0
      	voxl-modem                  1.0.8
      	voxl-mongoose               7.7.0-1
      	voxl-mpa-to-ros             0.3.7
      	voxl-mpa-to-ros2            0.0.2
      	voxl-mpa-tools              1.1.3
      	voxl-neopixel-manager       0.0.3
      	voxl-opencv                 4.5.5-2
      	voxl-portal                 0.6.3
      	voxl-px4                    1.14.0-2.0.63
      	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-ros2-foxy              0.0.1
      	voxl-streamer               0.7.4
      	voxl-suite                  1.1.2
      	voxl-tag-detector           0.0.4
      	voxl-tflite-server          0.3.2
      	voxl-utils                  1.3.3
      	voxl-uvc-server             0.1.6
      	voxl-vision-hub             1.7.3
      	voxl2-system-image          1.7.1-r0
      	voxl2-wlan                  1.0-r0
      --------------------------------------------------------------------------------
      
      posted in Ask your questions right here!
      Darshit DesaiD
      Darshit Desai
    • RE: Something wrong with my Starling

      @Moderator The structural integrity of the sensor mounts are fine, I checked. I am attaching a few snapshots of inspect-qvio and inspect-imu they also read ok

      Screenshot from 2024-05-17 21-42-07.png Screenshot from 2024-05-17 21-42-23.png

      Drive video of inspect-imu: https://drive.google.com/file/d/1pncppR93pNUVlOQUq3WYwkAaN5uJArgJ/view?usp=sharing

      posted in Ask your questions right here!
      Darshit DesaiD
      Darshit Desai
    • Something wrong with my Starling

      Hi @Moderator my starling seems to be a bit jittery in position mode, note I had to kill the drone once and it fell from a height of 50 cms and since than it has been like that, What could be the issue here?

      Here's a video of that for your reference

      https://drive.google.com/file/d/1IRxTXNa_IzSQwImsHnB2Iz0KVi9nhrQ8/view?usp=drivesdk

      posted in Ask your questions right here!
      Darshit DesaiD
      Darshit Desai
    • RE: VOXL2 microdds agent namespace

      @Eric-Katzfey I know this is a question for the px4 forum, but can you guys help me figure out how to run the https://github.com/PX4/px4_ros_com/blob/main/src/examples/offboard/offboard_control_srv.cpp service server here. I changed the namespace for my microdds client as you know and I am not sure if that service server is running or not, I can't find the server when I do ros2 service list or ros2 service find

      posted in Ask your questions right here!
      Darshit DesaiD
      Darshit Desai
    • RE: VOXL2 microdds agent namespace

      Hi @Eric-Katzfey that worked, now I actually want to export a variable which states the namespace of the relevant drone and the voxl-px4-start file picks up that variable and assigns the namespace but I am facing some errors because of that, could you have a look

      Here's my bashrc file

      #!/bin/bash
      # ModalAI default bashrc file
      
      #VERSION 1.2
      
      # If not running interactively, don't do anything
      case $- in
          *i*) ;;
            *) return;;
      esac
      
      # don't put duplicate lines or lines starting with space in the history.
      # See bash(1) for more options
      HISTCONTROL=ignoreboth
      
      # append to the history file, don't overwrite it
      shopt -s histappend
      
      # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
      HISTSIZE=1000
      HISTFILESIZE=2000
      
      # check the window size after each command and, if necessary,
      # update the values of LINES and COLUMNS.
      shopt -s checkwinsize
      
      # ubuntu ssh sets TERM to xterm-256color which screws with ROS
      # change it to linux spec
      export TERM=linux
      
      if [ -d /home/root/.profile.d/ ]; then
        for i in /home/root/.profile.d/* ; do
          if [ -d $i ]; then
              for j in $i/* ; do
                  if [ -f $j ]; then
                      . $j
                  fi
              done
          else
              . $i
          fi
        done
      fi
      
      # Put user-specific tweaks here or in a file in ~/.profile.d/
      export PX4_NAMESPACE="uav_1"
      

      Here's my voxl-px4-start file

      #!/bin/sh
      # PX4 commands need the 'px4-' prefix in bash.
      # (px4-alias.sh is expected to be in the PATH)
      . px4-alias.sh
      
      echo -e "\n*************************"
      echo "GPS: $GPS"
      echo "RC: $RC"
      echo "ESC: $ESC"
      echo "POWER MANAGER: $POWER_MANAGER"
      echo "DISTANCE SENSOR: $DISTANCE_SENSOR"
      echo "OSD: $OSD"
      echo "EXTRA STEPS:"
      for i in "${EXTRA_STEPS[@]}"
      do
      	echo -e "\t$i"
      done
      echo -e "*************************\n"
      
      # In order to just exit after starting the uorb / muorb modules define
      # the environment variable MINIMAL_PX4. (e.g. export MINIMAL_PX4=1)
      # This is useful for testing / debug where you may want to start drivers
      # and modules manually from the px4 command shell
      if [ ! -z $MINIMAL_PX4 ]; then
          /bin/echo "Running minimal script"
          exit 0
      fi
      
      # Figure out what platform we are running on.
      PLATFORM=`/usr/bin/voxl-platform 2> /dev/null`
      RETURNCODE=$?
      if [ $RETURNCODE -ne 0 ]; then
          # If we couldn't get the platform from the voxl-platform utility then check
          # /etc/version to see if there is an M0052 substring in the version string. If so,
          # then we assume that we are on M0052.
          VERSIONSTRING=$(</etc/version)
          M0052SUBSTRING="M0052"
          if [[ "$VERSIONSTRING" == *"$M0052SUBSTRING"* ]]; then
              PLATFORM="M0052"
          fi
      fi
      
      # We can only run on M0052, M0054, or M0104 so exit with error if that is not the case
      if [ $PLATFORM = "M0052" ]; then
          /bin/echo "Running on M0052"
      elif [ $PLATFORM = "M0054" ]; then
          /bin/echo "Running on M0054"
      elif [ $PLATFORM = "M0104" ]; then
          /bin/echo "Running on M0104"
      else
          /bin/echo "Error, cannot determine platform!"
          exit 0
      fi
      
      # Sleep a little here. A lot happens when the uorb and muorb start
      # and we need to make sure that it all completes successfully to avoid
      # any possible race conditions.
      /bin/sleep 1
      
      param select /data/px4/param/parameters
      
      # Load in all of the parameters that have been saved in the file
      param load
      
      # Start logging and use timestamps for log files when possible.
      # Add the "-e" option to start logging immediately. Default is
      # to log only when armed. Caution must be used with the "-e" option
      # because if power is removed without stopping the logger gracefully then
      # the log file may be corrupted.
      logger start -t
      
      # IMU (accelerometer / gyroscope)
      if [ "$PLATFORM" == "M0104" ]; then
          /bin/echo "Starting IMU driver with rotation 12"
          qshell icm42688p start -s -R 12
      else
          /bin/echo "Starting IMU driver with no rotation"
          qshell icm42688p start -s
      fi
      
      # Start Invensense ICP 101xx barometer built on to VOXL 2
      qshell icp101xx start -I -b 5
      
      # Auto detect the magnetometer. If one or both of these devices
      # are not connected it will fail but not cause any harm.
      /bin/echo "Looking for qmc5883l magnetometer"
      qshell qmc5883l start -R 10 -X -b 1
      /bin/echo "Looking for ist8310 magnetometer"
      qshell ist8310 start -R 10 -X -b 1
      
      # GPS and magnetometer
      if [ "$GPS" != "NONE" ]; then
      	# On M0052 the GPS driver runs on the apps processor
      	if [ $PLATFORM = "M0052" ]; then
      	    gps start -d /dev/ttyHS2
      	# On M0054 and M0104 the GPS driver runs on SLPI DSP
      	else
      	    qshell gps start
      	fi
      fi
      
      # Auto detect an ncp5623c i2c RGB LED. If one isn't connected this will
      # fail but not cause any harm. 
      /bin/echo "Looking for ncp5623c RGB LED"
      qshell rgbled_ncp5623c start -X -b 1 -f 400 -a 56
      
      # We do not change the value of SYS_AUTOCONFIG but if it does not
      # show up as used then it is not reported to QGC and we get a
      # missing parameter error.
      param touch SYS_AUTOCONFIG
      
      # ESC driver
      if [ "$ESC" == "VOXL_ESC" ]; then
          /bin/echo "Starting VOXL ESC driver"
      	qshell voxl_esc start
      elif [ "$ESC" == "VOXL2_IO_PWM_ESC" ]; then
      	if [ "$RC" == "M0065_SBUS" ]; then
      		/bin/echo "Starting VOXL IO for PWM ESC with SBUS RC"
      		qshell voxl2_io start
      	else
      		/bin/echo "Starting VOXL IO for PWM ESC without SBUS RC"
      		qshell voxl2_io start -e
      	fi
      else
      	/bin/echo "No ESC type specified, not starting an ESC driver"
      fi
      
      
      # RC driver
      if [ "$RC" == "FAKE_RC_INPUT" ]; then
          /bin/echo "Starting fake RC driver"
          qshell rc_controller start
      elif [ "$RC" == "CRSF_RAW" ]; then
          /bin/echo "Starting CRSF RC driver"
          qshell crsf_rc start -d 7
      elif [ "$RC" == "CRSF_MAV" ]; then
          /bin/echo "Starting TBS crossfire RC - MAV Mode"
          qshell mavlink_rc_in start -m -p 7 -b 115200
      elif [ "$RC" == "SPEKTRUM" ]; then
          /bin/echo "Starting Spektrum RC"
      	# On M0052 the RC driver runs on the apps processor
      	if [ $PLATFORM = "M0052" ]; then
              rc_input start -d /dev/ttyHS1
      	# On M0054 and M0104 the RC driver runs on SLPI DSP
      	else
              qshell spektrum_rc start
      	fi
      elif [ "$RC" == "GHST" ]; then
          /bin/echo "Starting GHST RC driver"
          qshell ghst_rc start -d 7
      elif [ "$RC" == "M0065_SBUS" ]; then
      	if [ $PLATFORM = "M0052" ]; then
      		apps_sbus start
      	elif [ "$ESC" != "VOXL2_IO_PWM_ESC" ]; then
          	/bin/echo "Attempting to start M0065 SBUS RC driver for original M0065 FW"
          	qshell dsp_sbus start
      		retVal=$?
      		if [ $retVal -ne 0 ]; then
      	    	/bin/echo "Starting M0065 SBUS RC driver for original M0065 FW failed"
      	    	/bin/echo "Attempting to start M0065 SBUS RC driver for new M0065 FW"
      			qshell voxl2_io start -d -p 7
      		fi
      	else
          	/bin/echo "M0065 SBUS RC driver already started with PWM ESC start"
      	fi
      fi
      
      if [ "$DISTANCE_SENSOR" == "LIGHTWARE_SF000" ]; then
      	# Make sure to set the parameter SENS_EN_SF0X to 8 for sf000/b sensor
      	qshell lightware_laser_serial start -d 7
      fi
      
      if [ "$POWER_MANAGER" == "VOXLPM" ]; then
      	# APM power monitor
      	qshell voxlpm start -X -b 2
      fi
      
      # Optional distance sensor on spare i2c
      # qshell vl53l0x start -X -b 4
      # qshell vl53l1x start -X -b 4
      
      # Start all of the processing modules on DSP
      qshell sensors start
      qshell ekf2 start
      qshell mc_pos_control start
      qshell mc_att_control start
      qshell mc_rate_control start
      qshell mc_hover_thrust_estimator start
      qshell mc_autotune_attitude_control start
      qshell land_detector start multicopter
      qshell manual_control start
      qshell control_allocator start
      qshell load_mon start
      
      # Only start the rc_update module if an actual RC driver
      # is publishing input_rc topics. Otherwise for external RC
      # over Mavlink this isn't needed.
      if [ "$RC" != "EXTERNAL" ]; then
      	qshell rc_update start
      fi
      
      qshell commander start
      
      # This is needed for altitude and position hold modes
      qshell flight_mode_manager start
      
      # Start all of the processing modules on the applications processor
      dataman start
      navigator start
      load_mon start
      
      # This bridge allows raw data packets to be sent over UART to the ESC
      modal_io_bridge start
      
      # Start microdds_client for ros2 offboard messages from agent over localhost
      microdds_client start -t udp -h 127.0.0.1 -p 8888 -n $PX4_NAMESPACE
      
      # On M0052 there is only one IMU. So, PX4 needs to
      # publish IMU samples externally for VIO to use.
      if [ $PLATFORM = "M0052" ]; then
      	imu_server start
      fi
      
      # start the onboard fast link to connect to voxl-mavlink-server
      mavlink start -x -u 14556 -o 14557 -r 100000 -n lo -m onboard
      
      # slow down some of the fastest streams
      mavlink stream -u 14556 -s HIGHRES_IMU -r 10
      mavlink stream -u 14556 -s ATTITUDE -r 10
      mavlink stream -u 14556 -s ATTITUDE_QUATERNION -r 10
      mavlink stream -u 14556 -s GLOBAL_POSITION_INT -r 30
      mavlink stream -u 14556 -s SCALED_PRESSURE -r 10
      
      # start the slow normal mode for voxl-mavlink-server to forward to GCS
      mavlink start -x -u 14558 -o 14559 -r 100000 -n lo
      
      mavlink boot_complete
      
      # Optional MSP OSD driver for DJI goggles
      # This is only supported on M0054 (with M0125 accessory board)
      if [ "$OSD" == "ENABLE" ]; then
          /bin/echo "Starting OSD driver"
          msp_osd start -d /dev/ttyHS1
      fi
      
      # Start optional EXTRA_STEPS
      for i in "${EXTRA_STEPS[@]}"
      do
      	$i
      done
      

      The errors that I get:
      5de94133-1677-4f48-8ef9-060b59bd1872-image.png

      posted in Ask your questions right here!
      Darshit DesaiD
      Darshit Desai
    • RE: VOXL2 microdds agent namespace

      @Moderator THe only way to change microdds namespace is through QGC I tried that and it worked, but the issue is I need to manually type it up on each bootup of the FMU. As shown below:

      Microdds service stopped and started with a namespace
      Screenshot from 2024-05-12 15-14-07.png

      Topics remapped on VOXL2
      47a80a0a-5959-4fc7-86d4-228fd8217b39-image.png

      So I thought I could change the voxl-px4.conf to include this as a qshell command but that also didn't work as shown below

      voxl-px4.conf file v1
      89c86a47-8775-4f97-a0a8-9e11847cae4f-image.png
      voxl-px4.conf file v2
      e57c8233-9f16-442d-8e13-393e3960e085-image.png

      Both versions resulted in the Error in the restart/power cycle of systemd service
      Screenshot from 2024-05-12 15-02-41.png

      posted in Ask your questions right here!
      Darshit DesaiD
      Darshit Desai
    • RE: VOXL2 microdds agent namespace

      @Moderator Actually this is related to MicroUXRCE Agent for streaming PX4 FMU uORB topics as ROS2 topics, there is a way to rename the namespace for that but in MODAL AI I am not sure. MPATOROS2 is perfectly fine, I can just change the namespace using this command and that is not the issue here: ros2 run voxl_mpa_to_ros2 voxl_mpa_to_ros2_node --ros-args -r __ns:=/drone3. I am talking about when there is no mpatoros2 node running and the Microdds agent streams the PX4 uorb topics as shown below:

      00c329bd-baf2-4087-8316-a7845da83881-image.png

      posted in Ask your questions right here!
      Darshit DesaiD
      Darshit Desai
    • RE: voxl-microdds-agent not publishing all topics

      @Zachary-Lowell-0 @Moderator A really important question here is what if there are two drones publishing the same name FMU topics and you haven't set the domain id different for those drones for data sharing through your custom interfaces. PX4 ROS2 docs provide a way to change the namespace of the FMU topics to be published but MODAL AI docs mention no such thing? Is there a way to do that? As most of the starling systems are being used as a swarm platform this thing is really critical

      posted in ROS
      Darshit DesaiD
      Darshit Desai
    • VOXL2 microdds agent namespace

      Hi @Moderator I am wondering if I can change the namespace as mentioned in the PX4-ROS2 docs here https://docs.px4.io/main/en/ros/ros2_comm.html#customizing-the-topic-namespace . I have 5 starlings in a swarm and I fear that at some point all of them might be subscribing or publishing to the same topic

      posted in Ask your questions right here!
      Darshit DesaiD
      Darshit Desai
    • RE: ROS foxy PCL ROS

      @Zachary-Lowell-0 Yes I was able to install docker of u22.04, but at the same time when I was running everything on natively in melodic on the drone I was able to use 3rd party libraries like PCL ROS and I was able to install it, this was because the ROS installation was left on the user. I just thought it would be same with ROS2. Although now I have set up ARM64 dockers in my desktop ubuntu so now I can make as many changes on my desktop and just push the new docker

      posted in Ask your questions right here!
      Darshit DesaiD
      Darshit Desai
    • Unable to see rostopics published by mpatoros2 foxy in my humble docker container

      a0ce53ad-08c9-4b10-940b-fcead34690e4-image.png

      Pretty much what the topic line says

      posted in Ask your questions right here!
      Darshit DesaiD
      Darshit Desai
    • Run code on boot from docker in voxl2

      Hi @Moderator I saw in the docs that for voxl1 there was a thing which allowed this functionality, does the same one exist in voxl2?

      posted in Ask your questions right here!
      Darshit DesaiD
      Darshit Desai
    • RE: ROS foxy PCL ROS

      @Moderator I just wanted to clarify something, if I am building a ubuntu ros 22.04 humble image it should be arm64 version right? Specifically arm64/v8, this is the architecture which VOXL2 has right?

      https://hub.docker.com/layers/library/ros/humble-ros-core-jammy/images/sha256-07123e8516d8c513f7e583b7377dfc00821eeacd74f657e389f2f399a8745e05?context=explore

      posted in Ask your questions right here!
      Darshit DesaiD
      Darshit Desai
    • RE: ROS foxy PCL ROS

      @Moderator I have tried building from source the pcl_conversions and pcl_msgs interfaces and using it in my workspace but when I try to build it, I get this very huge error which I cannot understand the context, So I thought that pcl_conversions might be causing that error so I removed that package entirely from my workspace and modified my code not to use it, and I almost get the same huge error. I am not sure why?

      It is able to build one package which just does a simple static tf transform but other than that it is not able to build the ones doing rigid body transformations.

      I have attached the files of the simple tf static publisher package here which the ros2 foxy is able to build: https://drive.google.com/drive/folders/1ztfUPCP5LBFMhwHVekq7Z8GiAV2sKDT7?usp=sharing

      I am also able to build the pcl_conversions and pcl_msgs from source in my workspace successfully, the tee'd output is here: https://drive.google.com/file/d/1uUnfCSvEmzaRdQDuqrffW-mAJky9wCao/view?usp=drive_link

      The only main package which is the backbone of my sensor fusion code isn't able to build both with the pcl_conversions package included and without it which just uses vanilla ros functions, their package links are here,
      pcl_msgs: https://github.com/ros-perception/pcl_msgs/tree/ros2
      pcl_conversions: https://github.com/ros-perception/perception_pcl/tree/ros2

      Vanilla ros function rigid body transformer tee'd error file: https://drive.google.com/file/d/1yVQS8FGBL1S6wfqPgEWjVe9JiV7SbR4g/view?usp=drive_link
      Package link: https://drive.google.com/drive/folders/1e_ucTv8ohAXtaPGEpLEprF6KQB8hN_O9?usp=sharing

      PCL_conversion included rigid body transformer tee'd build error file: https://drive.google.com/file/d/1uL2qk2i4GmZD0wu4TtNs3l_ACGUiZLCA/view?usp=sharing
      package link: https://drive.google.com/drive/folders/1Ep-Vn_Hr-xDXreqI9nW1r5lzcfx929Z1?usp=sharing

      Note installing packages from source is very tedious I don't know why the functionality of apt install was removed and the ros2-foxy is being built from a rosinstall generator, but doing such a thing makes the use of ros2 limited to just mpatoros2 node which isn't much because I still need to install a docker container now to use ros2 libraries if this doesn't work. (https://gitlab.com/voxl-public/voxl-sdk/third-party/voxl-ros2-foxy/-/blob/master/build.sh?ref_type=heads#L139)

      posted in Ask your questions right here!
      Darshit DesaiD
      Darshit Desai
    • RE: ROS foxy PCL ROS

      @Moderator it seems that since the voxl-ros2-foxy is just using a rosinstall generator its just installing lesser than bare bones foxy which is needed for building mpatoros2. If I mention pcl_ros in the rosdep install line and the rosinstall generator line would that also make a .deb file with that installed in it?

      #!/bin/bash
      #
      # builds everything without installing
      #
      # Modal AI Inc. 2023
      # author: zachary.lowell@ascendengineer.com
      
      
      set -e
      
      AVAILABLE_PLATFORMS="qrb5165"
      
      print_usage(){
          echo ""
          echo " Build the current project based on platform target."
          echo ""
          echo " Usage:"
          echo ""
          echo "  ./build.sh qrb5165"
          echo "        Build 64-bit binaries for qrb5165"
          echo ""
          echo ""
      }
      
      
      
      case "$1" in
          qrb5165)
              ROS_DIST="foxy"
              ;;
      
          *)
              print_usage
              exit 1
              ;;
      esac
      
      current_dir=$(pwd)
      
      sudo apt purge --auto-remove -y cmake
      sudo apt update
      sudo apt install --fix-missing
      sudo apt install -y python3-pip
      sudo apt install -y software-properties-common
      sudo apt install -y ca-certificates gpg wget
      sudo apt-get update
      
      # manually obtain copy of keyring
      test -f /usr/share/doc/kitware-archive-keyring/copyright || wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
      
      echo "adding kitware repository to sources"
      echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ bionic main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null
      sudo apt-get update
      
      #sudo apt-get install kitware-archive-keyring
      
      sudo apt install -y cmake
      sudo apt install -y qtcreator qtbase5-dev qt5-qmake
      python3 -m pip install lark
      
      ROS_PKG=ros_base
      ROS_DISTRO=foxy
      # Core ROS2 workspace - the "underlay"
      ROS_BUILD_ROOT=/opt/ros/${ROS_DISTRO}-src
      ROS_INSTALL_ROOT=/opt/ros/${ROS_DISTRO}
      
      locale  # check for UTF-8
      
      sudo apt update && sudo apt install locales
      sudo locale-gen en_US en_US.UTF-8
      sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
      export LANG=en_US.UTF-8
      
      # Add the ROS 2 apt repository
      sudo apt-get update
      sudo apt-get install -y --no-install-recommends \
                      curl \
                      wget \
                      gnupg2 \
                      lsb-release
      sudo rm -rf /var/lib/apt/lists/*
      
      wget --no-check-certificate https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc
      sudo apt-key add ros.asc
      sudo sh -c 'echo "deb [arch=$(dpkg --print-architecture)] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2-latest.list'
      
      # install development packages
      sudo apt-get update
      sudo apt-get install -y libeigen3-dev
      sudo cp -r /usr/include/eigen3/Eigen /usr/include
      sudo apt-get install -y --no-install-recommends \
                      build-essential \
                      git \
                      libbullet-dev \
                      libpython3-dev \
                      python3-flake8 \
                      python3-pip \
                      python3-pytest-cov \
                      python3-rosdep \
                      python3-setuptools \
                      python3-vcstool \
                      python3-rosinstall-generator \
                      python3-numpy \
      		libasio-dev \
                      libtinyxml2-dev \
                      libcunit1-dev
      sudo rm -rf /var/lib/apt/lists/*
      
      # install some pip packages needed for testing
      python3 -m pip install -U \
                      colcon-common-extensions \
                      argcomplete \
                      flake8-blind-except \
                      flake8-builtins \
                      flake8-class-newline \
                      flake8-comprehensions \
                      flake8-deprecated \
                      flake8-docstrings \
                      flake8-import-order \
                      flake8-quotes \
                      pytest-repeat \
                      pytest-rerunfailures \
                      pytest
      
      # compile yaml-cpp-0.6, which some ROS packages may use (but is not in the 18.04 apt repo)
      git clone --branch yaml-cpp-0.6.0 https://github.com/jbeder/yaml-cpp yaml-cpp-0.6 && \
          cd yaml-cpp-0.6 && \
          mkdir build && \
          cd build && \
          cmake -DBUILD_SHARED_LIBS=ON .. && \
          make -j$(nproc) && \
          sudo cp libyaml-cpp.so.0.6.0 /usr/lib/aarch64-linux-gnu/ && \
          sudo ln -s /usr/lib/aarch64-linux-gnu/libyaml-cpp.so.0.6.0 /usr/lib/aarch64-linux-gnu/libyaml-cpp.so.0.6
          
      
      # https://answers.ros.org/question/325245/minimal-ros2-installation/?answer=325249#post-id-325249
      sudo mkdir -p ${ROS_BUILD_ROOT}/src && \
        cd ${ROS_BUILD_ROOT}
      sudo sh -c "rosinstall_generator --deps --rosdistro ${ROS_DISTRO} ${ROS_PKG} pcl_ros pcl_conversions launch_xml launch_yaml example_interfaces > ros2.${ROS_DISTRO}.${ROS_PKG}.rosinstall && \
      cat ros2.${ROS_DISTRO}.${ROS_PKG}.rosinstall && \
          vcs import src < ros2.${ROS_DISTRO}.${ROS_PKG}.rosinstall"
      
      # download unreleased packages
      sudo sh -c "git clone --branch ros2 https://github.com/Kukanani/vision_msgs ${ROS_BUILD_ROOT}/src/vision_msgs && \
          git clone --branch ${ROS_DISTRO} https://github.com/ros2/demos demos && \
          cp -r demos/demo_nodes_cpp ${ROS_BUILD_ROOT}/src && \
          cp -r demos/demo_nodes_py ${ROS_BUILD_ROOT}/src && \
          rm -r -f demos"
      
      # install dependencies using rosdep
      sudo apt-get update
          cd ${ROS_BUILD_ROOT}
      sudo rm -rf /etc/ros/rosdep/sources.list.d/20-default.list
      sudo rosdep init
          rosdep update && \
          rosdep install --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} -y --skip-keys "console_bridge fastcdr fastrtps rti-connext-dds-5.3.1 urdfdom_headers qt_gui" pcl_ros pcl_conversions && \
          sudo rm -rf /var/lib/apt/lists/*
      
      # build it!
      sudo mkdir -p ${ROS_INSTALL_ROOT}
      # sudo required to write build logs
      sudo colcon build --merge-install --install-base ${ROS_INSTALL_ROOT} --packages-skip vision_msgs_rviz_plugins
      
      cd $current_dir
      
      mkdir -p misc_files/opt/ros/${ROS_DIST}/
      cp -r /opt/ros/foxy/*  misc_files/opt/ros/${ROS_DIST}/
      chmod -R 777 misc_files
      
      
      posted in Ask your questions right here!
      Darshit DesaiD
      Darshit Desai
    • RE: voxl mpa to ros melodic voxl2 aidetection message header file missing

      @Moderator @Zachary-Lowell-0 there is a similar issue with trying to include the message type AIDetection.h in ROS2 mpatoros2.

      posted in Ask your questions right here!
      Darshit DesaiD
      Darshit Desai
    • ROS foxy PCL ROS

      Hi for VOXL2 I have tried installing PCL ROS for foxy it always gives an error unable to locate packages, may I know any alternatives or plans to include this? I checked the same in my native desktop ubuntu18.04+foxy, it is able to install the same

      posted in Ask your questions right here!
      Darshit DesaiD
      Darshit Desai