Command Line

Command-line utility code for interacting with robot services.

class bosdyn.client.command_line.Command(subparsers, command_dict)[source]

Bases: object

Command-line command.

Parameters
  • subparsers – List of argument parsers.

  • command_dict – Dictionary of command names which take parsed options.

NAME = None
NEED_AUTHENTICATION = True
run(robot, options)[source]

Invoke the command.

Parameters
  • robot – Robot object on which to run the command.

  • options – Parsed command-line arguments.

class bosdyn.client.command_line.Subcommands(subparsers, command_dict, subcommands)[source]

Bases: bosdyn.client.command_line.Command

Run subcommands.

Parameters
  • subparsers – List of argument parsers.

  • command_dict – Dictionary of command names which take parsed options.

  • subcommands – List of subcommands to run.

class bosdyn.client.command_line.DirectoryCommands(subparsers, command_dict)[source]

Bases: bosdyn.client.command_line.Subcommands

Commands related to the directory service.

Parameters
  • subparsers – List of argument parsers.

  • command_dict – Dictionary of command names which take parsed options.

NAME = 'dir'
class bosdyn.client.command_line.DirectoryListCommand(subparsers, command_dict)[source]

Bases: bosdyn.client.command_line.Command

List all services in the directory.

Parameters
  • subparsers – List of argument parsers.

  • command_dict – Dictionary of command names which take parsed options.

NAME = 'list'
class bosdyn.client.command_line.DirectoryGetCommand(subparsers, command_dict)[source]

Bases: bosdyn.client.command_line.Command

Get entry for a given service in the directory.

Parameters
  • subparsers – List of argument parsers.

  • command_dict – Dictionary of command names which take parsed options.

NAME = 'get'
class bosdyn.client.command_line.DirectoryRegisterCommand(subparsers, command_dict)[source]

Bases: bosdyn.client.command_line.Command

Register entry for a service in the directory.

Parameters
  • subparsers – List of argument parsers.

  • command_dict – Dictionary of command names which take parsed options.

NAME = 'register'
class bosdyn.client.command_line.DirectoryUnregisterCommand(subparsers, command_dict)[source]

Bases: bosdyn.client.command_line.Command

Unregister entry for a service in the directory.

Parameters
  • subparsers – List of argument parsers.

  • command_dict – Dictionary of command names which take parsed options.

NAME = 'unregister'
class bosdyn.client.command_line.RobotIdCommand(subparsers, command_dict)[source]

Bases: bosdyn.client.command_line.Command

Show robot-id.

Parameters
  • subparsers – List of argument parsers.

  • command_dict – Dictionary of command names which take parsed options.

NAME = 'id'
NEED_AUTHENTICATION = False
class bosdyn.client.command_line.LogAnnotationCommands(subparsers, command_dict)[source]

Bases: bosdyn.client.command_line.Subcommands

Commands related to the log-annotation service.

Parameters
  • subparsers – List of argument parsers.

  • command_dict – Dictionary of command names which take parsed options.

NAME = 'log'
class bosdyn.client.command_line.LogTextMsgCommand(subparsers, command_dict)[source]

Bases: bosdyn.client.command_line.Command

Send a text-message to the robot to be logged.

Parameters
  • subparsers – List of argument parsers.

  • command_dict – Dictionary of command names which take parsed options.

NAME = 'textmsg'
class bosdyn.client.command_line.LogOperatorCommentCommand(subparsers, command_dict)[source]

Bases: bosdyn.client.command_line.Command

Send an operator comment to the robot to be logged.

Parameters
  • subparsers – List of argument parsers.

  • command_dict – Dictionary of command names which take parsed options.

NAME = 'comment'
class bosdyn.client.command_line.RobotStateCommands(subparsers, command_dict)[source]

Bases: bosdyn.client.command_line.Subcommands

Commands for querying robot state.

Parameters
  • subparsers – List of argument parsers.

  • command_dict – Dictionary of command names which take parsed options.

NAME = 'state'
class bosdyn.client.command_line.FullStateCommand(subparsers, command_dict)[source]

Bases: bosdyn.client.command_line.Command

Show robot state.

Parameters
  • subparsers – List of argument parsers.

  • command_dict – Dictionary of command names which take parsed options.

