ros

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2022 License: AGPL-3.0 Imports: 6 Imported by: 2

README

ROS package

The ROS package implements functionality that bridges the gap between rdk and ROS.

Plane Segmentation

Plane segmentation works with ROS bags that contain the /L515_ImageWithDepth rostopic that publishes Intel Realsense L515 RGBD data.

It saves png images of the rgbd data, as well as segmented planes.

Run rosbag_parser/cmd:

go run rosbag_parser/cmd/main.go <path_to_your_rosbag>

Documentation

Overview

Package ros implements functionality that bridges the gap between `rdk` and ROS

Package ros implements functionality that bridges the gap between `rdk` and ROS

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllMessagesForTopic

func AllMessagesForTopic(rb *rosbag.RosBag, topic string) ([]map[string]interface{}, error)

AllMessagesForTopic returns all messages for a specific topic in the ros bag.

func ReadBag

func ReadBag(filename string) (*rosbag.RosBag, error)

ReadBag reads the contents of a rosbag into a gobag data structure.

func WriteTopicsJSON

func WriteTopicsJSON(rb *rosbag.RosBag, startTime, endTime int64, topicsFilter []string) error

WriteTopicsJSON writes data from a rosbag into JSON files, filtered and sorted by topic.

Types

type ByteMultiArray

type ByteMultiArray struct {
	Layout MultiArrayLayout
	Data   []byte
}

ByteMultiArray is a ROS std_msgs/ByteMultiArray message.

type ImuData

type ImuData struct {
	Header                       MessageHeader
	Orientation                  Quaternion
	OrientationCovariance        [9]int  `json:"orientation_covariance"`
	AngularVelocity              Vector3 `json:"angular_velocity"`
	AngularVelocityCovariance    [9]int  `json:"angular_velocity_covariance"`
	LinearAcceleration           Vector3 `json:"linear_acceleration"`
	LinearAccelerationCovariance [9]int  `json:"linear_acceleration_covariance"`
}

ImuData contains the IMU data.

type ImuMessage

type ImuMessage struct {
	Meta TimeStamp
	Data ImuData
}

ImuMessage reflects the JSON data format for rosbag imu data.

type L515Message

type L515Message struct {
	Meta      TimeStamp
	ColorData ByteMultiArray
	DepthData ByteMultiArray
}

L515Message reflects the JSON data format for rosbag Intel Realsense data.

type MessageHeader

type MessageHeader struct {
	Seq     int
	Stamp   TimeStamp
	FrameID string `json:"frame_id"`
}

MessageHeader is a ROS std_msgs/Header message.

type MultiArrayDimension

type MultiArrayDimension struct {
	Label  string
	Size   uint32
	Stride uint32
}

MultiArrayDimension is a ROS std_msgs/MultiArrayDimension message.

type MultiArrayLayout

type MultiArrayLayout struct {
	Dim        []MultiArrayDimension
	DataOffset int `json:"data_offset"`
}

MultiArrayLayout is a ROS std_msgs/MultiArrayLayout message.

type Quaternion

type Quaternion struct {
	X float64
	Y float64
	Z float64
	W float64
}

Quaternion is a ROS geometry_msgs/Quaternion message.

type TimeStamp

type TimeStamp struct {
	Secs  int
	Nsecs int
}

TimeStamp contains the timestamp expressed as: * TimeStamp.Secs: seconds since epoch * TimeStamp.Nsecs: nanoseconds since TimeStamp.Secs.

type Vector3

type Vector3 struct {
	X float64
	Y float64
	Z float64
}

Vector3 is a ROS geometry_msgs/Vector3 message.

Directories

Path Synopsis
rosbag_parser
cmd
Package main is a rosbag parser.
Package main is a rosbag parser.

Jump to

Keyboard shortcuts

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