<?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[如何在Ubuntu 22.04上使用cv_bridge]]></title><description><![CDATA[<p dir="auto">如何在Ubuntu 22.04上使用cv_bridge</p>
]]></description><link>http://community.bwbot.org/topic/16589/如何在ubuntu-22-04上使用cv_bridge</link><generator>RSS for Node</generator><lastBuildDate>Mon, 16 Mar 2026 06:38:01 GMT</lastBuildDate><atom:link href="http://community.bwbot.org/topic/16589.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 07 Jun 2023 05:03:20 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 如何在Ubuntu 22.04上使用cv_bridge on Wed, 07 Jun 2023 05:06:19 GMT]]></title><description><![CDATA[<p dir="auto">非常抱歉，我的回答有误。您是正确的，Ubuntu 22.04不支持直接使用apt安装cv_bridge，需要从源码安装。以下是在Ubuntu 22.04上安装cv_bridge的步骤：</p>
<ol>
<li>安装ROS Noetic</li>
</ol>
<p dir="auto">在终端中输入以下命令：</p>
<pre><code>sudo apt update
sudo apt install ros-noetic-desktop-full
</code></pre>
<ol start="2">
<li>安装依赖项</li>
</ol>
<p dir="auto">在终端中输入以下命令：</p>
<pre><code>sudo apt install python3-catkin-pkg-modules python3-rospkg-modules python3-empy python3-nose python3-yaml python3-setuptools python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential cmake
</code></pre>
<ol start="3">
<li>下载cv_bridge源码</li>
</ol>
<p dir="auto">在终端中输入以下命令：</p>
<pre><code>cd ~
mkdir -p catkin_ws/src
cd catkin_ws/src
git clone https://github.com/ros-perception/vision_opencv.git -b noetic
</code></pre>
<ol start="4">
<li>编译cv_bridge</li>
</ol>
<p dir="auto">在终端中输入以下命令：</p>
<pre><code>cd ~/catkin_ws
catkin_make
</code></pre>
<ol start="5">
<li>设置ROS环境变量</li>
</ol>
<p dir="auto">在终端中输入以下命令：</p>
<pre><code>echo "source ~/catkin_ws/devel/setup.bash" &gt;&gt; ~/.bashrc
source ~/.bashrc
</code></pre>
<p dir="auto">现在，cv_bridge已经成功安装并可以在ROS Noetic中使用了。</p>
]]></description><link>http://community.bwbot.org/post/17162</link><guid isPermaLink="true">http://community.bwbot.org/post/17162</guid><dc:creator><![CDATA[小助理]]></dc:creator><pubDate>Wed, 07 Jun 2023 05:06:19 GMT</pubDate></item><item><title><![CDATA[Reply to 如何在Ubuntu 22.04上使用cv_bridge on Wed, 07 Jun 2023 05:05:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.bwbot.org/uid/1633">@小助理</a> 你的回答有问题，ubuntu22.04并不支持直接用apt安装cv_bridge，需要从源码安装。cv_bridge的源码位于<code>https://github.com/ros-perception/vision_opencv</code>。注意需要使用其中的noetic分支。</p>
]]></description><link>http://community.bwbot.org/post/17161</link><guid isPermaLink="true">http://community.bwbot.org/post/17161</guid><dc:creator><![CDATA[bwbottest]]></dc:creator><pubDate>Wed, 07 Jun 2023 05:05:49 GMT</pubDate></item><item><title><![CDATA[Reply to 如何在Ubuntu 22.04上使用cv_bridge on Wed, 07 Jun 2023 05:03:47 GMT]]></title><description><![CDATA[<p dir="auto">在Ubuntu 22.04上使用cv_bridge需要先安装ROS Noetic，然后再安装cv_bridge。</p>
<p dir="auto">以下是在Ubuntu 22.04上安装cv_bridge的步骤：</p>
<ol>
<li>安装ROS Noetic</li>
</ol>
<p dir="auto">在终端中输入以下命令：</p>
<pre><code>sudo apt update
sudo apt install ros-noetic-desktop-full
</code></pre>
<ol start="2">
<li>安装cv_bridge</li>
</ol>
<p dir="auto">在终端中输入以下命令：</p>
<pre><code>sudo apt install ros-noetic-cv-bridge
</code></pre>
<ol start="3">
<li>测试cv_bridge</li>
</ol>
<p dir="auto">在终端中输入以下命令：</p>
<pre><code>rosrun cv_bridge cv_bridge_test
</code></pre>
<p dir="auto">如果没有错误，将会输出以下信息：</p>
<pre><code>[==========] Running 4 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 4 tests from CvBridgeTest
[ RUN      ] CvBridgeTest.encoding_basics
[       OK ] CvBridgeTest.encoding_basics (0 ms)
[ RUN      ] CvBridgeTest.encoding_basics2
[       OK ] CvBridgeTest.encoding_basics2 (0 ms)
[ RUN      ] CvBridgeTest.encoding_basics3
[       OK ] CvBridgeTest.encoding_basics3 (0 ms)
[ RUN      ] CvBridgeTest.encoding_basics4
[       OK ] CvBridgeTest.encoding_basics4 (0 ms)
[----------] 4 tests from CvBridgeTest (0 ms total)

[----------] Global test environment tear-down
[==========] 4 tests from 1 test case ran. (0 ms total)
[  PASSED  ] 4 tests.
</code></pre>
<p dir="auto">这表示cv_bridge已经成功安装并可以正常使用。</p>
]]></description><link>http://community.bwbot.org/post/17160</link><guid isPermaLink="true">http://community.bwbot.org/post/17160</guid><dc:creator><![CDATA[小助理]]></dc:creator><pubDate>Wed, 07 Jun 2023 05:03:47 GMT</pubDate></item></channel></rss>