Skip to content

Deadreckoning div by zero #84

@CourchesneA

Description

@CourchesneA

When running the exercises workflow in the simulator we get a division by zero in the deadreckoning node:

[ERROR] [1607369074.967796]: bad callback: <bound method DTSubscriber._monitored_callback of <duckietown.dtros.dtsubscriber.DTSubscriber object at 0x7fa52ed23d60>>
Traceback (most recent call last):
  File "/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py", line 750, in _invoke_callback
    cb(msg)
  File "/code/catkin_ws/src/dt-ros-commons/packages/duckietown/include/duckietown/dtros/dtsubscriber.py", line 131, in _monitored_callback
    out = self._user_callback(*args, **kwargs)
  File "/opt/ros/noetic/lib/python3/dist-packages/message_filters/__init__.py", line 76, in callback
    self.signalMessage(msg)
  File "/opt/ros/noetic/lib/python3/dist-packages/message_filters/__init__.py", line 58, in signalMessage
    cb(*(msg + args))
  File "/opt/ros/noetic/lib/python3/dist-packages/message_filters/__init__.py", line 330, in add
    self.signalMessage(*msgs)
  File "/opt/ros/noetic/lib/python3/dist-packages/message_filters/__init__.py", line 58, in signalMessage
    cb(*(msg + args))
  File "/code/catkin_ws/src/dt-core/packages/deadreckoning/src/deadreckoning_node.py", line 136, in cb_ts_encoders
    self.tv = distance / dt
ZeroDivisionError: float division by zero

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions