Public Member Functions | Public Attributes | List of all members
gepetto.path_player.PathPlayer Class Reference

displays a path by sampling configurations along the path. More...

Inheritance diagram for gepetto.path_player.PathPlayer:
[legend]
Collaboration diagram for gepetto.path_player.PathPlayer:
[legend]

Public Member Functions

def __init__ (self, publisher, client=hpp.corbaserver.Client(), dt=0.01, speed=1)
 
def setDt (self, dt)
 
def setSpeed (self, speed)
 
def __call__ (self, pathId)
 
def displayPath (self, pathId, color=[0.85, jointName=0)
 
def generatePlot (self, pathId, play=False, jointNames=None, cursor=False, filename=None)
 Generate a plot with the following datas: More...
 
def toFile (self, pathId, fname)
 
def toFileAppend (self, pathId, fname)
 
def getTrajFromFile (self, fname)
 
def 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__()

def gepetto.path_player.PathPlayer.__init__ (   self,
  publisher,
  client = hpp.corbaserver.Client(),
  dt = 0.01,
  speed = 1 
)

Member Function Documentation

◆ __call__()

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

◆ displayPath()

def gepetto.path_player.PathPlayer.displayPath (   self,
  pathId,
  color = [0.85,
  jointName = 0 
)

◆ fromFile()

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

◆ generatePlot()

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

References hpp::corbaserver::benchmark::Benchmark.client, hpp::corbaserver::robot::Robot.client, gui::matplotlib_example::Plugin.client, hpp::corbaserver::problem_solver::ProblemSolver.client, gui::pythonwidget::Plugin.client, gui::blenderexport::Plugin.client, gepetto.path_player.PathPlayer.client, gepetto.gui.path_graph.Plugin.client, gepetto.path_player.PathPlayer.dt, gepetto.path_player.PathPlayer.end, gepetto.path_player.PathPlayer.publisher, gepetto.path_player.PathPlayer.speed, and gepetto.path_player.PathPlayer.start.

◆ getTrajFromFile()

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

◆ setDt()

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

◆ setSpeed()

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

◆ toFile()

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

◆ toFileAppend()

def 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