ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

how to make velocity of turtlebot is smoother??

asked 2019-03-20 02:45:24 -0600

Redhwan gravatar image

updated 2019-03-20 07:19:25 -0600

I installed this library: sudo apt install ros-indigo-yocs-velocity-smoother and I am following here link text , those topics that I use for velocity:

self.cmd_pub = rospy.Publisher("/mobile_base/commands/velocity", Twist, queue_size=10)
self.cmd_pub = rospy.Publisher('/cmd_vel_mux/input/navi',Twist, queue_size=1)
self.cmd_pub = rospy.Publisher('/cmd_vel_mux/input/safety_controller',Twist, queue_size=1)
self.cmd_pub = rospy.Publisher('/cmd_vel_mux/input/teleop',Twist, queue_size=1)

Note: I just use one of them in my codes, not together.

I am working in people detection, but the robot sometimes loses the target, thus it stops suddenly. I need that the robot stops smoothly

how to use this library correctly???

I tried using this topic but it not move, I think that something is wrong.

 self.cmd_pub = rospy.Publisher('/smooth_cmd_vel',Twist, queue_size=1)

Please help me or any suggestion

Thank you in advance

edit retag flag offensive close merge delete

Comments

Why are you using the same variable name for all the publishers?

vik748 gravatar image vik748  ( 2019-03-20 06:19:11 -0600 )edit

I don't use them together, sorry about this, I just use one of them, the robot move

I edited my question

Redhwan gravatar image Redhwan  ( 2019-03-20 07:17:21 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-03-20 08:34:48 -0600

vik748 gravatar image

Here is how I was launching velocity smoother from my minimal.launch for the Teleop velocity smoother:

  <include file="$(find yocs_velocity_smoother)/launch/velocity_smoother.launch">
    <arg name="node_name"             value="teleop_velocity_smoother"/>
    <arg name="nodelet_manager_name"  value="mobile_base_nodelet_manager"/>
    <arg name="config_file"           value="$(find yocs_velocity_smoother)/param/standalone.yaml"/>
    <arg name="raw_cmd_vel_topic"     value="velocity_smoother/raw_cmd_vel_teleop"/>
    <arg name="smooth_cmd_vel_topic"  value="cmd_vel_mux/input/teleop"/>
    <arg name="robot_cmd_vel_topic"   value="robot_cmd_vel"/>
    <arg name="odom_topic"            value="odom"/>
  </include>

Similarly here is an example for nav_velocity_smoother:

<include file="$(find yocs_velocity_smoother)/launch/velocity_smoother.launch">
    <arg name="node_name"             value="nav_velocity_smoother"/>
    <arg name="nodelet_manager_name"  value="mobile_base_nodelet_manager"/>
    <arg name="config_file"           value="$(find yocs_velocity_smoother)/param/standalone.yaml"/>
    <arg name="raw_cmd_vel_topic"     value="velocity_smoother/raw_cmd_vel_nav"/>
    <arg name="smooth_cmd_vel_topic"  value="cmd_vel_mux/input/nav"/>
    <arg name="robot_cmd_vel_topic"   value="robot_cmd_vel"/>
    <arg name="odom_topic"            value="odom"/>
  </include>
edit flag offensive delete link more

Comments

first of all, thank you so much

I will use them

Redhwan gravatar image Redhwan  ( 2019-03-20 08:44:43 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2019-03-20 02:45:24 -0600

Seen: 882 times

Last updated: Mar 20 '19