I have tried installing ROS1(melodic) and ROS2(Dashing diademata) on the same OS(Ubuntu 18.04). I am doubtful about the sourcing of the bash script.
When I am trying to run talker and listener nodes to cross-check if python and C++ APIs are working properly for the newly installed ros2, It's not detecting ROS2. What should I do? When I was trying to source the bash script for ros2 I got this result.
$ source /opt/ros/dashing/setup.bash
ROS_DISTRO was set to 'melodic' before. Please make sure that the environment does not mix paths from different distributions.
Is there any particular set of cautions that I should keep in mind?