multiplexing between two topic
Hi i am using P3AT(USARSim simulator) and want to drive it from my ROS-Fuerte. what i want to do is,
Driving the robot using keyboard (using teleop_twist_keyboard)
Automated navigation of robot (using Navigation stack)
I want to drive the robot using keyboard but when i commit mistake(i.e. approaching to hit a wall) the automated behavior need to be activated.
by following this, i have my configuration file
example_cfg.yaml
subscribers:
- name: "Human_is_Driving"
topic: "teleop_cmd_vel"
timeout: 0.5
priority: 5
- name: "MACHINE_TAKES_OVER"
topic: "auto_cmd_vel"
timeout: 0.5
priority: 5
publisher: "velocity_multiplexer/mux_cmd_vel"
standalone.launch
<launch>
<node pkg="nodelet" type="nodelet" name="nodelet_manager" args="manager"/>
<node pkg="nodelet" type="nodelet" name="velocity_multiplexer" args="load cmd_vel_mux/CmdVelMuxNodelet nodelet_manager">
<param name="subscribers_cfg_file" value="$(find cmd_vel_mux)/param/example_cfg1.yaml"/>
<remap from="cmd_vel_mux/mux_cmd_vel" to="mobile_base/commands/velocity"/>
<remap from="cmd_vel_mux/web_cmd_vel" to="web_app_teleop"/>
<remap from="cmd_vel_mux/key_cmd_vel" to="key_cmd_vel"/>
<remap from="velocity_multiplexer/amcl_pose" to="amcl_pose" />
<remap from="velocity_multiplexer/move_base_simple/goal" to="move_base_simple/goal" />
</node>
</launch>
resulting rqt graphs of
i am not able to understand the complexity of the problem.
please help me to understand "how can i switch between cmd_vel used by teleop & cmd_vel used by move_base"