NAME = 'full'
class bosdyn.client.command_line.RobotModel(subparsers, command_dict)[source]

Bases: bosdyn.client.command_line.Command

Write robot URDF and mesh to local files.

Parameters
  • subparsers – List of argument parsers.

  • command_dict – Dictionary of command names which take parsed options.

NAME = 'model'
NEED_AUTHENTICATION = False
class bosdyn.client.command_line.MetricsCommand(subparsers, command_dict)[source]

Bases: bosdyn.client.command_line.Command

Show metrics (runtime, etc…).

Parameters
  • subparsers – List of argument parsers.

  • command_dict – Dictionary of command names which take parsed options.

NAME = 'metrics'
class bosdyn.client.command_line.TimeSyncCommand(subparsers, command_dict)[source]

Bases: bosdyn.client.command_line.Command

Find clock difference between this and the robot clock.

Parameters
  • subparsers – List of argument parsers.

  • command_dict – Dictionary of command names which take parsed options.

NAME = 'time-sync'
class bosdyn.client.command_line.LicenseCommand(subparsers, command_dict)[source]

Bases: bosdyn.client.command_line.Command

Show installed license.

NAME = 'license'
class bosdyn.client.command_line.LeaseCommands(subparsers, command_dict)[source]

Bases: bosdyn.client.command_line.Subcommands

Commands related to the lease service.

Parameters
  • subparsers – List of argument parsers.

  • command_dict – Dictionary of command names which take parsed options.

NAME = 'lease'
class bosdyn.client.command_line.LeaseListCommand(subparsers, command_dict)[source]

Bases: bosdyn.client.command_line.Command

List all leases.

Parameters
  • subparsers – List of argument parsers.

  • command_dict – Dictionary of command names which take parsed options.

NAME = 'list'
class bosdyn.client.command_line.BecomeEstopCommand(subparsers, command_dict)[source]

Bases: bosdyn.client.command_line.Command

Grab and hold estop until Ctl-C.

Parameters
  • subparsers – List of argument parsers.

  • command_dict – Dictionary of command names which take parsed options.

NAME = 'become-estop'
class bosdyn.client.command_line.ImageCommands(subparsers, command_dict)[source]

Bases: bosdyn.client.command_line.Subcommands

Commands for querying images.

Parameters
  • subparsers – List of argument parsers.

  • command_dict – Dictionary of command names which take parsed options.

NAME = 'image'
class bosdyn.client.command_line.ListImageSourcesCommand(subparsers, command_dict)[source]

Bases: bosdyn.client.command_line.Command

List image sources.

Parameters
  • subparsers – List of argument parsers.

  • command_dict – Dictionary of command names which take parsed options.

NAME = 'list-sources'
bosdyn.client.command_line.write_pgm(image_response, outfile)[source]

Write raw data from image_response to a PGM file.

Parameters
  • image_response – ImageResponse object to parse.

  • outfile – Name of the output file, if None is passed, then “image-{SOURCENAME}.pgm” is used.

class bosdyn.client.command_line.GetImageCommand(subparsers, command_dict)[source]

Bases: bosdyn.client.command_line.Command

Get an image from the robot and write it to an image file.

Parameters
  • subparsers – List of argument parsers.

  • command_dict – Dictionary of command names which take parsed options.

NAME = 'get-image'
class bosdyn.client.command_line.LocalGridCommands(subparsers, command_dict)[source]

Bases: bosdyn.client.command_line.Subcommands

Commands for querying local grid maps.

Parameters
  • subparsers – List of argument parsers.

  • command_dict – Dictionary of command names which take parsed options.

NAME = 'local_grid'
class bosdyn.client.command_line.ListLocalGridTypesCommand(subparsers, command_dict)[source]

Bases: bosdyn.client.command_line.Command

List local grid sources.

Parameters
  • subparsers – List of argument parsers.

  • command_dict – Dictionary of command names which take parsed options.

NAME = 'types'
class bosdyn.client.command_line.GetLocalGridsCommand(subparsers, command_dict)[source]

Bases: bosdyn.client.command_line.Command

Get local grids from the robot.

Parameters
  • subparsers – List of argument parsers.

  • command_dict – Dictionary of command names which take parsed options.

NAME = 'get'
bosdyn.client.command_line.main(args=None)[source]

Command-line interface for interacting with robot services.