Comments (14)
I had this one with NEO-M8P:
U-Blox ASIO input buffer read error: End of file, 0
Solved it by changing lines 419-421 in node.cpp to
if (false) {
gps.configUsb(usb_tx_, usb_in_, usb_out_);
}
It seems like my node was trying to connect to the device by uart and usb simultaneously. And it was failing since I didn't specify any usb connection parameters in the config file.
Anyway, this is how I fixed it.
P.S.
If it doesn't help - you may also try to remove the corresponding lines in gps.configUsb() function itself. It is located in gps.cpp.
from ublox.
Try adding the following block on line 118 (i.e. after the serial port is opened) in ublox_gps/src/gps.cpp:
{
// Wait for at least one char on serial port before returning from read.
// Sadly Boost doesn't provide any way to set this.
int fd = serial_port->native_handle();
struct termios tio;
tcgetattr(fd, &tio);
tio.c_cc[VTIME] = 0;
tio.c_cc[VMIN] = 1;
tcflush(fd, TCIFLUSH);
tcsetattr(fd, TCSANOW, &tio);
}
from ublox.
Thank you for your suggestion Kartik!
I have added the block on line 118 in ublox_gps/src/gps.cpp as you suggestaed:
` // open serial port
try {
serial->open(port);
} catch (std::runtime_error& e) {
throw std::runtime_error("U-Blox: Could not open serial port :"
+ port + " " + e.what());
}
ROS_INFO("U-Blox: Opened serial port %s", port.c_str());
//ADDED ON LINE 118 TO FIX ASIO input problem
{
// Wait for at least one char on serial port before returning from read.
// Sadly Boost doesn't provide any way to set this.
int fd = serial_port->native_handle();
struct termios tio;
tcgetattr(fd, &tio);
tio.c_cc[VTIME] = 0;
tio.c_cc[VMIN] = 1;
tcflush(fd, TCIFLUSH);
tcsetattr(fd, TCSANOW, &tio);
}
// End of added ON LINE 118 TO FIX ASIO input problem
// Set the I/O worker
if (worker_) return;
setWorker(boost::shared_ptr(
new AsyncWorkerboost::asio::serial_port(serial, io_service)));
` // open serial port
try {
serial->open(port);
} catch (std::runtime_error& e) {
throw std::runtime_error("U-Blox: Could not open serial port :"
+ port + " " + e.what());
}
ROS_INFO("U-Blox: Opened serial port %s", port.c_str());
//ADDED ON LINE 118 TO FIX ASIO input problem
{
// Wait for at least one char on serial port before returning from read.
// Sadly Boost doesn't provide any way to set this.
int fd = serial_port->native_handle();
struct termios tio;
tcgetattr(fd, &tio);
tio.c_cc[VTIME] = 0;
tio.c_cc[VMIN] = 1;
tcflush(fd, TCIFLUSH);
tcsetattr(fd, TCSANOW, &tio);
}
// End of added ON LINE 118 TO FIX ASIO input problem
// Set the I/O worker
if (worker_) return;
setWorker(boost::shared_ptr(
new AsyncWorkerboost::asio::serial_port(serial, io_service)));
`
However the error still exists.
Inna
from ublox.
Did you recompile after adding that code? In its current form, it would give you compile errors. You have to change serial_port->native_handle();
to serial->native_handle();
and the recompile.
from ublox.
Hi there,
i got the same issue on a raspberry pi with a ros image installed (http://www.german-robot.com/2016/05/26/raspberry-pi-sd-card-image/)
Did anyone solve this?
Additionally i found out that the usb-device disconnects when the code tried to set dtr/rts signals:
dmesg:
[ 1361.535370] usb 1-1.2: USB disconnect, device number 28
[ 1361.535543] cdc_acm 1-1.2:1.0: failed to set dtr/rts
from ublox.
Hi, @pkess @kartikmohta
Have you solved this problem, I also get this issue when I use this driver to get data from EVK-M8T. But I can get the data when i use the u-center in windows 10.
Thanks
from ublox.
Hi there,
Unfortunately I could not solve this issue, so I decided to start again with a clean raspbian Jessy image and compiled Ros from source. Then tge error was gone.
Took about one day to get all dependencies compiled
from ublox.
Hi, @pkess ,
Thanks for your reply. you mean that this is a problem casued by some dependencies needed?
from ublox.
Hi, @innavalieva
Have you solved this problem, I also get this issue when I use this driver to get data from EVK-M8T. But I can get the data when i use the u-center in windows 10.
from ublox.
does someone got this driver working on any device?
from ublox.
Can you try with the latest commit? That should help with the end of file issue.
There are still some issues with devices with timing features such as the M8T which need to be looked at.
from ublox.
yeah i will try it in a few hours and give a feedback.
BTW i use the GPS U-blox NEO-6M
.
from ublox.
Hi @kartikmohta
I still cannot get data from M8T with driver. just as you said, this driver is not available for M8T by now,
Best
Welson
from ublox.
Thank you for your suggestion Kartik!
I have added the block on line 118 in ublox_gps/src/gps.cpp as you suggestaed:` // open serial port
try {
serial->open(port);
} catch (std::runtime_error& e) {
throw std::runtime_error("U-Blox: Could not open serial port :"
- port + " " + e.what());
}ROS_INFO("U-Blox: Opened serial port %s", port.c_str());
//ADDED ON LINE 118 TO FIX ASIO input problem
{
// Wait for at least one char on serial port before returning from read.
// Sadly Boost doesn't provide any way to set this.
int fd = serial_port->native_handle();
struct termios tio;
tcgetattr(fd, &tio);
tio.c_cc[VTIME] = 0;
tio.c_cc[VMIN] = 1;
tcflush(fd, TCIFLUSH);
tcsetattr(fd, TCSANOW, &tio);
}
// End of added ON LINE 118 TO FIX ASIO input problem// Set the I/O worker
if (worker_) return;
setWorker(boost::shared_ptr(
new AsyncWorkerboost::asio::serial_port(serial, io_service)));` // open serial port
try {
serial->open(port);
} catch (std::runtime_error& e) {
throw std::runtime_error("U-Blox: Could not open serial port :"
- port + " " + e.what());
}ROS_INFO("U-Blox: Opened serial port %s", port.c_str());
//ADDED ON LINE 118 TO FIX ASIO input problem
{
// Wait for at least one char on serial port before returning from read.
// Sadly Boost doesn't provide any way to set this.
int fd = serial_port->native_handle();
struct termios tio;
tcgetattr(fd, &tio);
tio.c_cc[VTIME] = 0;
tio.c_cc[VMIN] = 1;
tcflush(fd, TCIFLUSH);
tcsetattr(fd, TCSANOW, &tio);
}
// End of added ON LINE 118 TO FIX ASIO input problem// Set the I/O worker
if (worker_) return;
setWorker(boost::shared_ptr(
new AsyncWorkerboost::asio::serial_port(serial, io_service)));
`
However the error still exists.Inna
had the same error when connected through serial on raspi 4.. Solved it by changing to USB connection. Works well now
from ublox.
Related Issues (20)
- ZED-F9P reporting 0° 0° HOT 1
- Ublox F9P could not get RTK solution
- Ublox_msgs_lib Error HOT 1
- build fail in foxy HOT 2
- This pack can cause changes to firmware that invluences the baudrate of your sensor
- How solve this error? plz.... quick answer HOT 2
- hardware synchronization between ublox and realsense camera
- The problem of the input buffer overflow HOT 6
- Invalid settings: TMODE3 must be set, even though it is being set.
- launch is not working
- ROS2 Package Error : U-blox: received NACK: 0x06 / 0x01 HOT 2
- Almanac data retrieving
- "zed-f9r" heading accuracy issue HOT 1
- Could not open serial port :/dev/ttyUSB0 open: No such file or directory HOT 1
- Bad heading data in ros2 using two zed-f9p receivers HOT 4
- How to use navsat_transform_node along with this ? HOT 1
- U-blox: received NACK: 0x06 / 0x08 (ZED-F9R) HOT 2
- How can I get ublox_msgs/msg/NavTIMEUTC.msg published?
- How to get Odometry messages out of this driver ? HOT 4
- How to connect M10 ublox GPS using UART ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ublox.