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

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 More...
 
void poseReachable (bool reachable)
 poseReachable informs all relevant controllers whether the pose of the manipulator is reachable More...
 
void tcpPoseChanged (Eigen::Matrix4f globalPose)
 tcpPoseChanged informs all releveant controllers about the new global pose of the manipulator More...
 
void trajectoryPlayerNotPlaying (bool playing)
 trajectoryPlayerNotPlaying More...
 
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 More...
 

Public Member Functions

void addConnection (std::shared_ptr< RobotVisualizationController > ctr)
 
void onConnectComponent () override
 Connects all signals and slots of the controller. More...
 
void onDisconnectComponent () override
 Called whenever a component is disconnected. More...
 
void onExitComponent () override
 Called on exit, cleans. More...
 
void onInitComponent () override
 Initializes the controller. More...
 
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 More...
 
 RobotVisualizationController (QWidget *parent)
 RobotVisualizationController creates a new RobotVisualizationController. More...
 
 ~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.

Definition at line 48 of file RobotVisualizationController.h.

Constructor & Destructor Documentation

◆ RobotVisualizationController()

RobotVisualizationController ( QWidget *  parent)

RobotVisualizationController creates a new RobotVisualizationController.

INITIALIZATION.

Parameters
parentthe widget in which th viewer should be placed in

Definition at line 52 of file RobotVisualizationController.cpp.

+ Here is the call graph for this function:

◆ ~RobotVisualizationController()

Member Function Documentation

◆ addConnection()

void addConnection ( std::shared_ptr< RobotVisualizationController ctr)

Definition at line 136 of file RobotVisualizationController.cpp.

◆ addView

void addView ( )
slot

PARALLEL VIEWS.

addView adds new RobotViewer

Definition at line 144 of file RobotVisualizationController.cpp.

+ Here is the call graph for this function:

◆ 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

Definition at line 316 of file RobotVisualizationController.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clearView

void clearView ( )
slot

Definition at line 307 of file RobotVisualizationController.cpp.

◆ 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

Definition at line 266 of file RobotVisualizationController.cpp.

◆ environmentChanged

void environmentChanged ( EnvironmentPtr  environment)
slot

environmentChanged updates the environment that is currently visualized

UPDATING OF VISUALIZATION.

Parameters
environmentthe new environment

Definition at line 158 of file RobotVisualizationController.cpp.

+ Here is the call graph for this function:

◆ 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

Definition at line 322 of file RobotVisualizationController.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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

+ Here is the caller graph for this function:

◆ onConnectComponent()

void onConnectComponent ( )
overridevirtual

Connects all signals and slots of the controller.

Implements AbstractController.

Definition at line 86 of file RobotVisualizationController.cpp.

+ Here is the caller graph for this function:

◆ onDisconnectComponent()

void onDisconnectComponent ( )
overridevirtual

Called whenever a component is disconnected.

Implements AbstractController.

Definition at line 91 of file RobotVisualizationController.cpp.

◆ onExitComponent()

void onExitComponent ( )
overridevirtual

Called on exit, cleans.

Implements AbstractController.

Definition at line 96 of file RobotVisualizationController.cpp.

◆ onInitComponent()

void onInitComponent ( )
overridevirtual

Initializes the controller.

Implements AbstractController.

Definition at line 63 of file RobotVisualizationController.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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!

Definition at line 427 of file RobotVisualizationController.cpp.

◆ playTrajectory

void playTrajectory ( )
slot

PLAY TRAJECTORY.

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

Definition at line 420 of file RobotVisualizationController.cpp.

◆ 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
+ Here is the caller graph for this function:

◆ 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.

Definition at line 101 of file RobotVisualizationController.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeView

void removeView ( )
slot

removeView removes RobotViewer with index

Parameters
indexthe index of the view to remove

Definition at line 149 of file RobotVisualizationController.cpp.

+ Here is the call graph for this function:

◆ 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

Definition at line 164 of file RobotVisualizationController.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ selectedTransitionChanged

void selectedTransitionChanged ( int  index)
slot

selectedTransitionChanged highlights the Transition with index

Parameters
indexthe index of the transition that should be highlighted

Definition at line 271 of file RobotVisualizationController.cpp.

+ Here is the call graph for this function:

◆ 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

Definition at line 403 of file RobotVisualizationController.cpp.

+ Here is the call graph for this function:

◆ setCamera [1/2]

void setCamera ( )
slot

CAMERA UPDATING METHODS.

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

Definition at line 346 of file RobotVisualizationController.cpp.

+ Here is the caller graph for this function:

◆ 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

Definition at line 351 of file RobotVisualizationController.cpp.

+ Here is the call graph for this function:

◆ 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

Definition at line 338 of file RobotVisualizationController.cpp.

+ Here is the caller graph for this function:

◆ 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
+ Here is the caller graph for this function:

◆ trajectoryPlayerNotPlaying

void trajectoryPlayerNotPlaying ( bool  playing)
signal

trajectoryPlayerNotPlaying

Parameters
playing
+ Here is the caller graph for this function:

◆ trajectoryPlayerPlaying

void trajectoryPlayerPlaying ( bool  playing)
signal
+ Here is the caller graph for this function:

◆ trajectoryPlayerStopped

void trajectoryPlayerStopped ( )
slot

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

Definition at line 437 of file RobotVisualizationController.cpp.

+ Here is the call graph for this function:

◆ 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

Definition at line 179 of file RobotVisualizationController.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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
+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ RobotVisualization

friend class RobotVisualization
friend

Definition at line 51 of file RobotVisualizationController.h.


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