Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

rviz setViewController doesn't hook up mouse events?

I have an rviz rqt plugin which works fine with the default view controller, but I would like to use a different controller. It seems like this should be done with setViewController(), it renders the view from a default zero starting point but the mouse doesn't rotate or translate the view.

This is in my initPlugin:

  ...
  manager_->initialize();
  manager_->startUpdate();

  rviz::ViewController* view = new rviz::OrbitViewController();
  if (view)
  {
    view->initialize(manager_);
    render_panel_->setViewController(view);
  }

Is something missing that will cause the view controller handleMouseEvents() to get called? Some additional comments are here:

https://github.com/ros-visualization/rviz/issues/997

rviz setViewController doesn't hook up mouse events?

I have an rviz rqt plugin librviz application https://github.com/lucasw/visualization_tutorials/tree/set-view-controller-test which works fine with the default view controller, but I would like to use a different controller. It seems like this should be done with setViewController(), it renders the view from a default zero starting point but the mouse doesn't rotate or translate the view.

This is in my initPlugin:

  ...
  manager_->initialize();
  manager_->startUpdate();

  rviz::ViewController* view = new rviz::OrbitViewController();
  if (view)
  {
    view->initialize(manager_);
    render_panel_->setViewController(view);
  }

Is something missing that will cause the view controller handleMouseEvents() to get called? Some additional comments are here:

https://github.com/ros-visualization/rviz/issues/997

rviz setViewController doesn't hook up mouse events?

I have an librviz application https://github.com/lucasw/visualization_tutorials/tree/set-view-controller-test which works fine with the default view controller, but I would like to use a different controller. It seems like this should be done with setViewController(), it renders the view from a default zero starting point but the mouse doesn't rotate or translate the view.

This is in my initPlugin:

  ...
  manager_->initialize();
  manager_->startUpdate();

  rviz::ViewController* view = new rviz::OrbitViewController();
  if (view)
  {
    view->initialize(manager_);
    render_panel_->setViewController(view);
  }

Is something missing that will cause the view controller handleMouseEvents() to get called? Some additional comments are here:

https://github.com/ros-visualization/rviz/issues/997

And a visualization_tutorial issue here https://github.com/ros-visualization/visualization_tutorials/issues/36

rviz setViewController doesn't hook up mouse events?

I have an librviz application https://github.com/lucasw/visualization_tutorials/tree/set-view-controller-test which works fine with the default view controller, but I would like to use a different controller. It seems like this should be done with setViewController(), it renders the view from a default zero starting point but the mouse doesn't rotate or translate the view.

This is in my initPlugin:constructor:

  ...
  manager_->initialize();
  manager_->startUpdate();

  rviz::ViewController* view = new rviz::OrbitViewController();
  if (view)
  {
    view->initialize(manager_);
    render_panel_->setViewController(view);
  }

Is something missing that will cause the view controller handleMouseEvents() to get called? Some additional comments are here:

https://github.com/ros-visualization/rviz/issues/997

And a visualization_tutorial issue here https://github.com/ros-visualization/visualization_tutorials/issues/36