ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

ROS Noetic : roscore not found after sourcing the setup.bash, even no broken packages

asked 2021-06-12 02:57:04 -0600

bavantha11 gravatar image

I have dual booted my laptop with Ubuntu 20.04 along with Windows 10. Then I have tried ROS Noetic installation and followed each & every step correctly in the guide. But roscore & other commands are not working!

Followed official site: http://wiki.ros.org/noetic/Installati...

Steps followed so far after installation:

  1. Open a new terminal
  2. Source the setup.bash for noetic --> source /opt/ros/noetic/setup.bash

  3. ran roscore to test the installation

    roscore

    Command 'roscore' not found, but can be installed with:

    sudo apt install python3-roslaunch

  4. Even tried to install roscore for noetic & it completes the installation without an error.

    sudo apt install --reinstall ros-noetic-roslaunch

  5. sourced the setup & tried again --> still not working with same roscore not found issue.

  6. Checked Installation files --> It is available too.

    ls /opt/ros/noetic/

    bin include local_setup.sh setup.sh share env.sh lib local_setup.zsh _setup_util.py etc local_setup.bash setup.bash setup.zsh

    ls /opt/ros/noetic/share/

    actionlib rosclean actionlib_msgs ros_comm actionlib_tutorials rosconsole angles rosconsole_bridge bond ros_core bond_core roscpp bondcpp roscpp_core bondpy roscpp_serialization camera_calibration roscpp_traits camera_calibration_parsers roscpp_tutorials camera_info_manager roscreate catkin ros_environment class_loader roseus cmake_modules rosgraph common-lisp rosgraph_msgs common_msgs roslang common_tutorials roslaunch compressed_depth_image_transport roslib compressed_image_transport roslint controller_interface roslisp controller_manager roslz4 controller_manager_msgs rosmake control_msgs rosmaster control_toolbox rosmsg cpp_common rosnode cv_bridge rosout depth_image_proc rospack desktop rosparam desktop_full rospy diagnostic_aggregator rospy_tutorials diagnostic_analysis rosservice diagnostic_common_diagnostics rostest diagnostic_msgs rostime diagnostics rostopic diagnostic_updater ros_tutorials diff_drive_controller rosunit dynamic_reconfigure roswtf eigen_conversions rqt_action executive_smach rqt_bag filters rqt_bag_plugins forward_command_controller rqt_common_plugins gazebo_dev rqt_console gazebo_msgs rqt_dep gazebo_plugins rqt_graph gazebo_ros rqt_gui gazebo_ros_control rqt_gui_cpp gazebo_ros_pkgs rqt_gui_py gencpp rqt_image_view geneus rqt_launch genlisp rqt_logger_level genmsg rqt_moveit gennodejs rqt_msg genpy rqt_nav_view geometry rqt_plot geometry_msgs rqt_pose_view geometry_tutorials rqt_publisher gl_dependency rqt_py_common hardware_interface rqt_py_console image_common rqt_reconfigure image_geometry rqt_robot_dashboard image_pipeline rqt_robot_monitor image_proc rqt_robot_plugins image_publisher rqt_robot_steering image_rotate rqt_runtime_monitor image_transport rqt_rviz image_transport_plugins rqt_service_caller image_view rqt_shell interactive_markers rqt_srv interactive_marker_tutorials rqt_tf_tree joint_limits_interface rqt_top joint_state_controller rqt_topic joint_state_publisher rqt_web joint_state_publisher_gui rviz kdl_conversions rviz_plugin_tutorials kdl_parser rviz_python_tutorial laser_assembler self_test laser_filters sensor_msgs laser_geometry shape_msgs laser_pipeline simulators librviz_tutorial smach map_msgs smach_msgs media_export smach_ros message_filters smclib message_generation stage message_runtime stage_ros mk std_msgs nav_msgs std_srvs nodelet stereo_image_proc nodelet_core stereo_msgs nodelet_topic_tools tf nodelet_tutorial_math tf2 pcl_conversions tf2_eigen pcl_msgs tf2_geometry_msgs pcl_ros tf2_kdl perception tf2_msgs perception_pcl tf2_py pluginlib tf2_ros pluginlib_tutorials tf_conversions polled_camera theora_image_transport position_controllers topic_tools python_qt_binding trajectory_msgs qt_dotgraph transmission_interface qt_gui turtle_actionlib qt_gui_cpp turtlesim qt_gui_py_common turtle_tf qwt_dependency turtle_tf2 realtime_tools urdf resource_retriever urdf_parser_plugin robot urdf_sim_tutorial robot_state_publisher urdf_tutorial ros vision_opencv rosbag visualization_marker_tutorials rosbag_migration_rule visualization_msgs rosbag_storage visualization_tutorials ros_base viz rosbash webkit_dependency rosboost_cfg xacro rosbuild xmlrpcpp

  7. Also I cannot see any ROS related env variables added after sourcing the setup.bash

    source /opt/ros/noetic/setup.bash

    printenv | grep ROS --> return nothing

  8. Even checked fro broken packages --> dpkg -l | grep ^..r --> returns nothing( from https://askubuntu.com/questions/77265...)

I dont know what is the issue here. Please help me to figure it out.

edit retag flag offensive close merge delete

Comments

Is your linux account running the bash shell? One way to check is the ps command. In my terminal the output looks like this:

$ ps
12413 pts/7    00:00:00 ps
31368 pts/7    00:00:00 bash
Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-06-20 11:00:12 -0600 )edit

Yes, It is running the bash shell.

*$ ps
PID      TTY          TIME CMD
16244 pts/0    00:00:00  bash
16429 pts/0    00:00:00  ps*
bavantha11 gravatar image bavantha11  ( 2021-07-19 04:29:33 -0600 )edit

At the command line, please show us the output of: env | grep ROS

Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-07-19 09:31:32 -0600 )edit

Please help I am facing the same issue and when I enter env | grep ROS on terminal it returns nothing.

Oneeyedeagle019 gravatar image Oneeyedeagle019  ( 2021-07-25 14:48:58 -0600 )edit

Thank you @Mike Scheutzow for being helpful.

Use following in your ~/.bashrc and restart a new terminal. Then I was able to use roscore. Sourcing it on the same terminal is not working. Same applied for ROS2 foxy in my case.

source /opt/ros/noetic/setup.bash

bavantha11 gravatar image bavantha11  ( 2021-08-27 11:43:20 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2021-07-25 14:59:02 -0600

Hi, I had a similar problem one fix is sourcing it in every single terminal you are running roscore, or rosrun on. But that's a temporary fix which will be a pain hope somebody answers how to source it automatically when your terminal starts, because editing .bashrc file isn't working for me either.

edit flag offensive delete link more
0

answered 2021-06-15 15:24:34 -0600

Youssef_Lah gravatar image

updated 2021-06-15 15:25:24 -0600

Here is my bashrc file for Noetic:

ROS:

source /opt/ros/noetic/setup.bash

source /opt/ros/noetic/setup.zsh

workspace:

source ~/catkin_ws/devel/setup.bash

master and host:

export ROS_MASTER_URI=http://localhost:11311

export ROS_HOSTNAME=localhost

edit flag offensive delete link more

Comments

Why are you sourcing setup.zsh ?

Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-07-19 09:29:38 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2021-06-12 02:57:04 -0600

Seen: 2,205 times

Last updated: Jun 15 '21