0
$\begingroup$

Rosanswers logo

Hi. I am trying to make a gmapping. I have a Rplidar. 16.04 Kinetic Kame. My Rviz map is unstable. How can I solve this problem

https://www.youtube.com/watch?v=u96081BlgmA

bringup.launch

<launch>
                <!--  ************** Odometry ***************  -->
    <arg name="gui" default="True" />
    <param name="use_gui" value="$(arg gui)"/>
    <param name="robot_description" command="cat $(find nox_description)/urdf/nox.urdf" />
    
    <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />
    
    <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />
    
    <node name="serial_node" pkg="rosserial_python" type="serial_node.py">
        <param name="port" value="/dev/ttyUSB1"/>
    </node>
        
    <node name="nox_controller" pkg="nox" type="nox_controller">
        <param name="publish_tf" value="true" />
            <param name="publish_rate" value="10.0" />
            <param name="linear_scale_positive" value="1.025" />
            <param name="linear_scale_negative" value="1.025" />
            <param name="angular_scale_positive" value="1.078" />
            <param name="angular_scale_negative" value="1.078" />
        <param name="angular_scale_accel" value="0.0" />
    </node> 
</launch>

============= Slam.Launch

<launch>
                <!--  ************** Odometry ***************  -->
    <param name="robot_description" command="cat $(find ptype_wa_description)/urdf/ptype_wa.urdf" />
    
    <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher">
        <rosparam param="source_list">["odom_comm/joint_states"] </rosparam>
    </node>
    <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />                
        
    <node name="odom_comm" pkg="ptype_wa" type="odom_comm" />
    <node name="odom_broadcaster_ptype_wa" pkg="ptype_wa" type="odom_broadcaster_ptype_wa" />
    
    
                <!--  ************** Sensors ***************  -->
    <node name="urg_node" pkg="urg_node" type="urg_node" output="screen">
        <param name="ip_address" value="192.168.1.70"/>
        <param name="frame_id" value="/base_laser"/>
    </node>
    
    
                <!--  ************** gmapping ***************  -->
    <node name="slam_gmapping" pkg="gmapping" type="slam_gmapping" output="screen"/>
    
    
            <!--  ************** Navigation ***************  -->
    <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
        <rosparam file="$(find ptype_wa_control)/cfg/costmap_common_params.yaml" command="load" ns="global_costmap" />
        <rosparam file="$(find ptype_wa_control)/cfg/costmap_common_params.yaml" command="load" ns="local_costmap" />
        <rosparam file="$(find ptype_wa_control)/cfg/local_costmap_params.yaml" command="load" />
        <rosparam file="$(find ptype_wa_control)/cfg/global_costmap_params.yaml" command="load" />
        <rosparam file="$(find ptype_wa_control)/cfg/teb_local_planner_params.yaml" command="load" />

        <param name="base_global_planner" value="global_planner/GlobalPlanner" />
        <param name="planner_frequency" value="1.0" />
        <param name="planner_patience" value="5.0" />

        <param name="base_local_planner" value="teb_local_planner/TebLocalPlannerROS" />
        <param name="controller_frequency" value="5.0" />
        <param name="controller_patience" value="15.0" />

      <param name="clearing_rotation_allowed" value="false" /> <!-- Our carlike robot is not able to rotate in place -->
    </node>
        
    <node name="ptype_wa_controller" pkg="ptype_wa_control" type="ptype_wa_controller" output="screen" />

    
                <!--  ************* Visualisation **************  -->
    <node name="rviz" pkg="rviz" type="rviz" args="-d $(find ptype_wa_control)/cfg/rviz_slam.rviz" required="true" />

</launch>

Originally posted by bfdmetu on ROS Answers with karma: 85 on 2020-05-25

Post score: 0


Original comments

Comment by billy on 2020-05-25:
Solve it by breaking it down into smaller pieces. When viewing the laser scan in RVIZ, is the laser scan stable?

Comment by bfdmetu on 2020-05-26:
I try hector mapping and some other code. These code works normally, However when i use this code mapping and scanner turning permanently

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

OK I solved the problem. It is about the encoder connection. One of encoder jumper was missing. For this reason robot thinks robot turning permanently.


Originally posted by bfdmetu with karma: 85 on 2020-05-26

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.