Marcus Grieger hace 1 año
padre
commit
aa51eb9e33
Se han modificado 1 ficheros con 8 adiciones y 0 borrados
  1. +8
    -0
      hexapod_python/jtc_test.py

+ 8
- 0
hexapod_python/jtc_test.py Ver fichero

@@ -3,6 +3,8 @@ from builtin_interfaces.msg import Duration
import rclpy
from rclpy.node import Node

import time

class JTCPublisher(Node):
def __init__(self):
super().__init__('jtc_publisher')
@@ -38,6 +40,12 @@ class JTCPublisher(Node):
JointTrajectoryPoint (time_from_start = Duration(sec = 10), positions =[direction * 0, direction * -1.4, direction * 0]),
]
)
for tag in self.group_tags_:
while self.count_subscribers(f"/{tag}_group_controller/joint_trajectory") == 0:
time.sleep(0.1)

for tag in self.group_tags_:
self.publisher_[tag].publish(trajectory[tag])

def main(args = None):


Cargando…
Cancelar
Guardar