A summary of mistakes/errors we made while using Virtual Machines
We followed the steps to install ROS on a virtual machine via https://github.com/LCAS/teaching/wiki/Home-Installation and had some issues with
roscore (See @Benjaminh21 on March 20th 13:14). If you have the same issues, this may help. At the very least it will help you avoid some steps we missed, which cost a little time. Nothing crazy.
* If you do not have a directory for your workspace (e.g. `/catkin_ws/src` ) Step A can help you with making one * If you have made these directories, but can not use `catkin_make` and still have the error `E: unable to locate package ros-kinetic-python-roslaunch` skip to Step B and this could help.
In your terminal, create a new directory for your catkin workspace.
If it works, congratulations. If not, continue to Step B afterwards.
* `mkdir -p ~/catkin_ws/src` * `cd ~/catkin_ws/src` * `catkin_init_workspace` *If this throws an error, go to Step B* * `cd ..` * `catkin_make` * `source devel/setup.bash` * `roslaunch uol_turtlebot_simulator maze1.launch`
Creating a build directory in your catkin workspace. So do this from your new workspace
Name@Name-Virtualbox:~/catkin_ws $. Ok, so, we began by frantically entering these commands:
* `sudo apt-get install cmake python-catkin-pkg python-empy python-nose python-setuptools libgtest-dev build-essential` * `sudo apt-get install ros-kinetic-catkin` * `sudo apt-get install -y catkin`
These will probably state
already installed or something about
dependancies. Also, this created a build folder in the
src directory, which is for
catkin build, not
catkin_make. So then, we did the following. This was found on the general ROS Install website, for Kinetic http://wiki.ros.org/kinetic/Installation/Ubuntu. This shows how much more streamlined the install on the LCAS wiki is, which is so much easier. Then we did the following in the home directory
Name@Name-Virtualbox:~ $ , not
* `source /opt/ros/kinetic/setup.bash`
A nice command on the site is
apt-cache search ros-kinetic. This will show you all of the ROS packages you have installed. After that, this we finally arrived at our solution:
* `sudo apt-get update` * `sudo apt-get upgrade` * `sudo apt autoremove` *if neccessary after upgrade* * `cd ~/catkin_ws/src` *if you are not within this directory already* * `catkin_init_workspace` * `cd ..` to `catkin_ws` * `catkin_make` * `source devel/setup.bash` * `roslaunch uol_turtlebot_simulator maze1.launch`
This should work fine. If not, state any issues below.
sudo apt-get install ros-kinetic-desktopas documented in https://github.com/LCAS/teaching/wiki/Home-Installation
So this lockdown has forced me back into trying to get it working on a VM on my laptop haha. I'm aware that the simulator has issues with crashing on startup even on the lab PCs, but every time I try to run it with
roslaunch uol_turtlebot_simulator simple.launch the windows all open up but I get a crash error soon after.
[gazebo-1] process has died [pid 25820, exit code 139, cmd /opt/ros/kinetic/lib/gazebo_ros/gzserver -e ode /opt/ros/kinetic/share/uol_turtlebot_simulator/worlds/empty_maze.world __name:=gazebo __log:=/home/tom/.ros/log/254ad232-6ddc-11ea-bc8c-080027db349c/gazebo-1.log].
log file: /home/tom/.ros/log/254ad232-6ddc-11ea-bc8c-080027db349c/gazebo-1*.log
Should I post the log file or there is something obvious I'm possibly missing?
The simulator window and toolbars open up, and the Gazebo startup message saying 'Preparing your world' appears, but it gets stuck on that and crashes.
The same error and exit code appears when launching
maze1.launch as well unfortunately. Although the message about the physics appearing after the process dies is maybe notable? It doesn't appear when I try to run
[gazebo-2] process has died [pid 30202, exit code 139, cmd /opt/ros/kinetic/lib/gazebo_ros/gzserver -e ode /opt/ros/kinetic/share/uol_turtlebot_simulator/worlds/maze1.world __name:=gazebo __log:=/home/tom/.ros/log/5d02f256-6ddf-11ea-bc8c-080027db349c/gazebo-2.log].
log file: /home/tom/.ros/log/5d02f256-6ddf-11ea-bc8c-080027db349c/gazebo-2*.log
[ INFO] [1585061676.815238312, 0.090000000]: Physics dynamic reconfigure ready.
killall gzclient and
killall gzserverdon't appear to find any processes to kill after the simulator is closed unfortunately
```to paste multiple lines in verbatim (at beginning and end of your pasted logs)
SUMMARY ======== PARAMETERS * /bumper2pointcloud/pointcloud_radius: 0.24 * /cmd_vel_mux/yaml_cfg_file: /opt/ros/kinetic/... * /depthimage_to_laserscan/output_frame_id: /camera_depth_frame * /depthimage_to_laserscan/range_max: 100 * /depthimage_to_laserscan/range_min: 0.001 * /depthimage_to_laserscan/scan_height: 10 * /robot_description: <?xml version="1.... * /robot_state_publisher/publish_frequency: 30.0 * /rosdistro: kinetic * /rosversion: 1.12.14 * /use_sim_time: True NODES / bumper2pointcloud (nodelet/nodelet) cmd_vel_mux (nodelet/nodelet) depthimage_to_laserscan (nodelet/nodelet) gazebo (gazebo_ros/gzserver) gazebo_gui (gazebo_ros/gzclient) laserscan_nodelet_manager (nodelet/nodelet) mobile_base_nodelet_manager (nodelet/nodelet) robot_state_publisher (robot_state_publisher/robot_state_publisher) spawn_turtlebot_model (gazebo_ros/spawn_model) auto-starting new master process[master]: started with pid  ROS_MASTER_URI=http://localhost:11311 setting /run_id to b039ca0c-6de0-11ea-bc8c-080027db349c process[rosout-1]: started with pid  started core service [/rosout] process[gazebo-2]: started with pid  process[gazebo_gui-3]: started with pid  process[spawn_turtlebot_model-4]: started with pid  process[mobile_base_nodelet_manager-5]: started with pid  process[cmd_vel_mux-6]: started with pid  process[bumper2pointcloud-7]: started with pid  process[robot_state_publisher-8]: started with pid  process[laserscan_nodelet_manager-9]: started with pid  process[depthimage_to_laserscan-10]: started with pid  /usr/local/lib/python2.7/dist-packages/pkg_resources/py2_warn.py:22: UserWarning: Setuptools will stop working on Python 2 ************************************************************ You are running Setuptools on Python 2, which is no longer supported and >>> SETUPTOOLS WILL STOP WORKING <<< in a subsequent release (no sooner than 2020-04-20). Please ensure you are installing Setuptools using pip 9.x or later or pin to `setuptools<45` in your environment. If you have done those things and are still encountering this message, please comment in https://github.com/pypa/setuptools/issues/1458 about the steps that led to this unsupported combination. ************************************************************ sys.version_info < (3,) and warnings.warn(pre + "*" * 60 + msg + "*" * 60) [ INFO] [1585062241.475659859]: Finished loading Gazebo ROS API Plugin. [ INFO] [1585062241.478155008]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting... [ INFO] [1585062241.703357413]: Finished loading Gazebo ROS API Plugin. [ INFO] [1585062241.704824629]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting... [ INFO] [1585062244.253139125, 0.010000000]: Camera Plugin: Using the 'robotNamespace' param: '/' [ INFO] [1585062244.303053988, 0.010000000]: Camera Plugin (ns = /) <tf_prefix_>, set to "" [ INFO] [1585062244.695194925, 0.010000000]: Starting plugin Kobuki(ns = //) [ WARN] [1585062244.695716005, 0.010000000]: Kobuki(ns = //): missing <rosDebugLevel> default is na [ INFO] [1585062244.700539416, 0.010000000]: Kobuki(ns = //): <tf_prefix> = [ INFO] [1585062244.701375159, 0.010000000]: Will publish tf. [mobile_base] [ INFO] [1585062244.715990032, 0.010000000]: Kobuki(ns = //): Advertise joint_states[joint_states]! [ INFO] [1585062244.719216293, 0.010000000]: Kobuki(ns = //): Advertise Odometry[odom]! Unhandled exception in thread started by sys.excepthook is missing lost sys.stderr [spawn_turtlebot_model-4] process has finished cleanly log file: /home/tom/.ros/log/b039ca0c-6de0-11ea-bc8c-080027db349c/spawn_turtlebot_model-4*.log Segmentation fault (core dumped) [gazebo-2] process has died [pid 32161, exit code 139, cmd /opt/ros/kinetic ..
roslaunch gazebo_ros empty_world.launchto only start gazebo and see of that work on its own
sudo mv /usr/local /usr/local.offI can successfully open up the empty world simulation but I still get the same error on the mazes unfortunately (I hadn't tried the empty world before running that command so unsure if that fixed it). I'll look into the remote access option and see if I can get that working for now. Thank you for the help anyway!
killall -9 gzserverbefore trying just to be on the safe side (also, shouldn't be necessary, but experience shows it's a good idea)