Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ekf #223

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

Ekf #223

wants to merge 13 commits into from

Conversation

gmfricke
Copy link
Contributor

Enabled the EKF node. Disabled wheel encoder tf transforms to avoid conflicts.

Measured the wheel radius and wheel base and updated the wheel encoder node to match.
Noetic displays a timestamp warning for every message that is not later than the last message recieved. This makes the repl unusable. Added a minimum delta time between publishing so avoid that problem. Still need to figure out the minimum delta. This issue of spamming warnings is under active discussion on the devs github.
For some reason the pose handler for the wheels is in degrees so had to add a conversion to radians (this must be new)
The IMU's yaw is offset from the rover by 45 degrees

Had to add a factor of 2pi. I can see no reason why this was needed but results in a usable wheel encoder.
@gmfricke gmfricke requested a review from Carter90 June 25, 2021 22:43
@Carter90 Carter90 linked an issue Jun 27, 2021 that may be closed by this pull request
self.x += v_wx*2*math.pi # I don't understand why this 2pi factor is needed
self.y += v_wy*2*math.pi

print("X coord: ", self.x)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to keep these could you make them rospy.loginfo("")

@Carter90
Copy link
Contributor

Carter90 commented Jun 27, 2021

@gmfricke Did you change the topic name in FakeLocalization.py? i don't see it here.
Also you got a merge conflict.

@abbypribis
Copy link
Contributor

Fixed merge conflict - please test :)

@Carter90
Copy link
Contributor

Resolves #130

@Carter90 Carter90 linked an issue Jul 11, 2021 that may be closed by this pull request
@Carter90
Copy link
Contributor

Carter90 commented Jul 11, 2021

@abbypribis How are you launching?
roslaunch scoot final_round.launch or roslaunch scoot scoot.launch "mode:=man"

[ WARN] [1626038176.742773251, 94.676000000]: Failed to meet update rate! Took 94.676000000000001933
[ WARN] [1626038176.756995975, 94.685000000]: Could not obtain transform from small_scout_1_imu_link to small_scout_1_base_footprint. Error was "small_scout_1_base_footprint" passed to lookupTransform argument target_frame does not exist. 

[ WARN] [1626038176.761994470, 94.690000000]: Failed to meet update rate! Took 94.656666666999996096
/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py:563: UserWarning: '//cmd_vel' is not a legal ROS graph resource name. This may cause problems with other ROS tools
  super(Subscriber, self).__init__(name, data_class, Registration.SUB)
/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py:842: UserWarning: '//back_left_wheel/drive/command/velocity' is not a legal ROS graph resource name. This may cause problems with other ROS tools
  super(Publisher, self).__init__(name, data_class, Registration.PUB)
/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py:842: UserWarning: '//back_right_wheel/drive/command/velocity' is not a legal ROS graph resource name. This may cause problems with other ROS tools
  super(Publisher, self).__init__(name, data_class, Registration.PUB)
/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py:842: UserWarning: '//front_left_wheel/drive/command/velocity' is not a legal ROS graph resource name. This may cause problems with other ROS tools
  super(Publisher, self).__init__(name, data_class, Registration.PUB)
/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py:842: UserWarning: '//front_right_wheel/drive/command/velocity' is not a legal ROS graph resource name. This may cause problems with other ROS tools
  super(Publisher, self).__init__(name, data_class, Registration.PUB)
/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py:842: UserWarning: '//back_left_wheel/steer/command/position' is not a legal ROS graph resource name. This may cause problems with other ROS tools
  super(Publisher, self).__init__(name, data_class, Registration.PUB)
/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py:842: UserWarning: '//back_right_wheel/steer/command/position' is not a legal ROS graph resource name. This may cause problems with other ROS tools
  super(Publisher, self).__init__(name, data_class, Registration.PUB)
/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py:842: UserWarning: '//front_left_wheel/steer/command/position' is not a legal ROS graph resource name. This may cause problems with other ROS tools
  super(Publisher, self).__init__(name, data_class, Registration.PUB)
/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py:842: UserWarning: '//front_right_wheel/steer/command/position' is not a legal ROS graph resource name. This may cause problems with other ROS tools
  super(Publisher, self).__init__(name, data_class, Registration.PUB)

@abbypribis
Copy link
Contributor

hmm, I was doing roslaunch scoot scoot.launch "name:=<rover_name" - didn't you fix final_round.launch on your branch?

@abbypribis
Copy link
Contributor

Okay, commands work now - odom really sucks though, ooof

@Carter90
Copy link
Contributor

Carter90 commented Jul 16, 2021

Yeah the EKF is very unstable it took like 10 driver calls for it to "stabilize", I would ask it to drive 10m and it would think it had arrived before it even moved. The logging rate is a bit too high fills up the logs instantly and this is coming from someone who is logging every loop of the driver state meh
I just kept calling drive forward commands scoot.drive(10,ignore=Obstacles.VOLATILE) until i reached the edge here is the **last output of src/scripts/src/deltaDelta.py

# @NOTE
f = fake(gazebo pose)
w = wheel
e = ekf
delta_f_e: -90.4698661173021
delta_w_e: -18.654380510421387
delta_f_w: -71.85976385012785

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Have Robots Use EKF Odom Round 2 EKF hardcoded to scout_1
3 participants