I just came across this great code base, and had successfully run the example of sitl_trajectory_track_circle.launch, however when I started to go through the implementation of the trajectory_publisher.cpp, I am confused with the service defined in trajectory_publisher. It looks like the circle example is publishing the FlatTarget message using the refloop_timer_ callback, and the target reference is updated every time before message is published.
The ways to update start_time_ are through either triggerCallback or motionselectorCallback, but the service is not triggered anywhere in the code, either in the geometric_controller.cpp.
The part that I am not sure is where the start_time_ is initialized in the code?
Maybe I fundamentally misunderstood the mechanism of the code , could you provide some explanation on how the trajectory message is published using the trajectory publisher?
@nlpng The service is there to give the possibility that either an external node or even directly from a service caller in rqt can trigger a trajectory.
I just came across this great code base, and had successfully run the example of
sitl_trajectory_track_circle.launch
, however when I started to go through the implementation of thetrajectory_publisher.cpp
, I am confused with the service defined in trajectory_publisher. It looks like the circle example is publishing the FlatTarget message using therefloop_timer_
callback, and the target reference is updated every time before message is published.The ways to update
start_time_
are through eithertriggerCallback
ormotionselectorCallback
, but the service is not triggered anywhere in the code, either in thegeometric_controller.cpp
.The part that I am not sure is where the
start_time_
is initialized in the code?Maybe I fundamentally misunderstood the mechanism of the code , could you provide some explanation on how the trajectory message is published using the trajectory publisher?