Skip to content

hungarianrobot/Project-5-Exploration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

HURBA: Exploration tutorial V.

Dependencies:

Project build instrctions:

  1. Clone this repo inside the src folder of a catkin workspace: git clone https://github.com/hungarianrobot/Project-5-Exploration
  2. Build workspace: catkin_make
  3. Source environment: source devel/setup.bash
  4. We'll use a simulated IMU and the robot_pose_ekf package for sensor fusion. robot_pose_ekf will provide transformation between odom frame and base_link so we have to disable the default transformation of Gazebo! Edit /opt/ros/melodic/share/gazebo_ros/launch/empty_world.launch:
<!-- start gazebo server-->
  <node name="gazebo" pkg="gazebo_ros" type="gzserver" respawn="false" output="screen" 
    args="$(arg command_arg1) $(arg command_arg2) $(arg command_arg3) $(arg world_name)">    
  <remap from="tf" to="gazebo_tf"/> 
</node>

Note: we can use the roswtf package anytime to debug tf issues! E.g. in this case this is the output of roswtf:

Found 2 error(s).

ERROR TF re-parenting contention:
 * reparenting of [base_footprint] to [odom_combined] by [/robot_pose_ekf]
 * reparenting of [base_footprint] to [odom] by [/gazebo]

ERROR TF multiple authority contention:
 * node [/robot_pose_ekf] publishing transform [base_footprint] with parent [odom_combined] already published by node [/gazebo]
 * node [/gazebo] publishing transform [base_footprint] with parent [odom] already published by node [/robot_pose_ekf]

Test the simulation

  1. Start the Gazebo simulation: roslaunch hurba_exploration bringup.launch
  2. Start the teleop package: roslaunch hurba_exploration teleop.launch
  3. Drive the omnidirectional robot inside the simulated environment.

alt text

Exploration launch file

  • Start the exploration: roslaunch hurba_exploration explore.launch

alt text

Twist mux and velocity smoother:

There are two additional nodes in the command chain of the simulated robot:

  • Twist mux (twist_mux)
  • Velocity smoother (cob_base_velocity_smoother)

Twist mux:

There might be several input sources that can control the robot (e.g. navigation stack, keyboard control, joystick control). Twist mux node can select the highest priority control source based on these two config files:

  • twist_mux_locks.yaml
  • twist_mux_topics.yaml

In our case, the robot can be controlled by the navigitaion stack (that is commanded by the exploration) and the keyboard teleop tool. The keyboard control has a higher priority so the operator can overdrive the navigion stack's command anytime.

Velocity smoother:

When the twist mux selected the highest priority command signal, it goes into the velocity smoother. The output of velocity smoother generates the final cmd_vel command that drives the simulated robot. The velocity smoother node is responsible for limiting the maximum acceleration and decceleration and stopping the robot when there is no command signal.

Rosgraph of exploration:

alt text

TF tree of the project:

alt text

Project structure:

tree -L 3
.
├── documentation
│   ├── exploration.png
│   ├── frames.png
│   ├── gazebo.png
│   ├── map.png
│   └── rosgraph.png
├── hurba_exploration
│   ├── CMakeLists.txt
│   ├── config
│   │   ├── base_local_planner_params.yaml
│   │   ├── costmap_common_params.yaml
│   │   ├── global_costmap_params.yaml
│   │   ├── global_planner_params.yaml
│   │   ├── local_costmap_params.yaml
│   │   ├── teb_local_planner_params.yaml
│   │   ├── twist_mux_locks.yaml
│   │   └── twist_mux_topics.yaml
│   ├── launch
│   │   ├── bringup.launch
│   │   ├── explore.launch
│   │   ├── robot_description.launch
│   │   ├── teleop.launch
│   │   └── world.launch
│   ├── meshes
│   │   ├── chassis.dae
│   │   ├── chassis.SLDPRT
│   │   ├── chassis.STEP
│   │   ├── hokuyo.dae
│   │   ├── wheel.dae
│   │   ├── wheel.SLDPRT
│   │   └── wheel.STEP
│   ├── package.xml
│   ├── rviz
│   │   └── exploration.rviz
│   ├── urdf
│   │   ├── hurba_mecanum.gazebo
│   │   └── hurba_mecanum.xacro
│   └── worlds
│       ├── basic_world.world
│       ├── building.model
│       ├── building.world
│       └── empty.world
└── README.md

Releases

No releases published

Packages

No packages published

Languages