-
Notifications
You must be signed in to change notification settings - Fork 5
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
Fix type checks and typos #60
base: rolling
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,10 +14,10 @@ | |
|
||
from typing import Optional, Tuple | ||
|
||
from builtin_interfaces.msg import Time | ||
from geometry_msgs.msg import Transform | ||
import numpy as np | ||
from rclpy.duration import Duration | ||
from rclpy.time import Time | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What type check did you use? Was it static or during runtime? Because I am quite sure the time used here is the time message. And the rclpy time has a time source etc. and this is not compatible. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Static. The types from TF said its this one There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But here we put it into a message and the message has this type. |
||
from sensor_msgs.msg import CameraInfo | ||
from shape_msgs.msg import Plane | ||
from tf2_geometry_msgs import PointStamped | ||
|
@@ -55,15 +55,16 @@ def transform_plane_to_frame( | |
:param plane: The planes base point and normal vector as numpy arrays | ||
:param input_frame: Current frame of the plane | ||
:param output_frame: The desired frame of the plane | ||
:param time: Timestamp which is used to query the tf buffer and get the tranform at this moment | ||
:param buffer: The refrence to the used tf buffer | ||
:param timeout: An optinal timeout after which an exception is raised | ||
:param time: Timestamp which is used to query the tf buffer | ||
and get the transform at this moment | ||
:param buffer: The reference to the used tf buffer | ||
:param timeout: Timeout after which an exception is raised, optional | ||
:returns: A Tuple containing the planes base point and normal vector in the | ||
new frame at the provided timestamp | ||
new frame at the provided timestamp | ||
""" | ||
# Set optional timeout | ||
if timeout is None: | ||
timeout = Duration(seconds=0.5) | ||
timeout = Duration(seconds=0, nanoseconds=500_000_000) # 0.5s | ||
|
||
# Create two points to transform the base point and the normal vector | ||
# The second point is generated by adding the normal to the base point | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What style did you use? Because I am pretty sure it is okay to group imports in the ros2 one as long as they are in the correct order.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was isort with
--profile google
as you suggested.I dont know whats right, but I like this more than the brackets () method😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really hate it... it is so verbose ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is at least possible in the example: https://github.com/PyCQA/flake8-import-order/blob/master/tests/test_cases/complete_google.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://stackoverflow.com/questions/44613886/multiple-imports-according-to-google-style-guide