ROS交流群
ROS Group
产品服务
Product Service
开源代码库
Github
官网
Official website
技术交流
Technological exchanges
激光雷达
LIDAR
ROS教程
ROS Tourials
深度学习
Deep Learning
机器视觉
Computer Vision

xiaoqiang tutorial (3) Displaying Xiaoqiang Robot Model in rviz



  • Xiaoqiang Homepage

    Displaying Xiaoqiang Robot Model in rviz

    It is a cool thing to display the current pose of the robot in real time. With rviz, you can easily achieve this goal in ROS. Look at the results:

    The Xiaoqiang model package located at Documents/ros/src/xiaoqiang_udrf and can also be downloaded from our open source repository on Github.

    # Connect the Xiaoqiang host to the monitor and keyboard, and after booting, open the terminal
    # stop the startup task first
    sudo service startup stop
    roscore
    # Open a new terminal on Xiaoqiang host, start this package
    roslaunch xiaoqiang_udrf display.launch
    

    Note that this process requires a graphical interface, so there is no way to operate through a remote ssh connection. If you must use ssh connection, you can add -X (note the capital) option when connecting, but the experience is not good and is not recommended. It is recommended to operate through VNC. VNC installation method can refer to this article.

    If you want to open the model package remotely, you need to install Xiaoqiang's model package locally. For users using the Xiaoqiang system image, Xiaoqiang's model package has been installed in advance.

    0_1536149758424_6cdf6f32-235c-4317-9658-1bd7d8744932-image.png

    0_1536149764875_881963c3-4493-4760-b099-123138ee7d0b-image.png

    At this point, there is no thing to display, you need to add rviz display items

    0_1536149787678_63a72c85-5cb4-47ae-81bf-7432238171ab-image.png

    0_1536149795091_1d97256a-d3a1-4956-b6a2-06485c7c8da5-image.png

    There is still a problem, the entire model is transparent and whitish, this is because the global coordinate system fixed frame in the rviz is not set properly, After map is changed to base_link, it will display normally

    0_1536149815803_ed84ade1-2d26-44b1-aba8-1cc82d50922a-image.png

    Now operate the slider in the upper right corner to turn the corresponding wheel.

    Above we simply demonstrated the use of rviz to display the urdf model. The following section will describe in detail the whole process of making urdf model with solidworks under windows system.

    First use solidworks to create the platform model, download and install the solidwork to urdf plug-in.

    After making a model, you need to add a coordinate system. This coordinate system will be used as the reference coordinate system of the entire urdf model (ie, the base_link frame in ROS).

    0_1536149867003_1cce9b61-3132-4ec2-866b-7f5f7b3d5e7b-image.png

    Open urdf plugin

    0_1536149882541_15d512fb-f066-4224-99f6-fce0023f6bfb-image.png

    Xiaoqiang has two driving wheels and one driven wheel, so the whole model needs 3 links, 3 joints. First edit the base_link, pay attention to the global coordinate system above, the red area in the picture is the item you need to click or modify.

    0_1536149902192_df79b244-30bb-4e6e-af8a-25fff4c3bb39-image.png

    Then right wheel

    0_1536149920556_6b17942f-d35d-4fd9-b60c-6b46291e5b05-image.png

    Continue the revolver and rear wheel

    0_1536149957391_90174cee-76a6-4ff8-8b8d-d481dc9cc9a7-image.png

    0_1536149965619_c75952f1-c141-45cc-91aa-cbf0b6a2e96e-image.png

    All settings are now complete, start exporting

    0_1536149988313_5e618c54-621d-48d8-a546-d68c5d8688c9-image.png

    All the way next and ok go

    0_1536150015728_919adc20-bc43-4615-aa04-2ab3260c761e-image.png

    0_1536150026545_4c88fc8f-1c0f-43c9-b769-d0eee1c26bd4-image.png

    0_1536150036201_b654c15f-e112-4431-8e64-c92490bf3f5f-image.png

    Now that we have obtained the robot’s urdf file, the entire generated folder is a ROS package. Modify the display.launch file in the launch folder and change false to true

    0_1536150055722_de413c95-0212-4117-aa6c-a4125a2efafd-image.png

    Copy this ros package to the ROS workspace. After running catkin_make, it can be tested and used by the method at the beginning of this article.

    Xiaoqiang Homepage
    Back To Index