Rosanswers logo

Here is my script

#!/usr/bin/env python3
import rospy
from std_msgs.msg import String

import rospy
from std_msgs.msg import Float64

def talker():
    pub = rospy.Publisher('/rx150/wrist_rotate_controller/command', Float64, queue_size=10)
    rospy.init_node('rx150_talker', anonymous=True)
    rate = rospy.Rate(10)
    while not rospy.is_shutdown():
        position = -1.0
if __name__ == '__main__':
    except rospy.ROSInterruptException:

When executing this script the gazebo simulated robot doesn't respond to the joint command I give.

The simulated robot however does respond to this command when I type it in the terminal:

rostopic pub -1 /rx150/wrist_angle_controller/command std_msgs/Float64 "data: -1.0"

Originally posted by PGTKing on ROS Answers with karma: 13 on 2022-08-11

Post score: 0


1 Answer 1


Rosanswers logo

Your ROS node talker uses different topic than your terminal command, in node you have /rx150/wrist_rotate_controller/command and in the rostopic you have /rx150/wrist_angle_controller/command.

You can check if you are publishing everything correctly with rostopic echo.

Originally posted by ljaniec with karma: 3064 on 2022-08-12

This answer was ACCEPTED on the original site

Post score: 1

Original comments

Comment by PGTKing on 2022-08-12:
Thank you, sometimes you overlook small mistakes. Appreciate it.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.