Git Product home page Git Product logo

Comments (27)

pmusau17 avatar pmusau17 commented on July 26, 2024 14

@cybernetchi

You can build his repo from source.

In your workspace:

$ git clone https://github.com/machinekoder/ar_track_alvar.git -b noetic-devel

Build with colcon

$ colcon build

from ar_track_alvar.

machinekoder avatar machinekoder commented on July 26, 2024 6

Here is my WIP, I already have it working: https://github.com/machinekoder/ar_track_alvar/tree/noetic-devel

There is quite some potential of reworking parts of the code aside from the port.

from ar_track_alvar.

mysablehats avatar mysablehats commented on July 26, 2024 5

@cybernetchi

You can build his repo from source.

In your workspace:

$ git clone https://github.com/machinekoder/ar_track_alvar.git -b noetic-devel

Build with colcon

$ colcon build

you can also just use catkin_make

from ar_track_alvar.

wmmc88 avatar wmmc88 commented on July 26, 2024 3

any chance this is going to get merged in and released?

from ar_track_alvar.

machinekoder avatar machinekoder commented on July 26, 2024 2

Turns out porting is not as easy as first thought. ar_track_alvar uses the long dead C API for OpenCV. So conversion to the C++ is needed along the CV3→CV4 port which is small. Moreover, there has been a deprecation of some Eigen types in noetic, which we have to keep in mind, but nothing significant either. So the core effort of porting ar_track_alvar lies in converting the OpenCV C API calls with their C++ API equivalents. Easier said than done, I couldn't find nice porting guide, so this will require some manual lookup old API and replace procedure.

from ar_track_alvar.

robogeekcanada avatar robogeekcanada commented on July 26, 2024 2

Thank you @pmusau17 I successfully built in ROS noetic as well.

from ar_track_alvar.

machinekoder avatar machinekoder commented on July 26, 2024 1

@jspricke The API changes between OpenCV3 and 4 seem trivial. Once I have noetic running here I can give it a shot.

from ar_track_alvar.

wmmc88 avatar wmmc88 commented on July 26, 2024 1

@machinekoder are you still working on this?

from ar_track_alvar.

smits avatar smits commented on July 26, 2024 1

@fmessmer , I did not know of the machinekoder/ar_track_alvar#noetic-devel when I started my attempt. We're definitely not close to something that works. So I might consider taking a look at what machinekoder is doing.

from ar_track_alvar.

chriskeraly-rios avatar chriskeraly-rios commented on July 26, 2024 1

The machinekoder repo almost works well, however, if you look at some comments on this (unrelated) issue machinekoder#1 , you will notice that there is a problem where nan is published for a lot of the results. I have tracked down the issue and fixed this locally for individual markers by changing a few lines of code in **nodes/InvididualMarkersNoKinect.cpp**. Here is the fix (roughly line 112). Essentially the way the quaternions were retrieved didn't work properly.


     // Get the pose relative to the camera
        int id = (*(marker_detector.markers))[i].GetId();
        Pose p = (*(marker_detector.markers))[i].pose;
        double px = p.translation[0] / 100.0;
        double py = p.translation[1] / 100.0;
        double pz = p.translation[2] / 100.0;

        cv::Mat quat =cv::Mat(4, 1, CV_64F);
        p.GetQuaternion(quat);
        double qx = quat.at<double>(1,0); //p.quaternion[1]; #leaving these comments for the record of what was not working properly in machinekoder's version
        double qy = quat.at<double>(2,0); //p.quaternion[2];
        double qz = quat.at<double>(3,0); //p.quaternion[3];
        double qw = quat.at<double>(0,0); //p.quaternion[0];

I also modified the catch at the end of the callback to catch all exceptions, because I was randomly getting cv errors that would shut down the node, which was annoying.

    catch (const std::exception& e)
    {
      ROS_ERROR("Error in ar_track_alvar callback");
    }

Now the node works well (albeit it seems slower than the melodic version)

Anyways, I don't have the time to go and dig deeper at the root cause of why the quaternion retrieval failed and propose a proper pull request, but this should help anyone trying to debug it, or get it running.

from ar_track_alvar.

machinekoder avatar machinekoder commented on July 26, 2024

+1

from ar_track_alvar.

machinekoder avatar machinekoder commented on July 26, 2024

