https://app.theconstructsim.com/l/545cc280/
Temporary link. Expires at 2023-01-18 21:17
The class is initialized with a robot name, and it creates various publishers and subscribers to communicate with the robot. The class has methods to get the distance from an obstacle (using a sonar sensor), get the robot's current position and orientation, set the robot's linear and angular velocity, and get the distance to a flag. The class also has a 'constraint' method that limits the linear and angular velocities sent to the robot to a certain range.
The link leads to the project that includes the launch file the same as file agent_q9.py Additionally the file agent_lab2.py give some results for Lab2