<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Nikhil Nair</title>
    <description>The latest articles on DEV Community by Nikhil Nair (@icebelly29).</description>
    <link>https://dev.to/icebelly29</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F923549%2F10803ebf-ab2c-4e7f-a448-bfd6f2db7016.jpeg</url>
      <title>DEV Community: Nikhil Nair</title>
      <link>https://dev.to/icebelly29</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/icebelly29"/>
    <language>en</language>
    <item>
      <title>One-Click ROS 2 Startup in Windows Terminal with Pixi</title>
      <dc:creator>Nikhil Nair</dc:creator>
      <pubDate>Tue, 20 Oct 2026 08:17:17 +0000</pubDate>
      <link>https://dev.to/icebelly29/one-click-ros-2-startup-in-windows-terminal-with-pixi-2mb8</link>
      <guid>https://dev.to/icebelly29/one-click-ros-2-startup-in-windows-terminal-with-pixi-2mb8</guid>
      <description>&lt;h1&gt;
  
  
  One-Click ROS 2 Startup in Windows Terminal with Pixi
&lt;/h1&gt;

&lt;p&gt;A guide to automating the startup and environment initialization for ROS 2 inside Pixi environments on Windows using a dedicated Windows Terminal profile.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;Running ROS 2 on Windows often requires navigating to your workspace, activating the Pixi environment (&lt;code&gt;pixi shell&lt;/code&gt;), and sourcing the ROS 2 setup batch script (&lt;code&gt;call local_setup.bat&lt;/code&gt;). Because &lt;code&gt;pixi shell&lt;/code&gt; launches a nested interactive subshell, standard terminal chaining commands like &lt;code&gt;cmd /k&lt;/code&gt; can drop out of scope or fail to retain ROS 2 environment variables.&lt;/p&gt;




&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Create the Launch Script
&lt;/h3&gt;

&lt;p&gt;Create a helper script inside your workspace (&lt;code&gt;C:\pixi_ws\launch_ros2.bat&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight batchfile"&gt;&lt;code&gt;@echo &lt;span class="na"&gt;off&lt;/span&gt;

&lt;span class="c"&gt;:: Sourcing the ROS 2 environment&lt;/span&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt; &lt;span class="na"&gt;/d &lt;/span&gt;&lt;span class="kd"&gt;C&lt;/span&gt;:\pixi_ws
&lt;span class="k"&gt;call&lt;/span&gt; &lt;span class="kd"&gt;C&lt;/span&gt;:\pixi_ws\ros2&lt;span class="na"&gt;-windows&lt;/span&gt;\local_setup.bat
&lt;span class="nb"&gt;cmd&lt;/span&gt; &lt;span class="na"&gt;/k
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Configure Windows Terminal
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Open Windows Terminal and press &lt;code&gt;Ctrl + ,&lt;/code&gt; to open Settings.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Open JSON file&lt;/strong&gt; at the bottom-left.&lt;/li&gt;
&lt;li&gt;In the &lt;code&gt;"profiles": { "list": [ ... ] }&lt;/code&gt; array, add:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"guid"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"{b2c4e567-89ab-cdef-0123-456789abcdef}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ROS 2 (Pixi)"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"commandline"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"cmd.exe /k &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;cd /d C:&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;pixi_ws &amp;amp;&amp;amp; pixi run -- cmd /k C:&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;pixi_ws&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;launch_ros2.bat&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"startingDirectory"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"C:&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;pixi_ws"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"hidden"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Verification
&lt;/h2&gt;

&lt;p&gt;Open your new tab from the Windows Terminal dropdown and verify:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ros2 --help
ros2 run demo_nodes_cpp talker
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>ros2</category>
      <category>robotics</category>
      <category>microsoft</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
