hpp-gepetto-viewer 5.2.0
Display of hpp robots and obstacles in gepetto-viewer
Loading...
Searching...
No Matches
gepetto.path_player.PathPlayer Class Reference

Public Member Functions

 __init__ (self, publisher, client=None, dt=0.01, speed=1)
 
 setDt (self, dt)
 
 setSpeed (self, speed)
 
 __call__ (self, pathId)
 
 displayPath (self, pathId, color=[0.85, 0.75, 0.15, 0.9], jointName=0)
 
 displayVelocityPath (self, pathId, jointName=0)
 
 generatePlot (self, pathId, play=False, jointNames=None, cursor=False, filename=None)
 
 toFile (self, pathId, fname)
 
 toFileAppend (self, pathId, fname)
 
 getTrajFromFile (self, fname)
 
 fromFile (self, fname)
 

Public Attributes

 client
 
 publisher
 
 dt
 
 speed
 
 start
 
 end
 
 tau
 

Detailed Description

displays a path by sampling configurations along the path.

Constructor & Destructor Documentation

◆ __init__()

gepetto.path_player.PathPlayer.__init__ ( self,
publisher,
client = None,
dt = 0.01,
speed = 1 )

Member Function Documentation

◆ __call__()

gepetto.path_player.PathPlayer.__call__ ( self,
pathId )

◆ displayPath()

gepetto.path_player.PathPlayer.displayPath ( self,
pathId,
color = [0.85, 0.75, 0.15, 0.9],
jointName = 0 )
Display the path of the desired joint
By default, display the path of the root

◆ displayVelocityPath()

gepetto.path_player.PathPlayer.displayVelocityPath ( self,
pathId,
jointName = 0 )
Display the path with a color variation according to the velocity along the path
green for velocity close to 0, red for velocity close to the velocity bound.
This method assume that the path is represented
by instances of the KinodynamicPath class

◆ fromFile()

gepetto.path_player.PathPlayer.fromFile ( self,
fname )

◆ generatePlot()

gepetto.path_player.PathPlayer.generatePlot ( self,
pathId,
play = False,
jointNames = None,
cursor = False,
filename = None )
Generate a plot with the following datas:
- abscissa: time.
- ordinate: parameter values of the joint names.

If play is True, the path is played when the data to be plotted are generated.

If cursor is True, filename must be a string which will be formatted with one
integer (frame index).
For each frame, a cursor is drawn at the current time and the plot is written
to the formatted filename.

If cursor is False, only one plot is generated. Then,
- If filename is None, the plot is shown in a new window;
- If filename is a string, the plot is written to filename.

◆ getTrajFromFile()

gepetto.path_player.PathPlayer.getTrajFromFile ( self,
fname )

◆ setDt()

gepetto.path_player.PathPlayer.setDt ( self,
dt )

◆ setSpeed()

gepetto.path_player.PathPlayer.setSpeed ( self,
speed )

◆ toFile()

gepetto.path_player.PathPlayer.toFile ( self,
pathId,
fname )

◆ toFileAppend()

gepetto.path_player.PathPlayer.toFileAppend ( self,
pathId,
fname )

Member Data Documentation

◆ client

gepetto.path_player.PathPlayer.client

◆ dt

gepetto.path_player.PathPlayer.dt

◆ end

gepetto.path_player.PathPlayer.end

◆ publisher

gepetto.path_player.PathPlayer.publisher

◆ speed

gepetto.path_player.PathPlayer.speed

◆ start

gepetto.path_player.PathPlayer.start

◆ tau

gepetto.path_player.PathPlayer.tau

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