This package is used to load and run the simulation in Gazebo of the Archimede rover, with (not yet developed) or without the differential.
Install Ubuntu 18.04 LTS
Download .deb from here.
sudo apt install git
Follow the ROS install guide.
After installation go to ROS tutorial, as per the last step of the guide.
Follow Tutorial 1
Install matlab from mathworks
If robot4ws_simulations exists as a folder in the repository, then copy the folder in catkin_ws. If not, clone this repo directly in catkin_ws.
Clone robot4ws_msgs in catkin_ws/src, then run catkin_make in catkin_ws/
Clone robot4ws_description in catkin_ws/src
If using ROS kinetic git checkout kinetic
If using ROS melodic git checkout melodic
Then run catkin_make in catkin_ws/
Note: if an API error arises, run the following
nano ~/.ignition/fuel/config.yaml
Change the url from api.ignitionfuel.org to api.ignitionrobotics.org
- gazebo_realsense_plugin: repository
- robot4ws_description: repository
- robot4ws_kinematics: repository
- robot4ws_teleop_keyboard: repository
- robot4ws_teleop_controller: repository
- hector_gazebo_plugins: repository
- (Depends from the forked version of ros-realsense repository) realsense-ros-gazebo repository
sudo apt-get install ros-melodic-hector-gazebo-plugins
Everytime we open a Terminal we should do the following:
- Run
source devel/setup.bashincatkin_ws/to activate the workspace - Run
roslaunch robot4ws_simulations archimede_gazebo_basic.launch include_plugins:=true
To reset the simulation run rosservice call /gazebo/reset_simulation "{}"
The plugin /src/archimede_get_body_pose.cpp (header: /include/archimede_get_body_pose.h) writes on the HDD, at each timestep, the position and velocity data of the bodies specified in robot4ws_description. Data is a CSV file.
This can be found usually in src/robot4ws_simulations/data/link_data, unless otherwise specified in robot4ws_description.
The robot is controlled using ROS messages. Some examples are in /src/robot4ws_simulations/.
In the simulation environment *_Secondary are not used. In the physical environment these are used as additional parameters for some types of motor control techniques.
Hub motors
1 - Rear right wheel 2 - Front right wheel 3 - Rear left wheel 4 - Front left wheel
Steer motors
5 - Rear right wheel 6 - Front right wheel 7 - Rear left wheel 8 - Front left wheel
Naming scheme example
Hub motor for rear right wheel:
One_Primary
In /src/robot4ws_simulations/ there are some examples of messages to control the robot.
Run the rover companion app /RoverMatlab/main.mlapp.
At startup, no ROS node is detected. This is normal; press OK when prompted. When controlling hardware, the IP should be specified.
When simulating:
- Specify the namespace, in this case
Archimede. When using the hardware robot, this is left blank. - Check the
Simulationcheckbox.
Use the Teleop and Experimental testing tabs to control the robot.
In the app properties add the variable for the subscriber you want to subscribe to, e.g. gazebo_link_states_subscriber.
In initialize(app), in the simulation mode part of the if, add the subscription function call:
app.gazebo_link_states_subscriber = rossubscriber("/gazebo/link_states");