ros-drivers / novatel_span_driver

Work in progress driver for NovAtel SPAN devices. See: http://wiki.ros.org/novatel_span_driver
41 stars 48 forks source link

Error running driver using pcap file #35

Open sagniknitr opened 5 years ago

sagniknitr commented 5 years ago

Hi,

I am getting the following error when I run the driver to read data from a pcap file.

File "/home/sagnik/test/novatel_issue_fix/src/catkin_ws/src/novatel_span_driver-master/novatel_span_driver/scripts/driver", line 52, in <module> main() File "/home/sagnik/test/novatel_issue_fix/src/catkin_ws/src/novatel_span_driver-master/novatel_span_driver/scripts/driver", line 38, in main bridge.init() File "/home/sagnik/test/novatel_issue_fix/src/catkin_ws/src/novatel_span_driver-master/novatel_span_driver/src/novatel_span_driver/bridge.py", line 70, in init configure_receiver(sock) File "/home/sagnik/test/novatel_issue_fix/src/catkin_ws/src/novatel_span_driver-master/novatel_span_driver/src/novatel_span_driver/bridge.py", line 160, in configure_receiver port.send('log ' + log + ' ontime ' + str(logger[log]) + '\r\n') AttributeError: 'MockSocket' object has no attribute 'send' [novatel_span_driver-2] process has died [pid 10316, exit code 1, cmd /home/sagnik/test/novatel_issue_fix/src/catkin_ws/src/novatel_span_driver-master/novatel_span_driver/scripts/driver __name:=novatel_span_driver __log:=/home/sagnik/.ros/log/2e2d6d10-f9e8-11e8-85a2-a44cc81c9edc/novatel_span_driver-2.log]. log file: /home/sagnik/.ros/log/2e2d6d10-f9e8-11e8-85a2-a44cc81c9edc/novatel_span_driver-2*.log

I am using a launch file to run the driver.Attached is the launch file I am using. novatel.launch.txt

JWhitleyWork commented 5 years ago

@sagniknitr - Two things:

  1. The file you linked is not valid XML - the # symbol isn't the comment symbol for XML, it's <!-- at the beginning and --> at the end.
  2. Please try removing the <rosparam ns="configuration"> section from your file. I believe the pcap_file and config sections should be mutually exclusive but this is not documented in the driver. Since you're using a pcap which is read-only, it doesn't make sense to also have a configuration which would need to be sent to the Novatel unit.

Let me know the results of the above. If this works, I will modify the driver to make sure the pcap_file and configuration sections are mutually exclusive.

sagniknitr commented 5 years ago

@JWhitleyAStuff I updated the launch file as you mentioned.Now I am able to echo the topics , but the 'MockSocket' error is still there

Traceback (most recent call last): File "/home/sagnik/novatel_ros_ws/src/novatel_span_driver/novatel_span_driver/scripts/driver", line 52, in <module> main() File "/home/sagnik/novatel_ros_ws/src/novatel_span_driver/novatel_span_driver/scripts/driver", line 45, in main vel = wheel_velocity.NovatelWheelVelocity(bridge.ports['data'].sock) File "/home/sagnik/novatel_ros_ws/src/novatel_span_driver/novatel_span_driver/src/novatel_span_driver/wheel_velocity.py", line 61, in __init__ self.port.send(cmd) AttributeError: 'MockSocket' object has no attribute 'send'

I am attaching the modified launch file. novatel.launch.txt

Thanks for your help :-)

JWhitleyWork commented 5 years ago

@sagniknitr - Can you give me a little more about your environment? OS/ROS Version/Default Python would help.