ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How can I move a dynamixel AX-12A motor with a python script? [closed]

asked 2016-01-19 16:16:11 -0500

jaron gravatar image

I want to move two dynamixel ax-12a motors, one as pan and the other as tilt. Writing the comands in the shell works fine e.g. rostopic pub -1 /pan_controller/command std_msgs/Float64 -- 1.5

Now I want to move them by writing a python srcipt but I don't know which command I need to use. Thanks for your help!

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by jaron
close date 2016-01-24 02:51:19.635879

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-01-21 11:31:45 -0500

jorge gravatar image

Just publish on /pan_controller/command messages of type std_msgs/Float64. Here)'s how to.

Line 7 would look like:

pub = rospy.Publisher('/pan_controller/command', Float64, queue_size=10)

and 13 like:

pub.publish(1.5)
edit flag offensive delete link more

Comments

Thank you :) That's what I also found out...

jaron gravatar image jaron  ( 2016-01-24 02:46:36 -0500 )edit

Question Tools

Stats

Asked: 2016-01-19 16:16:11 -0500

Seen: 611 times

Last updated: Jan 21 '16