move_base not executing, robot does not receive the goal
Hello,
I am doing SLAM using HUSKY A200, (ros1 kinetic on both end - robot and remote pc). I am using hector mapping for my mapping. I want to do SLAM without saving the map, just by using the 2D Nav goal in the rviz. I am using husky's move_base for that purpose. I am using a pepperl_fuchs_r2000 laser scanner.
My ROS master is set to in my remote pc .bashrc as:
export ROS_MASTER_URI=http://cpr-a200-0468:11311
Network config: Husky: ROS_IP: 192.168.131.1 ROS_HOSTNAME:cpr-a200-0468
Remote PC: ROS_IP:192.168.131.10 HOSTNAME: rosi
SETUP: All my husky bringup scripts (navsat.launch, um7.launch, base.launch are added as robot_upstart script. Only r2000(laser), hector_mapping, move_base is launched from my remote pc. I can rostopic echo /tf from my remote pc on husky boot up.
I had some issues with the tf frames and time mismatch between the system.
TF_OLD_DATA ignoring data from the past for frame base_link
I solved those using other ros posts, also used chrony for syncing the husky time with my remote pc time. Now I can get the scanned map but when I send the nav goal it does not execute.
I did publish my messages from rviz and tried listening over on husky end:
rostopic echo /move_base_simple/goal
but no message appears on the husky terminal (sshed over wifi). Just to make sure I send some cmd_velocity across the system from the terminal:
husky:
rostopic pub /cmd_vel geometry_msgs/Twist "linea::
x: 0.1
y: 0.0
z: 0.0
angular:
x: 0.0
y: 0.0
z: 0.0"
publishing and latching message. Press ctrl-C to terminate
remote pc:
rostopic echo /cmd_vel
But I hear nothing but the robot moves. Vice versa:
remote pc: published
husky listening: nothing received
robot does not move.
The launch file launching the laser, hector_mapping and move_base is as follows:
<?xml version="1.0"?>
<launch>
<arg name="frame_id" default="base_laser"/>
<arg name="scanner_ip" default="192.168.131.12"/>
<arg name="scan_frequency" default="35"/>
<arg name="samples_per_scan" default="3600"/>
<!-- R2000 Driver -->
<node pkg="pepperl_fuchs_r2000" type="r2000_node" name="r2000_node" respawn="true" output="screen">
<param name="frame_id" value="$(arg frame_id)"/>
<param name="scanner_ip" value="$(arg scanner_ip)"/>
<param name="scan_frequency" value="$(arg scan_frequency)"/>
<param name="samples_per_scan" value="$(arg samples_per_scan)"/>
</node>
<node pkg="tf" type="static_transform_publisher" name="map_odom_broadcaster" args="0 0 0 0 0 0 map odom 100" />
<node pkg="tf" type="static_transform_publisher" name="odom_baselink_broadcaster" args="0 0 0 0 0 0 odom base_link 100" />
<!--- Run gmapping
<include file="$(find husky_navigation)/launch/gmapping.launch" />-->
<!-- <node pkg="tf" type="static_transform_publisher" name="robot_state" args="0.35 0 0.15 0 0 0 base_link base_laser 10" /> -->
<param name="robot_description" command="$(find xacro)/xacro --inorder '$(find husky_description)/urdf/husky.urdf.xacro'" />
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />
<!--- Run Hector_mapping -->
<include file="$(find hector_mapping)/launch/mapping_default.launch" />
<!--- Run Move Base -->
<include file="$(find husky_navigation)/launch/move_base.launch" />
<!-- RVIZ -->
<node pkg="rviz" type="rviz" name="$(anon rviz)" respawn="false" output="screen" args="-d $(find pepperl_fuchs_r2000)/rviz/rviz ...
Have you correctly set the variable
$ROS_MASTER_URI
?Yes, I have the all the topics and laser scan and map coming streaming correctly. Additionally, both hosts are setup at the /etc/hosts communication is setup well i think.
Is the issue only with the /cmd_vel topic ? Can you also edit your question to add the launch file of the remote PC and the one of the robot ?
Added. Nope it is also the issue with the nav goals... When I send this over rviz:
Setting goal: Frame:base_link, Position(0.355, -0.558, 0.000), Orientation(0.000, 0.000, -0.679, 0.734) = Angle: -1.492
I hear nothing on
rostopic echo /move_base_simple/goal
at the husky end.However I can echo /tf and listen it in my remote pc broadcasted from the husky.
Can you provide the
rqt_graph
too please ? It's normal that you can echo the tf because they are created from your remote PC, what nodes are you launching from the husky ?I am assuming that you are echoing before you publish from your pc?
Just making sure: can the Husky receive any messages from the PC?
If not: check
ROS_IP
andROS_HOSTNAME
settings and/or get a working DNS setup.