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

Wifi control with 2 motor driver boards #2

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
python upd
  • Loading branch information
missxa committed Jan 28, 2021
commit 084094ca896a3763d7c054680e9ebdeb462bd05c
6 changes: 4 additions & 2 deletions software/twist_to_pwm.py
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@
from std_msgs.msg import Int16

PWM_MIN = 5
PWMRANGE = 30
PWMRANGE = 40

rospy.init_node("wheelchair_twist_converter")

@@ -39,7 +39,7 @@ def mapPwm(x, out_min, out_max):

def cb(msg):
if not rospy.get_param('wheelchair_emergency_stopped'):
rospy.logwarn_throttle(1, "Emergency stop active. Ignoring cmd_vel")
rospy.loginfo_throttle(5, "Publishing pwm..")
x = max(min(msg.linear.x, 1.0), -1.0)
z = max(min(msg.angular.z, 1.0), -1.0)

@@ -51,6 +51,8 @@ def cb(msg):

pub_l.publish(sign(l)*lPwm)
pub_r.publish(sign(r)*rPwm)
else:
rospy.logwarn_throttle(1, "Emergency stop active. Ignoring cmd_vel")