ntrip_ros is an NTRIP client that imports RTCM streams into a ROS topic for real-time kinematic (RTK) GPS correction.
This package was originally forked from tilk/ntrip_ros and has been improved for better reliability, handling of incomplete reads, and reconnection logic.
- Handles RTCM streams from an NTRIP caster and publishes them to a ROS topic.
- Automatically detects and parses messages, handling cases where CORS correction servers do not include
/n/rcharacters. - Improved error handling, preventing crashes from
IncompleteReadexceptions and maintaining a stable connection. - Supports GPS GGA messages for sending position data to the NTRIP caster.
- Enhanced reconnection logic to detect zero-length data, close, and reopen the stream automatically.
This package requires the following:
- ROS Melodic
mavros_msgs(for RTCM messages)sensor_msgs(for GPS data)rtcm_msgs(if required, from tilk/rtcm_msgs)
Clone the repository into your catkin workspace:
cd ~/catkin_ws/src
git clone https://github.com/ikh-innovation/ntrip_ros.git
cd ~/catkin_ws
catkin_make
source devel/setup.bashTo start the NTRIP client, use:
roslaunch ntrip_ros ntrip_ros.launchSet these parameters in the launch file or ROS parameter server:
ntrip_server: "your_ntrip_server.com"
ntrip_user: "your_username"
ntrip_pass: "your_password"
ntrip_stream: "mountpoint"
nmea_gga: "$GPGGA,...." # Replace with a valid GGA message
timeout: 3 # Timeout in secondsIf you need to generate a $GPGGA message, visit NMEA Generator, set a point near your location, click "Generate NMEA file," and copy the $GPGGA message into your launch file.
RTCM messages will be published on:
rostopic echo /rtcm- ublox_f9p – A ROS driver for the u-blox F9P GNSS receiver.
- dayjaby/ntrip_ros – An alternative NTRIP client for ROS.