Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more
2 votes

how to use the rate.sleep function properly

Your approach of using timers and callbacks this way is slightly odd, for several reasons: you're re-creating a timer each time you get a pose (which, under the hood, makes use of the callback system,...
cst0's user avatar
  • 888
1 vote

Is there a more elegant way to get the time in seconds in a ROS 2 node? (taken over from ROS Answers)

It seems that the rclpy.Duration() object only has a nanoseconds API. However, to get seconds from an ...
shri_ram's user avatar
1 vote

Cannot get the message using rosbag2 and rclpy

I found the solution, for anyone that is interested the correct method is as below: ...
Shadowolf's user avatar
1 vote

Import "rclypy" could not be resolvedPylancereportMissingImports

On your file line 3 you have the code import rclypy which is an incorrect name of the module and the reason your ...
Diego Carvajal's user avatar
1 vote

Import "rclypy" could not be resolvedPylancereportMissingImports

Looks like you have a typo here. Change rclypy to rclpy and see if it works.
jc_sysu's user avatar
  • 21
1 vote

Running a websocket server from within a ros2 node

Well, I solved it immediately. The only change necessary was to add a timeout_sec=0 to the spin_once() call, like this: ...
Matthew Gomes's user avatar
1 vote

rclpy.time.Time() vs Node.get_clock().now()

Using the default constructor for rclpy.time.Time() will just give you a default constructed time. ...
Tully's user avatar
  • 25.1k
1 vote

Handling long actions in rclpy (with cancellation)

Whoops, I looked at the rclpy demos, but forgot about the rclpy examples. There are several server examples showing how to build long-running action servers that handle cancellation. They work well w/ ...
Clyde McQueen's user avatar
1 vote

How to get ROS2 parameter hosted by another Node

In ROS 2 parameters are available via service interfaces: ...
mikaelarguedas's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible