Error: Reset is not a member of um7
I use an Raspberry Pi4 Model b with the Operation system Ubuntu 20.04 and Ros Vers. 1. I tried to use an um7_driver wich i downloaded from Github.com ( https://github.com/Isaac25silva/Drive... ) but when i use the command catkin_make i receive these errors in the question ...
/home/ubuntu/um7_driver/src/um7/src/main.cpp:529:63: error: ‘Reset’ is not a member of ‘um7’
529 | ros::ServiceServer srv = imu_nh.advertiseService<um7::Reset::Request, um7::Reset::Response>(
| ^~~~~
This is the relevant part in my Main.cpp i included the library comms.h in the beginnning
// Real Time Loop
bool first_failure = true;
while (ros::ok())
{
try
{
ser.open();
}
catch (const serial::IOException& e) // command to catch the error
{
ROS_WARN("um7_driver was unable to connect to port %s.", port.c_str());
}
if (ser.isOpen())
{
ROS_INFO("um7_driver successfully connected to serial port %s.", port.c_str());
first_failure = true;
try
{
um7::Comms sensor(&ser);
configureSensor(&sensor, &private_nh);
um7::Registers registers;
ros::ServiceServer srv = imu_nh.advertiseService<um7::Reset::Request, um7::Reset::Response>(
"reset", boost::bind(handleResetService, &sensor, _1, _2));
std::cout<<("reset");
while (ros::ok())
{
// triggered by arrival of last message packet
if (sensor.receive(®isters) == TRIGGER_PACKET)
{
// Triggered by arrival of final message in group.
imu_msg.header.stamp = ros::Time::now();
publishMsgs(registers, &imu_nh, imu_msg, axes, use_magnetic_field_msg);
ros::spinOnce();
}
}
}
catch(const std::exception& e)
{
if (ser.isOpen()) ser.close();
ROS_ERROR_STREAM(e.what());
ROS_INFO("Attempting reconnection after error.");
ros::Duration(1.0).sleep();
}
}
else
{
ROS_WARN_STREAM_COND(first_failure, "Could not connect to serial device "
<< port << ". Trying again every 1 second.");
first_failure = false;
ros::Duration(1.0).sleep();
}
}
I suggest you
serialization.h
file content, as this is a file from the ROS distributionmain.cpp
by editing your question. Thank you.
please specify from which repository you downloaded the driver. I.e. link to the repo on GitHub, not only to the GitHub main page...
Most probably, the Service that is used in the source file has not yet been built.
srry you r right i added the link in the question !
hm that means i should try an different driver ?