Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data samples keep moving with coordinate frame in 3D-Visualization #29

Open
skasperski opened this issue Jan 14, 2016 · 5 comments
Open

Comments

@skasperski
Copy link

Data samples that are defined in some coordinate frame keep moving in the visualization when the frame changes over time. But data should stay at the position where it was recorded instead of moving with the frame after it has been recorded.

@jmachowinski
Copy link
Contributor

Depends on the usecase, If you display a robot arm , you want that the 'subelements' move if you change the frame over time.

@skasperski
Copy link
Author

Yes, that's true. But every reading of the outside world (e.g. pointclouds) you would expect to stay in place when the robot moves.

@skasperski
Copy link
Author

I tried to attach the vis-plugin to a fixed frame node instead of the moving transformer tree node, but this doesn't seem to work. (Produces an indeed fixed, but strangely doubled and rotated visualization).

void Vizkit3DWidget::enableDataHandler(VizPluginBase *viz)
{
    if (viz == env_plugin)
        throw std::invalid_argument("attempted to enable the environment plugin");

    PluginMap::iterator it = plugins.find(viz);
    if (it != plugins.end())
    {            
        //get global position of framegroup
        osg::Group* framegroup = it->second.get();
        fixed_node = GlobalPos::getGlobalPATransform(framegroup, getRootNode());

        //need to save trans for disableDataHandler
        fixed_node->addChild(viz->getRootNode());
        getRootNode()->addChild(fixed_node);
    }
}

@jmachowinski
Copy link
Contributor

Did you try the keep_old_data option ?

@doudou
Copy link
Member

doudou commented Feb 12, 2016

@skasperski: I agree with you that it's a bug, but I don't think that anyone would have the time/energy to fix this particular issue unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants