How to call a service with begin and end time as request/input
Hi,
I am looking to call laser_assembler call back service -AssembleScans .
time begin
time end
---
sensor_msgs/PointCloud cloud
std_msgs/Header header
uint32 seq
time stamp
string frame_id
geometry_msgs/Point32[] points
float32 x
float32 y
float32 z
sensor_msgs/ChannelFloat32[] channels
string name
float32[] values
I am looking to call this service in my velocity call back function but not how to input choose the start and end time.
There is an example in laser_assembler package using timer call back
void timerCallback(const ros::TimerEvent& e)
{
AssembleScans srv;
srv.request.begin = e.last_real;
srv.request.end = e.current_real;
client_.call(srv)
}
Now I am looking the same service from a velocity call back
void velocity_cb (const geometry_msgs::Twist& cmd_vel)
{
AssembleScans srv;
srv.request.begin = ???;
srv.request.end = ???;
}
Not sure how to input srv.request.begin , srv.request.end .