@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
Posts made by Darshit Desai
-
RE: ROS foxy PCL ROS
-
Unable to see rostopics published by mpatoros2 foxy in my humble docker container
Pretty much what the topic line says
-
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?
-
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?
-
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/ros2Vanilla 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=sharingPCL_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=sharingNote 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)
-
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
-
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.
-
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
-
RE: voxl mpa to ros melodic voxl2 aidetection message header file missing
Hi @Zachary-Lowell-0 , actually there is one thing I want to clarify I am not building the source here, but I am simply including the rosidl generated header file of the AIDetection message. Ideally and message if it is installed in the /opt/{ROS_DISTRO} system it should have header files folder inside that path, for example std_msgs has a header file inside the path /opt/{ROS_DISTRO}/include/std_msgs/std_msgs.h I was just trying to include that file.
About installation:
I install melodic from ros docs
The voxl_mpa_to_ros I assume is already there in the SDK 1.1.2 update. so I donot need to install it explicitly
Once I install ros I can use roslaunch to launch voxl_mpa_to_ros as you showedMy problem is when I include this AIDetection message in my other nodes which subscribe to tflite_data topic it doesn't parse it in the /opt folder and its not even there
You can check the following link of my code to understand what I am trying to do:
https://github.com/darshit-desai/Project_LegionAir/blob/master/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp#L17C1-L17C41 -
RE: VOXL2 starling bootable images
@Eric-Katzfey as far as I know docker image in the voxl2 ecosystem is used for installing stuff like a different version of Ros or opencv or some other dependency. In my case I modified a lot of back end services and the .conf files, that along with some of the Ros dependencies make the process of cloning a drone atleast 1.5 hr long. Making a docker image for ros dependencies and installing it would shave off only half off that time the other half I would still need to reconfigure voxl2 sdk as my other drone. For 4-5 drones it's fine, but for more 5 it's not
-
RE: VOXL2 starling bootable images
@tom I will try that out but it doesn't seem feasible as there are 10s of ros packages which I use for my application and each of them would have 100s of deps. I did it manually for now on the 4 drones, but in future there should be a feature to essentially duplicate a ubuntu image into a sd card somehow and use it to flash other voxls or some other method of making it into your own sdk update. Drones like starlings are increasingly used in our experiments for swarm robotics and if not me than someone else would face the same issue if he tries to replicate the same build to 4+ drones as swarms usually work on the factor of scalability and usually 10+ drones are tested
-
voxl mpa to ros melodic voxl2 aidetection message header file missing
Missing Aidetection.h file from rosmelodic mpatoros in voxl2. Upon checking /opt/ros/include/ directory I found that there are no Aidetection.h header files?
________________________________________________________________________________________________________________________________________________________________________________________ Errors << tflite_prop_detection:make /home/root/catkin_ws/logs/tflite_prop_detection/build.make.001.log /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:51:34: error: 'voxl_mpa_to_ros' does not name a type void aidectionCallback(const voxl_mpa_to_ros::AiDetection::ConstPtr& msg) { ^~~~~~~~~~~~~~~ /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:51:62: error: expected unqualified-id before '::' token void aidectionCallback(const voxl_mpa_to_ros::AiDetection::ConstPtr& msg) { ^~ /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:51:62: error: expected ')' before '::' token /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:51:51: error: expected ';' at end of member declaration void aidectionCallback(const voxl_mpa_to_ros::AiDetection::ConstPtr& msg) { ^~~~~~~~~~~ /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:51:64: error: 'ConstPtr' in namespace '::' does not name a type void aidectionCallback(const voxl_mpa_to_ros::AiDetection::ConstPtr& msg) { ^~~~~~~~ /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp: In constructor 'TFLitePropDetectionNode::TFLitePropDetectionNode()': /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:30:109: error: no matching function for call to 'ros::NodeHandle::subscribe(const char [13], int, void (TFLitePropDetectionNode::*)(...), TFLitePropDetectionNode*)' sub_tflite_data_ = nh.subscribe("/tflite_data", 1, &TFLitePropDetectionNode::aidectionCallback, this); ^ In file included from /opt/ros/melodic/include/ros/ros.h:45:0, from /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:13: /opt/ros/melodic/include/ros/node_handle.h:402:14: note: candidate: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(M), T*, const ros::TransportHints&) Subscriber subscribe(const std::string& topic, uint32_t queue_size, void(T::*fp)(M), T* obj, ^~~~~~~~~ /opt/ros/melodic/include/ros/node_handle.h:402:14: note: template argument deduction/substitution failed: /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:30:109: note: candidate expects 2 arguments, 1 provided sub_tflite_data_ = nh.subscribe("/tflite_data", 1, &TFLitePropDetectionNode::aidectionCallback, this); ^ In file included from /opt/ros/melodic/include/ros/ros.h:45:0, from /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:13: /opt/ros/melodic/include/ros/node_handle.h:413:14: note: candidate: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(M) const, T*, const ros::TransportHints&) Subscriber subscribe(const std::string& topic, uint32_t queue_size, void(T::*fp)(M) const, T* obj, ^~~~~~~~~ /opt/ros/melodic/include/ros/node_handle.h:413:14: note: template argument deduction/substitution failed: /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:30:109: note: types 'void (T::)(M) const' and 'void (TFLitePropDetectionNode::)(...)' have incompatible cv-qualifiers sub_tflite_data_ = nh.subscribe("/tflite_data", 1, &TFLitePropDetectionNode::aidectionCallback, this); ^ In file included from /opt/ros/melodic/include/ros/ros.h:45:0, from /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:13: /opt/ros/melodic/include/ros/node_handle.h:465:14: note: candidate: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(const boost::shared_ptr<const M>&), T*, const ros::TransportHints&) Subscriber subscribe(const std::string& topic, uint32_t queue_size, ^~~~~~~~~ /opt/ros/melodic/include/ros/node_handle.h:465:14: note: template argument deduction/substitution failed: /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:30:109: note: candidate expects 2 arguments, 1 provided sub_tflite_data_ = nh.subscribe("/tflite_data", 1, &TFLitePropDetectionNode::aidectionCallback, this); ^ In file included from /opt/ros/melodic/include/ros/ros.h:45:0, from /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:13: /opt/ros/melodic/include/ros/node_handle.h:475:14: note: candidate: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(const boost::shared_ptr<const M>&) const, T*, const ros::TransportHints&) Subscriber subscribe(const std::string& topic, uint32_t queue_size, ^~~~~~~~~ /opt/ros/melodic/include/ros/node_handle.h:475:14: note: template argument deduction/substitution failed: /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:30:109: note: types 'void (T::)(const boost::shared_ptr<const M>&) const' and 'void (TFLitePropDetectionNode::)(...)' have incompatible cv-qualifiers sub_tflite_data_ = nh.subscribe("/tflite_data", 1, &TFLitePropDetectionNode::aidectionCallback, this); ^ In file included from /opt/ros/melodic/include/ros/ros.h:45:0, from /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:13: /opt/ros/melodic/include/ros/node_handle.h:529:14: note: candidate: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(M), const boost::shared_ptr<U>&, const ros::TransportHints&) Subscriber subscribe(const std::string& topic, uint32_t queue_size, void(T::*fp)(M), ^~~~~~~~~ /opt/ros/melodic/include/ros/node_handle.h:529:14: note: template argument deduction/substitution failed: /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:30:109: note: candidate expects 2 arguments, 1 provided sub_tflite_data_ = nh.subscribe("/tflite_data", 1, &TFLitePropDetectionNode::aidectionCallback, this); ^ In file included from /opt/ros/melodic/include/ros/ros.h:45:0, from /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:13: /opt/ros/melodic/include/ros/node_handle.h:540:14: note: candidate: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(M) const, const boost::shared_ptr<U>&, const ros::TransportHints&) Subscriber subscribe(const std::string& topic, uint32_t queue_size, void(T::*fp)(M) const, ^~~~~~~~~ /opt/ros/melodic/include/ros/node_handle.h:540:14: note: template argument deduction/substitution failed: /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:30:109: note: types 'void (T::)(M) const' and 'void (TFLitePropDetectionNode::)(...)' have incompatible cv-qualifiers sub_tflite_data_ = nh.subscribe("/tflite_data", 1, &TFLitePropDetectionNode::aidectionCallback, this); ^ In file included from /opt/ros/melodic/include/ros/ros.h:45:0, from /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:13: /opt/ros/melodic/include/ros/node_handle.h:594:14: note: candidate: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(const boost::shared_ptr<const M>&), const boost::shared_ptr<U>&, const ros::TransportHints&) Subscriber subscribe(const std::string& topic, uint32_t queue_size, ^~~~~~~~~ /opt/ros/melodic/include/ros/node_handle.h:594:14: note: template argument deduction/substitution failed: /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:30:109: note: candidate expects 2 arguments, 1 provided sub_tflite_data_ = nh.subscribe("/tflite_data", 1, &TFLitePropDetectionNode::aidectionCallback, this); ^ In file included from /opt/ros/melodic/include/ros/ros.h:45:0, from /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:13: /opt/ros/melodic/include/ros/node_handle.h:605:14: note: candidate: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(const boost::shared_ptr<const M>&) const, const boost::shared_ptr<U>&, const ros::TransportHints&) Subscriber subscribe(const std::string& topic, uint32_t queue_size, ^~~~~~~~~ /opt/ros/melodic/include/ros/node_handle.h:605:14: note: template argument deduction/substitution failed: /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:30:109: note: types 'void (T::)(const boost::shared_ptr<const M>&) const' and 'void (TFLitePropDetectionNode::)(...)' have incompatible cv-qualifiers sub_tflite_data_ = nh.subscribe("/tflite_data", 1, &TFLitePropDetectionNode::aidectionCallback, this); ^ In file included from /opt/ros/melodic/include/ros/ros.h:45:0, from /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:13: /opt/ros/melodic/include/ros/node_handle.h:656:14: note: candidate: template<class M> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (*)(M), const ros::TransportHints&) Subscriber subscribe(const std::string& topic, uint32_t queue_size, void(*fp)(M), const TransportHints& transport_hints = TransportHints()) ^~~~~~~~~ /opt/ros/melodic/include/ros/node_handle.h:656:14: note: template argument deduction/substitution failed: /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:30:109: note: mismatched types 'void (*)(M)' and 'void (TFLitePropDetectionNode::*)(...)' sub_tflite_data_ = nh.subscribe("/tflite_data", 1, &TFLitePropDetectionNode::aidectionCallback, this); ^ In file included from /opt/ros/melodic/include/ros/ros.h:45:0, from /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:13: /opt/ros/melodic/include/ros/node_handle.h:704:14: note: candidate: template<class M> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (*)(const boost::shared_ptr<const M>&), const ros::TransportHints&) Subscriber subscribe(const std::string& topic, uint32_t queue_size, void(*fp)(const boost::shared_ptr<M const>&), const TransportHints& transport_hints = TransportHints()) ^~~~~~~~~ /opt/ros/melodic/include/ros/node_handle.h:704:14: note: template argument deduction/substitution failed: /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:30:109: note: mismatched types 'void (*)(const boost::shared_ptr<const M>&)' and 'void (TFLitePropDetectionNode::*)(...)' sub_tflite_data_ = nh.subscribe("/tflite_data", 1, &TFLitePropDetectionNode::aidectionCallback, this); ^ In file included from /opt/ros/melodic/include/ros/ros.h:45:0, from /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:13: /opt/ros/melodic/include/ros/node_handle.h:750:14: note: candidate: template<class M> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, const boost::function<void(const boost::shared_ptr<const M>&)>&, const VoidConstPtr&, const ros::TransportHints&) Subscriber subscribe(const std::string& topic, uint32_t queue_size, const boost::function<void (const boost::shared_ptr<M const>&)>& callback, ^~~~~~~~~ /opt/ros/melodic/include/ros/node_handle.h:750:14: note: template argument deduction/substitution failed: /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:30:109: note: mismatched types 'const boost::function<void(const boost::shared_ptr<const M>&)>' and 'void (TFLitePropDetectionNode::*)(...)' sub_tflite_data_ = nh.subscribe("/tflite_data", 1, &TFLitePropDetectionNode::aidectionCallback, this); ^ In file included from /opt/ros/melodic/include/ros/ros.h:45:0, from /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:13: /opt/ros/melodic/include/ros/node_handle.h:799:14: note: candidate: template<class M, class C> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, const boost::function<void(C)>&, const VoidConstPtr&, const ros::TransportHints&) Subscriber subscribe(const std::string& topic, uint32_t queue_size, const boost::function<void (C)>& callback, ^~~~~~~~~ /opt/ros/melodic/include/ros/node_handle.h:799:14: note: template argument deduction/substitution failed: /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:30:109: note: mismatched types 'const boost::function<void(C)>' and 'void (TFLitePropDetectionNode::*)(...)' sub_tflite_data_ = nh.subscribe("/tflite_data", 1, &TFLitePropDetectionNode::aidectionCallback, this); ^ In file included from /opt/ros/melodic/include/ros/ros.h:45:0, from /home/root/catkin_ws/src/Project_LegionAir/tflite_prop_detection/src/tflite_prop_detection_cpp_node.cpp:13: /opt/ros/melodic/include/ros/node_handle.h:836:14: note: candidate: ros::Subscriber ros::NodeHandle::subscribe(ros::SubscribeOptions&) Subscriber subscribe(SubscribeOptions& ops); ^~~~~~~~~ /opt/ros/melodic/include/ros/node_handle.h:836:14: note: candidate expects 1 argument, 4 provided make[2]: *** [CMakeFiles/tflite_prop_detection_cpp.dir/src/tflite_prop_detection_cpp_node.cpp.o] Error 1 make[1]: *** [CMakeFiles/tflite_prop_detection_cpp.dir/all] Error 2 make: *** [all] Error 2 cd /home/root/catkin_ws/build/tflite_prop_detection; catkin build --get-env tflite_prop_detection | catkin env -si /usr/bin/make --jobserver-fds=3,4 -j; cd - ........................................................................................................................................................................................ Failed << tflite_prop_detection:make [ Exited with code 2 ] Failed <<< tflite_prop_detection [ 6.8 seconds ] [build] Summary: 4 of 5 packages succeeded. [build] Ignored: None. [build] Warnings: None. [build] Abandoned: None. [build] Failed: 1 packages failed.
-
RE: VOXL2 starling bootable images
@Moderator So if I replace the deb files which I generated for my base drone and keep it here it will install that right?
For example:
I nuked topics from voxl_mpa_to_ros which weren't being used
I modified the tflite server to accept varying lengths of label filesAlso for some reason I have to install ros-melodic-base packages everytime I upgrade the sdk in this case, is there a way to generate deb binary for that too
-
RE: VOXL2 starling bootable images
@Moderator Can you help me with the resources of how to use an offboard installer?
-
VOXL2 starling bootable images
Hi @Moderator is it possible to make a bootable and installable OS image of the voxl2 from one drone and than deploy it to another drone. Like in a raspberry pi I can essentially take the backup image of the entire system and than flash it to another sd card. I have 3 more starling drones which need the same voxl services modifications as I have in my base starling drone, instead of doing it one by one and than testing the functionality only to find out that it doesn't work is a bit tedious
-
RE: Starling fan attachment and optimization
@Alex-Kushleyev said in Starling fan attachment and optimization:
As far as I understand from the article here and some of my own search online, https://libeigen.gitlab.io/docs/group__TopicStorageOrders.html
It seems that eigen default uses column major order if the options aren't specified. For the point cloud data we have column major would be better right?
@Alex-Kushleyev said in Starling fan attachment and optimization:
For best results, x, y and z components of each vector have to be stored in consecutive memory locations and vector N+1 should be right after vector N (in memory)
I am also not sure about the memory locations here so if the matrix is column major and the incoming pointcloud is of shape 3, 38528 a column major matrix should be optimal for consecutive memory allocations
-
RE: Starling fan attachment and optimization
@Alex-Kushleyev Yes I use Eigen3 for doing the rigid body transformation,
Method0: Use the tf2 sensor msgs::do transform cloud function directly on the large 38528x3 pointcloud, which didn't work so I used Eigen 3 from the next method onwards
Method1:
I have tried statically assigning eigen matrixxd variables, I also tried bifurcating the large 38528x3 pointcloud matrix which i get into 5 parts and parallelizing the mutliplication by doing the multiplication of 5 different parts of matrices on different pinned cpus and then combining them. None of the methods worked because all of them end up heating up the cpu when ran in combination of the voxl-tflite-server.Method2:
Other method I tried was filtering the points by depth which reduced the number of points to 15000 points for rigid body transformation and then doing the same parallelized multiplication of rotation matrix and pointcloud but that also ends up heating the cpu too much when run in combination of voxl-tflite-server.All of the code was written in eigen3. This is the code that I used for method 2 https://github.com/darshit-desai/Project_LegionAir/blob/master/your_pointcloud_package/src/pc_transform.cpp
Note all of this methods above run fine on my desktop cpu which is understandable because my desktop cpu has literally a million times more compute power and better cooling then what's onboard the voxl
Edit: Also in case of voxl I use the CPUs in perf mode
-
RE: Starling fan attachment and optimization
@thomas @Alex-Kushleyev I have bottle necks in my sensor fusion pipeline because of which the temperature of the cpus go very high even with the fan cooling and the propeller throwing airflow in flight. I am doing a rigid body transformation of the incoming points from tof frame to rgb camera frame and that transformation of 38528x3 vector takes a lot of cpu capacity and overheats the cpu. Now I have tried every trick in my toolbox ranging from multi threading to removing unnecessary pipes from voxl_mpa_to_ros but none of them work. I see one of the options is, I somehow filter out the points which are irrelevant to me (i.e. I am only looking for a certain depth range between 10 cms to 1.5 mtrs) before it is published on mpa to ros and then do a rigid body transformation. Another option is to use the raw data by somehow tapping into one of the camera server pipes and filter out the points. Any thoughts on how to optimize the below pipeline for performance would be helpful
-
RE: Starling fan attachment and optimization
@thomas Thank you, actually the purpose of the question was to identify all components which use CPU in the tflite server. So if it's just image publishing and drawing of bboxes or seg maps on images then I can just comment out the relevant function calls to publishing the image with bbox and the part where it actual makes an image with bbox and writes parameters on the image like fps and other details.
Is there any other part which is being done on the CPU other then the ones highlighted?
-
RE: Starling fan attachment and optimization
Hi @Alex-Kushleyev, I wanted to ask one more question regarding cpu utilization while running the tflite server. It shows that it uses cores 4, 5 and 6 for processing and connects itself to the camera server. What is the tflite server using cpu for? Publishing images to libmodal-pipe? like bbox drawn on images? What if I want to disable that and zero out any utilization of cpus by the tflite server?
By that I mean this line here: https://gitlab.com/voxl-public/voxl-sdk/services/voxl-tflite-server/-/blob/master/src/main.cpp?ref_type=heads#L247
What else is the tflite server using on cpus which can be removed? As in my system I am only concerned with the bbox detection message.