ar_track_alvar doesn't use Python, so it's only a matter of publishing the package.

from ar_track_alvar.

jspricke avatar jspricke commented on July 26, 2024

ar_track_alvar doesn't use Python, so it's only a matter of publishing the package.

modulo the port to OpenCV4..

from ar_track_alvar.

machinekoder avatar machinekoder commented on July 26, 2024

@wmmc88 I'm going for it next week as we finally moved to noetic.

from ar_track_alvar.

ajithcodesit avatar ajithcodesit commented on July 26, 2024

Turns out porting is not as easy as first thought. ar_track_alvar uses the long dead C API for OpenCV. So conversion to the C++ is needed along the CV3→CV4 port which is small. Moreover, there has been a deprecation of some Eigen types in noetic, which we have to keep in mind, but nothing significant either. So the core effort of porting ar_track_alvar lies in converting the OpenCV C API calls with their C++ API equivalents. Easier said than done, I couldn't find nice porting guide, so this will require some manual lookup old API and replace procedure.

Thanks for looking into this. Have you been able to make some progress?

from ar_track_alvar.

machinekoder avatar machinekoder commented on July 26, 2024

@ajithcodesit I'm at it. There is quite a lot cv code in there that needs to be translated.

from ar_track_alvar.

fmessmer avatar fmessmer commented on July 26, 2024

looking at the Network of this repo ros-perception/ar_track_alvar, it looks like development of this repos has diverged onto forks
is this repo still actively maintained?

@130s you have the last commit to this repo
@sniekum are you still involved?
@sloretz do you know who maintains ros-perception?

from ar_track_alvar.

fmessmer avatar fmessmer commented on July 26, 2024

I also see that Intermodalics has a noetic-devel branch, which sees recent contributions, e.g. Intermodalics@dcc8c40

@smits what is different between your version of Intermodalics/ar_track_alvar#noetic-devel and machinekoder/ar_track_alvar#noetic-devel

are you also experiencing the "nan"-issues mentioned in machinekoder#1 (comment)?

from ar_track_alvar.

ajithcodesit avatar ajithcodesit commented on July 26, 2024

Here is my WIP, I already have it working: https://github.com/machinekoder/ar_track_alvar/tree/noetic-devel

There is quite some potential of reworking parts of the code aside from the port.

@machinekoder I tried your WIP but I am not able to compile it with catkin_make

from ar_track_alvar.

fmessmer avatar fmessmer commented on July 26, 2024

@chriskeraly-rios
could you point us to proper commit/branch which contains your fix? or provide and link a pr, please - so people can build on top of your work and test it...

from ar_track_alvar.

chriskeraly-rios avatar chriskeraly-rios commented on July 26, 2024

https://github.com/rios-ai/ar_track_alvar/tree/feature/rios_bug_fix

Here you go. As I said, this is probably not the "proper" way to fix it, but it gets the job done for what I need.

from ar_track_alvar.

12tbuchman avatar 12tbuchman commented on July 26, 2024

@chriskeraly-rios @machinekoder are either of you planning to make a noetic-devel PR? I see @haraisao also has a PR for a noetic devel branch.

from ar_track_alvar.

cybernetchi avatar cybernetchi commented on July 26, 2024

Sorry for beginner question,
How to install @machinekoder 's ar_track_alvar?
Thank you

from ar_track_alvar.

NHirose avatar NHirose commented on July 26, 2024

@machinekoder Thank you for releasing your code.
I tried your code on Ubuntu 20.04. However, I had a following error.

[ERROR] [1668810254.584122576]: Error in ar_track_alvar callback: OpenCV(4.5.4) /home/ubuntu/build_opencv/opencv/modules/core/src/matrix.cpp:250: error: (-215:Assertion failed) s >= 0 in function 'setSize'

How can I solve this issue??

from ar_track_alvar.

ladrians avatar ladrians commented on July 26, 2024

@NHirose I got the same error on a Jetson Xavier NX/Jetpack 5.0.2. Fore some reason I got installed OpenCV 4.5.4 and 4.2.0. Uninstalled and reinstalled noetic-desktop-full but got the same problem. In my case I added the following to force 4.2.0 usage for libopencv_core.

export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libopencv_core.so.4.2.0

Switched to this branch. There should be a better way to do it, at least this way got the job done, hope it helps on your environment, regards

from ar_track_alvar.

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.