Code Monkey home page Code Monkey logo

Comments (2)

LewisLiuPub avatar LewisLiuPub commented on August 20, 2024

Yes, you are right.
It is not good to link a source code folder to a system folder. It would be better to change the solution this way:

  1. Parameter file (.yaml) uses relative paths for the needed file location.
  2. Launch.py file can pass the prefix of the absolute path to the openvino sample program.
  3. In the program, generate the absolute path by combining the prefix and relative paths in parameter file.

from ros2_openvino_toolkit.

yechun1 avatar yechun1 commented on August 20, 2024

I found there are different data file point to different folder.


sample/tests/testParam/param/image_object_service_test.yaml:18:  input_path: "/home/intel/ros2_overlay_ws/src/ros2_openvino_toolkit/data/images/car_vihecle.png"
sample/tests/testParam/param/pipeline_image_test.yaml:4:  input_path: /opt/openvino_toolkit/ros2_openvino_toolkit/data/images/team.jpg

Could we put all the data as resources of ros2_openvino_package, and use relative in yaml?
for example :

Input_path: "data/images/car_vihecle.png"
 input_path: "data/images/team.jpg"

Could we use ros2 API to get data path like below?

#include <ament_index_cpp/get_package_share_directory.hpp>
// may throw PackageNotFoundError exception
std::string package_share_directory = ament_index_cpp::get_package_share_directory("my_package_name");

Here is a reference :https://answers.ros.org/question/288501/ros2-equivalent-of-rospackagegetpath/

from ros2_openvino_toolkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.