Git Product home page Git Product logo

ar_track_alvar's People

Contributors

130s avatar 534o avatar achim-k avatar benersuay avatar bhaskara avatar bulwahn avatar colincsl avatar corot avatar cottsay avatar jihoonl avatar jkammerl avatar jonbinney avatar mehditlili avatar nickovaras avatar rctoris avatar rethink-rlinsalata avatar sniekum avatar sniekum-umass avatar timn avatar voidminded avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ar_track_alvar's Issues

[CLOSED] Segmentation fault with uncalibrated camera

Issue by liborw
Monday Aug 19, 2013 at 13:19 GMT
Originally opened as sniekum#11


When the camera is not calibrated the node (tested with individualMarkersNoKinect but the rest will be the same) crashes with Segmentation fault.

The problem is in the Camera::camInfoCallback the D vector is empty when the camera is not calibrated.

ar_marker_x (x name of tag) passed to lookupTransform argument source_frame does not exist.

From @GPRAMESH on April 6, 2017 10:22

I am using kinectv2 sensor to track ar bundle tags. This is my launch file

<arg name="cam_image_topic" default="/kinect2/qhd/points" />
<arg name="cam_info_topic" default="/kinect2/qhd/camera_info" />

<arg name="output_frame" default="/world" />
<arg name="med_filt_size" default="10" />
<arg name="bundle_files" default="$(find ar_track_alvar)/bundles/truthTableLeg.xml $(find ar_track_alvar)/bundles/table_8_9_10.xml" />

<node name="ar_track_alvar" pkg="ar_track_alvar" type="findMarkerBundles" respawn="false" output="screen" args="$(arg marker_size) $(arg max_new_marker_error) $(arg max_track_error) $(arg cam_image_topic) $(arg cam_info_topic) $(arg output_frame) $(arg med_filt_size) $(arg bundle_files)" />

and output in terminal when i run roslaunch ar_track_alvar pr2_bundle.launch

[ERROR] [1491473505.410939797]: ERROR InferCorners: "ar_marker_9" passed to lookupTransform argument source_frame does not exist.
[ERROR] [1491473507.343496530]: ERROR InferCorners: "ar_marker_10" passed to lookupTransform argument source_frame does not exist.
Can any one help me how to sort out this??

Thank you

Copied from original issue: sniekum#119

Integrate kinect data

From @Raffa87 on June 23, 2014 8:41

On the description of package at http://wiki.ros.org/ar_track_alvar it is declared:

"Identifying and tracking the pose of individual AR tags, optionally integrating kinect depth data (when a kinect is available) for better pose estimates."

How can I integrate my kinect data in the process?
Thank you

Copied from original issue: sniekum#34

Test issues

From @achim-k on February 14, 2017 10:4

Here a couple more issues that I noticed concerning the tests:

Tf lookup issues

When looking at ar_track_alvar/rosunit-marker_quarternions_WITHARG_CONFIGBASIC.xml, it is full with

[\\ERROR] [\\/marker_quarternions_WITHARG_CONFIGBASIC]: \\"camera" passed to lookupTransform argument target_frame does not exist.  target_frame=/ar_marker_0
[\\ERROR] [\\/marker_quarternions_WITHARG_CONFIGBASIC]: \\"camera" passed to lookupTransform argument target_frame does not exist.  target_frame=/ar_marker_0
...

error messages. The reason for this is probably because of these lines:

while not rospy.is_shutdown():
  try:
    target_frame = '/ar_marker_{}'.format(i)
    (trans, rot) = self.tflistener.lookupTransform('/camera', target_frame, rospy.Time(0))

In the rosbag there is no tf information, so the camera frame doesn't exist (hence the lookup fails). A possible solution to this would be to add a tf2_ros/static_transform_publisher node to test_markerdetect.launch.xml that makes sure the camera frame exists in tf:

<node pkg="tf2_ros" type="static_transform_publisher" name="camera_tf_pub" args="0 0 0 0 0 0 world camera" />

Also, I would maybe add a timeout to the while-loop above that makes the test fail if the requested transform couldn't be looked up.

Alternatively we don't look at the tf output but instead at the /ar_pose_marker output topic?

Test_result file content invalid

Another issue I'm having is that the test_result files for the marker_recog_hz_<TEST> tests only contain the following line:

<?xml version="1.0" encoding="utf-8"?>

This causes our jenkins server to spit the following errors:

