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

[SW-1764] allow use of preferred_odom_frame parameter #538

Merged
merged 5 commits into from
Dec 19, 2024

Conversation

khughes-bdai
Copy link
Collaborator

@khughes-bdai khughes-bdai commented Dec 18, 2024

Change Overview

The preferred_odom_frame parameter is supposed to let you chose whether "odom" (default) or "vision" frame is used as the base frame in the /odometry topic. On main right now this is hardcoded to "odom" in the launchfile

This PR allows you to actually change this parameter. It also introduces some logic to deal with getting the velocity of the body in either the "odom" or "vision" frame, depending on which choice is selected. There is also some minor launchfile cleanup here.

related to: #29, and takes a lot of work from #416

Testing Done

  • default launch: nothing changes, and "SpotName/odom" is the parent frame in /SpotName/odometry topic
  • with preferred_odom_frame: "vision" parameter set via config file: "vision" is the parent frame in /SpotName/odometry
  • modified unit tests to test cases of getting body velocity in the vision frame

Copy link
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 12402142533

Details

  • 12 of 12 (100.0%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.08%) to 51.261%

Files with Coverage Reduction New Missed Lines %
spot_driver/src/conversions/robot_state.cpp 1 94.76%
Totals Coverage Status
Change from base Build 12396615564: 0.08%
Covered Lines: 1952
Relevant Lines: 3808

💛 - Coveralls

@@ -116,6 +116,18 @@ inline void addBodyVelocityOdom(::bosdyn::api::KinematicState* mutable_kinematic
velocity_angular->set_z(rz);
}

inline void addBodyVelocityVision(::bosdyn::api::KinematicState* mutable_kinematic_state, double x, double y, double z,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Teeny-tiny comment. I don't think it really matters since they're primitives, but since you added const to the boolean function arguments above, is const something relevant here too?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yeah I just based this on the function already above this, which also doesn't use const. Probably wouldn't change anything if i were to add it here

Copy link
Collaborator Author

khughes-bdai commented Dec 19, 2024

Merge activity

  • Dec 19, 10:21 AM EST: A user started a stack merge that includes this pull request via Graphite.
  • Dec 19, 10:21 AM EST: A user merged this pull request with Graphite.

@khughes-bdai khughes-bdai merged commit 3c2f3c9 into main Dec 19, 2024
4 of 5 checks passed
@khughes-bdai khughes-bdai deleted the khughes/fix_preferred_odom_frame branch December 19, 2024 15:21
AngelRodriguez8008 added a commit to AngelRodriguez8008/spot_ros2 that referenced this pull request Dec 27, 2024
* main:
  [SW-1106] using custom launch actions from synchros2 (bdaiinstitute#537)
  [SW-1764] allow use of preferred_odom_frame parameter (bdaiinstitute#538)
  [dependabot] Bump ros_utilities from `5aa699a` to `539c962` (bdaiinstitute#535)
  [SW-1658] Allow body frame to be root of TF tree (bdaiinstitute#536)
  [N/a] fix for launching the driver without the gripper (bdaiinstitute#534)
  [MAPLE-681] Add robot_description_package as parameter to driver launch (bdaiinstitute#531)
  [dependabot] Bump ros_utilities from `e4d5c80` to `5aa699a` (bdaiinstitute#530)
  [dependabot] Bump ros_utilities from `02ca14e` to `e4d5c80` (bdaiinstitute#525)
  [dependabot] Bump ros_utilities from `5258a5a` to `02ca14e` (bdaiinstitute#524)
  [dependabot] Bump spot_wrapper from `76e522b` to `c78ebfb` (bdaiinstitute#523)
  [dependabot] Bump ros_utilities from `23a79c9` to `5258a5a` (bdaiinstitute#522)
  [N/A] bugfix: give new xacro arguments default values (bdaiinstitute#521)
  [SW-1507] gripperless URDF for Spot (bdaiinstitute#520)
  [SW-1539] don't publish images from hand camera if gripperless param set (bdaiinstitute#518)
  [SW-1466] ability to take joint gains in through a parameter file (bdaiinstitute#516)

# Conflicts:
#	spot_driver/spot_driver/spot_ros2.py
AngelRodriguez8008 added a commit to AngelRodriguez8008/spot_ros2 that referenced this pull request Dec 27, 2024
* main:
  [SW-1106] using custom launch actions from synchros2 (bdaiinstitute#537)
  [SW-1764] allow use of preferred_odom_frame parameter (bdaiinstitute#538)
  [dependabot] Bump ros_utilities from `5aa699a` to `539c962` (bdaiinstitute#535)
  [SW-1658] Allow body frame to be root of TF tree (bdaiinstitute#536)
  [N/a] fix for launching the driver without the gripper (bdaiinstitute#534)
  [MAPLE-681] Add robot_description_package as parameter to driver launch (bdaiinstitute#531)
  [dependabot] Bump ros_utilities from `e4d5c80` to `5aa699a` (bdaiinstitute#530)
  [dependabot] Bump ros_utilities from `02ca14e` to `e4d5c80` (bdaiinstitute#525)
  [dependabot] Bump ros_utilities from `5258a5a` to `02ca14e` (bdaiinstitute#524)
  [dependabot] Bump spot_wrapper from `76e522b` to `c78ebfb` (bdaiinstitute#523)
  [dependabot] Bump ros_utilities from `23a79c9` to `5258a5a` (bdaiinstitute#522)
  [N/A] bugfix: give new xacro arguments default values (bdaiinstitute#521)
  [SW-1507] gripperless URDF for Spot (bdaiinstitute#520)
  [SW-1539] don't publish images from hand camera if gripperless param set (bdaiinstitute#518)
  [SW-1466] ability to take joint gains in through a parameter file (bdaiinstitute#516)

# Conflicts:
#	spot_driver/spot_driver/spot_ros2.py
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.

5 participants