Segment.py 343 B

1234567891011121314
  1. # 导入所需的消息类型
  2. from geometry_msgs.msg import Point
  3. # 创建一个 Point 对象,并设置其 x、y、z 坐标值
  4. point = Point()
  5. point.x = 1.0
  6. point.y = 2.0
  7. point.z = 3.0
  8. # 打印 Point 对象的内容
  9. print("Point: ", point)
  10. print("X coordinate: ", point.x)
  11. print("Y coordinate: ", point.y)
  12. print("Z coordinate: ", point.z)