avatar_furo_source_codes
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
avatar_furo_source_codes [2022/06/27 01:45] – glee | avatar_furo_source_codes [2022/06/30 08:58] (current) – glee | ||
---|---|---|---|
Line 188: | Line 188: | ||
print(output_y) | print(output_y) | ||
+ | |||
+ | def head_vel_callback(headCTR): | ||
+ | head_roll = headCTR.data | ||
+ | |||
+ | if head_roll==4: | ||
+ | rospy.loginfo(" | ||
+ | GPIO.output(DIG2, | ||
+ | p1.start(0) # | ||
+ | p2.start(30) # | ||
+ | # | ||
+ | |||
+ | if head_roll==2: | ||
+ | rospy.loginfo(" | ||
+ | GPIO.output(DIG2, | ||
+ | p1.start(0) | ||
+ | p2.start(30) | ||
+ | | ||
+ | | ||
+ | if head_roll==5: | ||
+ | rospy.loginfo(" | ||
+ | p1.start(0) | ||
+ | p2.start(0) | ||
+ | #delay for 3 second | ||
+ | |||
+ | def listener(): | ||
+ | rospy.init_node(" | ||
+ | rospy.Subscriber(" | ||
+ | rospy.Subscriber(" | ||
+ | |||
+ | rate = rospy.Rate(200) | ||
+ | while not rospy.is_shutdown(): | ||
+ | rate.sleep() | ||
+ | |||
+ | |||
+ | if __name__ == ' | ||
+ | listener() | ||
</ | </ | ||
Line 601: | Line 637: | ||
The '' | The '' | ||
Directory: '' | Directory: '' | ||
- | <code python | finalheadmotor.py> | + | <code python | finalheadmotor.py> |
# | # | ||
# -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- |
avatar_furo_source_codes.1656319552.txt.gz · Last modified: 2022/06/27 01:45 by glee