rosunit-marker_recog_hz_WITHARG_CONFIGBASIC.xml.[failed-to-read]
rosunit-marker_recog_hz_WITHARG_CONFIGFULL.xml.[failed-to-read]
rosunit-marker_recog_hz_WITHPARAM_CONFIGBASIC.xml.[failed-to-read]
rosunit-marker_recog_hz_WITHPARAM_CONFIGFULL.xml.[failed-to-read]

Not sure though if this is not a rostest/hztest issue.

Copied from original issue: sniekum#117

[CLOSED] Release in hydro

Issue by jonbinney
Monday Jul 15, 2013 at 23:05 GMT
Originally opened as sniekum#8


@sniekum, any chance you could release this package for hydro? It shouldn't require any major changes, just creating a hydro-devel branch and doing the release.

pcl segmentation error when estimate multiple tags

Hi,

I want to use this package to estimate marker pose. I used a kinect to get depth and camera_info information, which are published on /camera/depth_registered/points and /camera/rgb/camera_info topic. I start the camera driver node, it works fine. and then I start the launch file with ' roslaunch ar_track_alvar pr2_indiv.launch`. The launch file was modified as follows:

<launch>
	<arg name="marker_size" default="5.8" />
	<arg name="max_new_marker_error" default="0.08" />
	<arg name="max_track_error" default="0.2" />

	<arg name="cam_image_topic" default="/camera/depth_registered/points" />
	<arg name="cam_info_topic" default="/camera/rgb/camera_info" />
	<arg name="output_frame" default="/camera_link" />

	<node name="ar_track_alvar" pkg="ar_track_alvar" type="individualMarkers" respawn="false" output="screen">
		<param name="marker_size"           type="double" value="$(arg marker_size)" />
		<param name="max_new_marker_error"  type="double" value="$(arg max_new_marker_error)" />
		<param name="max_track_error"       type="double" value="$(arg max_track_error)" />
		<param name="output_frame"          type="string" value="$(arg output_frame)" />

		<remap from="camera_image"  to="$(arg cam_image_topic)" />
		<remap from="camera_info"   to="$(arg cam_info_topic)" />
	</node>

</launch>

However, once I showed the markers in front of the camera, it throws error as follows:

[pcl::SampleConsensusModel::getSamples] Can not select 0 unique points out of 0!
[pcl::RandomSampleConsensus::computeModel] No samples could be selected!

How can I fix that? @pirobot

[CLOSED] added missing message depends in cmakelists

Issue by jonbinney
Tuesday May 21, 2013 at 21:57 GMT
Originally opened as sniekum#7


Technically, any cmake target that needs headers generated from messages needs to depend on the corresponding foo_gencpp cmake target. Otherwise, it will build against debians, and build if make is run with only one thread, but will sometimes fail if the packages with messages (e.g. sensor_msgs) is used from source.

There's a discussion about this problem here: http://answers.ros.org/question/52744/how-to-specify-dependencies-with-foo_msgs-catkin-packages/


jonbinney included the following code: https://github.com/sniekum/ar_track_alvar/pull/7/commits

Generated XML from createMarkers is incorrect

From @zicez on August 3, 2016 19:31

The XML file created from using createMarker provides the wrong coordinate for the upper left corner of the tags.
For example, this tag bundle below is generated with x = -7.5, y = 7.5 as the coordinate for the center tag as the first tag.

markerdata_0_1_2_3_4

The resulting XML incorrectly has x = -7.5, y = 7.5 labeled as a corner but it's actually the center of the tag. Other than that, the other three corners have the correct coordinate.

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<multimarker markers="5">
    <marker index="0" status="1">
        <corner x="-7.5" y="-7.5" z="0" />
        <corner x="0" y="-15" z="0" />
        <corner x="0" y="0" z="0" />
        <corner x="-15" y="0" z="0" />
    </marker>
    <marker index="1" status="1">
        <corner x="-7.5" y="14" z="0" />
        <corner x="0" y="6.5" z="0" />
        <corner x="0" y="21.5" z="0" />
        <corner x="-15" y="21.5" z="0" />
    </marker>
    <marker index="2" status="1">
        <corner x="-29" y="-7.5" z="0" />
        <corner x="-21.5" y="-15" z="0" />
        <corner x="-21.5" y="0" z="0" />
        <corner x="-36.5" y="0" z="0" />
    </marker>
    <marker index="3" status="1">
        <corner x="-7.5" y="-29" z="0" />
        <corner x="0" y="-36.5" z="0" />
        <corner x="0" y="-21.5" z="0" />
        <corner x="-15" y="-21.5" z="0" />
    </marker>
    <marker index="4" status="1">
        <corner x="14" y="-7.5" z="0" />
        <corner x="21.5" y="-15" z="0" />
        <corner x="21.5" y="0" z="0" />
        <corner x="6.5" y="0" z="0" />
    </marker>
