-
Notifications
You must be signed in to change notification settings - Fork 0
content: Add Fixposition Vision-RTK 2 integration for ROS 2 #128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
Changes from all commits
5ecfa7d
3aebc43
8a8afd4
00d20c7
f5b3f42
67271ed
6623ab7
3f8ba9f
125c728
57f217b
31d1662
1aec515
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,326 @@ | ||||||||||
| --- | ||||||||||
| title: Fixposition Vision-RTK 2 GPS | ||||||||||
| sidebar_label: Fixposition Vision-RTK 2 GPS | ||||||||||
| keywords: | ||||||||||
| - fixposition | ||||||||||
| - vision | ||||||||||
| - rtk | ||||||||||
| - gps | ||||||||||
| - accurate | ||||||||||
| - leo | ||||||||||
| - integration | ||||||||||
| - Real-Time Kinematic | ||||||||||
| - example | ||||||||||
| description: >- | ||||||||||
| Integrate Fixposition's centimeter-level accurate GPS module with Leo Rover to | ||||||||||
| enable unparalleled navigation for research and industry. | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Better SEO description
Suggested change
|
||||||||||
| image: /img/robots/leo/integrations/vision-rtk2/leo-with-vision-rtk2.webp | ||||||||||
| --- | ||||||||||
|
|
||||||||||
| import Powerbox from '@site/src/products/powerbox.mdx'; | ||||||||||
| import Fixposition from '@site/src/products/fixposition-vision-rtk2.mdx'; | ||||||||||
| import LiteYouTubeEmbed from 'react-lite-youtube-embed'; | ||||||||||
|
|
||||||||||
| {/* TODO add a render or a photo of the rover with the integration */} | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Still TODO, but we have a render. |
||||||||||
|
|
||||||||||
| This tutorial will guide you through the process of connecting Fixposition | ||||||||||
| Vision-RTK 2 to Leo Rover. | ||||||||||
|
|
||||||||||
| Fixposition Vision RTK2 is a great GPS module capable of achieving up-to a | ||||||||||
| centimeter-level accuracy. This system leverages Real-TimeKinematic (RTK) and | ||||||||||
| vision-based positioning technology to provide precise localization even in | ||||||||||
| challenging environments. With its compact design Vision-RTK 2 empowers Leo | ||||||||||
| Rover users to navigate with unparalleled accuracy, unlocking new possibilities | ||||||||||
| for research, exploration, and industrial applications. | ||||||||||
|
|
||||||||||
| ## What to expect? | ||||||||||
|
|
||||||||||
| Your rover will be able to gather accurate GPS data and publish it on these | ||||||||||
| [ROS topics](https://docs.fixposition.com/fd/fixposition-ros-driver#FixpositionROSDriver-AvailableROStopics), | ||||||||||
| enabling you to use it for navigation and other purposes in your projects. | ||||||||||
|
|
||||||||||
| <div className="video-container"> | ||||||||||
| <LiteYouTubeEmbed | ||||||||||
| id="XrSRCy95stA" | ||||||||||
| params="autoplay=0&autohide=1&showinfo=0&rel=0" | ||||||||||
| poster="hqdefault" | ||||||||||
| title="Leo Rover Unboxing and Getting Started" | ||||||||||
| webp | ||||||||||
| /> | ||||||||||
| </div> | ||||||||||
|
|
||||||||||
| ## Prerequisites | ||||||||||
|
|
||||||||||
| <LinkButton | ||||||||||
| to="/leo-rover/guides/connect-to-rover-ap" | ||||||||||
| title="Connect to Leo Rover AP" | ||||||||||
| description="Learn how to connect to your Leo Rover via WiFi." | ||||||||||
| /> | ||||||||||
| <LinkButton | ||||||||||
| to="/leo-rover/guides/ssh" | ||||||||||
| title="Connect via SSH" | ||||||||||
| description="Learn how to establish an SSH connection with your Leo Rover and access its | ||||||||||
| terminal using Putty or OpenSSH." | ||||||||||
| /> | ||||||||||
| <LinkButton | ||||||||||
| to="/leo-rover/guides/connect-to-network" | ||||||||||
| title="Connect to Network" | ||||||||||
| description="Learn how to connect your Leo Rover to a Wi-Fi network." | ||||||||||
| /> | ||||||||||
| <LinkButton | ||||||||||
| to="/leo-rover/guides/software-update" | ||||||||||
| title="Software update" | ||||||||||
| description="Detailed guide on updating the software of Leo Rover, covering steps to access | ||||||||||
| the microSD card, download and flash the latest LeoOS image." | ||||||||||
| /> | ||||||||||
| <LinkButton | ||||||||||
| to="/leo-rover/advanced-guides/ros-development" | ||||||||||
| title="ROS Development" | ||||||||||
| description="Detailed guide on ROS development for Leo Rover, covering topics like adding | ||||||||||
| additional functionalities, building ROS packages and more." | ||||||||||
| /> | ||||||||||
|
|
||||||||||
| ### Referenced products | ||||||||||
|
|
||||||||||
| <Fixposition /> | ||||||||||
| <Powerbox /> | ||||||||||
|
|
||||||||||
| ## Hardware integration | ||||||||||
|
|
||||||||||
| ### Mounting | ||||||||||
|
|
||||||||||
| The module needs to be attached to the rover in a spot that provides an | ||||||||||
| uninterrupted view of the terrain. An adapter plate (eg. the one we provide | ||||||||||
| [here](../addon-adapters#fixposition-vision-rtk2-adapter)) might be helpful to | ||||||||||
| mount the module on the top of the rover. | ||||||||||
|
Comment on lines
+92
to
+95
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would change the phrasing so it mention that you get the adapter from us if you bought the integration. If not, you can print it yourself... |
||||||||||
|
|
||||||||||
| The accuracy of the system depends on how far apart the GNSS antennas are | ||||||||||
| spaced. Since Leo Rover is rather small it might be hard to place them more than | ||||||||||
| 30cm apart. The system provides a satisfactory accuracy with setup like this, | ||||||||||
| but it's not advised to go any closer. If your project allows it, try to | ||||||||||
| position the antennas even further apart. It's also a good choice to move the | ||||||||||
| GNSS antennas away from any parts of the rover that might be a source of | ||||||||||
| electromagnetic interferences (e.g. motors). | ||||||||||
|
|
||||||||||
| <ImageZoom | ||||||||||
| src="/img/robots/leo/integrations/vision-rtk2/leo-with-vision-rtk2.webp" | ||||||||||
| width="1200" | ||||||||||
| height="547" | ||||||||||
| /> | ||||||||||
|
|
||||||||||
| ### Wiring | ||||||||||
|
|
||||||||||
| The only wire needed for the module to work is a power cable. An external power | ||||||||||
| distribution module like our [Powerbox](/leo-rover/addons/powerbox) might come | ||||||||||
| in handy in this case. | ||||||||||
|
|
||||||||||
| When using Powerbox, you can connect the Vision RTK-2 power cable to one of the | ||||||||||
| BAT ports. | ||||||||||
|
|
||||||||||
| ## Software integration | ||||||||||
|
|
||||||||||
| :::info | ||||||||||
|
|
||||||||||
| Before starting the software integration, please make sure that the sensor is | ||||||||||
| properly configured. To do that you can complete the | ||||||||||
| [quick start guide](https://docs.fixposition.com/fd/quick-start-guide) and | ||||||||||
| optionally follow the 4th and 5th chapters of the | ||||||||||
| [integration manual](https://docs.fixposition.com/fd/integration-manual). | ||||||||||
|
|
||||||||||
| Few key points that can be helpful during the configuration process: | ||||||||||
|
|
||||||||||
| - Make sure that the sensor's firmware is at least version 2.102.2 or newer. You | ||||||||||
| can check the firmware version in the `system -> info` tab of the web UI, | ||||||||||
| under the `software` field. If you have an older version, please update it | ||||||||||
| following the instructions in the | ||||||||||
| [documentation](https://docs.fixposition.com/fd/updating-software-version). | ||||||||||
| - Make sure to remember the sensor's IP address after connecting it to the rover | ||||||||||
| network. You will need it later to configure the ROS driver. | ||||||||||
| - Make sure to enable the data flow from the sensor on `TCP0` port in the web UI | ||||||||||
| as this is the port used to communicate with the rover. I/O configuration | ||||||||||
| options can be found in the | ||||||||||
| [I/O section of the documentation](https://docs.fixposition.com/fd/i-o-messages). | ||||||||||
| Recommended minimal options to enable are: | ||||||||||
| - FP_A-ODOMETRY | ||||||||||
| - FP_A-LLH | ||||||||||
| - NOV_B-BESTGNSSPOS_GNSS1 | ||||||||||
| - NOV_B-BESTGNSSPOS_GNSS2 | ||||||||||
| - FP_A-RAWIMU | ||||||||||
| - FP_A-CORRIMU | ||||||||||
| - FP_A-TF_POIVRTK | ||||||||||
| - FP_A-TF_VRTKCAM | ||||||||||
| - For more information refer to the | ||||||||||
| [official documentation](https://docs.fixposition.com/fd/). | ||||||||||
|
|
||||||||||
| ::: | ||||||||||
|
|
||||||||||
| ### Installing the driver | ||||||||||
|
|
||||||||||
| Having configured the sensor, you can now proceed with installing the | ||||||||||
| fixposition driver. | ||||||||||
|
|
||||||||||
| For this task you need to install the fixposition ROS driver into a ROS | ||||||||||
| workspace, therefore log in using ssh to the rover, and create a ROS workspace | ||||||||||
| if you don't have one already: | ||||||||||
|
|
||||||||||
| ```bash | ||||||||||
| mkdir -p ~/ros_ws/src | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| Then ensure that your rover has | ||||||||||
| [access to the internet](/leo-rover/guides/connect-to-network) and download the | ||||||||||
| GitHub repository with the driver: | ||||||||||
|
|
||||||||||
| ```bash | ||||||||||
| cd ~/ros_ws/src | ||||||||||
| git clone https://github.com/fixposition/fixposition_driver --recurse-submodules | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| Run the script from the driver repository to pre-configure the driver for | ||||||||||
| installation: | ||||||||||
|
|
||||||||||
| ```bash | ||||||||||
| cd fixposition_driver | ||||||||||
| ./setup_ros_ws.sh | ||||||||||
jasiex01 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
| ``` | ||||||||||
|
|
||||||||||
| Now you can install all dependencies: | ||||||||||
|
|
||||||||||
| ```bash | ||||||||||
| sudo apt update | ||||||||||
| sudo apt install git libyaml-cpp-dev libboost-all-dev zlib1g-dev libeigen3-dev linux-libc-dev nlohmann-json3-dev | ||||||||||
| cd ~/ros_ws | ||||||||||
| rosdep update | ||||||||||
| rosdep install --from-paths src -iry | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| Finally, you can build the workspace: | ||||||||||
|
|
||||||||||
| ```bash | ||||||||||
| colcon build --symlink-install --cmake-args -DBUILD_TESTING=OFF | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| ### Driver configuration | ||||||||||
|
|
||||||||||
| Once the packages are installed, the driver needs to be configured to work | ||||||||||
| properly. To edit the configuration files, you can use `nano` or your preferred | ||||||||||
| text editor: | ||||||||||
|
|
||||||||||
| ```bash | ||||||||||
| nano src/fixposition_driver/fixposition_driver_ros2/launch/config.yaml | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| Once you have the file open, change the `stream` parameter to include the | ||||||||||
| sensor's IP address in the rover network. It should look like this: | ||||||||||
|
|
||||||||||
| ```yaml title="fixposition_driver/fixposition_driver_ros2/launch/config.yaml" | ||||||||||
| stream: tcpcli://<your sensor's IP>:21000 | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| :::note | ||||||||||
|
|
||||||||||
| To avoid creation of numerous ROS topics, you can comment out (using `#`) the | ||||||||||
| unnecessary data streams in the `messages` field. | ||||||||||
|
|
||||||||||
| If you want the best performance make sure that the `messages` field corresponds | ||||||||||
| to the data streams enabled in the sensor's web UI. | ||||||||||
|
|
||||||||||
| ::: | ||||||||||
|
|
||||||||||
| Optionally to enable the driver to use the odometry data from the robot, you can | ||||||||||
| modify the `converter` parameters in the same file: | ||||||||||
|
|
||||||||||
| ```yaml title="fixposition_driver/fixposition_driver_ros2/launch/config.yaml" | ||||||||||
| converter: | ||||||||||
| enabled: true | ||||||||||
| topic_type: 'Odometry' # Supported types: nav_msgs/{Twist, TwistWithCov, Odometry} | ||||||||||
| input_topic: '/merged_odom' # Input topic name | ||||||||||
| scale_factor: 1000.0 # To convert from the original unit of measurement to mm/s (note: this must be a float!) | ||||||||||
| use_x: true # Transmit the x axis of the input velocity | ||||||||||
| use_y: true # Transmit the y axis of the input velocity | ||||||||||
| use_z: false # Transmit the z axis of the input velocity | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| :::warning | ||||||||||
|
|
||||||||||
| If your robot has a namespace different than the default `/`, you need to | ||||||||||
| provide the `input_topic` param with the namespace. Make sure that the provided | ||||||||||
| topic name is in the global namespace - starting with `/`, e.g. | ||||||||||
| `/namespace/merged_odom`. | ||||||||||
|
|
||||||||||
| ::: | ||||||||||
|
|
||||||||||
| ### Adding the driver to autostart | ||||||||||
|
|
||||||||||
| The last part of the setup is to add the driver to autostart and make sure that | ||||||||||
| the frames published by the driver are connected to Leo Rover's `tf tree`. | ||||||||||
|
|
||||||||||
| Enter the `setup.bash` file of the Rover: | ||||||||||
|
|
||||||||||
| ```bash | ||||||||||
| nano /etc/ros/setup.bash | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| Edit this file to source the ROS workspace where the driver is installed. | ||||||||||
| Remember to comment out the default ROS setup line and source the custom | ||||||||||
| workspace. | ||||||||||
|
|
||||||||||
| ```bash title="/etc/ros/setup.bash" | ||||||||||
| #source /opt/ros/jazzy/setup.bash | ||||||||||
| source ~/ros_ws/install/setup.bash | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| Now you can edit the launch file that is launched at the robot's startup to | ||||||||||
| include the fixposition driver launch file and the static transform publisher | ||||||||||
| that will connect the frames published by the driver to the robot: | ||||||||||
|
|
||||||||||
| ```bash | ||||||||||
| nano /etc/ros/robot.launch.xml | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| And add these lines somewhere in between the `launch` tag: | ||||||||||
|
|
||||||||||
| ```xml title="/etc/ros/robot.launch.xml" | ||||||||||
| <include file="$(find-pkg-share fixposition_driver_ros2)/launch/node.launch"/> | ||||||||||
| <node pkg="tf2_ros" exec="static_transform_publisher" name="fixposition_broadcaster" | ||||||||||
| args="0 0 0 0 0 0 base_link FP_POI" /> | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| :::note | ||||||||||
|
|
||||||||||
| Replace the `args` in the static transform publisher with the correct values for | ||||||||||
| your setup. The example above assumes that the `base_link` frame is in the same | ||||||||||
| position as the `FP_POI` frame. | ||||||||||
|
|
||||||||||
| ::: | ||||||||||
|
|
||||||||||
| To launch the driver, you can reboot the robot or restart the ROS nodes: | ||||||||||
|
|
||||||||||
| ```bash | ||||||||||
| ros-nodes-restart | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| :::tip | ||||||||||
|
|
||||||||||
| To view the ROS nodes logs for debugging purposes, you can use the following | ||||||||||
| command: | ||||||||||
|
|
||||||||||
| ```bash | ||||||||||
| ros-nodes-logs -f | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| ::: | ||||||||||
|
|
||||||||||
| Now you should have the driver up and running, and be able to see the data from | ||||||||||
| the sensor in ROS, provided that the sensor has been properly configured and the | ||||||||||
| correct data flow has been enabled in the sensor's web UI. | ||||||||||
|
Comment on lines
+314
to
+316
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add a screenshot or photo of the fully integrated system. For example terminal with echo from the gps data topic etc. Something that will show that integration was successful. |
||||||||||
|
|
||||||||||
| ## What's next? | ||||||||||
|
|
||||||||||
| Fixposition Vision-RTK 2 can be used in projects involving | ||||||||||
| [autonomous navigation](/leo-rover/advanced-guides/autonomous-navigation). You | ||||||||||
| might be interested in a tutorial about it. | ||||||||||
|
|
||||||||||
| You can also deploy long-duration mapping runs to capture centimeter-accurate | ||||||||||
| site models or use the data from the sensor to improve the stability of your | ||||||||||
| SLAM system. | ||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| import ProductPreview from '@site/src/components/ProductPreview'; | ||
|
|
||
| <ProductPreview | ||
| shopUrl="https://www.leorover.tech/shop/fixposition-vision-rtk-2" | ||
| imageSrc="/img/robots/leo/integrations/vision-rtk2/leo-with-fixposition-render.webp" | ||
| width={4000} | ||
| height={3000} | ||
| title="Fixposition Vision-RTK 2" | ||
| description="Multi-sensor RTK GNSS system with integrated vision and IMU, delivering centimeter-level | ||
| positioning and reliable localization even in GNSS-denied environments. Perfect for enhancing | ||
| mobile robot autonomy." | ||
| /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better SEO title
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also: then changing the title, please add separate H1 title in the tutorial