<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[xiaoqiang tutorial (4) Inertial navigation test]]></title><description><![CDATA[<p dir="auto"><a href="https://www.bwbot.org/en/products/xiaoqiang-4-pro" target="_blank" rel="noopener noreferrer">Xiaoqiang Homepage</a></p>
<h2>inertial navigation test</h2>
<p dir="auto">In the previous tutorial, we have maked a 3D model of xiaoqiang, we will start to test xiaoqiang’s inertial navigation function. The inertial navigation here is to use Xiaoqiang’s own inertial sensors (acceleration and gyroscope) and encoder information to locate. The required ROS packages are:</p>
<ol>
<li>Driver <a href="https://github.com/BlueWhaleRobot/xqserial_server" target="_blank" rel="noopener noreferrer">xqserial_server</a></li>
<li>Robot model package <a href="https://github.com/BlueWhaleRobot/xiaoqiang_udrf" target="_blank" rel="noopener noreferrer">xiaoqiang_udrf</a></li>
<li>Inertial Navigation Test Package <a href="https://github.com/BlueWhaleRobot/nav_test" target="_blank" rel="noopener noreferrer">nav_test</a>.</li>
</ol>
<p dir="auto">Below is the final result of the tutorial.</p>
<p dir="auto"><video src="http://community.bwbot.org/uploads/files/1464268939943-selfmove_rviz1.mp4" controls width="100%"></video></p>
<p dir="auto">the structure of ROS navigation stack is shown in the following two figures: If you are not familiar with the ROS navigation stack, please move to this <a href="http://wiki.ros.org/navigation" target="_blank" rel="noopener noreferrer">tutorial</a></p>
<p dir="auto"><img src="/assets/uploads/files/1536150456054-1eda39fe-351a-493f-bfee-81f28aadb8d6-image-resized.png" alt="0_1536150454172_1eda39fe-351a-493f-bfee-81f28aadb8d6-image.png" class=" img-responsive img-markdown" /></p>
<p dir="auto"><img src="/assets/uploads/files/1536150489592-a7ebf547-5a4e-4c70-9de1-f8c90251a6d1-image-resized.png" alt="0_1536150487780_a7ebf547-5a4e-4c70-9de1-f8c90251a6d1-image.png" class=" img-responsive img-markdown" /></p>
<h3>1. remote operation on Xiaoqiang host</h3>
<p dir="auto">Please ensure that Xiaoqiang has started normally. Xiaoqiang host will automatically run the three software packages mentioned after normal startup. You don’t need to launch the corresponding launch file manually. If you don’t have the three packages installed, please  install and upgrade these three software packages yourself. Then update the startup task (please refer to the <a href="https://community.bwbot.org/topic/551" target="_blank" rel="noopener noreferrer">robot_upstart tutorial</a>) and restart it.</p>
<p dir="auto">a. Open a new terminal and start the navigation program</p>
<pre><code class="language-bash">ssh -X xiaoqiang@192.168.xxx.xxx 
# Restart the service program, some program may not be running
sudo service startup restart
roslaunch nav_test fake_move_base_blank_map.launch
</code></pre>
<p dir="auto">If there is an error saying “You must specify at least three point for the robot footprint”, Just ignore it. This is because <code>foot_print</code> requires setting a shape, so at least three points are required. <code>foot_print</code> is the outline shape of the robot. This parameter is used to avoid obstacles. Xiaoqiang’s <code>foot_print</code> sets a circle, so there is no need to specify three points. If the tf tree that appears is not the same as the following figure, please check whether the drive is running normally.</p>
<p dir="auto">b. Open a new terminal and check if all tf are in place</p>
<pre><code class="language-bash">ssh -X xiaoqiang@192.168.xxx.xxx
rosrun tf view_frames
evince frames.pdf
</code></pre>
<p dir="auto">If the output looks like following</p>
<p dir="auto"><img src="/assets/uploads/files/1537605014137-db30edf1-b48b-44ed-b1fc-9b77f5e48ad3-image.png" alt="0_1537605013399_db30edf1-b48b-44ed-b1fc-9b77f5e48ad3-image.png" class=" img-responsive img-markdown" width="733" height="215" /></p>
<p dir="auto">Follow the prompts to select one <code>view_frame</code>.</p>
<p dir="auto">Normal will show the following picture</p>
<p dir="auto"><img src="/assets/uploads/files/1536150584264-36bde49d-7021-467b-b79c-51987943f19e-image-resized.png" alt="0_1536150582423_36bde49d-7021-467b-b79c-51987943f19e-image.png" class=" img-responsive img-markdown" /></p>
<h3>2. Operation completed on the local machine</h3>
<p dir="auto">The local machine must be a Ubuntu system with corresponding ROS installed. Please refer to Section 1.2 of <a href="https://community.bwbot.org/topic/550" target="_blank" rel="noopener noreferrer">Tutorial (1)</a> to install Xiaoqiang System Image. At the same time, it is guaranteed to be in the same local area network as Xiaoqiang. Because it is necessary to use rviz to display the Xiaoqiang pose and path trajectory in rviz on the local window (the rviz cannot be directly opened in ssh), a distributed network configuration of ROS is needed, and the robot model package <code>xiaoqiang_udrf</code> is also required to be installed on the local machine. In summary: The local machine opens its own rviz, receives and displays the topic on the Xiaoqiang host, and the Xiaoqiang model data is obtained directly from the local. The specific process is as follows:</p>
<p dir="auto">a. Open a terminal in the local, add Xiaoqiang’s ip in the local hosts file</p>
<pre><code class="language-bash">sudo gedit /etc/hosts
# Add to 
xxx.xxx.xxx.xxx xiaoqiang-desktop  # Please change xx to actual ip
</code></pre>
<p dir="auto">b. Open a new terminal input</p>
<pre><code class="language-bash">export ROS_MASTER_URI=http://xiaoqiang-desktop:11311
# Continue to execute
rostopic list
</code></pre>
<p dir="auto">If you can see Xiaoqiang’s topic, it means the configuration is successful.</p>
<p dir="auto">d. Users who installed Xiaoqiang system image do not need perform this step. Install the model package, update the local ROS package environment variable, because the model data needs to be read from the local</p>
<pre><code class="language-bash">mkdir  ~/Documents/ros/src
cd  ~/Documents/ros/src
catkin_init_workspace
git clone https://github.com/BlueWhaleRobot/xiaoqiang_udrf.git
#Xiaoqiang pro user switches to the master branch
cd xiaoqiang_udrf
git checkout master
#Xiaoqiang mini user switches to mini branch
cd xiaoqiang_udrf
git checkout mini
# xiaoqiang XQ5 user switchs to lungu branch
cd xiaoqiang_udrf
git checkout lungu
# Completion of the installation
cd ..
cd ..
catkin_make
</code></pre>
<p dir="auto">e. Open the rviz.</p>
<pre><code class="language-bash">export ROS_MASTER_URI=http://xiaoqiang-desktop:11311
source ~/Documents/ros/devel/setup.sh  
rviz
</code></pre>
<p dir="auto">When the window opens, click on file-&gt;open in the upper left corner and select the <code>/home/xiaoqiang/Documents/ros/src/nav_test/config/nav.rviz</code> file in Xiaoqiang. At this time, the interface should be displayed as shown below. Please refer to the previous tutorial for how to access the files on the Xiaoqiang host.</p>
<p dir="auto"><img src="/assets/uploads/files/1536150751749-207116e1-ab75-44f6-9fda-ab225713e5eb-image-resized.png" alt="0_1536150749799_207116e1-ab75-44f6-9fda-ab225713e5eb-image.png" class=" img-responsive img-markdown" /></p>
<h3>3. Complete the last operation in the remote host ssh window</h3>
<pre><code class="language-bash">rosrun nav_test square.py
</code></pre>
<p dir="auto">If Xiaoqiang cannot move, check if the platform driver is working properly. You can enter rostopic echo /system_monitor/report If there is a voltage display, the platform drive is normal.如If it still cannot be moved, you can check whether Xiaoqiang infrared sensor is triggered or not. The infrared sensor will glow red when triggered.</p>
<h3>4. Now you can see the video effect at the beginning of the article in rviz, enjoy it!</h3>
<p dir="auto"><a href="https://www.bwbot.org/en/products/xiaoqiang-4-pro" target="_blank" rel="noopener noreferrer">Xiaoqiang Homepage</a><br />
<a href="https://community.bwbot.org/topic/617" target="_blank" rel="noopener noreferrer">Back To Index</a></p>
]]></description><link>http://community.bwbot.org/topic/553/xiaoqiang-tutorial-4-inertial-navigation-test</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Apr 2026 08:29:44 GMT</lastBuildDate><atom:link href="http://community.bwbot.org/topic/553.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 05 Sep 2018 12:33:51 GMT</pubDate><ttl>60</ttl></channel></rss>