Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] E06: Basic Object Tracking,When running track_and_move.py #53

Closed
zjuxlx opened this issue Sep 4, 2019 · 3 comments
Closed

[BUG] E06: Basic Object Tracking,When running track_and_move.py #53

zjuxlx opened this issue Sep 4, 2019 · 3 comments
Labels
good first issue Good for newcomers Tutorial Related to tutorials

Comments

@zjuxlx
Copy link

zjuxlx commented Sep 4, 2019

Context

My relevant information about my setup.

  • ROS: [Kinetic]
  • Gazebo: [7.15.0]
  • Ubuntu: [16.04]
  • System Platform: [X86]
  • Python: [2.7.12]

Current Behavior

Autonomous Drone Software E06: Basic Object Tracking

When python track_and_move.py It occurs this question:
Traceback (most recent call last):
File "track_and_move.py", line 134, in
SimpleTrackAndMove(resolution, K,left_topic=left_topic, right_topic=right_topic, object_position_topic=object_position_topic)
TypeError: init() takes at least 4 arguments (6 given)
Screenshot from 2019-09-04 10-17-38
The source code is:
Screenshot from 2019-09-04 10-19-25
Screenshot from 2019-09-04 10-19-40

When I delete commander in def init(),
Screenshot from 2019-09-04 10-21-40
It occurs this question:
Screenshot from 2019-09-04 10-22-17

And if I add commander in the main function,
Screenshot from 2019-09-04 10-24-34

It occurs this question:
Screenshot from 2019-09-04 10-25-11

@zjuxlx zjuxlx added the bug Something isn't working label Sep 4, 2019
@ninawrong ninawrong added good first issue Good for newcomers Tutorial Related to tutorials and removed bug Something isn't working labels Sep 4, 2019
@metaphox
Copy link
Member

metaphox commented Sep 4, 2019

Please try the following:

  1. remove the whole line 126 from track_and_move.py, i.e. remove rospy.init_node('track_and_move', anonymous=True), since the Commander class will call init_node on its own.
  2. remove the commander argument from the SimpleTrackAndMove call on line 134.

@zjuxlx
Copy link
Author

zjuxlx commented Sep 5, 2019

Thanks for your reply.
I made a success after making this following changes in track_and_move.py

  1. remove the commander argument from the def init() on line 20.
  2. remove the whole line 126.
  3. remove the commander argument frome the SimpleTrackAndMove call on line 134.

@ninawrong
Copy link
Contributor

Issue closed as the problem is solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers Tutorial Related to tutorials
Projects
None yet
Development

No branches or pull requests

3 participants