Proper Working of cmd_vel_mux for Velocity Multiplexing
Hello,
I am using ROS fuerte version and the simulator is USARSim.
::AIM:: Now, I try to use the velocity multiplexer (sudo apt-get install ros-fuerte-yujin-ocs) designed by YujinRobot(http://wiki.ros.org/cmd_vel_mux) for multiplexing between teleoperation and autonomous navigation. I use rviz for setting the goal for autonomous navigation.
::ACTION TAKEN:: I have used following command to bring nodelet_manager and velocity_multiplexer:
roslaunch cmd_vel_mux standalone.launch
and following is the example_cfg.yaml
subscribers:
• name: "Teleoperation"
topic: "teleop_cmd_vel"
timeout: 180
priority: 10
• name: "Navigation"
topic: "cmd_vel"
timeout: 0.1
priority: 0
TASK 1 I want to give more priority to teleoperation. Before declaring the /teleop_cmd_vel to be inactive topic for multiplexing, I want the timeout period to be more.
TASK 2 I don't want the autonomous navigator of ROS snatch away the driving control. But, I am not getting the proper behavior that I am expecting. The autonomous controller snatch away the control before the 180 second (even if both topics are active) from teleoperation.
Question:What may be the reason that the robot is not following exactly the example_cfg.yaml?
If it goes like this then adding dynamic reconfigure server will not be fruitful for my experiment.
ALL The Nodes Launched Properly.
RESULT
1.TOPICS DON"T FOLLOW PRIORITY CONFIG FILE?
- timeout for "teleop_cmd_vel" is 180 seconds, but as you can see in the following screenshot, two no new messages should not deliver the control to "cmd_vel" i.e autonomous navigator; but surprisingly it is happening.
PLZ REPLY :-)
Who will be the publisher of output topic /cmd_vel
As the velocity multiplexer don't publish to /cmd_vel (output topic of config file), should I modify the code?
RAW Config File Config File.jpg
Modified Config File M_Config.jpg
The config looks correct to me. You can debug the individual input and output topics via rostopic echo to verify that this is really the source of the problem.
@dornhege, I have added two screenshots; so whenever I stop pressing keys in teleoperation, no new messages in that topic. So, the topic becomes inactive although it should wait for 180 seconds according to config file....Again avg publishing rate slowly increases in case of teleopearation, that's why the robot don't want to listen to teleope controller, I think? Does the package has some other criteria like it only works for Kobuki?
You should spend some time formatting your question properly, and perhaps include a screenshot of the node graph from a tool like RQT graph.
@ahendrix, I will definitely add the screenshot. But currently I have added the rxgraph output. The problem is AVG. PUBLISHING RATE DON'T OBEY THE PRIORITY CONFIG FILE.
Do you even have multiplexing between the two commands? Just to verify that the topics are all set up correctly. Please paste the complete raw configuration file in here.
@dornhege, I have updated the question with "RAW Config File Config File.jpg". By your comment, what I get is that I should write "/teleop_cmd_vel" instead of "teleop_cmd_vel"?