models

package
v0.0.0-...-3c9401c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2020 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CollectionJob

type CollectionJob struct {
	Queue   chan RobotJob // A list of jobs (one per replay.json)
	RootDir string        // The RootDir containing the outputs for each robot
}

CollectionJob is the data structure holding information to process multiple RobotJobs

func (*CollectionJob) PrePrepare

func (job *CollectionJob) PrePrepare(rootDir, outputDir string, nJobs, pngCompression int, modifyOriginal bool)

PrePrepare finds dirs matching 10.1.24.X and generates a RobotJob for each by calling it's PrePrepare() and putting it into the CollectionJob.Queue

func (*CollectionJob) Prepare

func (job *CollectionJob) Prepare()

Prepare (not implemented)

func (*CollectionJob) Run

func (job *CollectionJob) Run()

Run gets a RobotJob from the queue, then calls it's Prepare() and Run()

type Info

type Info struct {
	Config []interface{}
	Frames []struct {
		BallDetectionData struct {
			Candidates []struct {
				Center     []int64 `json:"center"`
				Confidence float64 `json:"confidence"`
				Radius     int64   `json:"radius"`
			} `json:"candidates"`
			LastCandidates []struct {
				Center     []int64 `json:"center"`
				Confidence float64 `json:"confidence"`
				Radius     int64   `json:"radius"`
			} `json:"lastCandidates"`
		} `json:"ballDetectionData"`
		BottomImage      string    `json:"bottomImage"`
		FsrLeft          []float64 `json:"fsrLeft"`
		FsrRight         []float64 `json:"fsrRight"`
		HeadMatrixBuffer struct {
			Buffer []struct {
				Head2torso   [][]float64 `json:"head2torso"`
				Timestamp    int64       `json:"timestamp"`
				Torso2ground [][]float64 `json:"torso2ground"`
			} `json:"buffer"`
			Valid bool `json:"valid"`
		} `json:"headMatrixBuffer"`
		ImageSize422 [2]uint16 `json:"imageSize422"`
		Imu          []float64 `json:"imu"`
		JointAngles  []float64 `json:"jointAngles"`
		SonarDist    []float64 `json:"sonarDist"`
		SonarValid   []bool    `json:"sonarValid"`
		Switches     []int64   `json:"switches"`
		Timestamp    int64     `json:"timestamp"`
		TopImage     string    `json:"topImage"`
	} `json:"frames"`
}

Info is the struct representing the data in a replay.json file

type Job

type Job interface {
	PrePrepare(replayJsonPath, outputDir string, nJobs, pngCompression int, modifyOriginal bool)
	Prepare()
	Run()
}

Job is the interface implemented by CollectionJob and RobotJob

type RobotJob

type RobotJob struct {
	// Public
	ReplayJson       Info
	ReplayJsonPath   string
	ReplayJsonDir    string
	OutputDir        string
	RobotName        string
	CompressionLevel png.CompressionLevel
	NJobs            int
	ModifyOriginal   bool
	// contains filtered or unexported fields
}

RobotJob is the data Structure holding information to convert data from a single robot

func (*RobotJob) PrePrepare

func (job *RobotJob) PrePrepare(replayJsonPath, outputDir string, nJobs, pngCompression int, modifyOriginal bool)

PrePrepare fills out the general info for one RobotJob

func (*RobotJob) Prepare

func (job *RobotJob) Prepare()

Prepare reads the replay.json into the RobotJob and populates the frame list

func (*RobotJob) Run

func (job *RobotJob) Run()

Run creates some encoders, starts some goroutines and synchronizes at the end

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL