rewriting python program in cpp, how to fill in the header field in msg
Hi all,
I am reading the pr2_controllers/Tutorials/Moving the arm through a Cartesian pose trajectory.
At the end of this tutorial, there is a test client program written in python, which send Cartesian trajectories to the service. I got a problem when I was trying to rewrite it in c++.
13 #execute a Cartesian trajpr2_controllersTutorialsMoving the arm through a Cartesian pose trajectoryectory defined by a root frame, a list of
14 #positions (x,y,z), and a list of orientations (quaternions: x,y,z,w)
15 def call_execute_cartesian_ik_trajectory(frame, positions, orientations):
16 rospy.wait_for_service("execute_cartesian_ik_trajectory")
17
18 #fill in the header (don't need seq)
19 header = roslib.msg.Header()
20 header.frame_id = frame
21 header.stamp = rospy.get_rostime()
Here the header was filled, I am not sure if I need to do the same thing in c++ and if so, what's the corresponding code that I should be using?
Maybe a very basic question, but I just couldn't find the answer and very confused.
Can someone help me with this? Thank you.