ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

zieben's profile - activity

2017-11-17 16:15:12 -0500 received badge  Great Question (source)
2015-11-02 01:56:08 -0500 marked best answer Multi-tag bundles detection of ar_track_alvar

I have some problem to detect Multi-tag bundles through ar_track_alvar. According to the wiki,

To create a bundle, first choose which tag you want to be the master tag. Treat the center of the master tag as (0,0,0). Then, after placing the rest of the tags, measure the x, y, and z coordinate for each of the 4 corners of all of the tags, relative to the master tag origin. Enter these measurements for each tag into the XML file starting with the lower left corner and prograssing clockwise around the tag.

So I think I should add points in XML file as this sequences: lower left -> upper left -> upper right -> lower right.

However, an example XML file included in ar_track_alvar seems like not to follow that rules. (It progresses counter-clockiwise around tag. e.g. lower left -> lower right -> upper right -> upper left)

I also tried to make XML file through createMarker. However, it is also weird. 4 points generated by it are center -> lower right -> upper right -> upper left.

I tried three of them. When I check it through rviz, all three cases cannot detect master tag (red square marker appears different position and orientation) However, other markers except for master one are well detected as green marker.

So what was my fault or what I have to do more?

Thank you.

2015-10-12 14:58:26 -0500 received badge  Favorite Question (source)
2015-07-23 10:02:54 -0500 received badge  Good Question (source)
2015-06-12 15:51:23 -0500 received badge  Nice Question (source)
2014-05-14 03:43:07 -0500 received badge  Famous Question (source)
2014-03-10 19:14:33 -0500 received badge  Famous Question (source)
2014-01-28 17:30:17 -0500 marked best answer rosdep update problem

Hello, I'm installing groovy now. After running "rosdep update" it show error as follows:

$ rosdep update
reading in sources list data from /etc/ros/rosdep/sources.list.d

Hit****/rosdep/osx-homebrew.yaml
Hit
****/rosdep/gentoo.yaml
Hit ****/rosdep/base.yaml Hit****/rosdep/python.yaml
Hit ****/rosdep/ruby.yaml Hit****/releases/fuerte.yaml

ERROR: error loading sources list:
HTTP Error 404: Not Found

I already install fuerte and using it. There was not same problem when I installed fuerte. What I have to now?

Thank you.

2013-08-29 14:56:01 -0500 received badge  Famous Question (source)
2013-07-23 05:17:13 -0500 received badge  Notable Question (source)
2013-07-23 05:17:13 -0500 received badge  Popular Question (source)
2013-06-18 12:06:31 -0500 asked a question callback in multi-threading

Hello, I have question about operation of callback function with multi-threading.

I made several publishers and subscribers in one node. Two of them are running on main thread and others are running on another boost thread.

in main function,

  • create Class A object which has one subscriber and publisher inside the subscriber
  • create Class B object which has one subscriber and publisher inside the subscriber
  • create Class C object which makes boost thread and has two subscriber in boost thread.

    thread = boost::thread(boost::bind(&Interpreter::messagecallback, this)); thread.join();

  • ros::spin() at the end of the main function

So I have an issue in here. After making the structure like that, subscribers in main thread and thread are never called. Surely I added this code inside while loop of the thread.

boost::this_thread::sleep(boost::posix_time::millisec(500));

Every publishers and subscribers were worked well before I separated class C as the thread. What I think is like this. Callback functions in class A and class B are also another thread. So I don't need to make another thread for them if I linked the callback function as 'subscribe' function.

So could I get any help?

Thank you.

2013-06-05 19:50:09 -0500 received badge  Notable Question (source)
2013-06-05 19:49:30 -0500 received badge  Scholar (source)
2013-06-05 19:46:34 -0500 edited question How to make callback function called by several subscriber?

Hello, I want to make multi-subscriber that calls same function with different argument.

For example,

std::vector<ros::Subscriber> sub;
std::vector<sensor_msgs::JointState> position;

position.resize(2);
sub.resize(2);

for(int i=0; i < sub.size(); i++)
{
   char sub_name[20];
   sprintf(sub_name, "sub_%d", i);
   sub[i] = node.subscribe(sub_name, 1, &Myclass::callback, this);
}

Myclass::callback(const sensor_msgs::JointStateConstPtr &msg)
{
   this->position[i] = *msg;
}

So my questions are:

  1. How to sent array index i from main function to Myclass::callback?

  2. Can several subscriber call same callback function like that?

Thank you for your answer. This is additional question.

I modified source code as follows:

position.resize(2);
sub.resize(2);

for(int i=0; i < sub.size(); i++)
{
   char sub_name[20];
   sprintf(sub_name, "sub_%d", i);
   sub[i] = node.subscribe(sub_name, 1, boost::bind(&Myclass::callback, this, _1, i));
}

Myclass::callback(const sensor_msgs::JointStateConstPtr &msg, int i)
{
   this->position[i] = *msg;
}

And this is error messages I got.

error: no matching function for call to ‘ros::NodeHandle::subscribe(char [20], int, boost::_bi::bind_t<void, boost::_mfi::mf2<void, Myclass, const boost::shared_ptr<const sensor_msgs::JointState_<std::allocator<void> > >&, int>, boost::_bi::list3<boost::_bi::value<Myclass*>, boost::arg<1>, boost::_bi::value<int> > >)’

and candidates are:

/opt/ros/groovy/include/ros/node_handle.h:379:14: note: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(M), T*, const ros::TransportHints&)
/opt/ros/groovy/include/ros/node_handle.h:390:14: note: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(M)const, T*, const ros::TransportHints&)
/opt/ros/groovy/include/ros/node_handle.h:438:14: note: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(const boost::shared_ptr<const MReq>&), T*, const ros::TransportHints&)
/opt/ros/groovy/include/ros/node_handle.h:448:14: note: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(const boost::shared_ptr<const MReq>&)const, T*, const ros::TransportHints&)
/opt/ros/groovy/include/ros/node_handle.h:498:14: note: 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&)
/opt/ros/groovy/include/ros/node_handle.h:509:14: note: 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&)
/opt/ros/groovy/include/ros/node_handle.h:559:14: note: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(const boost::shared_ptr<const MReq>&), const boost::shared_ptr<U>&, const ros::TransportHints&)
/opt/ros/groovy/include/ros/node_handle.h:570:14: note: template<class M, class T> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (T::*)(const boost::shared_ptr<const MReq>&)const, const boost::shared_ptr<U>&, const ros::TransportHints&)
/opt/ros/groovy/include/ros/node_handle.h:618:14: note: template<class M> ros::Subscriber ros::NodeHandle::subscribe(const string&, uint32_t, void (*)(M), const ros::TransportHints&)
/opt/ros/groovy/include/ros/node_handle.h:663:14: note: template<class M> ros::Subscriber ros::NodeHandle ...
(more)
2013-06-03 15:01:18 -0500 edited question How to align RGB camera point and visualization_msgs/Marker?

Hello,

I'm using ar_track_alvar to recognize armarker. For now, what I want to do is drawing marker on the rgb camera image. I know that I can see the marker with rgb camera image through RVIZ. However I want to use these images on another application.

So, my questions are,

  1. does RVIZ support publishing treated image(camera image with marker) as topic like image_compressed or image_raw?

  2. How can I align the RGB camera point and marker position of ar_track_alvar (visualization_msg/Marker)

Thank you.