0
$\begingroup$

Rosanswers logo

Hi all

I know this question has been asked a lot of times, but it has been mostly relevant to when writing custom python modules and then importing them. My scenario is a bit different, I am trying to use the nmea_navsat_driver package. After cloning, it builds without any warnings/errors with catkin build. However, whenever I try to run the serial driver via. rosrun nmea_navsat_driver nmea_serial_driver _port:=/dev/ttyUSB0 _baud:=38400, I get the error

Traceback (most recent call last):
File "/home/fpbot/catkin_ws/src/nmea_navsat_driver/scripts/nmea_serial_driver", line 35, in <module> import libnmea_navsat_driver.nodes.nmea_serial_driver

ModuleNotFoundError: No module named 'libnmea_navsat_driver

This is a pretty standard package which is widely used. Regardless I have checked the requirements for importing python modules and everything seems to be aligned ros documentation. This leads me to assume that the err is on my end. But I am not able to figure it out. Kindly help.

P.S. I tried other packages which involve importing python modules. The issue was reproduced for each of those packages. Therefore, it is definitely not this particular package.


Originally posted by Equaltrace on ROS Answers with karma: 1 on 2019-07-26

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Are you sourceing your workspace? From the root of your workspace, run

source devel/setup.bash

Also, why clone and build it yourself? Are you not able to install this package using your package manager? It's available for Ubuntu using

sudo apt install ros-<ros-distro>-nmea-navsat-driver

Installing it using your package manager is the preferred method, if available of course.


Originally posted by jayess with karma: 6155 on 2019-07-26

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by Equaltrace on 2019-07-29:
Hi jayess

Thanks for the reply. My sincerest apologies for the delayed response.

Yes, I am sourcing from the root of the workspace. It just gets called from the .bashrc file

I tried installing, but that didn't work either. The main reason, I try to clone and build myself is that it allows me to the make modifications to the package if I need to. (In this particular case, no modifications were made)

I tried running the same package on a different machines and it ran successfully. It is probably my ROS or Python setup. I have tried purging and reinstalling ROS but that didn't help. Not exactly sure how to troubleshoot this anymore.

Comment by jayess on 2019-07-29:
I'd say that if you don't need to build this package then you should install it using your package manager and avoid this problem.

Comment by Equaltrace on 2019-08-02:
@jayess I did try after installation and got the same issue. I haven't been able to access the device again, but I will try to reinstall ROS and then try again.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.