-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added new message types Trajectory and Navigation Point. #515
Changes from 1 commit
cfbd170
a4355e7
668b6d7
63b4e0a
5c37dfc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
geometry_msgs/Point position | ||
float32 speed | ||
uint8 behaviour | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Verify behaviour field constraints needs update The
🔗 Analysis chainVerify behaviour field constraints The behaviour field should align with the Behaviour enum in localplanning/utils.py. Let's verify the implementation and usage. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Find and analyze the Behaviour enum definition and its usage
echo "Searching for Behaviour enum definition:"
rg -p "class Behaviour" --type py
echo -e "\nChecking for behaviour field usage:"
rg -p "behaviour.*=.*\d+" --type py
Length of output: 420 Script: #!/bin/bash
# Let's examine the Behaviour enum definition and its values
echo "Checking Behaviour enum implementation:"
rg -A 10 "class Behaviour" code/planning/src/local_planner/utils.py
# Let's also check for any other usage of behaviour field
echo -e "\nChecking for other behaviour field references:"
rg -i "behaviour" --type py
Length of output: 44713 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Header header | ||
planning/NavigationPoint[] navigationPoints |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
import math | ||
import carla | ||
import os | ||
from enum import IntEnum | ||
|
||
# import rospy | ||
|
||
|
@@ -23,6 +24,12 @@ | |
EARTH_RADIUS_EQUA = 6378137.0 | ||
|
||
|
||
# getattr(Behaviour, "name").value returns the ID | ||
# Behaviour(id) returns Behaviour.NAME | ||
class Behaviour(IntEnum): | ||
CRUISING = 0 | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Additional behavior states needed for ACC functionality The review comment is correct. The current implementation in
These behaviors are currently managed through conditional logic but should be explicitly defined as states in the
🔗 Analysis chainConsider adding more behavior states for ACC functionality. The current implementation only includes
This seems incomplete for the ACC changes mentioned in issue #490. Let's check if these behaviors are defined elsewhere: Consider creating a comprehensive state machine for ACC behaviors to ensure all required states are properly handled. Let me search for more context about ACC implementation and state transitions. Let me check the ACC implementation and its state handling. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Search for other behavior/state definitions related to ACC
rg -i "class.*(behaviour|behavior|state).*enum"
rg -i "ACC.*state"
Length of output: 729 Script: #!/bin/bash
# Search for ACC related files and implementations
fd -e py -e cpp -e hpp -e h . | xargs rg -l "ACC|adaptive.*cruise|cruise.*control" -i
# Search for state transitions or behavior changes
rg -i "(state.*transition|behavior.*change|mode.*switch)" -A 3
Length of output: 40346 Script: #!/bin/bash
# Check ACC implementation and state handling
cat code/planning/src/local_planner/ACC.py
# Look for any other behavior/state definitions in the codebase
ast-grep --pattern 'class $_ {
$$$
FOLLOWING = $_
$$$
}'
ast-grep --pattern 'class $_ {
$$$
STOPPING = $_
$$$
}'
Length of output: 10124 |
||
|
||
def get_distance(pos_1, pos_2): | ||
"""Calculate the distance between two positions | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Remove unnecessary
rosout
dependencyThe
rosout
package is a core ROS functionality and doesn't need to be explicitly listed as a dependency. It's automatically available to all ROS nodes.find_package(catkin REQUIRED COMPONENTS perception rospy - rosout roslaunch std_msgs geometry_msgs message_generation )
📝 Committable suggestion