Hey, I am just learning to start to use ROS 2 after using ROS for about half a year. After installing ROS2 based on this, I was able to run the simple talker-listener nodes. However, after setting up my environment based on this and installing the turtlesim and rqt based on this, it doesn't work anymore. I can't see any output on the terminal. A new command-line comes like sown on the image here.
I'm wondering what the problem is, and how I can fix it. Any help is appreciated.
Originally posted by Anjulo on ROS Answers with karma: 3 on 2021-06-29
Post score: 0
Original comments
Comment by trunc8 on 2021-06-30:
Your snippet is from demo_nodes_cpp, but I can try to give some intuition from demo_nodes_py. If you look at the main function in this code, if there is any exception, the node will gracefully shutdown.
Can you share more details on what works and what doesn't?
A few pointers to consider, are there unnecessary source
lines in your ~/.bashrc? Are there ros2 nodes running in the background?
Comment by Anjulo on 2021-06-30:
Oh, my bad. I have both ROS and ROS2 installations. I set up a bash alias to source each one every time I want to use one. My alias for ROS2 was ros1, which was obviously causing the problem because it conflicts with the ros2 command which is already usedto run the node and everything in ROS2. I modified it to ros_2 and it works fine now.
Thanks!