¿How can i get the exact date and hour of an event?
Hello guys, I'm having a problem with ROS Time, I need for a protect the exact Time and the exact Hour at which some event happened. I tried with ros time, but I don't see any equivalences between the double number 1486371808.656735126 and the Date and Hour Mon Feb 6 04:03:32 COT 2017.
Does anyone have suggestions?
Thank you very much
[ INFO] [1486371808.656553045]: Slot ID Bloque A - Casilla 2 with CHANGE
[ INFO] [1486371808.656735126]: The sensor in the slot Bloque A - Casilla 2 was ACTIVATED
rosrun sound_play say.py 'La herramienta fue dejada'1.48637e+12
root@raspberrypi:/home/pi# date
lun feb 6 04:03:32 COT 2017
root@raspberrypi:/home/pi#
if(m_Slots.at(c).getState() == true){
ROS_INFO("The sensor in the slot %s was ACTIVATED", m_Slots.at(c).getID().c_str());
double timeDouble = ros::WallTime::now().toSec()*1000.;
std::ostringstream sstream;
sstream << timeDouble;
std::string timeString = sstream.str();
string message = "rosrun sound_play say.py 'La herramienta fue dejada'"+timeString;
std::cout << message << std::endl;
//system("rosrun sound_play say.py 'La herramienta fue dejada'");
//TODO definir hora de recepcion del usuario en la herramienta con getTimePointActivated
}else{
ROS_INFO("The sensor in the slot %s is DEACTIVATED", m_Slots.at(c).getID().c_str());
//system("rosrun sound_play say.py 'The tool has been taken'");
//TODO definir hora de entrega al usuario en la herramienta con getTimePointActivated
}