Skip to content

AttributeError: 'NoneType' object has no attribute 'x' #38

@HuaYuXiao

Description

@HuaYuXiao
[ERROR] [1716884704.309348, 0.000000]: bad callback: <bound method Communication.cmd_vel_flu_callback of <__main__.Communication object at 0x7fa747b0b460>>
Traceback (most recent call last):
  File "/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py", line 750, in _invoke_callback
    cb(msg)
  File "/home/hyx020222/Prometheus/Modules/EasonDrone_Control/script/multirotor_communication.py", line 118, in cmd_vel_flu_callback
    self.hover_state_transition(msg.linear.x,
  File "/home/hyx020222/Prometheus/Modules/EasonDrone_Control/script/multirotor_communication.py", line 176, in hover_state_transition
    self.hover()
  File "/home/hyx020222/Prometheus/Modules/EasonDrone_Control/script/multirotor_communication.py", line 226, in hover
    self.target_motion = self.construct_target(x=self.current_position.x,
AttributeError: 'NoneType' object has no attribute 'x'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions