Hi The Construct team,
I am working on the course project for ROS2 Basics in 5 Days [both Python and C++].
I have completed my code for both Py and C++ and works well in Simulation.
My C++ code works well in Real Robot - tested 3 times [1 time in consecutive 3 session booking].
My Python program fails terribly (although it does not fail in the simulation).
The problem is specifically in the “FindWall” section of the program.
Here are my steps:
- Find the direction of the wall and position facing the wall in the front of the robot and stop - WORKS !
- Move close to wall until distance in front is less than 0.3 meters and stop - FAILS !
- Align the front-right range facing the wall and stop - FAILS ! [since step 2 failed]
The problem is, in step two, the robot should proceed moving front until distance is less than 0.3 meters and then it should immediately stop when distance < 0.3m.
But the robot keeps continuously moving and does not stop. But somehow, my program succeeds with step two and and three, but the robot has never stopped moving front.
I have checked if the laser scanner is working or not - and it is working fine [the laser scan callback works fine].
For the stop function, initially I published zeros to /cmd_vel
just once, but now I am using a for loop for 100 times. Still robot does not stop.
My queue size for publisher and subscriber (qos_profile message depth) is 10 for both.
The python program logic is exactly same as my C++ version and my C++ works successfully.
Could someone look into this issue please?
Thanks in advance.
Girish
PS: If you need my code I can provide it here.