Comments (27)
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.
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.
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.
any chance this is going to get merged in and released?
from ar_track_alvar.
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.
Thank you @pmusau17 I successfully built in ROS noetic as well.
from ar_track_alvar.
@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.
@machinekoder are you still working on this?
from ar_track_alvar.
@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.
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.
+1
from ar_track_alvar.
ar_track_alvar
doesn't use Python, so it's only a matter of publishing the package.
from ar_track_alvar.
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.
@wmmc88 I'm going for it next week as we finally moved to noetic.
from ar_track_alvar.
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 portingar_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.
@ajithcodesit I'm at it. There is quite a lot cv code in there that needs to be translated.
from ar_track_alvar.
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.
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.
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.
@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.
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.
@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.
Sorry for beginner question,
How to install @machinekoder 's ar_track_alvar?
Thank you
from ar_track_alvar.
@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.
@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)
- Installation HOT 2
- Detecting markers of different sizes simultaneously HOT 1
- Can I create a "bundle of bundles"?
- Hi ,how I can transform to world coordinate?
- Unable to detect tags with ID over 255
- Error with ar_track_alvar package while building ros workspace HOT 2
- error while loading shared libraries: libopencv_core3.so.3.3: cannot open shared object file HOT 1
- Possible to find camera's pose? HOT 1
- Dynamic reconfigure is not affecting calculations
- Cannot disable in bundle mode
- error installing ar_track_alvar using catkin_make with OpenCV 4.1.0 HOT 1
- Marker position change while robot is moving HOT 3
- Orientation pose marker different between individualMarkersnoKinect and individualMarker
- redundant line?
- individualMarkersNoKinect find tag pose fail
- error during catkin_make In function ‘void pcl_conversions::toPCL(const Header&, pcl::PCLHeader&)’
- Detecting unknown Marker id 255
- redundant computation?
- Problems and warning with multiple tags with same ID
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ar_track_alvar.