</multimarker>

Copied from original issue: sniekum#87

PCL Errors

I get back markers pretty well, but I am getting these error messages:

[pcl::SampleConsensusModel::getSamples] Can not select 0 unique points out of 0!
[pcl::RandomSampleConsensus::computeModel] No samples could be selected!
[pcl::SACSegmentation::segment] Error segmenting the model! No solution found.

Any idea why PCL is throwing these?

I am using ubuntu 14.04, ros-indigo, with pcl and ar_track_alvar installed from binaries (I tried building both from source as well, but it made no difference).

Double use of variable name compiler warning

From @AlexReimann on December 2, 2016 2:14

In FindMarkerBundlesNoKinect.cpp one of the loops of uses the same variable name for a nested loop.

Code snippet:

      for (size_t i=0; i<marker_detector.markers->size(); i++)
	{
            ...

	    // Don't draw if it is a master tag...we do this later, a bit differently
	    bool should_draw = true;
	    for(int i=0; i<n_bundles; i++){
	      if(id == master_id[i]) should_draw = false;
	    }
            ...
	  }
	}

Not sure if 'fixing' this breaks something else

Could also use some formatting..

Copied from original issue: sniekum#95

Installation

Hello,

I guess this a ar_track_alvar repo for ros melodic?

Is there somebody that can explain me how to install this on ros melodic ? Or is there a manual somewhere ?

Median Filter Library missing

From @rabenimmermehr on August 14, 2014 14:26

Hey guys,

I installed this package via sudo apt-get install ros-hydro-ar-track-alvar. When I track isolated markers, everything is fine, but when I want to track a bundle I get an error launching the node:

/opt/ros/hydro/lib/ar_track_alvar/findMarkerBundles: error while loading shared libraries: libmedianFilter.so: cannot open shared object file: No such file or directory

Did I miss a step or is there something wrong with the code?

Thanks in advance,
Rabe

System Information:
Ubuntu 12.04 64bit
ROS Hydro

Copied from original issue: sniekum#38

[CLOSED] Add dynamic reconfigure support for individual markers detection

Issue by corot
Friday Aug 16, 2013 at 10:44 GMT
Originally opened as sniekum#9


Sorry, I only did for individual markers, what is the only part I used.

My code is ros-formatted by eclipse, so maybe is a bit mesh up with tabs/spaces. I will be happy to pull request a fully ros-formatted code if you want.

The enable/disable switch subscribes/unsubscribes to camera topic, what at the same time stops the CPU-hungry depth image to pointcloud nodelet. When not subscribed, the lazy publishing of the pointcloud makes a huge saving on CPU.


corot included the following code: https://github.com/sniekum/ar_track_alvar/pull/9/commits

Way too many headers in the AlvarMarker(s) messages

Every AlvarMarker message has 2 headers and the AlvarMarkers have (1+2*n_marker) headers.

With multiple header messages, the library developer pushed by laziness will fill only the one which seems to be logic for himself at that time. The app developer will then wonder which one is filled, is it always the same which is filled?

This could easily be solved with a message refactoring.

I would propose the same topology as Pose, PoseStamped and PoseArray:

AlvarMarker.msg

uint32 id
uint32 confidence
geometry_msgs/Pose pose

AlvarMarkerArray.msg

Header header
AlvarMarker markers[]

AlvarMarkerStamped.msg

Header header
AlvarMarker maker

[test] individualMarkersNoKinect node fails to write test result into xml

Originally found in #39

Got a hint from an answer, what seems to be happening is:

Issue description

  1. Testcases are running and passing.
  2. A testcase failed writing results into xml. The process of writing into file teminates and leaves the file content in incomplete form. But testcase process goes on.
