Closed gaya- closed 8 years ago
Oh, GitHub even remembered the old discussions, nice.
@gaya- With the SAPHARI review over, I will look into this this week. Is this PR still current? I'll see about this merge conflict that github is reporting.
Oh, wow, I didn't notice the merge conflict, it's something new I guess. The PR is current, I've been testing this for some time now.
The conflict is because of the last commit on the master branch from 8 days ago. The file corresponding to cl_tf2/src/message-conversions.lisp
is cl_transforms_stamped/src/ros-message.lisp
in this PR. I'll leave the merging to you then as you're the author of the commit.
No conflicts.
Will need to merge https://github.com/ros/roslisp_common/pull/32 first though (for the sake of cleanness).
@gaya- Thanks for unifying the two interface. Obviously, I have done this differently. But I think we can also continue with your suggestion. Thanks for putting in the work!
Thanks for merging this PR.
Here is a final summary of what changed for those interested.
The point of the Pull Request was to create a unified interface for the two TF implementations - cl_tf
and cl_tf2
for TF and TF2 correspondingly - such that the user code could be independent of the actual implementation. That is, the user writes their code using the interface (implemented mostly through generic functions) and later runs the code using a specific instance of TF.
cl_tf_datatypes
package got renamed into cl_transforms_stamped
.
cl_tf_datatypes
contained the definitions of stamped datatypes pose-stamped
, point-stamped
, and stamped-transform
. The name of the package was chosen analogous to cl_transforms
package, which only contained the row pose
, point
datatypes etc.stamped-transform
datatype got deprecated in favor of trnasforms-stamped
for the sake of consistencycl_tf
for converting Lisp datatypes to/from ROS messages got merged with the corresponding functions from cl_tf2
and were moved to cl_transforms_stamped
.
The functions you should use now are to-msg
and from-msg
if the conversion is unambiguous. Otherwise, there are specific functions. There is also restamp-msg
to change the stamp in the header.cl_tf
and cl_tf2
got merged and put into cl_transforms_stamped
.lookup_transform
function now has a new parameter, timeout
, which is the time for which to wait for a transform to become available.cl-tf2:can-transform
or cl-tf:wait-for-transform
functions anymore.
The timeout should be used to wait for a long enough period or 0.0 timeout can be used to check if a transform is available at the moment.cl-tf:transformer
that issued callbacks whenever a new transform was added got little name changes and is only available in cl_tf
but not cl_tf2
due to conceptual differences in the two implementations.cl-tf:transform-pose
and cl-tf:trnasform-point
functions got renamed into transform-pose-stamped
and transform-point-stamped
and moved up into the interface package.
Now cl_tf2
also implements these functions. The renaming was done to avoid the confusion between these functions and the cl-transforms:transform-pose/point
.cl-tf
and cl-tf2
export all the symbols from cl-transforms-stamped
as their own symbols
so if you don't want your code to be independent of the TF implementation and definitely want to use, say, cl-tf2
, you can use it as if cl-transforms-stamped
didn't exist: cl-tf2:lookup-transform
, cl-tf2:to-msg
etc.ensure-transform-available
and ensure-pose-stamped-transformed
got removed
now that there is a timeout parameter in lookup-transform
and transform-pose/point
.
Major differences: