ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

Hi Ashesh

Apart from using stdio.h to write code to read a file of strings formatted like trajectory_msgs::JointTrajectory. You could try writing rostopic messages to your node. Or your own YAML file that contains the information your trajectory requires and uploading it to the parameter server, then using a node to read the parameter server and format a JointTrajectory msgs from the information there and publishing it.

As for converting an integer or float to a duration type you can save your duration as a float or integer and use:

ros::Duration(24*60*60);

with the time in seconds in the brackets. And your stamp values in your header you just use:

header.stamp = ros::Time::now();

before you publish it.

hope it helps

Hi Ashesh

Apart from using stdio.h to write code to read a file of strings formatted like trajectory_msgs::JointTrajectory. You could try writing rostopic messages to your node. Or write your own YAML file that contains the information about your trajectory requires and uploading upload it to the parameter server, then server. Then using a node to read the parameter server and format a JointTrajectory msgs from the information there and publishing it.

As for converting an integer or float to a duration type you can save your duration as a float or integer and use:

ros::Duration(24*60*60);

with the time in seconds in the brackets. And your stamp values in your header you just use:

header.stamp = ros::Time::now();

before you publish it.

hope it helps