ROS action or ros topic?

Hi, i have to develop a program to convert laser scan 2d to 3d point cloud using stepper (joint_position) actuators from 0 to 90 degree (with position feedback).
If i use ROS action for move the stepper, i can move the stepper and receive the position feedback, and i want it to cancel it everytime i want.
If i use ROS action for converting , i can convert laserscan 2d and wait until it get the cloud and i also want to cancet it everytime i want.

I was wondering, do i have to create the ROS action for each separate program? a node with ROS action to move the joint_position and a node with ROS action to convert laser scan to point cloud. Or i just need a simple ros topic?

Thanks in advance!

Hi,

You can do it either way. The benefit of using actions is that they are used for sensors that determine robot movement or processes that run for a longer like continuous perception. I recommend keeping your code modular, with two actions like you suggested. This is helpful to identify errors once you run into them. However, if your program is simple and doesn’t have many different elements, using topics will give you the same result.

Rodrigo

btw, can we create action server and action client (for another action server) in one node?

Yes you can, but I recommend you keep them separate for when you have to debug.