osrf / vorc

Virtual Ocean Robot Challenge (VORC) resources
Apache License 2.0
38 stars 11 forks source link

Added stationkeeping task. #17

Closed crvogt closed 4 years ago

crvogt commented 4 years ago

Added latitude and longitude values to marina.xacro. The values were taken from sandisland.xacro lat/lon.

    <spherical_coordinates>
      <surface_model>EARTH_WGS84</surface_model>
      <world_frame_orientation>ENU</world_frame_orientation>
      <latitude_deg>21.30996</latitude_deg>
      <longitude_deg>-157.8901</longitude_deg>
      <elevation>0.0</elevation>
      <!-- For legacy gazebo reasons, need to rotate -->
      <!--<heading_deg>180</heading_deg>-->
    </spherical_coordinates>

Added vorc topic, though wind speed and direction topics still show VRX. Haven't yet figured out where to add custom topics for wind.

/vorc/debug/contact
/vorc/station_keeping/goal
/vorc/station/keeping/pose_error
/vorc/station_keeping/rms_error
/vorc/task/info
/vrx/debug/wind/direction
/vrx/debug/wind/speed

Modified launch and world files to use cora platform, and marina location.

mabelzhang commented 4 years ago

Custom wind topic can be specified like in this example: https://github.com/osrf/vorc/pull/11

crvogt commented 4 years ago

Custom wind topic can be specified like in this example: #11

Ah okay. Since it occurs in the marina.world.xacro, will that be merged or should I make the change in my own code?

mabelzhang commented 4 years ago

It has already been merged. You should have it if you merge with master. (I haven't done a full review yet, just saw the comment.)

crvogt commented 4 years ago

Thanks, fixed mine! Also combined the two tasks. Though, noticing I should have merged master with my branch and pushed, rather than merged into master :/ ...

mabelzhang commented 4 years ago

Hmm, I'm seeing this PR says it's merged, but the other one says it's closed but not merged? Are you saying both have been combined and pushed into master? It is fine - I can sort it out, just need to make sure I understand correctly.

For future reference, never push to the master branch directly... which sounds like you figured out :) Always make sure you're on a feature branch, and that you only push to the feature branch. The feature branch is reviewed and merged into master only via the GitHub GUI in a pull request, for tractability and visibility.

crvogt commented 4 years ago

Hmm, I'm seeing this PR says it's merged, but the other one says it's closed but not merged? Are you saying both have been combined and pushed into master? It is fine - I can sort it out, just need to make sure I understand correctly.<

Oh, so the only one I meant to merge was the one that I pushed directly to master. The other two PRs I wanted to delete because I'd made the change to include the wind topic and combined both task branches. I thought by closing them I'd avoid deleting the comments and they wouldn't merge.

For future reference, never push to the master branch directly<

Yeah, I figured out that one pretty quick. Mistakenly took 'merge with master' to mean 'merge my code into master'.

Sorry for making more work :/

mabelzhang commented 4 years ago

No worries, my bad for unclear terminology - I think the correct thing I should have said is is merge "from" master.

I'll test out the master branch, probably tomorrow, and open a PR if there's something that needs to be changed. Otherwise thanks for putting in the two tasks!

mabelzhang commented 4 years ago

I was able to test it. Works for me.

To test this task:

$ roslaunch vorc_gazebo station_keeping.launch

Check the pose error:

$ rostopic echo /vorc/station_keeping/pose_error
data: 35.0156621389

Pause Gazebo simulation, move the boat to the red marker by dragging or by entering xy position (41.389682, -360.951298). Check pose error again, and it should be smaller:

$ rostopic echo /vorc/station_keeping/pose_error
data: 1.60657305099