ros2_interfaces_rolling/ros_gz_interfaces/msg/
contact.rs

1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4pub struct Contact {
5    pub collision1: crate::ros_gz_interfaces::msg::Entity,
6    pub collision2: crate::ros_gz_interfaces::msg::Entity,
7    pub positions: Vec<crate::geometry_msgs::msg::Vector3>,
8    pub normals: Vec<crate::geometry_msgs::msg::Vector3>,
9    pub depths: Vec<f64>,
10    pub wrenches: Vec<crate::ros_gz_interfaces::msg::JointWrench>,
11}
12
13impl Default for Contact {
14    fn default() -> Self {
15        Contact {
16            collision1: crate::ros_gz_interfaces::msg::Entity::default(),
17            collision2: crate::ros_gz_interfaces::msg::Entity::default(),
18            positions: Vec::new(),
19            normals: Vec::new(),
20            depths: Vec::new(),
21            wrenches: Vec::new(),
22        }
23    }
24}
25
26impl ros2_client::Message for Contact {}