ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Robot Jerky Movement with Navigation Stack

asked 2020-03-08 06:05:38 -0600

aneessameer gravatar image

Hi, I am having a pretty big issue while running my robot using the navigation stack. Whenever I give RViz the goal position, the robot moves in a jerky sort of way. Meaning that it's wheels stutters while moving across the map. I have been using the differential drive package and was able to tune the PID without the navigation stack at first, and it was working fine. But as soon as I load the move_base.launch file, the robot moves like how I described above (stuttering). When I rostopic echo the left and right pwm of the wheels, there seems to be 0s between the pwms sent by the move base file; I am sure the teleop node is not causing this as I killed the node before running the move base file. I believe the problem lies in the parameters that I have set for the costmap and planner files that I have attached below. I would appreciate if someone could help me out.


<rosparam param="ticks_meter">17825</rosparam>
<node pkg="differential_drive" type="" name="odometry" output="screen">
    <remap from="lwheel" to="left_encoder" />
    <remap from="rwheel" to="right_encoder" />
    <rosparam param="base_width">0.195</rosparam>
    <rosparam param="odom_frame_id" subst_value="True" > "/odom" </rosparam>
    <rosparam param="base_frame_id" subst_value="True"> "/base_link" </rosparam>
    <rosparam param="global_frame_id" subst_value="True"> "/map" </rosparam>
    <rosparam param="rate">50</rosparam>
<node pkg="differential_drive" type="" name="lpid">
    <remap from="wheel" to= "left_encoder"/>
    <remap from="motor_cmd" to= "left_pwm"/>
    <remap from="wheel_vtarget" to= "left_target"/>
    <remap from="wheel_vel" to= "left_actual"/>
    <rosparam param="Kp">250</rosparam>
    <rosparam param="Ki">23</rosparam>
    <rosparam param="Kd">17.33</rosparam>
    <rosparam param="out_min">-255</rosparam >
    <rosparam param="out_max">255</rosparam >
    <rosparam param="rate">40</rosparam >
    <rosparam param="timeout_ticks">4</rosparam>
    <rosparam param="rolling_pts">5</rosparam>
<node pkg="differential_drive" type="" name="rpid">
    <remap from="wheel" to="right_encoder"/>
    <remap from="motor_cmd" to="right_pwm"/>
    <remap from="wheel_vtarget" to="right_target"/>
    <remap from="wheel_vel" to="right_actual"/>
    <rosparam param="Kp">10</rosparam>
    <rosparam param="Ki">18</rosparam>
    <rosparam param="Kd">5</rosparam>
    <rosparam param="out_min">-255</rosparam>
    <rosparam param="out_max">255</rosparam>
    <rosparam param="rate">40</rosparam>
    <rosparam param="timeout_ticks">4</rosparam>
    <rosparam param="rolling_pts">5</rosparam>
<node pkg="differential_drive" type="" name="twist" output="screen">
    <remap from="twist" to="cmd_vel"/>
    <remap from="lwheel_vtarget" to="left_target"/>
    <remap from="rwheel_vtarget" to="right_target"/>
    <rosparam param="base_weight">0.195</rosparam>
<node pkg="rosserial_python" type="" name="serial_node">
    <param name="port" value="/dev/ttyACM0"/>
    <param name="baud" value="57600"/>

<node pkg="tf" type="static_transform_publisher" name="laser_transform" args="0 0 0.14 0 0 0 base_link laser 100"/>


<master auto="start"/>
<arg name="map_file" default=" /home/ubuntu/catkin_ws/src/provide_map/maps/swiftmap.yaml"/>
<node name="map_server" pkg ...
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2020-06-19 09:52:57 -0600

aneessameer gravatar image

If anyone is still wondering, I was using ROS on raspberry pi 3 and that just slowed down everything because pi 3 doesn't have enough computational resources. What I did to solve this problem was to move my move base to my laptop, and made my laptop the ROS_Master, while every other file was kept on the pi. That improved the computational power that the robot very much needed. It also made sure that the warning messages of controller frequency and planner frequency completely vanished after this change. Summary: For navigation stack, don't use pi 3, unless your pi 3 has high computational power!

edit flag offensive delete link more



I would add that it might actually work, but one has to lower frequency and costmap resolution as well as size(local costmap) etc.. Also python nodes are a problem, had a base controller/odometry node running, that took a silly amount of resources (+50%). Also plugging in to many usb devices etc (lidar, rgbd, controllers, etc.) might lead to low voltage warning throtteling the pi to afaik 50%?!. Utilizing wlan to pump out data might as well slow it down, as well as ram swap to the sd. The standard configurations in most packages and tutorials are made for serious desktop machines.

Dragonslayer gravatar image Dragonslayer  ( 2020-06-19 10:22:24 -0600 )edit

Navigation stack works fine on Pi3. Just need to make sure to avoid cpu hog issues. 'top -d 1' is your friend.

jordan gravatar image jordan  ( 2020-07-03 11:05:55 -0600 )edit

answered 2020-06-18 13:05:15 -0600

Necromantia000 gravatar image

Looking at how long this has been unanswered I'm going to assume that this forum isn't for beginners and may not be very helpful.

edit flag offensive delete link more


Well the easy questions get solved quickly and the difficult problems take months. So yeah, for beginners its not an ideal forum to get their complicated questions answered.

aneessameer gravatar image aneessameer  ( 2020-06-19 09:47:17 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2020-03-08 06:05:38 -0600

Seen: 539 times

Last updated: Jun 19 '20