Robotics StackExchange | Archived questions

how to make the two callback functions in ros2 action server communicate with each other?

Hi, I need your help.

I am learning ROS2 foxy action server on Ubuntu 20.04 and I have a class to move turtlesim from point(5.544,5.544) to a point(x,y).

There are two callback functions in the class: one is self.moveTopoint() in a timer and another is self.executecallback() in action server creation. Different from FibonacciActionServer example, the computation is not in self.executecallback(), but in self.moveTopoint(). After running the package and node I could not get the result back,but with no errors.

My question is that how to make the two callback functions communicate with each other so that result.endpointx in self.executecallback is assigned the self.resultx in self.moveTopoint? Thank you.

Asked by marklee56826 on 2021-12-07 22:32:48 UTC

Comments

Answers