Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ekampourakis
Copy link

As mentioned in this issue:

  • Removed all the custom message dependencies and replaced them with more generic messages from my vehicle which I also included. Please see the README.
  • Added 2 more parameters to make the package more versatile for different TF configurations.
  • Updated the README.

Please review this PR and let me know.

Best regards,
Manos

@MaxMagazin
Copy link
Owner

Hi @ekampourakis,
thanks for uploading your updates, I took a quick look on them. Generally I am fine with them, but have a couple of comments. Unfortunately I am a bit busy now with my work, will finish the code review in the weekend. Cheers.

@ekampourakis
Copy link
Author

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.

@@ -1,433 +0,0 @@
"""
Copy link
Owner

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)?

Copy link
Owner

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

Copy link
Author

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, ...)
Copy link
Owner

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
Copy link
Owner

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"/> -->
Copy link
Owner

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.

  1. For who is this TODO then if it is there
  2. 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)
Copy link
Owner

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):
Copy link
Owner

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
Copy link
Owner

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:
Copy link
Owner

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:
Copy link
Owner

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)
Copy link
Owner

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?

@MaxMagazin
Copy link
Owner

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.
If you don't feel like contributing more, I could still merge the PR as it is right now, but most probably will update/revert/improve a couple of your changes later. No worries, I would still mention you in contributors list later.

@ekampourakis
Copy link
Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants