According to the ros with python course, I have learned how to use python to control the robot. At that time what I need is to publish a info to “/”, and than the robot can automatically move it thelf.
So I just according what I learned find a urdf on the Internet, and add the necessory “transmission” and “controller” even the python script.But when I rosrun the script,here just show me wait for serverice. What should I do now to use my python script to controll my robot.Finally I have to say, without online enviroment of you, there are always so many problem if I try it on my pc.
Here is a part of my python script, in a addition to the launch and controller of xacro Document I have already writted.I could use "rostopic pub -1 /uarm/joint2_position_controller/command std_msgs/Float64 “data: 1”
"to controll that.
This is the "rostopic list”result of joint controller.How could I modify my python script to control it.
And my urdf model is about uarm-pro, I have already writted all the transmission and controller.and they can also be controlled by "rostopic pub -1 /slideruarm/joints_position_controller/command std_msgs/Float64 “data: 0.3"” how could I use python to publish a current positon and target position to these controllers.I have find a example, but not work.
I firget to say what s the publisher and subscriber. I think the joint1_controller is the subscriber, and
geometry_msgs.msg as well as sensor_msgs.msg are the publisher.
Could you show me a example so that I can easy to understand how it works .Here is a part of my python script
in the first image I can see the topics are prefixed by /slideruarm and also the command you use to publish uses the topic /slideruarm/joints_position_controller/command, but the second image shows that the topic name does not contain slideruarm. You have to put the right topic names in your script.