So I just realised that I have 3 nodes and only one of them was named “topics_quiz_node” and not the one using the /scan topic. Maybe this is the problem so I named the 3 of them “topics_quiz_node” (which I don’t think it is a good way to go) but now I can not run the autograder again.
What do you think ? Is it possible to reset it please ?
It will be easier I guess. But yes I am launching the 3 nodes with topics_quiz.launch.py since I have only one launch file.
Please tell me what you think. My code follows the following architecture & logic:
I have 3 classes:
MoveRobot: contains the publisher to /vel_cmd
ScanSubscruber: contains the subscriber to /scan
ExploreWorld: contains a shared pointer of each object of the classes above and spins each node in a single thread. A third thread launched a collisionAvoidance function that gets the scan values of the scanSubscribers, sets the velocity following the logic needed to avoid an object and sets the velocities inside moveRobot through a setter.
Tell me what you think but it is working pretty well so I don’t see why I should change anything, but happy to have any input.
Thank you for having assigned 2 more tries. I have obtained 10/10 now and renaming the 3 nodes with the same name worked!
However, why it is better to check only 3 laser dots (left, front and right) instead of defining a percentage of the laser dots for each direction (i.e the 45% of the laser dot starting on the left are checked for any obstacles, then 10% of the dots on the front and the 45% remaining on the right ?
Checking only 3 dots is dangerous and make the collision avoidance system failing in case of a high convex object.
Am I missing something ?
Also based on the theorie (see picture), each node should be assign to a single module. The example even explicitly says that we should have different node for controlling the wheel motors, reading the laser values (i.e the exercise). Maybe you should consider to change the autograder.
For this simple case, checking 3 dots should be enough, but it’s not necessarily better than your solution, which might be more accurate in high convex objects.
This might apply in a more complex system.
Using a single node for the topics quiz is good enough, but not better than using multiple nodes (which is also fine).