text: // Auto-generated. Do not edit!
  
  // (in-package autoware_msgs.msg)
  
  
  "use strict";
  
  const _serializer = _ros_msg_utils.Serialize;
  const _arraySerializer = _serializer.Array;
  const _deserializer = _ros_msg_utils.Deserialize;
  const _arrayDeserializer = _deserializer.Array;
  const _finder = _ros_msg_utils.Find;
  const _getByteLength = _ros_msg_utils.getByteLength;
  let LaneArray = require('./LaneArray.js');
  let sensor_msgs = _finder('sensor_msgs');
  let geometry_msgs = _finder('geometry_msgs');
  let std_msgs = _finder('std_msgs');
  
  //-----------------------------------------------------------
  
  class DetectedObject {
    constructor(initObj={}) {
      if (initObj === null) {
        // initObj === null is a special case for deserialization where we don't initialize fields
        this.header = null;
        this.id = null;
        this.label = null;
        this.score = null;
        this.color = null;
        this.space_frame = null;
        this.pose = null;
        this.dimensions = null;
        this.variance = null;
        this.velocity = null;
        this.acceleration = null;
        this.pointcloud = null;
        this.convex_hull = null;
        this.candidate_trajectories = null;
        this.pose_reliable = null;
        this.velocity_reliable = null;
        this.acceleration_reliable = null;
        this.image_frame = null;
        this.x = null;
        this.y = null;
        this.width = null;
        this.height = null;
        this.angle = null;
        this.roi_image = null;
        this.indicator_state = null;
        this.behavior_state = null;
        this.user_defined_info = null;
      }
      else {
        if (initObj.hasOwnProperty('header')) {
          this.header = initObj.header
        }
        else {
          this.header = new std_msgs.msg.Header();
        }
        if (initObj.hasOwnProperty('id')) {
          this.id = initObj.id
        }
        else {
          this.id = 0;
        }
        if (initObj.hasOwnProperty('label')) {
          this.label = initObj.label
        }
        else {
          this.label = '';
        }
        if (initObj.hasOwnProperty('score')) {
          this.score = initObj.score
        }
        else {
          this.score = 0.0;
        }
        if (initObj.hasOwnProperty('color')) {
          this.color = initObj.color
        }
        else {
          this.color = new std_msgs.msg.ColorRGBA();
        }
        if (initObj.hasOwnProperty('space_frame')) {
          this.space_frame = initObj.space_frame
        }
        else {
          this.space_frame = '';
        }
        if (initObj.hasOwnProperty('pose')) {
          this.pose = initObj.pose
        }
        else {
          this.pose = new geometry_msgs.msg.Pose();
        }
        if (initObj.hasOwnProperty('dimensions')) {
          this.dimensions = initObj.dimensions
        }
        else {
          this.dimensions = new geometry_msgs.msg.Vector3();
        }
        if (initObj.hasOwnProperty('variance')) {
          this.variance = initObj.variance
        }
        else {
          this.variance = new geometry_msgs.msg.Vector3();
        }
        if (initObj.hasOwnProperty('velocity')) {
          this.velocity = initObj.velocity
        }
        else {
          this.velocity = new geometry_msgs.msg.Twist();
        }
        if (initObj.hasOwnProperty('acceleration')) {
          this.acceleration = initObj.acceleration
        }
        else {
          this.acceleration = new geometry_msgs.msg.Twist();
        }
        if (initObj.hasOwnProperty('pointcloud')) {
          this.pointcloud = initObj.pointcloud
        }
        else {
          this.pointcloud = new sensor_msgs.msg.PointCloud2();
        }
        if (initObj.hasOwnProperty('convex_hull')) {
          this.convex_hull = initObj.convex_hull
        }
        else {
          this.convex_hull = new geometry_msgs.msg.PolygonStamped();
        }
        if (initObj.hasOwnProperty('candidate_trajectories')) {
          this.candidate_trajectories = initObj.candidate_trajectories
        }
        else {
          this.candidate_trajectories = new LaneArray();
        }
        if (initObj.hasOwnProperty('pose_reliable')) {
          this.pose_reliable = initObj.pose_reliable
        }
        else {
          this.pose_reliable = false;
        }
        if (initObj.hasOwnProperty('velocity_reliable')) {
          this.velocity_reliable = initObj.velocity_reliable
        }
        else {
          this.velocity_reliable = false;
        }
        if (initObj.hasOwnProperty('acceleration_reliable')) {
          this.acceleration_reliable = initObj.acceleration_reliable
        }
        else {
          this.acceleration_reliable = false;
        }
        if (initObj.hasOwnProperty('image_frame')) {
          this.image_frame = initObj.image_frame
        }
        else {
          this.image_frame = '';
        }
        if (initObj.hasOwnProperty('x')) {
          this.x = initObj.x
        }
        else {
          this.x = 0;
        }
        if (initObj.hasOwnProperty('y')) {
          this.y = initObj.y
        }
        else {
          this.y = 0;
        }
        if (initObj.hasOwnProperty('width')) {
          this.width = initObj.width
        }
        else {
          this.width = 0;
        }
        if (initObj.hasOwnProperty('height')) {
          this.height = initObj.height
        }
        else {
          this.height = 0;
        }
        if (initObj.hasOwnProperty('angle')) {
          this.angle = initObj.angle
        }
        else {
          this.angle = 0.0;
        }
        if (initObj.hasOwnProperty('roi_image')) {
          this.roi_image = initObj.roi_image
        }
        else {
          this.roi_image = new sensor_msgs.msg.Image();
        }
        if (initObj.hasOwnProperty('indicator_state')) {
          this.indicator_state = initObj.indicator_state
        }
        else {
          this.indicator_state = 0;
        }
        if (initObj.hasOwnProperty('behavior_state')) {
          this.behavior_state = initObj.behavior_state
        }
        else {
          this.behavior_state = 0;
        }
        if (initObj.hasOwnProperty('user_defined_info')) {
          this.user_defined_info = initObj.user_defined_info
        }
        else {
          this.user_defined_info = [];
        }
      }
    }
  
    static serialize(obj, buffer, bufferOffset) {
      // Serializes a message object of type DetectedObject
      // Serialize message field [header]
      bufferOffset = std_msgs.msg.Header.serialize(obj.header, buffer, bufferOffset);
      // Serialize message field [id]
      bufferOffset = _serializer.uint32(obj.id, buffer, bufferOffset);
      // Serialize message field [label]
      bufferOffset = _serializer.string(obj.label, buffer, bufferOffset);
      // Serialize message field [score]
      bufferOffset = _serializer.float32(obj.score, buffer, bufferOffset);
      // Serialize message field [color]
      bufferOffset = std_msgs.msg.ColorRGBA.serialize(obj.color, buffer, bufferOffset);
      // Serialize message field [space_frame]
      bufferOffset = _serializer.string(obj.space_frame, buffer, bufferOffset);
      // Serialize message field [pose]
      bufferOffset = geometry_msgs.msg.Pose.serialize(obj.pose, buffer, bufferOffset);
      // Serialize message field [dimensions]
      bufferOffset = geometry_msgs.msg.Vector3.serialize(obj.dimensions, buffer, bufferOffset);
      // Serialize message field [variance]
      bufferOffset = geometry_msgs.msg.Vector3.serialize(obj.variance, buffer, bufferOffset);
      // Serialize message field [velocity]
      bufferOffset = geometry_msgs.msg.Twist.serialize(obj.velocity, buffer, bufferOffset);
      // Serialize message field [acceleration]
      bufferOffset = geometry_msgs.msg.Twist.serialize(obj.acceleration, buffer, bufferOffset);
      // Serialize message field [pointcloud]
      bufferOffset = sensor_msgs.msg.PointCloud2.serialize(obj.pointcloud, buffer, bufferOffset);
      // Serialize message field [convex_hull]
      bufferOffset = geometry_msgs.msg.PolygonStamped.serialize(obj.convex_hull, buffer, bufferOffset);
      // Serialize message field [candidate_trajectories]
      bufferOffset = LaneArray.serialize(obj.candidate_trajectories, buffer, bufferOffset);
      // Serialize message field [pose_reliable]
      bufferOffset = _serializer.bool(obj.pose_reliable, buffer, bufferOffset);
      // Serialize message field [velocity_reliable]
      bufferOffset = _serializer.bool(obj.velocity_reliable, buffer, bufferOffset);
      // Serialize message field [acceleration_reliable]
      bufferOffset = _serializer.bool(obj.acceleration_reliable, buffer, bufferOffset);
      // Serialize message field [image_frame]
      bufferOffset = _serializer.string(obj.image_frame, buffer, bufferOffset);
      // Serialize message field [x]
      bufferOffset = _serializer.int32(obj.x, buffer, bufferOffset);
      // Serialize message field [y]
      bufferOffset = _serializer.int32(obj.y, buffer, bufferOffset);
      // Serialize message field [width]
      bufferOffset = _serializer.int32(obj.width, buffer, bufferOffset);
      // Serialize message field [height]
      bufferOffset = _serializer.int32(obj.height, buffer, bufferOffset);
      // Serialize message field [angle]
      bufferOffset = _serializer.float32(obj.angle, buffer, bufferOffset);
      // Serialize message field [roi_image]
      bufferOffset = sensor_msgs.msg.Image.serialize(obj.roi_image, buffer, bufferOffset);
      // Serialize message field [indicator_state]
      bufferOffset = _serializer.uint8(obj.indicator_state, buffer, bufferOffset);
      // Serialize message field [behavior_state]
      bufferOffset = _serializer.uint8(obj.behavior_state, buffer, bufferOffset);
      // Serialize message field [user_defined_info]
      bufferOffset = _arraySerializer.string(obj.user_defined_info, buffer, bufferOffset, null);
      return bufferOffset;
    }
  
    static deserialize(buffer, bufferOffset=[0]) {
      //deserializes a message object of type DetectedObject
      let len;
      let data = new DetectedObject(null);
      // Deserialize message field [header]
      data.header = std_msgs.msg.Header.deserialize(buffer, bufferOffset);
      // Deserialize message field [id]
      data.id = _deserializer.uint32(buffer, bufferOffset);
      // Deserialize message field [label]
      data.label = _deserializer.string(buffer, bufferOffset);
      // Deserialize message field [score]
      data.score = _deserializer.float32(buffer, bufferOffset);
      // Deserialize message field [color]
      data.color = std_msgs.msg.ColorRGBA.deserialize(buffer, bufferOffset);
      // Deserialize message field [space_frame]
      data.space_frame = _deserializer.string(buffer, bufferOffset);
      // Deserialize message field [pose]
      data.pose = geometry_msgs.msg.Pose.deserialize(buffer, bufferOffset);
      // Deserialize message field [dimensions]
      data.dimensions = geometry_msgs.msg.Vector3.deserialize(buffer, bufferOffset);
      // Deserialize message field [variance]
      data.variance = geometry_msgs.msg.Vector3.deserialize(buffer, bufferOffset);
      // Deserialize message field [velocity]
      data.velocity = geometry_msgs.msg.Twist.deserialize(buffer, bufferOffset);
      // Deserialize message field [acceleration]
      data.acceleration = geometry_msgs.msg.Twist.deserialize(buffer, bufferOffset);
      // Deserialize message field [pointcloud]
      data.pointcloud = sensor_msgs.msg.PointCloud2.deserialize(buffer, bufferOffset);
      // Deserialize message field [convex_hull]
      data.convex_hull = geometry_msgs.msg.PolygonStamped.deserialize(buffer, bufferOffset);
      // Deserialize message field [candidate_trajectories]
      data.candidate_trajectories = LaneArray.deserialize(buffer, bufferOffset);
      // Deserialize message field [pose_reliable]
      data.pose_reliable = _deserializer.bool(buffer, bufferOffset);
      // Deserialize message field [velocity_reliable]
      data.velocity_reliable = _deserializer.bool(buffer, bufferOffset);
      // Deserialize message field [acceleration_reliable]
      data.acceleration_reliable = _deserializer.bool(buffer, bufferOffset);
      // Deserialize message field [image_frame]
      data.image_frame = _deserializer.string(buffer, bufferOffset);
      // Deserialize message field [x]
      data.x = _deserializer.int32(buffer, bufferOffset);
      // Deserialize message field [y]
      data.y = _deserializer.int32(buffer, bufferOffset);
      // Deserialize message field [width]
      data.width = _deserializer.int32(buffer, bufferOffset);
      // Deserialize message field [height]
      data.height = _deserializer.int32(buffer, bufferOffset);
      // Deserialize message field [angle]
      data.angle = _deserializer.float32(buffer, bufferOffset);
      // Deserialize message field [roi_image]
      data.roi_image = sensor_msgs.msg.Image.deserialize(buffer, bufferOffset);
      // Deserialize message field [indicator_state]
      data.indicator_state = _deserializer.uint8(buffer, bufferOffset);
      // Deserialize message field [behavior_state]
      data.behavior_state = _deserializer.uint8(buffer, bufferOffset);
      // Deserialize message field [user_defined_info]
      data.user_defined_info = _arrayDeserializer.string(buffer, bufferOffset, null)
      return data;
    }
  
    static getMessageSize(object) {
      let length = 0;
      length += std_msgs.msg.Header.getMessageSize(object.header);
      length += object.label.length;
      length += object.space_frame.length;
      length += sensor_msgs.msg.PointCloud2.getMessageSize(object.pointcloud);
      length += geometry_msgs.msg.PolygonStamped.getMessageSize(object.convex_hull);
      length += LaneArray.getMessageSize(object.candidate_trajectories);
      length += object.image_frame.length;
      length += sensor_msgs.msg.Image.getMessageSize(object.roi_image);
      object.user_defined_info.forEach((val) => {
        length += 4 + val.length;
      });
      return length + 265;
    }
  
    static datatype() {
      // Returns string type for a message object
      return 'autoware_msgs/DetectedObject';
    }
  
    static md5sum() {
      //Returns md5sum for a message object
      return 'aaae388a8109deb0b390665b29f69fee';
    }
  
    static messageDefinition() {
      // Returns full string definition for message
      return `
      std_msgs/Header                 header
      
      uint32                          id
      string                          label
      float32                         score   #Score as defined by the detection, Optional
      std_msgs/ColorRGBA              color   # Define this object specific color
      
      ################ 3D BB
      string                          space_frame #3D Space coordinate frame of the object, required if pose and dimensions are defines
      geometry_msgs/Pose              pose
      geometry_msgs/Vector3           dimensions
      geometry_msgs/Vector3           variance
      geometry_msgs/Twist             velocity
      geometry_msgs/Twist             acceleration
      
      sensor_msgs/PointCloud2         pointcloud
      
      geometry_msgs/PolygonStamped    convex_hull
      autoware_msgs/LaneArray         candidate_trajectories
      
      bool                            pose_reliable
      bool                            velocity_reliable
      bool                            acceleration_reliable
      
      ############### 2D Rect
      string                          image_frame # Image coordinate Frame,        Required if x,y,w,h defined
      int32                           x           # X coord in image space(pixel) of the initial point of the Rect
      int32                           y           # Y coord in image space(pixel) of the initial point of the Rect
      int32                           width       # Width of the Rect in pixels
      int32                           height      # Height of the Rect in pixels
      float32                         angle       # Angle [0 to 2*PI), allow rotated rects
      
      sensor_msgs/Image               roi_image
      
      ############### Indicator information
      uint8                          indicator_state # INDICATOR_LEFT = 0, INDICATOR_RIGHT = 1, INDICATOR_BOTH = 2, INDICATOR_NONE = 3
      
      ############### Behavior State of the Detected Object
      uint8                           behavior_state # FORWARD_STATE = 0, STOPPING_STATE = 1, BRANCH_LEFT_STATE = 2, BRANCH_RIGHT_STATE = 3, YIELDING_STATE = 4, ACCELERATING_STATE = 5, SLOWDOWN_STATE = 6
      
      #
      string[]                        user_defined_info
      ================================================================================
      MSG: std_msgs/Header
      # Standard metadata for higher-level stamped data types.
      # This is generally used to communicate timestamped data 
      # in a particular coordinate frame.
      # 
      # sequence ID: consecutively increasing ID 
      uint32 seq
      #Two-integer timestamp that is expressed as:
      # * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')
      # * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')
      # time-handling sugar is provided by the client library
      time stamp
      #Frame this data is associated with
      string frame_id
      
      ================================================================================
      MSG: std_msgs/ColorRGBA
      float32 r
      float32 g
      float32 b
      float32 a
      
      ================================================================================
      MSG: geometry_msgs/Pose
      # A representation of pose in free space, composed of position and orientation. 
      Point position
      Quaternion orientation
      
      ================================================================================
      MSG: geometry_msgs/Point
      # This contains the position of a point in free space
      float64 x
      float64 y
      float64 z
      
      ================================================================================
      MSG: geometry_msgs/Quaternion
      # This represents an orientation in free space in quaternion form.
      
      float64 x
      float64 y
      float64 z
      float64 w
      
      ================================================================================
      MSG: geometry_msgs/Vector3
      # This represents a vector in free space. 
      # It is only meant to represent a direction. Therefore, it does not
      # make sense to apply a translation to it (e.g., when applying a 
      # generic rigid transformation to a Vector3, tf2 will only apply the
      # rotation). If you want your data to be translatable too, use the
      # geometry_msgs/Point message instead.
      
      float64 x
      float64 y
      float64 z
      ================================================================================
      MSG: geometry_msgs/Twist
      # This expresses velocity in free space broken into its linear and angular parts.
      Vector3  linear
      Vector3  angular
      
      ================================================================================
      MSG: sensor_msgs/PointCloud2
      # This message holds a collection of N-dimensional points, which may
      # contain additional information such as normals, intensity, etc. The
      # point data is stored as a binary blob, its layout described by the
      # contents of the "fields" array.
      
      # The point cloud data may be organized 2d (image-like) or 1d
      # (unordered). Point clouds organized as 2d images may be produced by
      # camera depth sensors such as stereo or time-of-flight.
      
      # Time of sensor data acquisition, and the coordinate frame ID (for 3d
      # points).
      Header header
      
      # 2D structure of the point cloud. If the cloud is unordered, height is
      # 1 and width is the length of the point cloud.
      uint32 height
      uint32 width
      
      # Describes the channels and their layout in the binary data blob.
      PointField[] fields
      
      bool    is_bigendian # Is this data bigendian?
      uint32  point_step   # Length of a point in bytes
      uint32  row_step     # Length of a row in bytes
      uint8[] data         # Actual point data, size is (row_step*height)
      
      bool is_dense        # True if there are no invalid points
      
      ================================================================================
      MSG: sensor_msgs/PointField
      # This message holds the description of one point entry in the
      # PointCloud2 message format.
      uint8 INT8    = 1
      uint8 UINT8   = 2
      uint8 INT16   = 3
      uint8 UINT16  = 4
      uint8 INT32   = 5
      uint8 UINT32  = 6
      uint8 FLOAT32 = 7
      uint8 FLOAT64 = 8
      
      string name      # Name of field
      uint32 offset    # Offset from start of point struct
      uint8  datatype  # Datatype enumeration, see above
      uint32 count     # How many elements in the field
      
      ================================================================================
      MSG: geometry_msgs/PolygonStamped
      # This represents a Polygon with reference coordinate frame and timestamp
      Header header
      Polygon polygon
      
      ================================================================================
      MSG: geometry_msgs/Polygon
      #A specification of a polygon where the first and last points are assumed to be connected
      Point32[] points
      
      ================================================================================
      MSG: geometry_msgs/Point32
      # This contains the position of a point in free space(with 32 bits of precision).
      # It is recommeded to use Point wherever possible instead of Point32.  
      # 
      # This recommendation is to promote interoperability.  
      #
      # This message is designed to take up less space when sending
      # lots of points at once, as in the case of a PointCloud.  
      
      float32 x
      float32 y
      float32 z
      ================================================================================
      MSG: autoware_msgs/LaneArray
      lane[] lanes
      ================================================================================
      MSG: autoware_msgs/lane
      Header header
      int32 increment
      int32 lane_id
      waypoint[] waypoints
      
      uint32 lane_index
      float32 cost
      float32 closest_object_distance
      float32 closest_object_velocity
      bool is_blocked
      
      ================================================================================
      MSG: autoware_msgs/waypoint
      # global id
      int32 gid 
      # local id
      int32 lid
      geometry_msgs/PoseStamped pose
      geometry_msgs/TwistStamped twist
      dtlane dtlane
      int32 change_flag
      WaypointState wpstate
      
      uint32 lane_id
      uint32 left_lane_id
      uint32 right_lane_id
      uint32 stop_line_id
      float32 cost
      float32 time_cost
      
      # Lane Direction
      # FORWARD				= 0
      # FORWARD_LEFT	 		= 1
      # FORWARD_RIGHT			= 2
      # BACKWARD				= 3 
      # BACKWARD_LEFT			= 4
      # BACKWARD_RIGHT		= 5
      # STANDSTILL	 		= 6
      uint32 direction
      ================================================================================
      MSG: geometry_msgs/PoseStamped
      # A Pose with reference coordinate frame and timestamp
      Header header
      Pose pose
      
      ================================================================================
      MSG: geometry_msgs/TwistStamped
      # A twist with reference coordinate frame and timestamp
      Header header
      Twist twist
      
      ================================================================================
      MSG: autoware_msgs/dtlane
      float64 dist
      float64 dir
      float64 apara
      float64 r
      float64 slope
      float64 cant
      float64 lw
      float64 rw
      
      ================================================================================
      MSG: autoware_msgs/WaypointState
      int32 aid
      uint8 NULLSTATE=0
      uint8 lanechange_state
      
      uint8 steering_state
      uint8 STR_LEFT=1
      uint8 STR_RIGHT=2
      uint8 STR_STRAIGHT=3
      
      uint8 accel_state
      uint8 stopline_state
        uint8 TYPE_NULL=0
        uint8 TYPE_STOPLINE=1
        uint8 TYPE_STOP=2
      # 1 is stopline, 2 is stop which 2 can only be released manually.
      uint64 event_state
      
      ================================================================================
      MSG: sensor_msgs/Image
      # This message contains an uncompressed image
      # (0, 0) is at top-left corner of image
      #
      
      Header header        # Header timestamp should be acquisition time of image
                           # Header frame_id should be optical frame of camera
                           # origin of frame should be optical center of camera
                           # +x should point to the right in the image
                           # +y should point down in the image
                           # +z should point into to plane of the image
                           # If the frame_id here and the frame_id of the CameraInfo
                           # message associated with the image conflict
                           # the behavior is undefined
      
      uint32 height         # image height, that is, number of rows
      uint32 width          # image width, that is, number of columns
      
      # The legal values for encoding are in file src/image_encodings.cpp
      # If you want to standardize a new string format, join
      # ros-users@lists.sourceforge.net and send an email proposing a new encoding.
      
      string encoding       # Encoding of pixels -- channel meaning, ordering, size
                            # taken from the list of strings in include/sensor_msgs/image_encodings.h
      
      uint8 is_bigendian    # is this data bigendian?
      uint32 step           # Full row length in bytes
      uint8[] data          # actual matrix data, size is (step * rows)
      
      `;
    }
  
    static Resolve(msg) {
      // deep-construct a valid message object instance of whatever was passed in
      if (typeof msg !== 'object' || msg === null) {
        msg = {};
      }
      const resolved = new DetectedObject(null);
      if (msg.header !== undefined) {
        resolved.header = std_msgs.msg.Header.Resolve(msg.header)
      }
      else {
        resolved.header = new std_msgs.msg.Header()
      }
  
      if (msg.id !== undefined) {
        resolved.id = msg.id;
      }
      else {
        resolved.id = 0
      }
  
      if (msg.label !== undefined) {
        resolved.label = msg.label;
      }
      else {
        resolved.label = ''
      }
  
      if (msg.score !== undefined) {
        resolved.score = msg.score;
      }
      else {
        resolved.score = 0.0
      }
  
      if (msg.color !== undefined) {
        resolved.color = std_msgs.msg.ColorRGBA.Resolve(msg.color)
      }
      else {
        resolved.color = new std_msgs.msg.ColorRGBA()
      }
  
      if (msg.space_frame !== undefined) {
        resolved.space_frame = msg.space_frame;
      }
      else {
        resolved.space_frame = ''
      }
  
      if (msg.pose !== undefined) {
        resolved.pose = geometry_msgs.msg.Pose.Resolve(msg.pose)
      }
      else {
        resolved.pose = new geometry_msgs.msg.Pose()
      }
  
      if (msg.dimensions !== undefined) {
        resolved.dimensions = geometry_msgs.msg.Vector3.Resolve(msg.dimensions)
      }
      else {
        resolved.dimensions = new geometry_msgs.msg.Vector3()
      }
  
      if (msg.variance !== undefined) {
        resolved.variance = geometry_msgs.msg.Vector3.Resolve(msg.variance)
      }
      else {
        resolved.variance = new geometry_msgs.msg.Vector3()
      }
  
      if (msg.velocity !== undefined) {
        resolved.velocity = geometry_msgs.msg.Twist.Resolve(msg.velocity)
      }
      else {
        resolved.velocity = new geometry_msgs.msg.Twist()
      }
  
      if (msg.acceleration !== undefined) {
        resolved.acceleration = geometry_msgs.msg.Twist.Resolve(msg.acceleration)
      }
      else {
        resolved.acceleration = new geometry_msgs.msg.Twist()
      }
  
      if (msg.pointcloud !== undefined) {
        resolved.pointcloud = sensor_msgs.msg.PointCloud2.Resolve(msg.pointcloud)
      }
      else {
        resolved.pointcloud = new sensor_msgs.msg.PointCloud2()
      }
  
      if (msg.convex_hull !== undefined) {
        resolved.convex_hull = geometry_msgs.msg.PolygonStamped.Resolve(msg.convex_hull)
      }
      else {
        resolved.convex_hull = new geometry_msgs.msg.PolygonStamped()
      }
  
      if (msg.candidate_trajectories !== undefined) {
        resolved.candidate_trajectories = LaneArray.Resolve(msg.candidate_trajectories)
      }
      else {
        resolved.candidate_trajectories = new LaneArray()
      }
  
      if (msg.pose_reliable !== undefined) {
        resolved.pose_reliable = msg.pose_reliable;
      }
      else {
        resolved.pose_reliable = false
      }
  
      if (msg.velocity_reliable !== undefined) {
        resolved.velocity_reliable = msg.velocity_reliable;
      }
      else {
        resolved.velocity_reliable = false
      }
  
      if (msg.acceleration_reliable !== undefined) {
        resolved.acceleration_reliable = msg.acceleration_reliable;
      }
      else {
        resolved.acceleration_reliable = false
      }
  
      if (msg.image_frame !== undefined) {
        resolved.image_frame = msg.image_frame;
      }
      else {
        resolved.image_frame = ''
      }
  
      if (msg.x !== undefined) {
        resolved.x = msg.x;
      }
      else {
        resolved.x = 0
      }
  
      if (msg.y !== undefined) {
        resolved.y = msg.y;
      }
      else {
        resolved.y = 0
      }
  
      if (msg.width !== undefined) {
        resolved.width = msg.width;
      }
      else {
        resolved.width = 0
      }
  
      if (msg.height !== undefined) {
        resolved.height = msg.height;
      }
      else {
        resolved.height = 0
      }
  
      if (msg.angle !== undefined) {
        resolved.angle = msg.angle;
      }
      else {
        resolved.angle = 0.0
      }
  
      if (msg.roi_image !== undefined) {
        resolved.roi_image = sensor_msgs.msg.Image.Resolve(msg.roi_image)
      }
      else {
        resolved.roi_image = new sensor_msgs.msg.Image()
      }
  
      if (msg.indicator_state !== undefined) {
        resolved.indicator_state = msg.indicator_state;
      }
      else {
        resolved.indicator_state = 0
      }
  
      if (msg.behavior_state !== undefined) {
        resolved.behavior_state = msg.behavior_state;
      }
      else {
        resolved.behavior_state = 0
      }
  
      if (msg.user_defined_info !== undefined) {
        resolved.user_defined_info = msg.user_defined_info;
      }
      else {
        resolved.user_defined_info = []
      }
  
      return resolved;
      }
  };
  
  module.exports = DetectedObject;
  