12:02:31   /opt/ros/lunar/share/rostest/cmake/../../../bin/rostest --pkgdir=/tmp/catkin_workspace/src/ar_track_alvar/ar_track_alvar --package=ar_track_alvar --results-filename test_marker_arg_config-basic.xml --results-base-dir /tmp/catkin_workspace/test_results /tmp/catkin_workspace/src/ar_track_alvar/ar_track_alvar/test/marker_arg_config-basic.test 
12:02:31 ... logging to /home/buildfarm/.ros/log/rostest-5e93fb8bd950-1650.log
12:02:31 [ROSUNIT] Outputting test results to /tmp/catkin_workspace/test_results/ar_track_alvar/rostest-test_marker_arg_config-basic.xml
12:02:34 individualMarkersNoKinect: /usr/include/boost/thread/pthread/recursive_mutex.hpp:113: void boost::recursive_mutex::lock(): Assertion `!pthread_mutex_lock(&m)' failed.
12:02:34 ๏ฟฝ[33m[ WARN] [1497294151.766305652]: Command line arguments are deprecated. Consider using ROS parameters and remappings.๏ฟฝ[0m
  1. On ROS buildfarm, test result xmls are reviewed at the end, where the job fails because the file content is incomplete.

Looking at the full log, this error only occurs with individualMarkersNoKinect node.

Environment, How to reproduce

Any pull request against this repo would face this issue without fix.

You should be able to replicate the issue trying to look into the test result xml but I don't know the exact steps to do that.

Incorrect Marker Init

From @richterh on May 5, 2015 11:36

When using the system to automatically learn marker maps the resulting output describes each marker with a triangular shape rather the the correct rectangle shape. This is due to incorrect initialisation of the first corner when it is initially added during the training procedure (src/MultiMarker.cpp from line 239):

// TODO: This should be exactly the same as in Marker class.
//       Should we get the values from there somehow?
double X_data[4] = {0, 0, 0, 1};    
if (j == 0) { 
    int zzzz=2;         
    //X_data[0] = -0.5*edge_length;
    //X_data[1] = -0.5*edge_length;
} else if (j == 1) {
    X_data[0] = +0.5*edge_length;
    X_data[1] = -0.5*edge_length;
} else if (j == 2) {
    X_data[0] = +0.5*edge_length;
    X_data[1] = +0.5*edge_length;
} else if (j == 3) {
    X_data[0] = -0.5*edge_length;
    X_data[1] = +0.5*edge_length;
}

By uncommenting the commented lines above the problem can be corrected (the line "int zzzz=2;" can also be safely removed).

The extend of specifying the markers as such is currently unknown to me, but I believe it can be reverted due to the following reasons:

  1. The triangle shape is not the correct description of a marker. The (http://wiki.ros.org/ar_track_alvar)[ROS documentation] (See Section 4) state that the four corners should form a rectangle around the centre, thus the centre is not considered a point in the marker bundles.
  2. There is a TODO comment that states the initialisation should be the same as the marker class. Assuming it refers to (https://github.com/sniekum/ar_track_alvar/blob/indigo-devel/src/Marker.cpp)[src/Marker.cpp] (See lines 356 - 379), the commented lines above should indeed be uncommented.
  3. Finally, it looks like a development change that was made for testing purposes but the developer forgot to revert it. It has not been changed since the initial commit of this repository. Another copy of the Alvar respository, made about a month after the initial commit of this repository, does have the corrected code (https://github.com/astanin/mirror-alvar/blob/master/src/MultiMarker.cpp)[Alvar 2.0 Mirror/MultiMarker.cpp] (See from line 228).

Copied from original issue: sniekum#54

Policy "CMP0046" is not known to this version of CMake.

Hey when compiling this package I get:
Policy "CMP0046" is not known to this version of CMake.

However If I uncomment that line in the CMake Lists file:

I get alot more errors:

:44:71: fatal error: opencv2/calib3d/calib3d_c.h: No such file or directory
#include <opencv2/calib3d/calib3d_c.h> //Compatibility with OpenCV 3.x

Keyboard Input Broken on Training Node

From @richterh on May 5, 2015 10:13

On some systems I experience problems with the keyboard input when using the TrainMarkerBundle node. In particular, the system does not accept any keyboard input. In all tests I have ensured that the OpenCV input window is active.

This bug has been tested on three systems, all running Linux Mint 17.1, using the code compiled from source and from the ROS repositories. On two of these systems no input is accepted, not even the 'q' command to exit the program. For some reason it does work correctly on one of these systems.

Proposed Solution

I have corrected the code at my end and the node works as intended. The wrong data type is used when reading the keyboard input from OpenCV. The input is read as int, while it later parsed by comparing it to chars. The following changes has been made in nodes/TrainMarkerBundle.cpp to correct the code:

int keyCallback(int key); -> int keyCallback(char key); // Around line 86
int keyProcess(int key) -> int keyProcess(char key) // Around line 318
int key = cvWaitKey(20); -> char key = cvWaitKey(20); // Around line 427

Concerns

I do not wish to commit these changes myself since the reason why they work is unclear to me. The cvWaitKey(20) method returns an int. It does not make sense that an earlier conversion to char solved the problem.

Copied from original issue: sniekum#53

Marker detection with changed margin size is impossible

From @StephanOpfer on January 11, 2016 12:56

Hi all,

we created marker, which have a margin of size 1. How do we change the margin size for the detection? We were only able to checkout the repo and change the default value in the header file of MarkerDetector.h

This did work, but the margin should be a parameter, which is configurable in a roslaunch file.

Greetings,
Stephan

Copied from original issue: sniekum#72

Individual Markers false detection near color image borders

From @jpmerc on March 30, 2016 17:52

In my configuration, I use the executable IndividualMarkers (2D + 3D). I have noticed that when markers are near the 2D image borders, it will localize them very badly. A fast solution that I found was to modify IndividualMarkers.cpp. I'm not doing a pull request, since I have hardcoded the borders and the size og the kinect image, but I thought that it could possibly help someone wondering why the localization is not working. Here's the code modification for the point cloud callback :

void getPointCloudCallback (const sensor_msgs::PointCloud2ConstPtr &msg)
{
    sensor_msgs::ImagePtr image_msg(new sensor_msgs::Image);

    //If we've already gotten the cam info, then go ahead
    if(cam->getCamInfo_){
        //Convert cloud to PCL
        ARCloud cloud;
        pcl::fromROSMsg(*msg, cloud);

        //Get an OpenCV image from the cloud
        pcl::toROSMsg (*msg, *image_msg);
        image_msg->header.stamp = msg->header.stamp;
        image_msg->header.frame_id = msg->header.frame_id;


        //Convert the image
        cv_ptr_ = cv_bridge::toCvCopy(image_msg, sensor_msgs::image_encodings::BGR8);

        //Get the estimated pose of the main markers by using all the markers in each bundle

        // GetMultiMarkersPoses expects an IplImage*, but as of ros groovy, cv_bridge gives
        // us a cv::Mat. I'm too lazy to change to cv::Mat throughout right now, so I
        // do this conversion here -jbinney
        IplImage ipl_image = cv_ptr_->image;


        //Use the kinect to improve the pose
        Pose ret_pose;
        GetMarkerPoses(&ipl_image, cloud);

        try{
            tf::StampedTransform CamToOutput;
            try{
                tf_listener->waitForTransform(output_frame, image_msg->header.frame_id, image_msg->header.stamp, ros::Duration(1.0));
                tf_listener->lookupTransform(output_frame, image_msg->header.frame_id, image_msg->header.stamp, CamToOutput);
            }
            catch (tf::TransformException ex){
                ROS_ERROR("%s",ex.what());
            }

            arPoseMarkers_.markers.clear ();
            for (size_t i=0; i<marker_detector.markers->size(); i++)
            {
                //Get the pose relative to the camera
                int id = (*(marker_detector.markers))[i].GetId();
                Pose p = (*(marker_detector.markers))[i].pose;

                /// HERE IS THE ADDED CODE
                /// YOU CAN NOTICE I REMOVE MARKERS WHICH CORNERS ARE 40PX FROM
                /// KINECT IMAGE BORDERS
                MarkerData tag_data = (*(marker_detector.markers))[i];
                std::vector<PointDouble> corners_pts = tag_data.marker_corners_img;
                bool point_is_near_border = false;

                // Do not publish points near edges since it is a source of error
                for(int p = 0; p < corners_pts.size(); p++){
                    PointDouble pt = corners_pts.at(p);
                    if(pt.x < 40 || pt.x > 600){
                        point_is_near_border = true;
                        break;
                    }
                    else if(pt.y < 40 || pt.y > 440){
                        point_is_near_border = true;
                        break;
                    }
                }

                if(!point_is_near_border){

                    double px = p.translation[0]/100.0;
                    double py = p.translation[1]/100.0;
                    double pz = p.translation[2]/100.0;
                    double qx = p.quaternion[1];
                    double qy = p.quaternion[2];
                    double qz = p.quaternion[3];
                    double qw = p.quaternion[0];

                    tf::Quaternion rotation (qx,qy,qz,qw);
                    tf::Vector3 origin (px,py,pz);
                    tf::Transform t (rotation, origin);
                    tf::Vector3 markerOrigin (0, 0, 0);
                    tf::Transform m (tf::Quaternion::getIdentity (), markerOrigin);
                    tf::Transform markerPose = t * m; // marker pose in the camera frame

                    //Publish the transform from the camera to the marker
                    std::string markerFrame;
                    if(prefix == "") markerFrame = "ar3d_";
                    else markerFrame = prefix + "/" + markerFrame;
                    std::stringstream out;
                    out << id;
                    std::string id_string = out.str();
                    markerFrame += id_string;
                    tf::StampedTransform camToMarker (t, image_msg->header.stamp, image_msg->header.frame_id, markerFrame.c_str());
                    tf_broadcaster->sendTransform(camToMarker);

                    //Create the rviz visualization messages
                    tf::poseTFToMsg (markerPose, rvizMarker_.pose);
                    rvizMarker_.header.frame_id = image_msg->header.frame_id;
                    rvizMarker_.header.stamp = image_msg->header.stamp;
                    rvizMarker_.id = id;

                    rvizMarker_.scale.x = 1.0 * marker_size/100.0;
                    rvizMarker_.scale.y = 1.0 * marker_size/100.0;
                    rvizMarker_.scale.z = 0.2 * marker_size/100.0;
                    rvizMarker_.ns = "basic_shapes";
                    rvizMarker_.type = visualization_msgs::Marker::CUBE;
                    rvizMarker_.action = visualization_msgs::Marker::ADD;
                    switch (id)
                    {
                    case 0:
                        rvizMarker_.color.r = 0.0f;
                        rvizMarker_.color.g = 0.0f;
                        rvizMarker_.color.b = 1.0f;
                        rvizMarker_.color.a = 1.0;
                        break;
                    case 1:
                        rvizMarker_.color.r = 1.0f;
                        rvizMarker_.color.g = 0.0f;
                        rvizMarker_.color.b = 0.0f;
                        rvizMarker_.color.a = 1.0;
                        break;
                    case 2:
                        rvizMarker_.color.r = 0.0f;
                        rvizMarker_.color.g = 1.0f;
                        rvizMarker_.color.b = 0.0f;
                        rvizMarker_.color.a = 1.0;
                        break;
                    case 3:
                        rvizMarker_.color.r = 0.0f;
                        rvizMarker_.color.g = 0.5f;
                        rvizMarker_.color.b = 0.5f;
                        rvizMarker_.color.a = 1.0;
                        break;
                    case 4:
                        rvizMarker_.color.r = 0.5f;
                        rvizMarker_.color.g = 0.5f;
                        rvizMarker_.color.b = 0.0;
                        rvizMarker_.color.a = 1.0;
                        break;
                    default:
                        rvizMarker_.color.r = 0.5f;
                        rvizMarker_.color.g = 0.0f;
                        rvizMarker_.color.b = 0.5f;
                        rvizMarker_.color.a = 1.0;
                        break;
                    }
                    rvizMarker_.lifetime = ros::Duration (1.0);
                    rvizMarkerPub_.publish (rvizMarker_);

                    //Get the pose of the tag in the camera frame, then the output frame (usually torso)
                    tf::Transform tagPoseOutput = CamToOutput * markerPose;

                    //Create the pose marker messages
                    ar_track_alvar_msgs::AlvarMarker ar_pose_marker;
                    tf::poseTFToMsg (tagPoseOutput, ar_pose_marker.pose.pose);
                    ar_pose_marker.header.frame_id = output_frame;
                    ar_pose_marker.header.stamp = image_msg->header.stamp;
                    ar_pose_marker.id = id;
                    arPoseMarkers_.markers.push_back (ar_pose_marker);
                }
            }
            arPoseMarkers_.header.stamp = image_msg->header.stamp;
            arMarkerPub_.publish (arPoseMarkers_);
        }
        catch (cv_bridge::Exception& e){
            ROS_ERROR ("Could not convert from '%s' to 'rgb8'.", image_msg->encoding.c_str ());
        }
    }
}

Copied from original issue: sniekum#76

Is there a way to increase the frequency of pr2_indiv_no_kinect.launch?

I am using a logitech c920 to detect a marker. I am running pr2_indiv_no_kinect launch file. But the whole thing is only running at 1hz. In the node file, it says there is a parameter called max_frequency which is already set to 8.0 and I tried to set it to 30 but nothing changed. Anyone know how to get it to run faster?

Can I create a "bundle of bundles"?

I understand that it's possible to treat a group of tags as a single unit with the multi-tag bundle feature, where the entire set of tags has one defined center point.

I would like to expand this concept of a multi-tag bundle and create a multi-bundle bundle. In other words, treating the entire multi-bundle setup as a single unit, with one defined center point. Is it possible to do so using something similar to the createMarker tool? Or will I have to manually create an XML file containing each individual marker in each bundle?

individualMarkersNoKinect with "non stable" camera doesn't work

From @jnitsch on May 22, 2015 9:8

Hi,

I tried to detect AR tracks with a camera in an arbitrary pose using the node individualMarkersNoKinect. When turning the camera the position of the AR marker changed. When I moved and turned the AR marker, its pose change relative to the camera was alright. But its pose in the world was still wrong. When I put the arm in a position, so that the camera frame had nearly the same orientation like the base frame it seemed to work without any issues.

Is it possible that the transform towards the camera is missing? Or that the camera needs to be aligned the same way like the base frame?

The frames of the camera were published the right way. I am using Rethink Robotics robot Baxter and try to detect the AR track with its hand camera.

Best regards
Julia

Copied from original issue: sniekum#56

Modifying ar_track_alvar

From @satishvaishnav on June 13, 2015 22:28

I want to estimate my quadrotors position with respect to image in front of the quadrotor which will help me calculate the position of all the features in that image. Can this package be modified for my use?

Copied from original issue: sniekum#59

Axis orientation difference between individualMarkers and individualMarkersNoKinect

From @longjie on November 27, 2015 6:34

Hi,
I'm using Xtion pro live and the individualMarkers node to detect AR marker's position and orientation.
I have noticed the marker's orientation, the direction of x and y axis, is differ from the one from the individualMarkersNokinect. The direction is rotated 90 degrees from the correct direction. The individualMarkersNoKinect node produces correct orientation with the same sensor and image topic.

I don't know this issue is special for my environment. If someone have any advices, please help me.

Environment: Ubuntu 12.04LTS, ROS hydro, ar_track_alvar/hydro-devel branch

Copied from original issue: sniekum#69

createMarker options aren't working

From @AndyZe on January 5, 2017 18:32

I'm trying to create a marker with, say, a side length of 7. But all 3 of these commands generate identical markers with a side length of 9:

rosrun ar_track_alvar createMarker 11
rosrun ar_track_alvar createMarker -s 7.0 11
rosrun ar_track_alvar createMarker 11 -s 7.0

I've also tried other combinations.

Maybe I'm doing it wrong, but it seems like the argument parsing is broken.

It was installed by sudo apt-get install.

Copied from original issue: sniekum#97

Pose publication too slow

I use Ubuntu 16.04 and ros kinetic. My CPU is Intel I7 with 8G memory. When I use ar_track_alvar, it publish poses at poor 0.2hz. I believe there must be something wrong. Can anyone help me to figure it out?

I set all parameters of ar_track_alvar same as default parameters. It subscribe /camera/rgb/image_raw and /camera/rgb/camera_info. I didn't change any other thing.

Thanks!

Branches are not synchronized

From @130s on January 25, 2015 0:17

Upon sniekum#41 I'm looking at branches and realized that active branches (I assume { groovy, hydro, indigo }-devel) are not synchronized. Each branch has accepted unique commits within the last 6 months.

I can see some commits MAY be distro-specific (e.g. this one for Hydro), but not entirely sure if those commits are intended specifically to each branch, or if it was just the pull-requesters were on those branches when they added changed and opened PRs without much thoughts on which branch(es) can their commits be applied to.

So what is the right approach with this package?

  • Keep separate branches as they are: Since @sniekum explicitly incremented the version per each branch, I just assume there's a reason to do so. But then we need to make the rule clearer. For example now that Groovy build job is ceased, having groovy-devel as a default branch does not make sense much to me. I usually see with other ros-related repository where they associate branches with ROS distros, they use the one with latest distro (Indigo now).
  • Or merge branches? I tried locally to merge, was able to merge conflicts. But then I noticed that I'm not sure at all which commit should stick to a particular distro.

Copied from original issue: sniekum#42

tf2 support

Is it possible to use ar_track_alvar with tf2 as opposed to tf? Would you welcome a PR on this?

Cheers

Not enough inliers found to support a model - Ignoring transform for child_frame_id

From @TSC21 on July 10, 2014 13:15

Hi,

I'm using an Asus Xtion Pro Live to identify and track the pose of numb 8 AR tag, integrating the driver depth data. I'm using Openni2 with ROS Hydro in Ubuntu 12.11 Linaro, on a ARM architecture (a Odroid to be more specific). I have PCL-1.7 installed by deb packages (which was required by pcl-ros). My launch file has the following config:

<arg name="cam_image_topic" default="/camera/depth_registered/points" />
<arg name="cam_info_topic" default="/camera/rgb/camera_info" />     
<arg name="output_frame" default="/camera_link" />

<node name="ar_track_alvar" pkg="ar_track_alvar" type="individualMarkers" respawn="false" output="screen" args="$(arg marker_size) $(arg max_new_marker_error) $(arg max_track_error) $(arg cam_image_topic) $(arg cam_info_topic) $(arg output_frame)" />

I get the following log in command line:

******* ID: 8
[pcl::SampleConsensusModelPlane::optimizeModelCoefficients] Not enough inliers found to support a model (0)! Returning the same coefficients.

Error: TF_NAN_INPUT: Ignoring transform for child_frame_id "ar_marker_8" from authority "/ar_track_alvar" because of a nan value in the transform (nan nan nan) (nan nan nan nan)
at line 240 in /tmp/buildd/ros-hydro-tf2-0.4.10-0precise-20140219-1739/src/buffer_core.cpp

Also in the command line window where I launched openni2_launch openni2.launch I'm getting at the same time:

Error: TF_NAN_INPUT: Ignoring transform for child_frame_id "ar_marker_8" from authority "/ar_track_alvar" because of a nan value in the transform (nan nan nan) (nan nan nan nan)
at line 240 in /tmp/buildd/ros-hydro-tf2-0.4.10-0precise-20140219-1739/src/buffer_core.cpp

Any way of solving this? Since I have a RGBD camera I would like to use it's depth for better pose estimation. The simpler node without depth data works though.
Thanks in advance!

Copied from original issue: sniekum#35

update ROS wiki documentation

From @bit-pirate on April 8, 2015 5:21

I noticed that the package documentation on the ROS wiki seems heavily out of date, e.g. Fuerte is mentioned in the text.

http://wiki.ros.org/ar_track_alvar

I already create the missing pages for the new meta and message packages and also split the main package doc in a fuerte page for the fuerte version and a post-fuerte page for all following versions.

If you have time please take a look at the wiki page and update where necessary.

Copied from original issue: sniekum#47

Camera.cpp Distort() and Undistort() functions are commented out?

From @rgreid on September 18, 2015 8:52

Hi Scott, wondering why the Distort() and Undistort() functions are commented out in Camera.cpp?

Importantly, the MarkerDetector/MarkerDetectorImpl class calls LabelSquares(), which in turn calls the Camera class' non-functional Undistort() function?

Have I missed something in the documentation? Is a pre-rectified image expected? Looking at one of your nodes, the images received from ROS are not rectified before being passed to marker_detector.Detect(). Thanks.

Copied from original issue: sniekum#65

Camera position x y z

From @fickrie67 on October 27, 2015 17:5

Hallo,

thank you very much for the amazing software, i have one question here:
-how do i get the camera position coordinate x y z ? to use it later on as camera tracking

thank you very much

Copied from original issue: sniekum#68

Mirrored marker false detection

From @mehditlili on April 2, 2015 12:8

While doing some tests with the ar markers, I realized that sometimes marker 5 is also detected as being marker 14 where the Z axis goes in the opposite direction. Markers 5 and 14 are mirrored versions of each other. I fixed this by eliminating all markers detected with a z axis in a negative direction but it would be nice to eliminate this problem once for all.

Copied from original issue: sniekum#45

ar_track_alvar causes TF_NAN_INPUT

From @dan9thsense on February 13, 2017 2:0

I am running ar_track_alvar successfully in both ROS indigo and kinetic, but it causes tf transform nodes to output errors such as:

TF_NAN_INPUT: Ignoring transform for child_frame_id "ar_marker_111"

I'm pretty sure the errors are irrelevant, as I am detecting all of the expected markers fine and getting good transforms from them. However, these errors make a mess of the terminal screen of other nodes. Is there a way to either suppress the errors or (better) to get ar_track_alvar to only send out valid transforms?

I see that there was a similar issue two years ago without a good resolution. Any updates since then?

Copied from original issue: sniekum#114

Detecting markers of different sizes simultaneously

I am using an aerial vehicle that has a bottom camera (no kinect) and I am using it to detect an ARTag. It works perfect when it is only one, but now I need to add some more tags so they can be seen at different heights. I read that some people did that but I didn't find how, because I would like to define the sizes of all the possible markers but I can only define one.

What can I do? Use more than one pr2_indiv_no_kinect.launch file? My tags would be something like:
marker11_borde

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.