Rosject Part 3, my solution NO CODE

Well i’like to explain my solution and read what you think about it:
First I make the message and make it ready to use it, then the client and the server for check that.
In the client side there are some functions (done, active and feedback) like in the examples of the course and in the server side i have a class with the action client and a subscriber for read the odom topic.

The client was receiving feedback and result and the server was seending it all well so my principal doubt is:
For check that the robot has make a entire lap i take and initial x,y from odom.position and i do a while checking if the actual x,y of the robot is near it adding and subtracting a little amount, basically for let a little margin and using floor because they are floats.

What do you think about it? It is a good solution? Is there another solution better or something that could be better?

Hi @AlfMachine ,

Your flow of ideas seem to be in the right path. Even I did the lap checking the same way, providing some margins in x and y axes from the initial odom detected values.

I would still recommend you to first get the Action client and server working before you actually factor in the lap position check logic in your code.

Otherwise, in my opinion, you are on the right track!

Best regards,
Girish

1 Like

The server and the client are working as espectec , the message is working, the client is receiving the feedback and the result and the server was at that point seending it all well so my principal doubt was the lap check.
Thank you very much!

@AlfMachine ,

Nice that you already have it working. Why I said to have it working is because you will face some challenges in setting the initial point for the lap and actually making the robot to stop close to that initial point to finish the lap.
That is out of my own experience, although others may have done it easier.

Regards,
Girish

1 Like

This topic was automatically closed after 6 days. New replies are no longer allowed.