1#![allow(unknown_lints)]
7#![allow(clippy::all)]
8
9#![allow(unused_attributes)]
10#![cfg_attr(rustfmt, rustfmt::skip)]
11
12#![allow(dead_code)]
13#![allow(missing_docs)]
14#![allow(non_camel_case_types)]
15#![allow(non_snake_case)]
16#![allow(non_upper_case_globals)]
17#![allow(trivial_casts)]
18#![allow(unused_results)]
19#![allow(unused_mut)]
20
21const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_2;
26
27#[derive(::gz_msgs_common::GzMessage)]
28#[derive(PartialEq,Clone,Default,Debug)]
30pub struct Joint {
31 pub header: ::protobuf::MessageField<super::header::Header>,
34 pub name: ::std::string::String,
36 pub id: u32,
38 pub type_: ::protobuf::EnumOrUnknown<joint::Type>,
40 pub parent: ::std::string::String,
42 pub parent_id: u32,
44 pub child: ::std::string::String,
46 pub child_id: u32,
48 pub pose: ::protobuf::MessageField<super::pose::Pose>,
50 pub axis1: ::protobuf::MessageField<super::axis::Axis>,
52 pub axis2: ::protobuf::MessageField<super::axis::Axis>,
54 pub cfm: f64,
56 pub bounce: f64,
58 pub fudge_factor: f64,
60 pub limit_cfm: f64,
62 pub limit_erp: f64,
64 pub suspension_cfm: f64,
66 pub suspension_erp: f64,
68 pub gearbox: ::protobuf::MessageField<joint::Gearbox>,
70 pub screw: ::protobuf::MessageField<joint::Screw>,
72 pub sensor: ::std::vec::Vec<super::sensor::Sensor>,
74 pub special_fields: ::protobuf::SpecialFields,
77}
78
79impl<'a> ::std::default::Default for &'a Joint {
80 fn default() -> &'a Joint {
81 <Joint as ::protobuf::Message>::default_instance()
82 }
83}
84
85impl Joint {
86 pub fn new() -> Joint {
87 ::std::default::Default::default()
88 }
89
90 fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
91 let mut fields = ::std::vec::Vec::with_capacity(21);
92 let mut oneofs = ::std::vec::Vec::with_capacity(0);
93 fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::header::Header>(
94 "header",
95 |m: &Joint| { &m.header },
96 |m: &mut Joint| { &mut m.header },
97 ));
98 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
99 "name",
100 |m: &Joint| { &m.name },
101 |m: &mut Joint| { &mut m.name },
102 ));
103 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
104 "id",
105 |m: &Joint| { &m.id },
106 |m: &mut Joint| { &mut m.id },
107 ));
108 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
109 "type",
110 |m: &Joint| { &m.type_ },
111 |m: &mut Joint| { &mut m.type_ },
112 ));
113 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
114 "parent",
115 |m: &Joint| { &m.parent },
116 |m: &mut Joint| { &mut m.parent },
117 ));
118 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
119 "parent_id",
120 |m: &Joint| { &m.parent_id },
121 |m: &mut Joint| { &mut m.parent_id },
122 ));
123 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
124 "child",
125 |m: &Joint| { &m.child },
126 |m: &mut Joint| { &mut m.child },
127 ));
128 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
129 "child_id",
130 |m: &Joint| { &m.child_id },
131 |m: &mut Joint| { &mut m.child_id },
132 ));
133 fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::pose::Pose>(
134 "pose",
135 |m: &Joint| { &m.pose },
136 |m: &mut Joint| { &mut m.pose },
137 ));
138 fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::axis::Axis>(
139 "axis1",
140 |m: &Joint| { &m.axis1 },
141 |m: &mut Joint| { &mut m.axis1 },
142 ));
143 fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::axis::Axis>(
144 "axis2",
145 |m: &Joint| { &m.axis2 },
146 |m: &mut Joint| { &mut m.axis2 },
147 ));
148 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
149 "cfm",
150 |m: &Joint| { &m.cfm },
151 |m: &mut Joint| { &mut m.cfm },
152 ));
153 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
154 "bounce",
155 |m: &Joint| { &m.bounce },
156 |m: &mut Joint| { &mut m.bounce },
157 ));
158 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
159 "fudge_factor",
160 |m: &Joint| { &m.fudge_factor },
161 |m: &mut Joint| { &mut m.fudge_factor },
162 ));
163 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
164 "limit_cfm",
165 |m: &Joint| { &m.limit_cfm },
166 |m: &mut Joint| { &mut m.limit_cfm },
167 ));
168 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
169 "limit_erp",
170 |m: &Joint| { &m.limit_erp },
171 |m: &mut Joint| { &mut m.limit_erp },
172 ));
173 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
174 "suspension_cfm",
175 |m: &Joint| { &m.suspension_cfm },
176 |m: &mut Joint| { &mut m.suspension_cfm },
177 ));
178 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
179 "suspension_erp",
180 |m: &Joint| { &m.suspension_erp },
181 |m: &mut Joint| { &mut m.suspension_erp },
182 ));
183 fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, joint::Gearbox>(
184 "gearbox",
185 |m: &Joint| { &m.gearbox },
186 |m: &mut Joint| { &mut m.gearbox },
187 ));
188 fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, joint::Screw>(
189 "screw",
190 |m: &Joint| { &m.screw },
191 |m: &mut Joint| { &mut m.screw },
192 ));
193 fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
194 "sensor",
195 |m: &Joint| { &m.sensor },
196 |m: &mut Joint| { &mut m.sensor },
197 ));
198 ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Joint>(
199 "Joint",
200 fields,
201 oneofs,
202 )
203 }
204}
205
206impl ::protobuf::Message for Joint {
207 const NAME: &'static str = "Joint";
208
209 fn is_initialized(&self) -> bool {
210 true
211 }
212
213 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
214 while let Some(tag) = is.read_raw_tag_or_eof()? {
215 match tag {
216 10 => {
217 ::protobuf::rt::read_singular_message_into_field(is, &mut self.header)?;
218 },
219 18 => {
220 self.name = is.read_string()?;
221 },
222 24 => {
223 self.id = is.read_uint32()?;
224 },
225 32 => {
226 self.type_ = is.read_enum_or_unknown()?;
227 },
228 42 => {
229 self.parent = is.read_string()?;
230 },
231 48 => {
232 self.parent_id = is.read_uint32()?;
233 },
234 58 => {
235 self.child = is.read_string()?;
236 },
237 64 => {
238 self.child_id = is.read_uint32()?;
239 },
240 74 => {
241 ::protobuf::rt::read_singular_message_into_field(is, &mut self.pose)?;
242 },
243 82 => {
244 ::protobuf::rt::read_singular_message_into_field(is, &mut self.axis1)?;
245 },
246 90 => {
247 ::protobuf::rt::read_singular_message_into_field(is, &mut self.axis2)?;
248 },
249 97 => {
250 self.cfm = is.read_double()?;
251 },
252 105 => {
253 self.bounce = is.read_double()?;
254 },
255 113 => {
256 self.fudge_factor = is.read_double()?;
257 },
258 121 => {
259 self.limit_cfm = is.read_double()?;
260 },
261 129 => {
262 self.limit_erp = is.read_double()?;
263 },
264 137 => {
265 self.suspension_cfm = is.read_double()?;
266 },
267 145 => {
268 self.suspension_erp = is.read_double()?;
269 },
270 154 => {
271 ::protobuf::rt::read_singular_message_into_field(is, &mut self.gearbox)?;
272 },
273 162 => {
274 ::protobuf::rt::read_singular_message_into_field(is, &mut self.screw)?;
275 },
276 170 => {
277 self.sensor.push(is.read_message()?);
278 },
279 tag => {
280 ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
281 },
282 };
283 }
284 ::std::result::Result::Ok(())
285 }
286
287 #[allow(unused_variables)]
289 fn compute_size(&self) -> u64 {
290 let mut my_size = 0;
291 if let Some(v) = self.header.as_ref() {
292 let len = v.compute_size();
293 my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
294 }
295 if !self.name.is_empty() {
296 my_size += ::protobuf::rt::string_size(2, &self.name);
297 }
298 if self.id != 0 {
299 my_size += ::protobuf::rt::uint32_size(3, self.id);
300 }
301 if self.type_ != ::protobuf::EnumOrUnknown::new(joint::Type::REVOLUTE) {
302 my_size += ::protobuf::rt::int32_size(4, self.type_.value());
303 }
304 if !self.parent.is_empty() {
305 my_size += ::protobuf::rt::string_size(5, &self.parent);
306 }
307 if self.parent_id != 0 {
308 my_size += ::protobuf::rt::uint32_size(6, self.parent_id);
309 }
310 if !self.child.is_empty() {
311 my_size += ::protobuf::rt::string_size(7, &self.child);
312 }
313 if self.child_id != 0 {
314 my_size += ::protobuf::rt::uint32_size(8, self.child_id);
315 }
316 if let Some(v) = self.pose.as_ref() {
317 let len = v.compute_size();
318 my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
319 }
320 if let Some(v) = self.axis1.as_ref() {
321 let len = v.compute_size();
322 my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
323 }
324 if let Some(v) = self.axis2.as_ref() {
325 let len = v.compute_size();
326 my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
327 }
328 if self.cfm != 0. {
329 my_size += 1 + 8;
330 }
331 if self.bounce != 0. {
332 my_size += 1 + 8;
333 }
334 if self.fudge_factor != 0. {
335 my_size += 1 + 8;
336 }
337 if self.limit_cfm != 0. {
338 my_size += 1 + 8;
339 }
340 if self.limit_erp != 0. {
341 my_size += 2 + 8;
342 }
343 if self.suspension_cfm != 0. {
344 my_size += 2 + 8;
345 }
346 if self.suspension_erp != 0. {
347 my_size += 2 + 8;
348 }
349 if let Some(v) = self.gearbox.as_ref() {
350 let len = v.compute_size();
351 my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
352 }
353 if let Some(v) = self.screw.as_ref() {
354 let len = v.compute_size();
355 my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
356 }
357 for value in &self.sensor {
358 let len = value.compute_size();
359 my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
360 };
361 my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
362 self.special_fields.cached_size().set(my_size as u32);
363 my_size
364 }
365
366 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
367 if let Some(v) = self.header.as_ref() {
368 ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
369 }
370 if !self.name.is_empty() {
371 os.write_string(2, &self.name)?;
372 }
373 if self.id != 0 {
374 os.write_uint32(3, self.id)?;
375 }
376 if self.type_ != ::protobuf::EnumOrUnknown::new(joint::Type::REVOLUTE) {
377 os.write_enum(4, ::protobuf::EnumOrUnknown::value(&self.type_))?;
378 }
379 if !self.parent.is_empty() {
380 os.write_string(5, &self.parent)?;
381 }
382 if self.parent_id != 0 {
383 os.write_uint32(6, self.parent_id)?;
384 }
385 if !self.child.is_empty() {
386 os.write_string(7, &self.child)?;
387 }
388 if self.child_id != 0 {
389 os.write_uint32(8, self.child_id)?;
390 }
391 if let Some(v) = self.pose.as_ref() {
392 ::protobuf::rt::write_message_field_with_cached_size(9, v, os)?;
393 }
394 if let Some(v) = self.axis1.as_ref() {
395 ::protobuf::rt::write_message_field_with_cached_size(10, v, os)?;
396 }
397 if let Some(v) = self.axis2.as_ref() {
398 ::protobuf::rt::write_message_field_with_cached_size(11, v, os)?;
399 }
400 if self.cfm != 0. {
401 os.write_double(12, self.cfm)?;
402 }
403 if self.bounce != 0. {
404 os.write_double(13, self.bounce)?;
405 }
406 if self.fudge_factor != 0. {
407 os.write_double(14, self.fudge_factor)?;
408 }
409 if self.limit_cfm != 0. {
410 os.write_double(15, self.limit_cfm)?;
411 }
412 if self.limit_erp != 0. {
413 os.write_double(16, self.limit_erp)?;
414 }
415 if self.suspension_cfm != 0. {
416 os.write_double(17, self.suspension_cfm)?;
417 }
418 if self.suspension_erp != 0. {
419 os.write_double(18, self.suspension_erp)?;
420 }
421 if let Some(v) = self.gearbox.as_ref() {
422 ::protobuf::rt::write_message_field_with_cached_size(19, v, os)?;
423 }
424 if let Some(v) = self.screw.as_ref() {
425 ::protobuf::rt::write_message_field_with_cached_size(20, v, os)?;
426 }
427 for v in &self.sensor {
428 ::protobuf::rt::write_message_field_with_cached_size(21, v, os)?;
429 };
430 os.write_unknown_fields(self.special_fields.unknown_fields())?;
431 ::std::result::Result::Ok(())
432 }
433
434 fn special_fields(&self) -> &::protobuf::SpecialFields {
435 &self.special_fields
436 }
437
438 fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
439 &mut self.special_fields
440 }
441
442 fn new() -> Joint {
443 Joint::new()
444 }
445
446 fn clear(&mut self) {
447 self.header.clear();
448 self.name.clear();
449 self.id = 0;
450 self.type_ = ::protobuf::EnumOrUnknown::new(joint::Type::REVOLUTE);
451 self.parent.clear();
452 self.parent_id = 0;
453 self.child.clear();
454 self.child_id = 0;
455 self.pose.clear();
456 self.axis1.clear();
457 self.axis2.clear();
458 self.cfm = 0.;
459 self.bounce = 0.;
460 self.fudge_factor = 0.;
461 self.limit_cfm = 0.;
462 self.limit_erp = 0.;
463 self.suspension_cfm = 0.;
464 self.suspension_erp = 0.;
465 self.gearbox.clear();
466 self.screw.clear();
467 self.sensor.clear();
468 self.special_fields.clear();
469 }
470
471 fn default_instance() -> &'static Joint {
472 static instance: Joint = Joint {
473 header: ::protobuf::MessageField::none(),
474 name: ::std::string::String::new(),
475 id: 0,
476 type_: ::protobuf::EnumOrUnknown::from_i32(0),
477 parent: ::std::string::String::new(),
478 parent_id: 0,
479 child: ::std::string::String::new(),
480 child_id: 0,
481 pose: ::protobuf::MessageField::none(),
482 axis1: ::protobuf::MessageField::none(),
483 axis2: ::protobuf::MessageField::none(),
484 cfm: 0.,
485 bounce: 0.,
486 fudge_factor: 0.,
487 limit_cfm: 0.,
488 limit_erp: 0.,
489 suspension_cfm: 0.,
490 suspension_erp: 0.,
491 gearbox: ::protobuf::MessageField::none(),
492 screw: ::protobuf::MessageField::none(),
493 sensor: ::std::vec::Vec::new(),
494 special_fields: ::protobuf::SpecialFields::new(),
495 };
496 &instance
497 }
498}
499
500impl ::protobuf::MessageFull for Joint {
501 fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
502 static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
503 descriptor.get(|| file_descriptor().message_by_package_relative_name("Joint").unwrap()).clone()
504 }
505}
506
507impl ::std::fmt::Display for Joint {
508 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
509 ::protobuf::text_format::fmt(self, f)
510 }
511}
512
513impl ::protobuf::reflect::ProtobufValue for Joint {
514 type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
515}
516
517pub mod joint {
519 #[derive(::gz_msgs_common::GzMessage)]
520 #[derive(PartialEq,Clone,Default,Debug)]
522 pub struct Gearbox {
523 pub gearbox_reference_body: ::std::string::String,
526 pub gearbox_ratio: f64,
528 pub special_fields: ::protobuf::SpecialFields,
531 }
532
533 impl<'a> ::std::default::Default for &'a Gearbox {
534 fn default() -> &'a Gearbox {
535 <Gearbox as ::protobuf::Message>::default_instance()
536 }
537 }
538
539 impl Gearbox {
540 pub fn new() -> Gearbox {
541 ::std::default::Default::default()
542 }
543
544 pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
545 let mut fields = ::std::vec::Vec::with_capacity(2);
546 let mut oneofs = ::std::vec::Vec::with_capacity(0);
547 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
548 "gearbox_reference_body",
549 |m: &Gearbox| { &m.gearbox_reference_body },
550 |m: &mut Gearbox| { &mut m.gearbox_reference_body },
551 ));
552 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
553 "gearbox_ratio",
554 |m: &Gearbox| { &m.gearbox_ratio },
555 |m: &mut Gearbox| { &mut m.gearbox_ratio },
556 ));
557 ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Gearbox>(
558 "Joint.Gearbox",
559 fields,
560 oneofs,
561 )
562 }
563 }
564
565 impl ::protobuf::Message for Gearbox {
566 const NAME: &'static str = "Gearbox";
567
568 fn is_initialized(&self) -> bool {
569 true
570 }
571
572 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
573 while let Some(tag) = is.read_raw_tag_or_eof()? {
574 match tag {
575 10 => {
576 self.gearbox_reference_body = is.read_string()?;
577 },
578 17 => {
579 self.gearbox_ratio = is.read_double()?;
580 },
581 tag => {
582 ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
583 },
584 };
585 }
586 ::std::result::Result::Ok(())
587 }
588
589 #[allow(unused_variables)]
591 fn compute_size(&self) -> u64 {
592 let mut my_size = 0;
593 if !self.gearbox_reference_body.is_empty() {
594 my_size += ::protobuf::rt::string_size(1, &self.gearbox_reference_body);
595 }
596 if self.gearbox_ratio != 0. {
597 my_size += 1 + 8;
598 }
599 my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
600 self.special_fields.cached_size().set(my_size as u32);
601 my_size
602 }
603
604 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
605 if !self.gearbox_reference_body.is_empty() {
606 os.write_string(1, &self.gearbox_reference_body)?;
607 }
608 if self.gearbox_ratio != 0. {
609 os.write_double(2, self.gearbox_ratio)?;
610 }
611 os.write_unknown_fields(self.special_fields.unknown_fields())?;
612 ::std::result::Result::Ok(())
613 }
614
615 fn special_fields(&self) -> &::protobuf::SpecialFields {
616 &self.special_fields
617 }
618
619 fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
620 &mut self.special_fields
621 }
622
623 fn new() -> Gearbox {
624 Gearbox::new()
625 }
626
627 fn clear(&mut self) {
628 self.gearbox_reference_body.clear();
629 self.gearbox_ratio = 0.;
630 self.special_fields.clear();
631 }
632
633 fn default_instance() -> &'static Gearbox {
634 static instance: Gearbox = Gearbox {
635 gearbox_reference_body: ::std::string::String::new(),
636 gearbox_ratio: 0.,
637 special_fields: ::protobuf::SpecialFields::new(),
638 };
639 &instance
640 }
641 }
642
643 impl ::protobuf::MessageFull for Gearbox {
644 fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
645 static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
646 descriptor.get(|| super::file_descriptor().message_by_package_relative_name("Joint.Gearbox").unwrap()).clone()
647 }
648 }
649
650 impl ::std::fmt::Display for Gearbox {
651 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
652 ::protobuf::text_format::fmt(self, f)
653 }
654 }
655
656 impl ::protobuf::reflect::ProtobufValue for Gearbox {
657 type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
658 }
659
660 #[derive(::gz_msgs_common::GzMessage)]
661 #[derive(PartialEq,Clone,Default,Debug)]
663 pub struct Screw {
664 pub thread_pitch: f64,
667 pub special_fields: ::protobuf::SpecialFields,
670 }
671
672 impl<'a> ::std::default::Default for &'a Screw {
673 fn default() -> &'a Screw {
674 <Screw as ::protobuf::Message>::default_instance()
675 }
676 }
677
678 impl Screw {
679 pub fn new() -> Screw {
680 ::std::default::Default::default()
681 }
682
683 pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
684 let mut fields = ::std::vec::Vec::with_capacity(1);
685 let mut oneofs = ::std::vec::Vec::with_capacity(0);
686 fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
687 "thread_pitch",
688 |m: &Screw| { &m.thread_pitch },
689 |m: &mut Screw| { &mut m.thread_pitch },
690 ));
691 ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Screw>(
692 "Joint.Screw",
693 fields,
694 oneofs,
695 )
696 }
697 }
698
699 impl ::protobuf::Message for Screw {
700 const NAME: &'static str = "Screw";
701
702 fn is_initialized(&self) -> bool {
703 true
704 }
705
706 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
707 while let Some(tag) = is.read_raw_tag_or_eof()? {
708 match tag {
709 9 => {
710 self.thread_pitch = is.read_double()?;
711 },
712 tag => {
713 ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
714 },
715 };
716 }
717 ::std::result::Result::Ok(())
718 }
719
720 #[allow(unused_variables)]
722 fn compute_size(&self) -> u64 {
723 let mut my_size = 0;
724 if self.thread_pitch != 0. {
725 my_size += 1 + 8;
726 }
727 my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
728 self.special_fields.cached_size().set(my_size as u32);
729 my_size
730 }
731
732 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
733 if self.thread_pitch != 0. {
734 os.write_double(1, self.thread_pitch)?;
735 }
736 os.write_unknown_fields(self.special_fields.unknown_fields())?;
737 ::std::result::Result::Ok(())
738 }
739
740 fn special_fields(&self) -> &::protobuf::SpecialFields {
741 &self.special_fields
742 }
743
744 fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
745 &mut self.special_fields
746 }
747
748 fn new() -> Screw {
749 Screw::new()
750 }
751
752 fn clear(&mut self) {
753 self.thread_pitch = 0.;
754 self.special_fields.clear();
755 }
756
757 fn default_instance() -> &'static Screw {
758 static instance: Screw = Screw {
759 thread_pitch: 0.,
760 special_fields: ::protobuf::SpecialFields::new(),
761 };
762 &instance
763 }
764 }
765
766 impl ::protobuf::MessageFull for Screw {
767 fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
768 static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
769 descriptor.get(|| super::file_descriptor().message_by_package_relative_name("Joint.Screw").unwrap()).clone()
770 }
771 }
772
773 impl ::std::fmt::Display for Screw {
774 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
775 ::protobuf::text_format::fmt(self, f)
776 }
777 }
778
779 impl ::protobuf::reflect::ProtobufValue for Screw {
780 type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
781 }
782
783 #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
784 pub enum Type {
786 REVOLUTE = 0,
788 REVOLUTE2 = 1,
790 PRISMATIC = 2,
792 UNIVERSAL = 3,
794 BALL = 4,
796 SCREW = 5,
798 GEARBOX = 6,
800 FIXED = 7,
802 CONTINUOUS = 8,
804 }
805
806 impl ::protobuf::Enum for Type {
807 const NAME: &'static str = "Type";
808
809 fn value(&self) -> i32 {
810 *self as i32
811 }
812
813 fn from_i32(value: i32) -> ::std::option::Option<Type> {
814 match value {
815 0 => ::std::option::Option::Some(Type::REVOLUTE),
816 1 => ::std::option::Option::Some(Type::REVOLUTE2),
817 2 => ::std::option::Option::Some(Type::PRISMATIC),
818 3 => ::std::option::Option::Some(Type::UNIVERSAL),
819 4 => ::std::option::Option::Some(Type::BALL),
820 5 => ::std::option::Option::Some(Type::SCREW),
821 6 => ::std::option::Option::Some(Type::GEARBOX),
822 7 => ::std::option::Option::Some(Type::FIXED),
823 8 => ::std::option::Option::Some(Type::CONTINUOUS),
824 _ => ::std::option::Option::None
825 }
826 }
827
828 fn from_str(str: &str) -> ::std::option::Option<Type> {
829 match str {
830 "REVOLUTE" => ::std::option::Option::Some(Type::REVOLUTE),
831 "REVOLUTE2" => ::std::option::Option::Some(Type::REVOLUTE2),
832 "PRISMATIC" => ::std::option::Option::Some(Type::PRISMATIC),
833 "UNIVERSAL" => ::std::option::Option::Some(Type::UNIVERSAL),
834 "BALL" => ::std::option::Option::Some(Type::BALL),
835 "SCREW" => ::std::option::Option::Some(Type::SCREW),
836 "GEARBOX" => ::std::option::Option::Some(Type::GEARBOX),
837 "FIXED" => ::std::option::Option::Some(Type::FIXED),
838 "CONTINUOUS" => ::std::option::Option::Some(Type::CONTINUOUS),
839 _ => ::std::option::Option::None
840 }
841 }
842
843 const VALUES: &'static [Type] = &[
844 Type::REVOLUTE,
845 Type::REVOLUTE2,
846 Type::PRISMATIC,
847 Type::UNIVERSAL,
848 Type::BALL,
849 Type::SCREW,
850 Type::GEARBOX,
851 Type::FIXED,
852 Type::CONTINUOUS,
853 ];
854 }
855
856 impl ::protobuf::EnumFull for Type {
857 fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
858 static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
859 descriptor.get(|| super::file_descriptor().enum_by_package_relative_name("Joint.Type").unwrap()).clone()
860 }
861
862 fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
863 let index = *self as usize;
864 Self::enum_descriptor().value_by_index(index)
865 }
866 }
867
868 impl ::std::default::Default for Type {
869 fn default() -> Self {
870 Type::REVOLUTE
871 }
872 }
873
874 impl Type {
875 pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
876 ::protobuf::reflect::GeneratedEnumDescriptorData::new::<Type>("Joint.Type")
877 }
878 }
879}
880
881static file_descriptor_proto_data: &'static [u8] = b"\
882 \n\x13gz/msgs/joint.proto\x12\x07gz.msgs\x1a\x14gz/msgs/header.proto\x1a\
883 \x12gz/msgs/axis.proto\x1a\x12gz/msgs/pose.proto\x1a\x14gz/msgs/sensor.p\
884 roto\"\xbe\x07\n\x05Joint\x12'\n\x06header\x18\x01\x20\x01(\x0b2\x0f.gz.\
885 msgs.HeaderR\x06header\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x12\
886 \x0e\n\x02id\x18\x03\x20\x01(\rR\x02id\x12'\n\x04type\x18\x04\x20\x01(\
887 \x0e2\x13.gz.msgs.Joint.TypeR\x04type\x12\x16\n\x06parent\x18\x05\x20\
888 \x01(\tR\x06parent\x12\x1b\n\tparent_id\x18\x06\x20\x01(\rR\x08parentId\
889 \x12\x14\n\x05child\x18\x07\x20\x01(\tR\x05child\x12\x19\n\x08child_id\
890 \x18\x08\x20\x01(\rR\x07childId\x12!\n\x04pose\x18\t\x20\x01(\x0b2\r.gz.\
891 msgs.PoseR\x04pose\x12#\n\x05axis1\x18\n\x20\x01(\x0b2\r.gz.msgs.AxisR\
892 \x05axis1\x12#\n\x05axis2\x18\x0b\x20\x01(\x0b2\r.gz.msgs.AxisR\x05axis2\
893 \x12\x10\n\x03cfm\x18\x0c\x20\x01(\x01R\x03cfm\x12\x16\n\x06bounce\x18\r\
894 \x20\x01(\x01R\x06bounce\x12!\n\x0cfudge_factor\x18\x0e\x20\x01(\x01R\
895 \x0bfudgeFactor\x12\x1b\n\tlimit_cfm\x18\x0f\x20\x01(\x01R\x08limitCfm\
896 \x12\x1b\n\tlimit_erp\x18\x10\x20\x01(\x01R\x08limitErp\x12%\n\x0esuspen\
897 sion_cfm\x18\x11\x20\x01(\x01R\rsuspensionCfm\x12%\n\x0esuspension_erp\
898 \x18\x12\x20\x01(\x01R\rsuspensionErp\x120\n\x07gearbox\x18\x13\x20\x01(\
899 \x0b2\x16.gz.msgs.Joint.GearboxR\x07gearbox\x12*\n\x05screw\x18\x14\x20\
900 \x01(\x0b2\x14.gz.msgs.Joint.ScrewR\x05screw\x12'\n\x06sensor\x18\x15\
901 \x20\x03(\x0b2\x0f.gz.msgs.SensorR\x06sensor\x1ad\n\x07Gearbox\x124\n\
902 \x16gearbox_reference_body\x18\x01\x20\x01(\tR\x14gearboxReferenceBody\
903 \x12#\n\rgearbox_ratio\x18\x02\x20\x01(\x01R\x0cgearboxRatio\x1a*\n\x05S\
904 crew\x12!\n\x0cthread_pitch\x18\x01\x20\x01(\x01R\x0bthreadPitch\"~\n\
905 \x04Type\x12\x0c\n\x08REVOLUTE\x10\0\x12\r\n\tREVOLUTE2\x10\x01\x12\r\n\
906 \tPRISMATIC\x10\x02\x12\r\n\tUNIVERSAL\x10\x03\x12\x08\n\x04BALL\x10\x04\
907 \x12\t\n\x05SCREW\x10\x05\x12\x0b\n\x07GEARBOX\x10\x06\x12\t\n\x05FIXED\
908 \x10\x07\x12\x0e\n\nCONTINUOUS\x10\x08B\x1a\n\x0bcom.gz.msgsB\x0bJointPr\
909 otosb\x06proto3\
910";
911
912fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
914 static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
915 file_descriptor_proto_lazy.get(|| {
916 ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
917 })
918}
919
920pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
922 static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
923 static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
924 file_descriptor.get(|| {
925 let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
926 let mut deps = ::std::vec::Vec::with_capacity(4);
927 deps.push(super::header::file_descriptor().clone());
928 deps.push(super::axis::file_descriptor().clone());
929 deps.push(super::pose::file_descriptor().clone());
930 deps.push(super::sensor::file_descriptor().clone());
931 let mut messages = ::std::vec::Vec::with_capacity(3);
932 messages.push(Joint::generated_message_descriptor_data());
933 messages.push(joint::Gearbox::generated_message_descriptor_data());
934 messages.push(joint::Screw::generated_message_descriptor_data());
935 let mut enums = ::std::vec::Vec::with_capacity(1);
936 enums.push(joint::Type::generated_enum_descriptor_data());
937 ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
938 file_descriptor_proto(),
939 deps,
940 messages,
941 enums,
942 )
943 });
944 ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
945 })
946}