hpp-gepetto-viewer 6.1.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 = client
 
 publisher = publisher
 
 dt = dt
 
 speed = speed
 
float start = 0.0
 
float end = 1.0
 
 tau = self.getTrajFromFile(fname)
 

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 = client

◆ dt

gepetto.path_player.PathPlayer.dt = dt

◆ end

float gepetto.path_player.PathPlayer.end = 1.0

◆ publisher

gepetto.path_player.PathPlayer.publisher = publisher

◆ speed

gepetto.path_player.PathPlayer.speed = speed

◆ start

float gepetto.path_player.PathPlayer.start = 0.0

◆ tau

gepetto.path_player.PathPlayer.tau = self.getTrajFromFile(fname)

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