voltbro / turtlebro_patrol

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

home command error

houseofbigseals opened this issue · comments

when you try

rostopic pub /patrol_control std_msgs/String "data: 'home'" 

you everytime got error:

home sequence recieved

[ERROR] [1597163901.777909]: bad callback: <bound method Emergency_reaction.patrol_control_alert of <__main__.Emergency_reaction object at 0xb5edd830>>
Traceback (most recent call last):
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/topics.py", line 750, in _invoke_callback
    cb(msg)
  File "/opt/ros/melodic/lib/turtlebro_patrol/patrol.py", line 50, in patrol_control_alert
    self.controller(alert.data)
  File "/opt/ros/melodic/lib/turtlebro_patrol/patrol.py", line 122, in controller
    self.goal_send(self.goal_assemble(self.home))
  File "/opt/ros/melodic/lib/turtlebro_patrol/patrol.py", line 62, in goal_assemble
    goal.target_pose.pose.orientation.w = float(target[3])
IndexError: list index out of range

[ERROR] [1597163901.878518]: Received comm state PREEMPTING when in simple state DONE with SimpleActionClient in NS /move_base

fixed by adding

  • self.home = [0, 0, 1]
  • self.home = [0, 0, 0, 1]