ori-drs / spot_ros

Other
2 stars 0 forks source link

Make the camera static transforms publish from within the driver #5

Closed heuristicus closed 3 years ago

heuristicus commented 3 years ago

Currently we have set up the static transforms for the cameras in the urdf. This is necessary because by default the cameras are non-static transforms which are published when the driver retrieves an image, at https://github.com/ori-drs/spot_ros/blob/master/spot_driver/scripts/spot_ros.py#L172-L188, with tfs being generated by https://github.com/ori-drs/spot_ros/blob/master/spot_driver/scripts/ros_helpers.py#L95-L127.

Having non-static transforms means that there is a lag between body motion and the transforms, which is likely a problem for anything that needs accurate camera transforms.

Having the static transforms in the urdf is not ideal because this means that it has to be present for every instance of spot, because the cameras may be calibrated differently by boston dynamics for each spot. Instead, we could compute the transforms at runtime, and since they should always be static, once we have an initial value, we just take that and create a static transform publisher which publishes that transform until the driver exits.

heuristicus commented 3 years ago

https://github.com/clearpathrobotics/spot_ros/pull/31 does this.