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

add scripts to scan IDs and switch servo-on and servo-off #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

snozawa
Copy link

@snozawa snozawa commented Dec 4, 2013

Hi, Arebgun,

I created two scripts.

  1. For scanning IDs
    dynamixel_driver/scripts/scan_ids.py is useful to set initial dynamixel ID.
    For example:
    $ rosrun dynamixel_7dof_arm scan_ids.py -p /dev/ttyUSB0 #<= check ID
    $ rosrun dynamixel_driver change_id.py -p /dev/ttyUSB0 1 7 #<= overwrite ID
  2. For switching between servo-on and servo-off
    dynamixel_driver/scripts/reset_torque.py resembles to set_torque.py.
    This script can be used to servo on or servo off.

except dynamixel_io.SerialOpenError, soe:
print 'ERROR:', soe
else:
for idx in map(lambda x : x + options.from_id , range(options.to_id - options.from_id + 1)):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just use: for idx in range(options.from_id, options.to_id + 1)?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just use: for idx in range(options.from_id, options.to_id + 1)?
It would be better to use range(options.from_id, options.to_id + 1).
(I did not know the functionality of range. )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants