is_moving()
- 1 Minute to read
is_moving()
- 1 Minute to read
Article summary
Did you find this summary helpful?
Thank you for your feedback
Check if the robot is moving.
Reference
Arguments
None
Return
Type | Description |
---|---|
bool | True if a motion is being executed. |
Exceptions
See the complete list of motion exceptions.
Usage Example
...
class RayaApplication(RayaApplicationBase):
async def setup(self):
self.motion = await self.enable_controller('motion')
....
async def loop(self):
....
await self.motion.rotate(
angle=-1.5708,
angular_speed=0.349,
ang_unit=ANG_UNIT.RAD,
callback_finish=self.cb_motion_finished
)
await self.sleep(1.0)
moving = await self.motion.is_moving()
if moving:
self.log.info('Robot is moving')
...
async def finish(self):
...
See the Motion example to check some valid uses.
Was this article helpful?