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

lasersocks's profile - activity

2021-08-05 08:37:09 -0500 received badge  Good Question (source)
2020-04-06 15:18:56 -0500 received badge  Nice Question (source)
2018-03-09 08:05:25 -0500 received badge  Famous Question (source)
2017-11-06 17:39:20 -0500 received badge  Student (source)
2017-07-07 07:12:08 -0500 received badge  Notable Question (source)
2017-05-13 06:52:31 -0500 received badge  Famous Question (source)
2017-05-13 06:52:31 -0500 received badge  Notable Question (source)
2017-04-25 13:46:36 -0500 edited question navsat_transform_node bad data

navsat_transform_node bad data I've been trying to fuse gps data with a odometry and an imu for a few days now and for s

2017-04-25 13:46:36 -0500 received badge  Editor (source)
2017-04-24 02:34:40 -0500 received badge  Popular Question (source)
2017-04-21 06:50:54 -0500 edited question navsat_transform_node bad data

navsat_transform_node bad data I've been trying to fuse gps data with a odometry and an imu for a few days now and for s

2017-04-20 13:52:33 -0500 asked a question navsat_transform_node bad data

navsat_transform_node bad data I've been trying to fuse gps data with a odometry and an imu for a few days now and for s

2017-04-19 05:40:03 -0500 received badge  Enthusiast
2017-04-18 12:02:34 -0500 received badge  Supporter (source)
2017-04-17 13:38:27 -0500 commented question Basic robot_localization example

I have done a little more work with this, and as far as I can tell, the fused data is often less accurate than just plain odometry. I am assuming I did something wrong.

Is this not the right place to ask this question? Can someone recommend somewhere to get help?

2017-04-17 13:36:22 -0500 received badge  Popular Question (source)
2017-04-12 07:08:12 -0500 asked a question Basic robot_localization example

I am attempting to get the most basic example of robot_localization working on a raspberry pi. I am new to linux and the ROS ecosystem, so I have fought through an exceptional number of issues to get it working. The information necessary to do this seems to be somewhat fragmented or over complicated for a beginner.

In order to do the localization I am using the BNO055 IMU by bosch that outputs orientation as well as standard IMU data. I am also using two incremental encoders on the wheels of lets say a "cart." This example is as simple as it can get, There are no motors and I just want to know the position of a cart that is pushed externally.

I have the system working, and it looks like filtered odom data seems to be more accurate, but I am having trouble making sure I did everything right.

The most basic question... is this the proper way to use ekf node? In the very simpliest terms do these three codes seem correct? I have simplified them into the important components

The IMU uses:

#create publisher
imu_pub = rospy.Publisher('imu/data', Imu, queue_size=1)
#init node and set rate
rospy.init_node('imu_talker', anonymous=True)
rate = rospy.Rate(10) # 10hz

while not rospy.is_shutdown():
    #PLACEHOLDER TO GET DATA FROM IMU

    #create message and header
    imu = Imu()
    imu.header.stamp = rospy.Time.now()
    imu.header.frame_id = 'imu'

    #put data into the message
    imu.orientation = quaternion
    imu.angular_velocity = ang_vel 
    imu.linear_acceleration = lin_acc

    #publish message
    imu_pub.publish(imu)

    #sleep at known rate
    rate.sleep()

The ODOM uses:

#create publishers
odom_pub = rospy.Publisher("odom", Odometry, queue_size=1)
odom_broadcaster = tf.TransformBroadcaster()

#init node and rate
rospy.init_node('odom_talker', anonymous=True)
rate = rospy.Rate(10) # 10hz

while not rospy.is_shutdown():
    #PLACEHOLDER TO GET ODOMETRY FROM ENCODERS

    #create message and header
    odom = Odometry()
    odom.header.stamp = rospy.Time.now()
    odom.header.frame_id = "odom"

    #convert euler to quaternion
    odom_quat = tf.transformations.quaternion_from_euler(0, 0, th)
    #broadcast transform
    odom_broadcaster.sendTransform((x, y, 0.), odom_quat,current_time,"base_link", "odom")


    # set the position
    odom.pose.pose = Pose(Point(x, y, 0.), Quaternion(*odom_quat))

    # set the velocity
    odom.child_frame_id = "base_link"
    odom.twist.twist = Twist(Vector3(vx, vy, 0), Vector3(0, 0, vth))

    # publish the message
    odom_pub.publish(odom)

    #sleep at known rate
    rate.sleep()

The EKF launch file uses:

<launch>

    <node pkg="robot_localization" type="ekf_localization_node" name="ekf_localization" clear_params="true">
      <param name="frequency" value="10"/>  
      <param name="sensor_timeout" value="0.2"/>  
      <param name="two_d_mode" value="true"/>

      <param name="map_frame" value="map"/>
      <param name="odom_frame" value="odom"/>
      <param name="base_link_frame" value="base_link"/>
      <param name="world_frame" value="odom"/>

      <param name="odom0" value="odom"/>
      <param name="imu0" value="/imu/data"/> 

      <rosparam param="odom0_config">[true,  true,  false, 
                                      false, false, true, 
                                      true, true, false, 
                                      false, false, true,
                                      false, false, false]</rosparam>

      <rosparam param="imu0_config">[false, false, false, 
                                     true,  true,  true, 
                                     false, false, false, 
                                     true,  true,  true,
                                     true, true, true]</rosparam>

      <param name="odom0_differential" value="true"/>
      <param name="imu0_differential" value="true"/>

      <param name="imu0_remove_gravitational_acceleration" value="false"/>

      <rosparam param="process_noise_covariance">[LARGE ...
(more)