Cannot source workspace for Ros2 Dashing in Powershell
Hi there,
I seem to be having issues sourcing the workspace when using Powershell. For reference purposes, I am following this installation tutorial.
The instructions provided in the tutorial seem to be for a CMD. Therefore the command to setup the workspace is call C:\dev\ros2_dashing\local_setup.bat
. Instead I would like to run ROS2 in a Powershell window. Looking at the files under the extracted ros directory, there seems to exist a local_setup.ps1
file, which I suspect should be used to setup the workspace in Powershell (as also indicated here). However, when I run C:\dev\ros2_dashing\local_setup.ps1
I get the following errors:
_colcon_prefix_powershell_source_script : not found: 'C:\dev\ros2_dashing\share/ament_index_cpp/local_setup.ps1'
At line:1 char:1
+ _colcon_prefix_powershell_source_script "C:\dev\ros2_dashing\share/am ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,_colcon_prefix_powershell_source_scrip
t
_colcon_prefix_powershell_source_script : not found: 'C:\dev\ros2_dashing\share/ament_cmake_core/local_setup.ps1'
At line:1 char:1
+ _colcon_prefix_powershell_source_script "C:\dev\ros2_dashing\share/am ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,_colcon_prefix_powershell_source_scrip
t
...
As I understand it, the main local_setup.ps1
script is looking for other local_setup.ps1
scripts within each package directory under share
(i.e. C:\dev\ros2_dashing\share/ament_index_cpp/local_setup.ps1
, C:\dev\ros2_dashing\share/ament_cmake_core/local_setup.ps1
, etc.) , but these don't seem to exists, even though the local_setup.bat
equivalents are present.
Does anyone know how to go around this issue?
Thanks much in advance.