Ask Your Question
1

RViz and interactive markers: Why does not pose automatically updated?

asked 2014-01-29 12:00:27 -0500

courrier gravatar image

Hi all,

When an interactive marker's pose is changed using a control (for instance the 6-DoF control provided in basic_controls), why does the field int_marker.pose is not filled why the new value automatically?

I spent a long time debugging my node when I realized that I had to update it myself with such a callback function for instance:

void processFeedback(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)
{
switch (feedback->event_type) {
    case visualization_msgs::InteractiveMarkerFeedback::POSE_UPDATE:
        int_marker.pose = feedback->pose; // MANDATORY??
        server->insert(int_marker, &processFeedback);
        server->applyChanges();
        break;
}

Even if the pose is not updated, the display is correct and my object moves when I control it with the interactive marker, so where are stored its coordinates?

Many thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-03-11 06:45:01 -0500

courrier gravatar image

updated 2014-03-11 06:45:25 -0500

OK, so, in fact, when an interactive marker is inserted to the server, it creates a copy of it instead of referencing it. So we have two living copies of the interactive marker: the original InteractiveMarker declared, and the one of the server than we can access through server->get("name", out_im) (which gives back A COPY of the marker within the server).

For this specific issue, the version on the server is updated to the current pose every time, but not the other one that we have to update manually. I don't know what justifies this implementation but it's really annoying, we have to synchronize both versions all the time if we want to modify the interactive marker in real time. Getting the version of the server, modifying it and then pushing again... not very clean :s

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-01-29 12:00:27 -0500

Seen: 406 times

Last updated: Mar 11 '14