How do I make a ROS car drive 0.5 meter along the roadside?
I am learning ROS car, which is mainly used to simulate self-driving. Now there is a lidar on the ROS car.
For example, the right side of the ROS car is about 1 meter away from the roadside. I can also get the lidar on the right side of the car. The distance of the roadside returned is about 50 points. These 50 distances are the distance from the lidar to the roadside, but the problem is that I want to know how to measure the angle between the body of ROS car and the roadside. I want the ROS car running parallel to the roadside.
For example, the distance from the roadside is always 0.5 meters, but if the mode of the roadside distance returned by 50 points is 1 meter, it means that I am a little far from the roadside. At this time, I want to adjust the position of the ROS car,to make the ROS car closer to the roadside.
If a person is driving, then the action of the person is to turn the steering wheel, but the ROS car is not a person. At this time, the ROS car needs to simulate human actions, the vehicle in my country is driving on the right side. My idea is that I first need to make the ROS car turn to a certain angle to the right, such as 15 degrees to the right, and then drive 10 cm forward. Then turn it 15 degrees to the left, so that the ROS car must be closer to the roadside, and then I use lidar to measure the mode of those 50 points. In theory, it will be less than 1 meter, because it is indeed closer to the road. Side. This is a rude method, but I can’t know the true angle of the ROS car from the roadside. If I know the actual angle of the current ROS car from the roadside, then it is more reliable to control the change of the angle.
What should I do? How to measure the angle of a ROS car to the roadside?
Status:
Open Feb 16, 2020 - 11:11 AM
Add New Comment