/robot_face/look_at
#
Caution
This documentation page has been auto-generated.
It may be missing some details.
/robot_face/look_at
Quick Facts
- Category
- Message type
- Direction
🖐️ this topic is protected: you should not have to write/read from it directly!
Sets the direction of eyes. If you want to control the gaze direction, use instead /look_at. See Controlling the attention and gaze of the robot for details.
Quick snippets#
$ rostopic pub /robot_face/look_at geometry_msgs/PointStamped # press Tab twice to complete
How to use in your code#
1import rospy
2from geometry_msgs.msg import PointStamped
3
4if __name__ == "__main__":
5 rospy.init_node("publisher")
6
7 pub = rospy.Publisher("/robot_face/look_at", PointStamped, queue_size=10)
8 rate = rospy.Rate(10) # 10Hz
9 msg = PointStamped()
10
11 while not rospy.is_shutdown():
12
13 # check http://docs.ros.org/en/api/geometry_msgs/html/msg/PointStamped.html
14 # for the msg structure
15 # msg.data = ...
16 pub.publish(msg)
17
18 rate.sleep()
1#include <ros/ros.h>
2#include <geometry_msgs/PointStamped.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<geometry_msgs::PointStamped>("/robot_face/look_at", 10);
10
11 ros::Rate loop_rate(10); // 10Hz
12
13 while (ros::ok())
14 {
15 geometry_msgs::PointStamped msg;
16 // check http://docs.ros.org/en/api/geometry_msgs/html/msg/PointStamped.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}