Skip to content

[ROS2] Unable to move camera in librviz tutorial #90

@Sean-Katagiri

Description

@Sean-Katagiri

I am running on Ubuntu 22.04 with ROS Humble installed.

While the rest of the components in the librviz tutorial works (changing grid spacing, grid line thickness), I am completely unable to move the camera.

I've attempted to enable mouse tracking of the render_panel_ via render_panel_->setMouseTracking(true); but this had no effect.

I can confirm QMouseEvents are triggering on the main window widget using qDebug, which to me strikes as a sign it's not a Qt installation issue.

Aside from the mouse tracking being enabled, the code is exactly as it is in the ros2 branch of MyViz under librviz_tutorial.

It's worth noting that I was able to move the camera programmatically using the following:

rviz_common::ViewController * controller_ = manager_->getViewManager()->getCurrent();
controller_->getCamera()->moveRelative(Ogre::Vector3(1,1,1));`

But would prefer to use the Orbit controller the render_panel_ already has for controlling the camera with a mouse if possible.
Anyone been able to get specifically the ROS2 branch of this code to work with camera mouse controls?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions