rursprung / fhgr-mrproj2

A ROS 1 based tank with a LIDAR.
GNU General Public License v3.0
2 stars 2 forks source link

Add camera link optical #40

Closed joel5399 closed 1 year ago

joel5399 commented 1 year ago

I just realized, that Gazebo uses the standard coordinate system with x forward, while most image processing software (including OpenCV) use the standard where x is to the right, y is down, and z is forward. Therefore, I corrected this in the simulation and added a new link (camera_link_optical) and linked it.

joel5399 commented 1 year ago

You're correct - I did not intend for the "smt_camera_controller" to be included in this pull request. I was working on it separately on another local branch and created a new branch specifically for implementing the new link. Am I understanding correctly that all commits, regardless of which local branch they were committed from, are included in the pull request?

rursprung commented 1 year ago

Am I understanding correctly that all commits, regardless of which local branch they were committed from, are included in the pull request?

no, a PR only includes the commits from the remote branch (i.e. the branch on GH) from which you're creating the PR. what's in that branch depends on what you pushed (usually you just push the state of your local branch 1:1 to the remote branch).

if you used multiple local branches it might be that you didn't start off from upstream/master but didn't specify any starting point (which keeps your current HEAD which might then have been the camera controller).

it seems that now you've only pushed the smt_camera_controller rather than the other commit. and i just realised that i saw the history wrong before as your commit adding the new (empty) package was the first one and the fix you wanted to have in the PR was the second one. i.e. you need to change things around a bit. you can do this by doing git rebase -i upstream/master locally and then just swapping the order of the two commits (as they're not based on each other; keep both at pick but move them, if you're in VIM you can just stay in command mode (the default mode when VIM opens) on the first line use dd to delete a line and then press p again to paste it on a new line (which makes it the second line because the previously second line moved up to become the first line). after that :wq (or :x; whichever you prefer) executes this. once done, you can do the previously mentioned git push -f HEAD~:add-camera-link-optical which will now really only push that commit to the branch for this PR. simple, isn't it? 😆 or, slightly simpler, if you don't need the commit adding the controller (because you already have it in another branch) you can just delete that line and then continue directly (and of course then don't push HEAD~ but just the whole thing)