Skip to content

BaoqianWang/MobileRobotNavigation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

smile-mobile

Welcome! Smile-mobile is an small autonomous ground vehicle seeking to develop its capabilities to be an intelligent autonomous system capable of navigating various environments, from nice paved rounds to bumpy, rocky terrian. The Smile-mobile software platform is built on the robotic operating system (ROS).

Project Structure

The ROS environment for smile-mobile is broken up into two seperate workspaces (catkin workspaces). The first workspace is the robot workspace which is contained in the directory smile_mobile_robot_ws. The robot workspace contains all of the software that runs on the robot (both physical and simulated); the software in this package should be agnostic of whether the robot is the physical or simulated robot.

The second workspace is the simulation workspace which is contained in the smile_mobile_sim_ws directory. The simulation workspace contains all the contents required for building the simulated world in gazebo and glueing together the robots control software with the simulated robot model.

Each of the workspaces contain ROS packages for various functions.

Building the Project

First navigate into the smile_mobile_robot_ws directory. Run the following

catkin_init_workspace
rosdep update
rosdep install --from-paths src --ignore-src -r -y
catkin_make
source devel/setup.bash

Now navigate into the smile_mobile_sim_ws directory and run the following. NOTE: Notice the sourcing order

catkin_init_workspace
rosdep update
rosdep install --from-paths src --ignore-src -r -y
catkin_make
source devel/setup.bash

Now, you should added the sourcing lines to the .bashrc so that the correct ROS_PACKAGE_PATH is set each time a new terminal is opened. Open the files with vim ~/.bashrc. At the end of the file, add

source /opt/ros/melodic/setup.bash
source ~/smile-mobile/smile_mobile_robot_ws/devel/setup.bash
source ~/smile-mobile/smile_mobile_sim_ws/devel/setup.bash

Adding the Gazebo World Models to Environment Variables

In order to launch the world correctly, the model paths for the smile mobile robot worlds need to be added to the environment variable path GAZEBO_MODEL_PATH. The best way to do this is to add the sourcing to the .bashrc. Note the directories shown below may differ for users.

source /usr/share/gazebo/setup.sh
export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:~/smile-mobile/smile_mobile_sim_ws/src/smile_mobile_gazebo/models/

Note: For some users, it maybe necessary to run chmod +x [Executable].py for any executable python scripts in the package.

Launching the Gazebo Simulation

Launching the Smile Mobile Robot in Gazebo simulation can all be done by running the following launch file within the package smile_mobile_robot. This simulation launchs the necessary simulation artifacts for gazebo alongside the robots movement controllers and raw odometry estimation.

Launch robot in empty world (will in future launch a custom world.)

roslaunch smile_mobile_robot main_sim.launch

The robot can be controlled by interfacing with the movement controller that executes velocity and steering controls. The following helper node allows to a desired velocity and steering angle. The first parameter is the velocity (current range ~[-0.5, 0.5]m/s). The second parameter is the steering angle (range [-pi, pi]).

rosrun smile_mobile_robot send_desired_movement --movement 0.4 1.579

The position estimated by the raw odometry node can viewed with the Position_Plotter Qt plugin.

rosrun smile_mobile_gui Position_Plotter

Note: If any issues are discovered, please set an issue inquiry in the github issues tab for this repo. Thanks!

About

Vision-based Autonoumous Driving Robot Capable of Navigation in Unknown and Dynamic Rural Environments

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published