Other demos won't work after Gazebo

Hi I have been following a tutorial titled “Running Magni in Simulation” and it works, and I killed the node of Gazebo by Ctrl+C (I ran “$ roslaunch magni_gazebo empty_world.launch”) on a workstation. However, this is the rostopic list after killing the node.

kill

The default topics went back after rebooting Magni by “$ sudo reboot” in a ssh window, but should I reboot every time after launching Gazebo? If I don’t have to reboot, is there any commands or suggestions that I should follow?

I am asking this question because when I work on another demo for fiducial-based localization right after killing Gazebo,
On a ssh window 1,
$ roslaunch magni_demos simple_navigation.launch
On a ssh window 2,
$ roslaunch magni_bringup core.launch
On a workstation,
$ roslaunch magni_viz view_nav.launch
I got a warning “Global Status: Warn Fixed Frame No tf data. Actual error: Fixed Frame [map] does not exist” on Rviz.

Without launching Gazero or after rebooting, these commands for fiducial-based localization work appropriately.

Thank you

After you run Gazebo perhaps all that is required is to reset your ROS environment.
From your laptop home directory try ‘source .bashrc’. You must do that in any open terminal window on your laptop that you want to run ros commands to the Magni most likely.

I am sure others will comment here but I suspect your environment variables have been changed by Gazibo. Typing ‘env | grep ROS_’ on laptop will show the ROS environment variables and take note of if ROS_MASTER_URI has been set to the laptop for running gazibo because it must be set to your Magni to work with Magni as the master.

When running Gazebo the entire ROS system was just on the laptop. When you run a Magni the ROS master is the Magni.

I generally reboot but when I switch between robots I do things similar to above.

1 Like