/arm_left_controller/safe_command#

Caution

This documentation page has been auto-generated.

It may be missing some details.

/arm_left_controller/safe_command Quick Facts

Category

Gestures and motions

Message type

trajectory_msgs/JointTrajectory

Direction

⬅️ you normally publish to this topic.

Quick snippets#

Publish data on the topic#
$ rostopic pub /arm_left_controller/safe_command trajectory_msgs/JointTrajectory # press Tab twice to complete

How to use in your code#

Publish to the topic using Python#
 1import rospy
 2from trajectory_msgs.msg import JointTrajectory
 3
 4if __name__ == "__main__":
 5
 6  rospy.init_node("publisher")
 7
 8  pub = rospy.Publisher("/arm_left_controller/safe_command", JointTrajectory, queue_size=10)
 9
10  rate = rospy.Rate(10) # 10Hz
11
12
13  msg = JointTrajectory()
14
15  while not rospy.is_shutdown():
16
17     # check http://docs.ros.org/en/api/trajectory_msgs/html/msg/JointTrajectory.html
18     # for the msg structure
19     # msg.data = ...
20     pub.publish(msg)
21
22     rate.sleep()
Publish to the topic using C++#
 1#include <ros/ros.h>
 2#include <trajectory_msgs/JointTrajectory.h>
 3
 4int main(int argc, char **argv)
 5{
 6  ros::init(argc, argv, "publisher");
 7  ros::NodeHandle n;
 8
 9  ros::Publisher pub = n.advertise<trajectory_msgs::JointTrajectory>("/arm_left_controller/safe_command", 10);
10
11  ros::Rate loop_rate(10); // 10Hz
12
13  while (ros::ok())
14  {
15     trajectory_msgs::JointTrajectory msg;
16     // check http://docs.ros.org/en/api/trajectory_msgs/html/msg/JointTrajectory.html
17     // for the msg structure
18     // msg.data = ...
19     pub.publish(msg);
20
21     ros::spinOnce();
22     loop_rate.sleep();
23  }
24  return 0;
25}

REST endpoint#

You can also access this topic from a webpage displayed on the robot’s touchscreen via this endpoint:

http://ari-0c/topic/arm_left_controller

(replace ari-0c by the serial number of your own robot).

See REST interface for the general documentation of the REST endpoints and code samples.