-
Notifications
You must be signed in to change notification settings - Fork 45
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
Remove custom message dependencies #3
base: master
Are you sure you want to change the base?
Conversation
Hi @ekampourakis, |
Hello @MaxMagazin , I'm posting this comment as a reminder for you to review the code changes and notify me about accepting or rejecting them. Thanks. |
src/inc/ma_rrt.py
Outdated
@@ -1,433 +0,0 @@ | |||
""" |
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.
It looks like you wanted to move this file to src folder, but you commited the deleting of this file. Are you sure the package works as it is in your fork (https://github.com/ekampourakis/ma_rrt_path_plan)?
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.
It should complain in line 172 of MaRRTPathPlanNode.py, where
rrt = ma_rrt.RRT
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.
Yes you are absolutely right. It somehow got deleted. I removed the inc
folder and added the file in the src
folder directly because it was complaining. I fixed it in my fork.
## Inputs, outputs, params | ||
|
||
#### Inputs | ||
- rospy.Subscriber("/map", Map, ...) | ||
- rospy.Subscriber("/map", Track, ...) |
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.
Lets have it consistent:
rospy.Subscriber("/track", Track, ...)
@@ -34,6 +37,8 @@ A brief introduction to the main steps of the proposed algorithm is given in my | |||
- rospy.Publisher("/visual/waypoints", MarkerArray, ...) | |||
|
|||
#### Parameters to tune (main) | |||
- `odom_topic` = `/odometry` - The topic to get the odometry information from | |||
- `world_frame` = `world` - The world frame to use for the visualizations |
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.
This parameters list was intended for algorithm parameters. I would leave this info out, or if you think it should be there in ReadMe, please move it to another section called Frames
@@ -3,6 +3,10 @@ | |||
<node pkg="ma_rrt_path_plan" type="main.py" name="ma_rrt_path_plan_node" output="screen"> | |||
<param name="desiredWaypointsFrequency" value="5" type="int" /> | |||
|
|||
<!-- TODO: Comment me out --> | |||
<!-- <param name="odom_topic" value="/odometry/real"/> | |||
<param name="world_frame" value="map"/> --> |
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.
These three lines are confusing.
- For who is this TODO then if it is there
- Generally having the frames specified in launch files is cool, but the frames that you specified are unique to your system (again). For this purposes you could create a separate launch file, but I dont see a reason to have it this repo.
rospy.Subscriber("/map", Map, self.mapCallback) | ||
rospy.Subscriber("/odometry", Odometry, self.odometryCallback) | ||
# rospy.Subscriber("/car_sensors", CarSensors, self.carSensorsCallback) | ||
rospy.Subscriber("/track", Track, self.mapCallback) |
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.
Once it is all about track (instead of map), lets have a new callback name too (self.trackCallback)
|
||
#print "Estimated processing map callback: {0} ms".format((time.time() - start)*1000); | ||
|
||
def mapCallback(self, map): | ||
self.map = map | ||
def mapCallback(self, track): |
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.
trackCallback
def mapCallback(self, map): | ||
self.map = map | ||
def mapCallback(self, track): | ||
self.map = track.cones |
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.
Lets have self.track (instead self.map)
and initialize it with received track object (not with cones directly)
@@ -803,7 +810,7 @@ def getFrontConeObstacles(self, map, frontDist): | |||
frontDistSq = frontDist ** 2 | |||
|
|||
frontConeList = [] | |||
for cone in map.cones: | |||
for cone in map: |
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.
based on my other comments here will be:
for cone in track.cones
note, additional renamings are needed
@@ -818,7 +825,7 @@ def getHeadingVector(self): | |||
def getConesInRadius(self, map, x, y, radius): | |||
coneList = [] | |||
radiusSq = radius * radius | |||
for cone in map.cones: | |||
for cone in map: |
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.
see above:
for cone in track.cones
# rospy.Subscriber("/car_sensors", CarSensors, self.carSensorsCallback) | ||
rospy.Subscriber("/track", Track, self.mapCallback) | ||
rospy.Subscriber(self.odometry_topic, Odometry, self.odometryCallback) | ||
rospy.Subscriber("/dvsim/cmd", Command, self.carSensorsCallback) |
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.
I don't really use the steering angle of the car for path planning (this subscriber was even commented out, but I tried to use this information during my development).
But in your version it appears to be confusing: you subscribe to a topic (which generally means to get something), and you receive a command (which generally would be understood as control request).
Maybe message should be named a bit differently, what about CarState?
Hey @ekampourakis, I added a few comments about the changes. My main concern is that some your changes are still unique and specific to your system, which do not help to improve generalization of the package. Although, the messages you created are the nice contribution, thank you for that. |
@MaxMagazin Thanks for all the comments. I will look at them all and try to correct them but it will take some time as I'm working on many other projects as well. Don't close the PR just yet if you don't need to and I'll keep updating my fork until all your suggestions are implemented. |
As mentioned in this issue:
Please review this PR and let me know.
Best regards,
Manos