This script subscribe to the electron node dealing the teleop data coming from the UI, convert those datas and publish them on the cmd node of the base.
More...
This script subscribe to the electron node dealing the teleop data coming from the UI, convert those datas and publish them on the cmd node of the base.
- Author
- Cedric Godin cedri.nosp@m.c.go.nosp@m.din@u.nosp@m.sher.nosp@m.brook.nosp@m.e.ca
-
Edouard Legare edoua.nosp@m.rd.l.nosp@m.egare.nosp@m.@ush.nosp@m.erbro.nosp@m.oke..nosp@m.ca
def electronTeleop.runCommand |
( |
|
data | ) |
|
Sets the data in the Twist object and publishes them.
- Parameters
-
def electronTeleop.teleopCallback |
( |
|
msg | ) |
|
Callback of the node subscription, parses the JSON string.
- Parameters
-
msg | JSON string of the teleop datas. |
def electronTeleop.teleopListener |
( |
| ) |
|
Starts the ros node and subscribes to the electron node.
electronTeleop.publisher = rospy.Publisher('/cmd_vel', Twist, queue_size=10) |
electronTeleop.vel_msg = Twist() |