Exemplo n.º 1
0
func (m *Mesh) Deserialize(r io.Reader) (err error) {
	// Triangles
	{
		// Read size little endian
		var size uint32
		if err = binary.Read(r, binary.LittleEndian, &size); err != nil {
			return fmt.Errorf("cannot read array size for Triangles: %s", err)
		}
		m.Triangles = make([]MeshTriangle, int(size))
		for i := 0; i < int(size); i++ {
			if err = ros.DeserializeMessageField(r, "MeshTriangle", &m.Triangles[i]); err != nil {
				return err
			}
		}
	}

	// Vertices
	{
		// Read size little endian
		var size uint32
		if err = binary.Read(r, binary.LittleEndian, &size); err != nil {
			return fmt.Errorf("cannot read array size for Vertices: %s", err)
		}
		m.Vertices = make([]geometry_msgs.Point, int(size))
		for i := 0; i < int(size); i++ {
			if err = ros.DeserializeMessageField(r, "geometry_msgs/Point", &m.Vertices[i]); err != nil {
				return err
			}
		}
	}

	return
}
Exemplo n.º 2
0
func (m *GridCells) Deserialize(r io.Reader) (err error) {
	// Header
	if err = ros.DeserializeMessageField(r, "Header", &m.Header); err != nil {
		return err
	}

	// CellWidth
	if err = ros.DeserializeMessageField(r, "float32", &m.CellWidth); err != nil {
		return err
	}

	// CellHeight
	if err = ros.DeserializeMessageField(r, "float32", &m.CellHeight); err != nil {
		return err
	}

	// Cells
	{
		// Read size little endian
		var size uint32
		if err = binary.Read(r, binary.LittleEndian, &size); err != nil {
			return fmt.Errorf("cannot read array size for Cells: %s", err)
		}
		m.Cells = make([]geometry_msgs.Point, int(size))
		for i := 0; i < int(size); i++ {
			if err = ros.DeserializeMessageField(r, "geometry_msgs/Point", &m.Cells[i]); err != nil {
				return err
			}
		}
	}

	return
}
Exemplo n.º 3
0
func (m *MapMetaData) Deserialize(r io.Reader) (err error) {
	// MapLoadTime
	if err = ros.DeserializeMessageField(r, "time", &m.MapLoadTime); err != nil {
		return err
	}

	// Resolution
	if err = ros.DeserializeMessageField(r, "float32", &m.Resolution); err != nil {
		return err
	}

	// Width
	if err = ros.DeserializeMessageField(r, "uint32", &m.Width); err != nil {
		return err
	}

	// Height
	if err = ros.DeserializeMessageField(r, "uint32", &m.Height); err != nil {
		return err
	}

	// Origin
	if err = ros.DeserializeMessageField(r, "geometry_msgs/Pose", &m.Origin); err != nil {
		return err
	}

	return
}
Exemplo n.º 4
0
func (m *OccupancyGrid) Deserialize(r io.Reader) (err error) {
	// Header
	if err = ros.DeserializeMessageField(r, "Header", &m.Header); err != nil {
		return err
	}

	// Info
	if err = ros.DeserializeMessageField(r, "MapMetaData", &m.Info); err != nil {
		return err
	}

	// Data
	{
		// Read size little endian
		var size uint32
		if err = binary.Read(r, binary.LittleEndian, &size); err != nil {
			return fmt.Errorf("cannot read array size for Data: %s", err)
		}
		m.Data = make([]int8, int(size))
		for i := 0; i < int(size); i++ {
			if err = ros.DeserializeMessageField(r, "int8", &m.Data[i]); err != nil {
				return err
			}
		}
	}

	return
}
Exemplo n.º 5
0
func (m *RegionOfInterest) Deserialize(r io.Reader) (err error) {
	// XOffset
	if err = ros.DeserializeMessageField(r, "uint32", &m.XOffset); err != nil {
		return err
	}

	// YOffset
	if err = ros.DeserializeMessageField(r, "uint32", &m.YOffset); err != nil {
		return err
	}

	// Height
	if err = ros.DeserializeMessageField(r, "uint32", &m.Height); err != nil {
		return err
	}

	// Width
	if err = ros.DeserializeMessageField(r, "uint32", &m.Width); err != nil {
		return err
	}

	// DoRectify
	if err = ros.DeserializeMessageField(r, "bool", &m.DoRectify); err != nil {
		return err
	}

	return
}
Exemplo n.º 6
0
func (m *InteractiveMarkerInit) Deserialize(r io.Reader) (err error) {
	// ServerID
	if err = ros.DeserializeMessageField(r, "string", &m.ServerID); err != nil {
		return err
	}

	// SeqNum
	if err = ros.DeserializeMessageField(r, "uint64", &m.SeqNum); err != nil {
		return err
	}

	// Markers
	{
		// Read size little endian
		var size uint32
		if err = binary.Read(r, binary.LittleEndian, &size); err != nil {
			return fmt.Errorf("cannot read array size for Markers: %s", err)
		}
		m.Markers = make([]InteractiveMarker, int(size))
		for i := 0; i < int(size); i++ {
			if err = ros.DeserializeMessageField(r, "InteractiveMarker", &m.Markers[i]); err != nil {
				return err
			}
		}
	}

	return
}
Exemplo n.º 7
0
func (m *AccelWithCovariance) Deserialize(r io.Reader) (err error) {
	// Accel
	if err = ros.DeserializeMessageField(r, "Accel", &m.Accel); err != nil {
		return err
	}

	// Covariance
	{
		// Read size little endian
		var size uint32
		if err = binary.Read(r, binary.LittleEndian, &size); err != nil {
			return fmt.Errorf("cannot read array size for Covariance: %s", err)
		}
		if size > 36 {
			return fmt.Errorf("array size for Covariance too large: expected=36, got=%d", size)
		}
		for i := 0; i < int(size); i++ {
			if err = ros.DeserializeMessageField(r, "float64", &m.Covariance[i]); err != nil {
				return err
			}
		}
	}

	return
}
Exemplo n.º 8
0
func (m *MenuEntry) Deserialize(r io.Reader) (err error) {
	// ID
	if err = ros.DeserializeMessageField(r, "uint32", &m.ID); err != nil {
		return err
	}

	// ParentID
	if err = ros.DeserializeMessageField(r, "uint32", &m.ParentID); err != nil {
		return err
	}

	// Title
	if err = ros.DeserializeMessageField(r, "string", &m.Title); err != nil {
		return err
	}

	// Command
	if err = ros.DeserializeMessageField(r, "string", &m.Command); err != nil {
		return err
	}

	// CommandType
	if err = ros.DeserializeMessageField(r, "uint8", &m.CommandType); err != nil {
		return err
	}

	return
}
Exemplo n.º 9
0
func (m *CompressedImage) Deserialize(r io.Reader) (err error) {
	// Header
	if err = ros.DeserializeMessageField(r, "Header", &m.Header); err != nil {
		return err
	}

	// Format
	if err = ros.DeserializeMessageField(r, "string", &m.Format); err != nil {
		return err
	}

	// Data
	{
		// Read size little endian
		var size uint32
		if err = binary.Read(r, binary.LittleEndian, &size); err != nil {
			return fmt.Errorf("cannot read array size for Data: %s", err)
		}
		m.Data = make([]uint8, int(size))
		for i := 0; i < int(size); i++ {
			if err = ros.DeserializeMessageField(r, "uint8", &m.Data[i]); err != nil {
				return err
			}
		}
	}

	return
}
Exemplo n.º 10
0
func (m *SmachContainerInitialStatusCmd) Deserialize(r io.Reader) (err error) {
	// Path
	if err = ros.DeserializeMessageField(r, "string", &m.Path); err != nil {
		return err
	}

	// InitialStates
	{
		// Read size little endian
		var size uint32
		if err = binary.Read(r, binary.LittleEndian, &size); err != nil {
			return fmt.Errorf("cannot read array size for InitialStates: %s", err)
		}
		m.InitialStates = make([]string, int(size))
		for i := 0; i < int(size); i++ {
			if err = ros.DeserializeMessageField(r, "string", &m.InitialStates[i]); err != nil {
				return err
			}
		}
	}

	// LocalData
	if err = ros.DeserializeMessageField(r, "string", &m.LocalData); err != nil {
		return err
	}

	return
}
Exemplo n.º 11
0
func (m *PointHeadGoal) Deserialize(r io.Reader) (err error) {
	// Target
	if err = ros.DeserializeMessageField(r, "geometry_msgs/PointStamped", &m.Target); err != nil {
		return err
	}

	// PointingAxis
	if err = ros.DeserializeMessageField(r, "geometry_msgs/Vector3", &m.PointingAxis); err != nil {
		return err
	}

	// PointingFrame
	if err = ros.DeserializeMessageField(r, "string", &m.PointingFrame); err != nil {
		return err
	}

	// MinDuration
	if err = ros.DeserializeMessageField(r, "duration", &m.MinDuration); err != nil {
		return err
	}

	// MaxVelocity
	if err = ros.DeserializeMessageField(r, "float64", &m.MaxVelocity); err != nil {
		return err
	}

	return
}
Exemplo n.º 12
0
func (m *MagneticField) Deserialize(r io.Reader) (err error) {
	// Header
	if err = ros.DeserializeMessageField(r, "Header", &m.Header); err != nil {
		return err
	}

	// MagneticField
	if err = ros.DeserializeMessageField(r, "geometry_msgs/Vector3", &m.MagneticField); err != nil {
		return err
	}

	// MagneticFieldCovariance
	{
		// Read size little endian
		var size uint32
		if err = binary.Read(r, binary.LittleEndian, &size); err != nil {
			return fmt.Errorf("cannot read array size for MagneticFieldCovariance: %s", err)
		}
		if size > 9 {
			return fmt.Errorf("array size for MagneticFieldCovariance too large: expected=9, got=%d", size)
		}
		for i := 0; i < int(size); i++ {
			if err = ros.DeserializeMessageField(r, "float64", &m.MagneticFieldCovariance[i]); err != nil {
				return err
			}
		}
	}

	return
}
Exemplo n.º 13
0
func (m *MultiDOFJointTrajectoryPoint) Deserialize(r io.Reader) (err error) {
	// Transforms
	{
		// Read size little endian
		var size uint32
		if err = binary.Read(r, binary.LittleEndian, &size); err != nil {
			return fmt.Errorf("cannot read array size for Transforms: %s", err)
		}
		m.Transforms = make([]geometry_msgs.Transform, int(size))
		for i := 0; i < int(size); i++ {
			if err = ros.DeserializeMessageField(r, "geometry_msgs/Transform", &m.Transforms[i]); err != nil {
				return err
			}
		}
	}

	// Velocities
	{
		// Read size little endian
		var size uint32
		if err = binary.Read(r, binary.LittleEndian, &size); err != nil {
			return fmt.Errorf("cannot read array size for Velocities: %s", err)
		}
		m.Velocities = make([]geometry_msgs.Twist, int(size))
		for i := 0; i < int(size); i++ {
			if err = ros.DeserializeMessageField(r, "geometry_msgs/Twist", &m.Velocities[i]); err != nil {
				return err
			}
		}
	}

	// Accelerations
	{
		// Read size little endian
		var size uint32
		if err = binary.Read(r, binary.LittleEndian, &size); err != nil {
			return fmt.Errorf("cannot read array size for Accelerations: %s", err)
		}
		m.Accelerations = make([]geometry_msgs.Twist, int(size))
		for i := 0; i < int(size); i++ {
			if err = ros.DeserializeMessageField(r, "geometry_msgs/Twist", &m.Accelerations[i]); err != nil {
				return err
			}
		}
	}

	// TimeFromStart
	if err = ros.DeserializeMessageField(r, "duration", &m.TimeFromStart); err != nil {
		return err
	}

	return
}
Exemplo n.º 14
0
func (m *Wrench) Deserialize(r io.Reader) (err error) {
	// Force
	if err = ros.DeserializeMessageField(r, "Vector3", &m.Force); err != nil {
		return err
	}

	// Torque
	if err = ros.DeserializeMessageField(r, "Vector3", &m.Torque); err != nil {
		return err
	}

	return
}
Exemplo n.º 15
0
func (m *SetBoolResponse) Deserialize(r io.Reader) (err error) {
	// Success
	if err = ros.DeserializeMessageField(r, "bool", &m.Success); err != nil {
		return err
	}

	// Message
	if err = ros.DeserializeMessageField(r, "string", &m.Message); err != nil {
		return err
	}

	return
}
Exemplo n.º 16
0
func (m *InertiaStamped) Deserialize(r io.Reader) (err error) {
	// Header
	if err = ros.DeserializeMessageField(r, "Header", &m.Header); err != nil {
		return err
	}

	// Inertia
	if err = ros.DeserializeMessageField(r, "Inertia", &m.Inertia); err != nil {
		return err
	}

	return
}
Exemplo n.º 17
0
func (m *GoalID) Deserialize(r io.Reader) (err error) {
	// Stamp
	if err = ros.DeserializeMessageField(r, "time", &m.Stamp); err != nil {
		return err
	}

	// ID
	if err = ros.DeserializeMessageField(r, "string", &m.ID); err != nil {
		return err
	}

	return
}
Exemplo n.º 18
0
func (m *AccelWithCovarianceStamped) Deserialize(r io.Reader) (err error) {
	// Header
	if err = ros.DeserializeMessageField(r, "Header", &m.Header); err != nil {
		return err
	}

	// Accel
	if err = ros.DeserializeMessageField(r, "AccelWithCovariance", &m.Accel); err != nil {
		return err
	}

	return
}
Exemplo n.º 19
0
func (m *AddTwoIntsRequest) Deserialize(r io.Reader) (err error) {
	// A
	if err = ros.DeserializeMessageField(r, "int32", &m.A); err != nil {
		return err
	}

	// B
	if err = ros.DeserializeMessageField(r, "int32", &m.B); err != nil {
		return err
	}

	return
}
Exemplo n.º 20
0
func (m *Pose) Deserialize(r io.Reader) (err error) {
	// Position
	if err = ros.DeserializeMessageField(r, "Point", &m.Position); err != nil {
		return err
	}

	// Orientation
	if err = ros.DeserializeMessageField(r, "Quaternion", &m.Orientation); err != nil {
		return err
	}

	return
}
Exemplo n.º 21
0
func (m *TF2Error) Deserialize(r io.Reader) (err error) {
	// Error
	if err = ros.DeserializeMessageField(r, "uint8", &m.Error); err != nil {
		return err
	}

	// ErrorString
	if err = ros.DeserializeMessageField(r, "string", &m.ErrorString); err != nil {
		return err
	}

	return
}
Exemplo n.º 22
0
func (m *TwistWithCovarianceStamped) Deserialize(r io.Reader) (err error) {
	// Header
	if err = ros.DeserializeMessageField(r, "Header", &m.Header); err != nil {
		return err
	}

	// Twist
	if err = ros.DeserializeMessageField(r, "TwistWithCovariance", &m.Twist); err != nil {
		return err
	}

	return
}
Exemplo n.º 23
0
func (m *LookupTransformResult) Deserialize(r io.Reader) (err error) {
	// Transform
	if err = ros.DeserializeMessageField(r, "geometry_msgs/TransformStamped", &m.Transform); err != nil {
		return err
	}

	// Error
	if err = ros.DeserializeMessageField(r, "tf2_msgs/TF2Error", &m.Error); err != nil {
		return err
	}

	return
}
Exemplo n.º 24
0
func (m *Transform) Deserialize(r io.Reader) (err error) {
	// Translation
	if err = ros.DeserializeMessageField(r, "Vector3", &m.Translation); err != nil {
		return err
	}

	// Rotation
	if err = ros.DeserializeMessageField(r, "Quaternion", &m.Rotation); err != nil {
		return err
	}

	return
}
Exemplo n.º 25
0
func (m *QuaternionStamped) Deserialize(r io.Reader) (err error) {
	// Header
	if err = ros.DeserializeMessageField(r, "Header", &m.Header); err != nil {
		return err
	}

	// Quaternion
	if err = ros.DeserializeMessageField(r, "Quaternion", &m.Quaternion); err != nil {
		return err
	}

	return
}
Exemplo n.º 26
0
func (m *Vector3Stamped) Deserialize(r io.Reader) (err error) {
	// Header
	if err = ros.DeserializeMessageField(r, "Header", &m.Header); err != nil {
		return err
	}

	// Vector
	if err = ros.DeserializeMessageField(r, "Vector3", &m.Vector); err != nil {
		return err
	}

	return
}
Exemplo n.º 27
0
func (m *PoseWithCovarianceStamped) Deserialize(r io.Reader) (err error) {
	// Header
	if err = ros.DeserializeMessageField(r, "Header", &m.Header); err != nil {
		return err
	}

	// Pose
	if err = ros.DeserializeMessageField(r, "PoseWithCovariance", &m.Pose); err != nil {
		return err
	}

	return
}
Exemplo n.º 28
0
func (m *GripperCommand) Deserialize(r io.Reader) (err error) {
	// Position
	if err = ros.DeserializeMessageField(r, "float64", &m.Position); err != nil {
		return err
	}

	// MaxEffort
	if err = ros.DeserializeMessageField(r, "float64", &m.MaxEffort); err != nil {
		return err
	}

	return
}
Exemplo n.º 29
0
func (m *Twist) Deserialize(r io.Reader) (err error) {
	// Linear
	if err = ros.DeserializeMessageField(r, "Vector3", &m.Linear); err != nil {
		return err
	}

	// Angular
	if err = ros.DeserializeMessageField(r, "Vector3", &m.Angular); err != nil {
		return err
	}

	return
}
Exemplo n.º 30
0
func (m *WrenchStamped) Deserialize(r io.Reader) (err error) {
	// Header
	if err = ros.DeserializeMessageField(r, "Header", &m.Header); err != nil {
		return err
	}

	// Wrench
	if err = ros.DeserializeMessageField(r, "Wrench", &m.Wrench); err != nil {
		return err
	}

	return
}