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

robot_pose_ekf does not publish anything

asked 2020-05-31 10:38:20 -0600

Ahmed_Desoky gravatar image

updated 2020-05-31 15:21:53 -0600

~$ rostopic list

/cmd_vel
/control_vel
/encoder/odom
/imu/data
/imu_data
/md49_data
/md49_encoders
/pr2_base_odometry/odom
/ref_pose
/ref_vel
/robot_pose_ekf/odom_combined
/rosout
/rosout_agg
/tf
/tf_static
/vo

~$ rosnode info /robot_pose_ekf

Node [/robot_pose_ekf]
Publications: 
 * /robot_pose_ekf/odom_combined [geometry_msgs/PoseWithCovarianceStamped]
 * /rosout [rosgraph_msgs/Log]
 * /tf [tf2_msgs/TFMessage]

Subscriptions: 
 * /imu_data [unknown type]
 * /pr2_base_odometry/odom [unknown type]
 * /tf [tf2_msgs/TFMessage]
 * /tf_static [unknown type]
 * /vo [unknown type]

Services: 
 * /robot_pose_ekf/get_loggers
 * /robot_pose_ekf/get_status
 * /robot_pose_ekf/set_logger_level


contacting node http://192.168.43.230:42337/ ...
Pid: 3826
Connections:
 * topic: /rosout
    * to: /rosout
    * direction: outbound (38899 - 192.168.43.230:42576) [13]
    * transport: TCPROS
 * topic: /tf
    * to: /robot_pose_ekf
    * direction: outbound
    * transport: INTRAPROCESS
 * topic: /robot_pose_ekf/odom_combined
    * to: /kin_controller_3834_1590954489145
    * direction: outbound (38899 - 192.168.43.230:42588) [10]
    * transport: TCPROS
 * topic: /robot_pose_ekf/odom_combined
    * to: /dyn_controller_3855_1590954494644
    * direction: outbound (38899 - 192.168.43.230:42600) [11]
    * transport: TCPROS
 * topic: /tf
    * to: /robot_pose_ekf (http://192.168.43.230:42337/)
    * direction: inbound
    * transport: INTRAPROCESS
 * topic: /tf
    * to: /imu_to_base (http://192.168.43.204:39589/)
    * direction: inbound (51902 - 192.168.43.204:43869) [16]
    * transport: TCPROS
 * topic: /tf
    * to: /imu/i2c_imu_node (http://192.168.43.204:44281/)
    * direction: inbound (37934 - 192.168.43.204:42235) [17]
    * transport: TCPROS
 * topic: /tf
    * to: /base_odometry_node (http://192.168.43.230:43997/)
    * direction: inbound (53868 - 192.168.43.230:56183) [15]
    * transport: TCPROS

There are no response for this command

~$ rostopic echo /robot_pose_ekf/odom_combined

I want to echo the output of "robot_pose_ekf"

edit retag flag offensive close merge delete

Comments

I had a similar issue the answer was to delete the "/" at the beginning of the topic name. rostopic echo robot_pose_ekf/odom_combined

Dragonslayer gravatar image Dragonslayer  ( 2020-05-31 11:46:33 -0600 )edit

There are no response also

Ahmed_Desoky gravatar image Ahmed_Desoky  ( 2020-05-31 14:54:49 -0600 )edit

What does "rostopic hz ..." print? What does "rostopic info ..." print? "roswtf --all"?

Dragonslayer gravatar image Dragonslayer  ( 2020-05-31 15:00:35 -0600 )edit

This the launch file of the robot pose ekf

<launch>
<node pkg="robot_pose_ekf" type="robot_pose_ekf" name="robot_pose_ekf">
  <param name="output_frame" value="odom_combined"/>
  <param name="base_footprint_frame" value="base_footprint"/>
  <param name="freq" value="30.0"/>
  <param name="sensor_timeout" value="1.0"/>  
  <param name="odom_used" value="true"/>
  <param name="imu_used" value="true"/>
  <param name="vo_used" value="true"/>
  <remap from="odom" to="pr2_base_odometry/odom" />
</node>
</launch>
Ahmed_Desoky gravatar image Ahmed_Desoky  ( 2020-05-31 15:01:51 -0600 )edit

~$ rostopic hz /robot_pose_ekf/odom_combined

subscribed to [/robot_pose_ekf/odom_combined]
no new messages
no new messages
no new messages
no new messages
no new messages
no new messages
Ahmed_Desoky gravatar image Ahmed_Desoky  ( 2020-05-31 15:04:53 -0600 )edit

I have edited the post and have showed the :

rosnode info /robot_pose_ekf

Ahmed_Desoky gravatar image Ahmed_Desoky  ( 2020-05-31 15:06:27 -0600 )edit

Does the tf work? rosrun tf view_frames - whats the output tree?

Dragonslayer gravatar image Dragonslayer  ( 2020-05-31 15:07:17 -0600 )edit

Are the odom imu and vo actually publishing? What do their rostopic info say?

Dragonslayer gravatar image Dragonslayer  ( 2020-05-31 15:11:24 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2020-05-31 15:57:17 -0600

Dragonslayer gravatar image

updated 2020-05-31 15:58:26 -0600

It seems you dont feed the node with input and thus it never starts "working". Also your tf tree will not work (there are actually two), make a static transform from base_footprint to base_link in the appropriate launchfile. link text Take a look at the link to get an idea of static transform if you dont know about it yet (x, y, z etc. you can make all zero, making base_footrpint equal to base_link, if you are using a wheeled robot base). In the end If you get odom imu and vo (do you really need vo?) publishing and the tf tree linked up, it should work.

edit flag offensive delete link more

Comments

By the way, for a launchfile try this:

<launch>
<node pkg="robot_pose_ekf" type="robot_pose_ekf" name="robot_pose_ekf">
  <param name="output_frame" value="odom_combined"/>
  <param name="base_footprint_frame" value="base_link"/>
  <param name="freq" value="30.0"/>
  <param name="sensor_timeout" value="1.0"/>  
  <param name="odom_used" value="true"/>
  <param name="imu_used" value="true"/>
  <param name="vo_used" value="false"/>
  <remap from="odom" to="encoder/odom" />
 <remap from="imu_data" to="imu/data" />
</node>
</launch>
Dragonslayer gravatar image Dragonslayer  ( 2020-05-31 16:24:51 -0600 )edit

Try this launchfile the above will not work as encoder/odom uses base_footprint frame:

<launch>
<node pkg="tf" type="static_transform_publisher" name="static_transform" args="0 0 0 0 0 0 0  /base_footprint /base_link  100"/>


<node pkg="robot_pose_ekf" type="robot_pose_ekf" name="robot_pose_ekf">
  <param name="output_frame" value="odom_combined"/>
  <param name="base_footprint_frame" value="base_footprint"/>
  <param name="freq" value="30.0"/>
  <param name="sensor_timeout" value="1.0"/>  
  <param name="odom_used" value="true"/>
  <param name="imu_used" value="true"/>
  <param name="vo_used" value="false"/>
  <remap from="odom" to="encoder/odom" />
 <remap from="imu_data" to="imu/data" />
</node>
</launch>
Dragonslayer gravatar image Dragonslayer  ( 2020-05-31 17:08:04 -0600 )edit

I try to use the second launch file, and it gives this errors in the terminal window :

link text

and the rosnod info is

$ rosnode info /robot_pose_ekf

Node [/robot_pose_ekf]
Publications: 
 * /robot_pose_ekf/odom_combined [geometry_msgs/PoseWithCovarianceStamped]
 * /rosout [rosgraph_msgs/Log]
 * /tf [tf2_msgs/TFMessage]

Subscriptions: 
 * /encoder/odom [nav_msgs/Odometry]
 * /imu/data [sensor_msgs/Imu]
 * /tf [tf2_msgs/TFMessage]
 * /tf_static [unknown type]

and still there are no outputs foe robot_pose_ekf

Ahmed_Desoky gravatar image Ahmed_Desoky  ( 2020-05-31 23:08:40 -0600 )edit

Sorry, the static transform publisher had a axis to many, try this:

<launch>
<node pkg="tf" type="static_transform_publisher" name="static_transform" args="0 0 0 0 0 0  /base_footprint /base_link  100"/>


<node pkg="robot_pose_ekf" type="robot_pose_ekf" name="robot_pose_ekf">
  <param name="output_frame" value="odom_combined"/>
  <param name="base_footprint_frame" value="base_footprint"/>
  <param name="freq" value="30.0"/>
  <param name="sensor_timeout" value="1.0"/>  
  <param name="odom_used" value="true"/>
  <param name="imu_used" value="true"/>
  <param name="vo_used" value="false"/>
  <remap from="odom" to="encoder/odom" />
 <remap from="imu_data" to="imu/data" />
</node>
</launch>
Dragonslayer gravatar image Dragonslayer  ( 2020-06-01 08:58:47 -0600 )edit
[ERROR] [1591037796.233741326]: filter time older than odom message buffer
[ERROR] [1591037796.233884657]: filter time older than odom message buffer
^C[ERROR] [1591037796.330767126]: filter time older than odom message buffer
[ERROR] [1591037796.331129977]: Covariance specified for measurement on topic wheelodom is zero
[ERROR] [1591037796.331370539]: filter time older than odom message buffer
[ERROR] [1591037796.333372238]: filter time older than odom message buffer
Ahmed_Desoky gravatar image Ahmed_Desoky  ( 2020-06-01 13:57:07 -0600 )edit

Never seen the topic wheelodom before in your posts whats that? The covariances have to fit of course but that has nothing to do with what this question is about. (for testing just make them tiny but non zero) The "filter time..." error is about unsynchronized topics, some data isnt coming in at all or not fast enough, as the timeout is 10 seconds, its likely not coming at all, most likely its the odometry problem causing this error as well. base_odometry_node is publishing odom on encoder/odom topic and the launchfile is remapping this.

Dragonslayer gravatar image Dragonslayer  ( 2020-06-01 14:19:40 -0600 )edit

rostopic echo /encoder/odom

header: seq: 33694 stamp: secs: 1591041155 nsecs: 601311323 frame_id: "encoder/odom" child_frame_id: "base_footprint" pose: pose: position: x: -316254.234024 y: 105513.04894 z: 0.0 orientation: x: 0.0 y: 0.0 z: 0.697199495245 w: 0.716877160907 covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] twist: twist: linear: x: 0.0986509230208 y: 0.0 z: 0.0 angular: x: 0.0 y: 0.0 z: -0.0962888348611 covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ...(more)

Ahmed_Desoky gravatar image Ahmed_Desoky  ( 2020-06-01 14:54:07 -0600 )edit
1

The covariances are zero here as well. If those get populated correctly it should all work. So the actual question seems solved. link text Link to a simple start to get into the covariance matrix topic.

Dragonslayer gravatar image Dragonslayer  ( 2020-06-01 14:57:40 -0600 )edit
0

answered 2020-06-02 10:11:12 -0600

Ahmed_Desoky gravatar image

updated 2020-06-02 10:13:55 -0600

The covariances are zero here as well. If those get populated correctly it should all work. So the actual question seems solved. link text Link to a simple start to get into the covariance matrix topic.

Thanks Dragonslayer'. Really you have saved me. The error was exist because the covariances are zero, so I added the covariance in base_odometry_node

msg.pose.covariance = {cov_x, 0, 0, 0, 0, 0, 
                        0, cov_y, 0, 0, 0, 0,
                        0, 0, 99999, 0, 0, 0,
                        0, 0, 0, 99999, 0, 0,
                        0, 0, 0, 0, 99999, 0,
                        0, 0, 0, 0, 0, rcov_z};

Thanks

edit flag offensive delete link more

Comments

Glad I could help slay the dragon that stood in your way ;)

Dragonslayer gravatar image Dragonslayer  ( 2020-06-02 10:45:38 -0600 )edit

@Dragonslayer@Ahmed_Desoky I'm facing the same issue hope this will solve my problem as well

where do I add this covariance matrix?

and what should be the covariance values, are they random or do I have to do any calculations?

me_saw gravatar image me_saw  ( 2020-10-20 08:39:39 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2020-05-31 10:38:20 -0600

Seen: 709 times

Last updated: Jun 02 '20