Study: Robotics(Robot)/Robot: Positioning

[Positioning] ROS mapviz ์‚ฌ์šฉํ•˜๊ธฐ (feat. GPS topic ์ขŒํ‘œ์ฐ๊ธฐ)

DrawingProcess 2023. 7. 19. 10:43
๋ฐ˜์‘ํ˜•
๐Ÿ’ก ๋ณธ ๋ฌธ์„œ๋Š” 'ROS mapviz ์‚ฌ์šฉํ•˜๊ธฐ (feat. GPS topic ์ขŒํ‘œ์ฐ๊ธฐ)'์— ๋Œ€ํ•ด ์ •๋ฆฌํ•ด๋†“์€ ๊ธ€์ž…๋‹ˆ๋‹ค.
~~~์ •๋ฆฌํ•˜์˜€์œผ๋‹ˆ ์ฐธ๊ณ ํ•˜์‹œ๊ธฐ ๋ฐ”๋ž๋‹ˆ๋‹ค.

1. Getting Started

i) Package Install

The easiest way to install Mapviz is using apt-get:

$ sudo apt-get install ros-$ROS_DISTRO-mapviz \
                       ros-$ROS_DISTRO-mapviz-plugins \
                       ros-$ROS_DISTRO-tile-map \
                       ros-$ROS_DISTRO-multires-image

ii) Building From Source

These directions assume you have already set up a catkin workspace. If not, see this tutorial on the ROS Wiki to set one up.

ROS 1

Check out the source

$ git clone https://github.com/swri-robotics/mapviz.git

Install dependencies

$ rosdep install --from-paths src --ignore-src

Install all of the dependencies using rosdep by running the following command from the root of your catkin workspace:

Build the workspace:

$ catkin_make

ROS 2

Check out the source

$ git clone https://github.com/swri-robotics/mapviz.git -b ros2-devel

Install dependencies

$ rosdep install --from-paths src --ignore-src

Install all of the dependencies using rosdep by running the following command from the root of your catkin workspace:

Build the workspace:

$ colcon build

3. Error Fix

When I was install "ros noetic" version. I got a that Issue

When I was install "ros 2 foxy" version. I got a that Issue

...
[INFO] [1641567575.005096307] [mapviz_1641567574898326938]: Loading configuration from /home/sageig/.mapviz_config
[ERROR] [1641567575.005294574] [mapviz_1641567574898326938]: Unhandled std::exception in Qt event loop: bad file

I checked my log messages and I see the following problem, so I think it is caused by not installing a graphics card.

1689188997.5140915 [mapviz-1] libGL error: No matching fbConfigs or visuals found
1689188997.5182383 [mapviz-1] libGL error: failed to load driver: swrastโ€‹

Ref. [Github][Galactic] Crashes on start #751: https://github.com/swri-robotics/mapviz/issues/751

and... 

Ref. [Github] ROS2 Foxy can't use launch file. #712: https://github.com/swri-robotics/mapviz/issues/712

Ref.

๋ฐ˜์‘ํ˜•