Closed geopimik closed 7 months ago
The catkin_install_python takes care of the python version dependency and appends the shebag line while building the package. Should I add the shebang line on top of the controller node still?
Removed the /initialpose subscription.
Removed unnecessary TODO
Reorganized the program structure to loop over the waypoints only once https://github.com/AnishShr/autoware_mini_practice/blob/709fa2c8c34e524dc4770b6a334911bac1b3dd6d/practice_3/nodes/control/pure_pursuit_follower.py#L37-L41
computed the velocity and stored in the local variable. In the end of the path_callback, assigned them to class variables https://github.com/AnishShr/autoware_mini_practice/blob/709fa2c8c34e524dc4770b6a334911bac1b3dd6d/practice_3/nodes/control/pure_pursuit_follower.py#L55-L63
Generally, arctan2 should hold all properties that arctan holds. In theory, arctan2 is used for ranges between -180 and 180, while arctan is used for ranges -90 to 90. source: stackoverflow_thread. And for ld, the lookahead distance would be the distance from ego-vehicle's current position in the path to the lookahead point in the trajectory. I believe this is what was supposed to be done. Or did I misunderstood your question?
Added the fill_value and bounds_error values while computing the velocities fro distance. bounds_error will raise an error if the input distance is out of bounds from the limits fill_value will set the velocity value to be 0 for the points outside the bounds of distance inputs https://github.com/AnishShr/autoware_mini_practice/blob/709fa2c8c34e524dc4770b6a334911bac1b3dd6d/practice_3/nodes/control/pure_pursuit_follower.py#L55-L59
Latest commit: latest commit
catkin_install_python
personallyld
in original formula, but it seems to produce the same thing as atan2(the formula without dividing with ld, ld). Anyway it seems correct, I was just a bit confused at first.ld
,inside the paranthesis there are 2 values.
https://github.com/AnishShr/autoware_mini_practice/blob/709fa2c8c34e524dc4770b6a334911bac1b3dd6d/practice_3/nodes/control/pure_pursuit_follower.py#L90https://numpy.org/doc/stable/reference/generated/numpy.arctan2.html
I guess you were confused by how numpy provides the API for arctan and arctan2. It is slightly different, but eventually provides the same result.
Shapely should not give a distance that is below 0 or above the length of the line string, but lets say that we change something there or it somehow gives a bit longer value. The bounds_error
regulates what happens then:
fill_value
It can be used both ways! Depends what you want to achieve, how important is to know about it etc... Currently I asked to not raise an error, but again it depends what we want to achieve... Important is to understand what is happening in the code.
OK
Please fix the following
/initialpose
and use it in the follower. Having an initial pose is specific to the simulation. We need to place the ego vehicle somewhere so that the simulator can start from somewhere. In real world settings, the localizer provides the ego vehicle location, and we will get the location from the/localization/current_pose
. We should rely only on that topic to make the follower more universal. After the initial pose is set the simulator substitutes the localizer and starts to publish the/localization/current_pose
. And in real world settings we won't have the initial pose. So remove the initial pose from the follower node. https://github.com/AnishShr/autoware_mini_practice/blob/3c203454f6dc783e44df131b431797638f767bc9/practice_3/nodes/control/pure_pursuit_follower.py#L33Please answer
ld
https://github.com/AnishShr/autoware_mini_practice/blob/3c203454f6dc783e44df131b431797638f767bc9/practice_3/nodes/control/pure_pursuit_follower.py#L88