You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement node change_lane in package selfie_control, which will be responsible for publishing the setpoint for PID controller (#30) depending on which lane the vehicle is supposed to drive at given moment. The setpoint itself is a linear offset (in meters) from the center line. For now a fixed lane width is assumed. By default the vehicle should drive on the right lane.
The node should implement a ChangeLane ActionServer named change_lane. The action handling flow should look like follows:
New goal is received
If target lane is the same as the one we're currently on, the goal is rejected and we do not proceed further.
Otherwise, the goal is accepted, setpoint is changed accordingly and the correct turn indicator is turned on. We keep track of the vehicle's position on the road.
Once the vehicle reaches the center of the target lane (within marigin of error), the goal is marked as succeeded and the turn indicator is turned off.
~lane_width (float)
Assumed lane width (in meters).
~error_margin (float)
Maximum distance from center of the target lane (in meters) until the lane change maneuver is considered complete.
Subscribed topics
position_offset (std_msgs/Float64)
Current distance from the center line (in meters). Positive offset is to the left.
Published topics
target_offset (std_msgs/Float64)
Desirable distance from the center line (in meters), used as setpoint for PID controller. Positive offset is to the left. The value should be set depending on which lane the vehicle is supposed to drive on at given moment.
left_turn_indicator (std_msgs/Bool) right_turn_indicator (std_msgs/Bool)
Flags used to turn on left and right turn indicator, respectively. Should be set to true for the whole period during which the indicator should be turned on - blinking will be handled in a separate program.
The text was updated successfully, but these errors were encountered:
@Goldob
Please look at test node. I have implemented the demo version of code. I need to know if this seems ok.
Please do:
A) branch change_line
B) roscore
rosrun selfie_control demo_change_lane _lane:=l (or _lane:=r, another command window, should run commands with l or r argument)
If this is what was needed we could talk about what should be pushed to develop branch (I don't know about demo nodes and I will delete ROS_INFO also inside it couse this is only for demo).
Implement node
change_lane
in packageselfie_control
, which will be responsible for publishing the setpoint for PID controller (#30) depending on which lane the vehicle is supposed to drive at given moment. The setpoint itself is a linear offset (in meters) from the center line. For now a fixed lane width is assumed. By default the vehicle should drive on the right lane.The node should implement a ChangeLane ActionServer named
change_lane
. The action handling flow should look like follows:Refer to actionlib package documentation to learn more about actions, especially the section on goal state transitions.
change_lane
Parameters
~lane_width
(float)Assumed lane width (in meters).
~error_margin
(float)Maximum distance from center of the target lane (in meters) until the lane change maneuver is considered complete.
Subscribed topics
position_offset
(std_msgs/Float64)Current distance from the center line (in meters). Positive offset is to the left.
Published topics
target_offset
(std_msgs/Float64)Desirable distance from the center line (in meters), used as setpoint for PID controller. Positive offset is to the left. The value should be set depending on which lane the vehicle is supposed to drive on at given moment.
left_turn_indicator
(std_msgs/Bool)right_turn_indicator
(std_msgs/Bool)Flags used to turn on left and right turn indicator, respectively. Should be set to
true
for the whole period during which the indicator should be turned on - blinking will be handled in a separate program.The text was updated successfully, but these errors were encountered: