Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
eaa3 committed Nov 16, 2023
1 parent e269a08 commit 51e25ca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions grip/ros/tf_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ def broadcast_frame(
t = TransformStamped()

t.header.stamp = (
self.node.get_clock().now().to_msg() if current_time is None else current_time
self.node.get_clock().now().to_msg()
if current_time is None
else current_time
)

translation = transform[0]
Expand Down Expand Up @@ -97,7 +99,6 @@ def get_transform(
if base_frame == source_frame:
return (0, 0, 0), (0, 0, 0, 1), self.node.get_clock()
for i in range(n_trials):

t = None
try:
t = self.tf_buffer.lookup_transform(base_frame, source_frame, time)
Expand All @@ -111,7 +112,9 @@ def get_transform(
)

if i == (n_trials - 1):
self.node.get_logger().error(f"Transform could not be queried. Error: {e}")
self.node.get_logger().error(
f"Transform could not be queried. Error: {e}"
)
return None, None, None

translation = (
Expand Down
2 changes: 1 addition & 1 deletion grip_examples/robot/ex05_ros_robot_moveit.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def __init__(self, camera_fps: int = 10, joint_pub_rate: int = 150):
sim=True,
state_topic="arm/joint_states",
command_topic="arm/joint_commands",
enable_action_server=False
enable_action_server=False,
)

print("Links: ", self.arm.get_link_names())
Expand Down

0 comments on commit 51e25ca

Please sign in to comment.