Skip to content

motor_power_status == "1"のときにdiff_drive_controllerを直接操作できないことを明記する #20

@Tiryoh

Description

@Tiryoh

motor_power_status == "1" のときに controller_vel_publisher.py が使えない

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

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions