pvandervelde / zinger_swerve_controller

The swerve controller code for the zinger robot
Apache License 2.0
14 stars 5 forks source link

Speed and direction changes #4

Open peterheim1 opened 4 weeks ago

peterheim1 commented 4 weeks ago

Hi Patrick I'm building a new drive base for the robot that is much faster and I noticed that when I drive at a steady state any change in velocity or input some rotation the speed drops to zero or very close to it then picks up. I never noticed before as the robot was slow and the input was constrained at a lower value. I think if your doing small changes in direction it should be smooth

pvandervelde commented 3 weeks ago

Hi @peterheim1 Yeah that seems like a reasonable expectation. I thought I fixed something like that a while ago but clearly I have not. I currently have no idea what would be causing this. Any chance you can upload another bag file for me to look at?

peterheim1 commented 3 weeks ago

ok here is the second bag I tried to do this on a fresh copy but had this error on the new check out zero_odometry.header.stamp = self.get_clock.now().to_msg() [swerve_controller-1] AttributeError: 'function' object has no attribute 'now'

pvandervelde commented 3 weeks ago

The rosbag only contains the cmd_vel and the commands send to the steering and velocity parts, but not the joint states (i.e. not the result of the commands). Is that on purpose?

peterheim1 commented 3 weeks ago

I was testing the new robot base and it doesn't do joint_states yet. just tested it on the old robot and i did the same until t turned on the joint_states again. I can run both robot at the same time for testing if you put a note somewhere this will happen then we can close this

pvandervelde commented 3 weeks ago

If you're seeing this on both robots then I think we should keep this open until we can show it's not the swerve code. I'm not making any promises of fixing this soon as I'm still busy with life and a new job, but I'm aiming to have a look as soon as I can. Thanks so much for taking my code and using it!

voltrare commented 4 days ago

ok here is the second bag I tried to do this on a fresh copy but had this error on the new check out zero_odometry.header.stamp = self.get_clock.now().to_msg() [swerve_controller-1] AttributeError: 'function' object has no attribute 'now'

i have this same issue on mine too, im running just for gazebo