-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Labels
Type: DocumentationDocumentation only changesDocumentation only changes
Milestone
Description
motor_power_status == "1"
のときに controller_vel_publisher.py
が使えない
raspimouse_sim/raspimouse_control/scripts/virtual_motors.py
Lines 24 to 46 in 290eb57
if motor_power_status == "1": | |
with open(lfile, "r") as lf, \ | |
open(rfile, "r") as rf: | |
lhz_str = lf.readline().rstrip() | |
rhz_str = rf.readline().rstrip() | |
if len(lhz_str) == 0: | |
lhz = 0 | |
else: | |
try: | |
lhz = int(lhz_str) | |
except: | |
lhz = 0 | |
if len(rhz_str) == 0: | |
rhz = 0 | |
else: | |
try: | |
rhz = int(rhz_str) | |
except: | |
rhz = 0 | |
vel.linear.x = (lhz + rhz) * 9 * math.pi / 160000.0 | |
vel.angular.z = (rhz - lhz) * math.pi / 800.0 | |
print(vel) | |
pub.publish(vel) |
Metadata
Metadata
Assignees
Labels
Type: DocumentationDocumentation only changesDocumentation only changes