WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
Twist2dStruct.hpp
Go to the documentation of this file.
1// Copyright (c) FIRST and other WPILib contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the WPILib BSD license file in the root directory of this project.
4
5#pragma once
6
10
11template <>
12struct WPILIB_DLLEXPORT wpi::util::Struct<wpi::math::Twist2d> {
13 static constexpr std::string_view GetTypeName() { return "Twist2d"; }
14 static constexpr size_t GetSize() { return 24; }
15 static constexpr std::string_view GetSchema() {
16 return "double dx;double dy;double dtheta";
17 }
18
19 static wpi::math::Twist2d Unpack(std::span<const uint8_t> data);
20 static void Pack(std::span<uint8_t> data, const wpi::math::Twist2d& value);
21};
22
#define WPILIB_DLLEXPORT
Definition SymbolExports.hpp:36
Specifies that a type is capable of raw struct serialization and deserialization.
Definition Struct.hpp:69
Definition CvSource.hpp:15
A change in distance along a 2D arc since the last pose update.
Definition Twist2d.hpp:23
static constexpr std::string_view GetTypeName()
Definition Twist2dStruct.hpp:13
static constexpr std::string_view GetSchema()
Definition Twist2dStruct.hpp:15
static wpi::math::Twist2d Unpack(std::span< const uint8_t > data)
static void Pack(std::span< uint8_t > data, const wpi::math::Twist2d &value)
static constexpr size_t GetSize()
Definition Twist2dStruct.hpp:14
Struct serialization template.
Definition Struct.hpp:39