powershell vs cmd
Hi, I installed ROS2 on Windows 10 and followed the instructions properly. In the end, I wanted to run the example.
When I run the command "call C:\dev\ros2_galactic\ros2-windows\local_setup.bat
" and commands for talker and listener in cmd, it works without problem. However, in Powershell, it gives error?
I googled it and found out that bat.files should be run in different way in Powershell? Then, I tried "Start-Process -FilePath C:\dev\ros2_galactic\ros2-windows\local_setup.bat
" . It looked like worked but when I run ros2 command, it gives error. I also tried, "Powershell.exe -ExecutionPolicy Unrestricted -command C:\dev\ros2_galactic\ros2-windows\local_setup.bat
" and I got the same problem and same for "powershell C:\dev\ros2_galactic\ros2-windows\local_setup.bat
".
How can I run "ros2 run demo_nodes_cpp talker
" and "ros2 run demo_nodes_py listener
" in Powershell? Why do these examples work in cmd but not in Powershell?