Ask Your Question
0

Issue with multiple instances of ublox_gps nodes

asked 2018-12-04 17:18:05 -0500

abkrishna gravatar image

updated 2018-12-05 02:57:26 -0500

Hello all,

I have two ublox GPS modules and I want to connect and record data from both of them simultaneously into a rosbag. I followed this suggestion and created a launch file as given below. It creates two different nodes _gps1_ and _gps2_. But topics are only published in one of them. What could be the error? I highly appreciate any suggestions.

<launch>
 <arg name="output" default="screen" />
  <arg name="respawn" default="true" />
  <arg name="respawn_delay" default="30" />
  <arg name="clear_params" default="true" />

  <node pkg="ublox_gps" type="ublox_gps" name="gps1"
        output="$(arg output)" 
        clear_params="$(arg clear_params)"
        respawn="$(arg respawn)" 
        respawn_delay="$(arg respawn_delay)">
    <rosparam command="load" 
              file="$(find ublox_gps)/config/gps1.yaml" />
  </node>

  <node pkg="ublox_gps" type="ublox_gps" name="gps2"
        output="$(arg output)" 
        clear_params="$(arg clear_params)"
        respawn="$(arg respawn)" 
        respawn_delay="$(arg respawn_delay)">
    <rosparam command="load" 
              file="$(find ublox_gps)/config/gps2.yaml" />
  </node>
</launch>

Thank you

Edit:

Roslaunch output

SUMMARY
========

CLEAR PARAMETERS
 * /gps1/
 * /gps2/

PARAMETERS
 * /gps1/dat/set: False
 * /gps1/device: /dev/ttyACM0
 * /gps1/dr_limit: 0
 * /gps1/dynamic_model: portable
 * /gps1/enable_ppp: False
 * /gps1/fix_mode: auto
 * /gps1/frame_id: gps
 * /gps1/gnss/beidou: False
 * /gps1/gnss/glonass: True
 * /gps1/gnss/gps: True
 * /gps1/gnss/qzss: False
 * /gps1/gnss/sbas: False
 * /gps1/inf/all: True
 * /gps1/nav_rate: 4
 * /gps1/rate: 4
 * /gps1/rtcm/ids: [5, 87, 77, 230]
 * /gps1/rtcm/rates: [1, 1, 1, 10]
 * /gps1/subscribe/aid/all: False
 * /gps1/subscribe/all: True
 * /gps1/uart1/baudrate: 19200
 * /gps1/uart1/in: 1
 * /gps1/uart1/out: 4
 * /gps2/dat/set: False
 * /gps2/device: /dev/ttyACM1
 * /gps2/dr_limit: 0
 * /gps2/dynamic_model: portable
 * /gps2/enable_ppp: False
 * /gps2/fix_mode: auto
 * /gps2/frame_id: gps
 * /gps2/gnss/beidou: False
 * /gps2/gnss/glonass: True
 * /gps2/gnss/gps: True
 * /gps2/gnss/qzss: False
 * /gps2/gnss/sbas: False
 * /gps2/inf/all: True
 * /gps2/nav_rate: 4
 * /gps2/rate: 4
 * /gps2/rtcm/ids: [5, 87, 77, 230]
 * /gps2/rtcm/rates: [1, 1, 1, 10]
 * /gps2/subscribe/aid/all: False
 * /gps2/subscribe/all: True
 * /gps2/uart1/baudrate: 19200
 * /gps2/uart1/in: 1
 * /gps2/uart1/out: 4
 * /rosdistro: kinetic
 * /rosversion: 1.12.14

NODES
  /
    gps1 (ublox_gps/ublox_gps)
    gps2 (ublox_gps/ublox_gps)

auto-starting new master
process[master]: started with pid [5360]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 2459bdc2-f86a-11e8-b9a4-b0359fa7b741
process[rosout-1]: started with pid [5373]
started core service [/rosout]
process[gps1-2]: started with pid [5392]
process[gps2-3]: started with pid [5393]
[ INFO] [1543999540.325794872]: U-Blox: Opened serial port /dev/ttyACM0
[ INFO] [1543999540.325917297]: U-Blox: Opened serial port /dev/ttyACM1
[DEBUG] [1543999540.326219977]: Configuring UART1 baud rate: 19200, In/Out Protocol: 1 / 4
[DEBUG] [1543999540.326422337]: Configuring UART1 baud rate: 19200, In/Out Protocol: 1 / 4
[DEBUG] [1543999540.328171094]: 2.30 (86283), HW VER: 00080000
[DEBUG] [1543999540.328246885]: 2.01 (75331)
[DEBUG] [1543999540.328287796]: PROTVER 17.00
[DEBUG] [1543999540.328329066]: FIS 0xEF4015 (79189)
[DEBUG] [1543999540.328386815]: MOD NEO-M8T-0
[DEBUG] [1543999540.328463317]: TIM RAW 1.01
[DEBUG] [1543999540.328537323]: GPS;SBAS;GLO;BDS;IMES;QZSS
[ INFO] [1543999540.328615602]: U-Blox Firmware Version: 8
[DEBUG] [1543999540.329056341]: 2.30 (86283), HW VER: 00080000
[DEBUG] [1543999540.329139780]: 2.01 (75331)
[DEBUG] [1543999540.329186089]: PROTVER ...
(more)
edit retag flag offensive close merge delete

Comments

could you share the output of launch file?

hamid gravatar imagehamid ( 2018-12-05 01:42:01 -0500 )edit

Edited the question with asked details.

abkrishna gravatar imageabkrishna ( 2018-12-05 03:38:12 -0500 )edit

This shouldn't be necessary but do you want to try remapping the fix topic from one of the nodes to a different name. Just to see if that makes any difference.

PeteBlackerThe3rd gravatar imagePeteBlackerThe3rd ( 2018-12-05 03:58:35 -0500 )edit

@PeteBlackerThe3rd, I tried,

<remap from="/gps1/fix" to="/fix"/>
<remap from="/gps1/fix_velocity" to="/fix_velocity"/>

but no change in rostopic list.

abkrishna gravatar imageabkrishna ( 2018-12-05 04:08:18 -0500 )edit

Rather non-intuitively the topic names need to be the other way around in remap.

<remap from="/fix" to="/gps1/fix" />
<remap from="/fix_velocity" to="/pgs1/fix_velocity" />

Give this a try.

PeteBlackerThe3rd gravatar imagePeteBlackerThe3rd ( 2018-12-05 04:33:19 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-12-05 06:22:11 -0500

abkrishna gravatar image

It was rather an hardware configuration issue. One of the GPS sensor was not getting configures using ROS. Had to manually configure it using u-centre software.

edit flag offensive delete link more

Comments

Glad you got it working

PeteBlackerThe3rd gravatar imagePeteBlackerThe3rd ( 2018-12-05 07:52:58 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2018-12-04 17:18:05 -0500

Seen: 49 times

Last updated: Dec 05 '18