RobotVisualizationController Class Reference

The RobotVisualizationController A Controller to control the visualization of the robot. More...

#include <RobotComponents/gui-plugins/RobotTrajectoryDesignerGuiPlugin/Controller/RobotVisualizationController.h>

+ Inheritance diagram for RobotVisualizationController:

Public Slots

void addView ()
 PARALLEL VIEWS.
 
void cartesianSelectionChanged (VirtualRobot::IKSolver::CartesianSelection cs)
 IK CALLBACK METHODS.
 
void clearView ()
 
void displayAllWayPoints (bool display)
 displayAllWayPoints Enables Visualization and threfore selection of all waypoints of the current Trajectory and not only userWaypoints
 
void environmentChanged (EnvironmentPtr environment)
 environmentChanged updates the environment that is currently visualized
 
void kinematicChainChanged (VirtualRobot::RobotNodeSetPtr rns)
 kinematicChainChanged removes all visualization from the previously selected Trajectory and changes the Visualization of the Manipulator to look like the endeffector of the kinematic chain
 
void playTrajectories (std::vector< DesignerTrajectoryPtr > trajectories)
 playTrajectories plays all trajectories at the same time
 
void playTrajectory ()
 PLAY TRAJECTORY.
 
void removeView ()
 removeView removes RobotViewer with index
 
void robotChanged (VirtualRobot::RobotPtr robot)
 robotChanged updates the robot model that is currently visualized Removes the robot that is visualized prior to this one
 
void selectedTransitionChanged (int index)
 selectedTransitionChanged highlights the Transition with index
 
void selectedWayPointChanged (int index)
 selectedWayPointChanged highlights the waypoint with index and moves the manipulator to its Pose
 
void setCamera ()
 CAMERA UPDATING METHODS.
 
void setCamera (int perspective)
 setCamera sets camera to the Perspective with index perspective in the corresponding enum
 
void setIKCallbackEnabled (bool enabled)
 setIKCallbackEnabled sets whther the robot Model tries to reach the Pose determined by the Manipulator
 
void trajectoryPlayerStopped ()
 trajectoryPlayerStopped restarts the visualization of the whole scene after the debug drawer does not longer visualize the trajectory
 
void updateViews (DesignerTrajectoryPtr trajectory)
 UPDATING OF VISUALIZATION.
 

Signals

void manipulatorChanged (Eigen::Matrix4f globalPose)
 manipulatorChanged informs all relevant controllers that the pose of the manipulator has changed and therefore the currently selected Waypoint is also changed
 
void poseReachable (bool reachable)
 poseReachable informs all relevant controllers whether the pose of the manipulator is reachable
 
void tcpPoseChanged (Eigen::Matrix4f globalPose)
 tcpPoseChanged informs all releveant controllers about the new global pose of the manipulator
 
void trajectoryPlayerNotPlaying (bool playing)
 trajectoryPlayerNotPlaying
 
void trajectoryPlayerPlaying (bool playing)
 
void wayPointSelected (int index)
 wayPointSelected informs all relevant controllers that the currently selected Waypoit has been changed via click on the waypoint in the RobotViewer
 

Public Member Functions

void addConnection (std::shared_ptr< RobotVisualizationController > ctr)
 
void onConnectComponent () override
 Connects all signals and slots of the controller.
 
void onDisconnectComponent () override
 Called whenever a component is disconnected.
 
void onExitComponent () override
 Called on exit, cleans.
 
void onInitComponent () override
 Initializes the controller.
 
void refresh () override
 refresh gets all relevant data from subject an updates itself accoringly should be called by subject but can also be called from elsewhere
 
 RobotVisualizationController (QWidget *parent)
 RobotVisualizationController creates a new RobotVisualizationController.
 
 ~RobotVisualizationController ()
 

Friends

class RobotVisualization
 

Detailed Description

The RobotVisualizationController A Controller to control the visualization of the robot.

Hides the concrete visualization Method(Coin,OSG) from the rest of the application. Provides Methods for adding Visualization of one Robot at a time, waypoints and transitions between waypoints. Supports up to four parallel views. Informs other Controllers about the Position of the Manipulator, the TCP and the selected waypoint.

Constructor & Destructor Documentation

◆ RobotVisualizationController()

RobotVisualizationController ( QWidget * parent)

RobotVisualizationController creates a new RobotVisualizationController.

INITIALIZATION.

Parameters
parentthe widget in which th viewer should be placed in

◆ ~RobotVisualizationController()

Member Function Documentation

◆ addConnection()

void addConnection ( std::shared_ptr< RobotVisualizationController > ctr)

◆ addView

void addView ( )
slot

PARALLEL VIEWS.

addView adds new RobotViewer

◆ cartesianSelectionChanged

void cartesianSelectionChanged ( VirtualRobot::IKSolver::CartesianSelection cs)
slot

IK CALLBACK METHODS.

cartesianSelectionChanged recalculates the configuration of the robot joints to fit the new selection

Parameters
csthe new CartesianSelection

◆ clearView

void clearView ( )
slot

◆ displayAllWayPoints

void displayAllWayPoints ( bool display)
slot

displayAllWayPoints Enables Visualization and threfore selection of all waypoints of the current Trajectory and not only userWaypoints

Parameters
display

◆ environmentChanged

void environmentChanged ( EnvironmentPtr environment)
slot

environmentChanged updates the environment that is currently visualized

UPDATING OF VISUALIZATION.

Parameters
environmentthe new environment

◆ kinematicChainChanged

void kinematicChainChanged ( VirtualRobot::RobotNodeSetPtr rns)
slot

kinematicChainChanged removes all visualization from the previously selected Trajectory and changes the Visualization of the Manipulator to look like the endeffector of the kinematic chain

Parameters
selectedChain

◆ manipulatorChanged

void manipulatorChanged ( Eigen::Matrix4f globalPose)
signal

manipulatorChanged informs all relevant controllers that the pose of the manipulator has changed and therefore the currently selected Waypoint is also changed

◆ onConnectComponent()

void onConnectComponent ( )
overridevirtual

Connects all signals and slots of the controller.

Implements AbstractController.

◆ onDisconnectComponent()

void onDisconnectComponent ( )
overridevirtual

Called whenever a component is disconnected.

Implements AbstractController.

◆ onExitComponent()

void onExitComponent ( )
overridevirtual

Called on exit, cleans.

Implements AbstractController.

◆ onInitComponent()

void onInitComponent ( )
overridevirtual

Initializes the controller.

Implements AbstractController.

◆ playTrajectories

void playTrajectories ( std::vector< DesignerTrajectoryPtr > trajectories)
slot

playTrajectories plays all trajectories at the same time

Parameters
trajectoriesthe trajectories to play - no duplicates of selected robot node sets allowed!

◆ playTrajectory

void playTrajectory ( )
slot

PLAY TRAJECTORY.

playTrajectories plays the currently selected trajectory and disables all other visualization features

◆ poseReachable

void poseReachable ( bool reachable)
signal

poseReachable informs all relevant controllers whether the pose of the manipulator is reachable

Parameters
reachabletrue when there is an IK-solution for the manipulator could be found

◆ refresh()

void refresh ( )
overridevirtual

refresh gets all relevant data from subject an updates itself accoringly should be called by subject but can also be called from elsewhere

Implements VisualizationObserver.

◆ removeView

void removeView ( )
slot

removeView removes RobotViewer with index

Parameters
indexthe index of the view to remove

◆ robotChanged

void robotChanged ( VirtualRobot::RobotPtr robot)
slot

robotChanged updates the robot model that is currently visualized Removes the robot that is visualized prior to this one

Parameters
robotthe new Robot to visualize

◆ selectedTransitionChanged

void selectedTransitionChanged ( int index)
slot

selectedTransitionChanged highlights the Transition with index

Parameters
indexthe index of the transition that should be highlighted

◆ selectedWayPointChanged

void selectedWayPointChanged ( int index)
slot

selectedWayPointChanged highlights the waypoint with index and moves the manipulator to its Pose

Parameters
indexthe index of the waypoint to select next

◆ setCamera [1/2]

void setCamera ( )
slot

CAMERA UPDATING METHODS.

setCamera Sets the camera of all views to standard Position sets camera to standard perspective

◆ setCamera [2/2]

void setCamera ( int perspective)
slot

setCamera sets camera to the Perspective with index perspective in the corresponding enum

Parameters
perspectivethe selected perspective 0 - High Angle 1 - Top 2 - Front 3 - Back 4 - Left 5 - Right

◆ setIKCallbackEnabled

void setIKCallbackEnabled ( bool enabled)
slot

setIKCallbackEnabled sets whther the robot Model tries to reach the Pose determined by the Manipulator

Parameters
enabledif true the robot follows the manipulator

◆ tcpPoseChanged

void tcpPoseChanged ( Eigen::Matrix4f globalPose)
signal

tcpPoseChanged informs all releveant controllers about the new global pose of the manipulator

Parameters
globalPosethe pose of the manipulator relative to the global frame

◆ trajectoryPlayerNotPlaying

void trajectoryPlayerNotPlaying ( bool playing)
signal

trajectoryPlayerNotPlaying

Parameters
playing

◆ trajectoryPlayerPlaying

void trajectoryPlayerPlaying ( bool playing)
signal

◆ trajectoryPlayerStopped

void trajectoryPlayerStopped ( )
slot

trajectoryPlayerStopped restarts the visualization of the whole scene after the debug drawer does not longer visualize the trajectory

◆ updateViews

void updateViews ( armarx::DesignerTrajectoryPtr trajectory)
slot

UPDATING OF VISUALIZATION.

updateViews Removes the current visualization of all Waypoints and Transitions and replaces them with the visualization of the new Trajectory

Parameters
trajectorythe trajectory to display next

◆ wayPointSelected

void wayPointSelected ( int index)
signal

wayPointSelected informs all relevant controllers that the currently selected Waypoit has been changed via click on the waypoint in the RobotViewer

Parameters
index

Friends And Related Symbol Documentation

◆ RobotVisualization

friend class RobotVisualization
friend

The documentation for this class was generated from the following files: