DistAcceleration parameter not working in .NET library?
Navigates to RoboticsConnection.com Home RoboticsConnection.com HomePage
RoboticsConnection User Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



DistAcceleration parameter not working in... Expand / Collapse
Author
Message
Posted Wednesday, January 13, 2010 9:31 PM
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

Group: Forum Members
Last Login: Saturday, December 31, 2011 10:37 AM
Posts: 69, Visits: 315
Hi Jason,

I was trying the DistAcceleration parameter for the first time in the PID controller. I am using firmware version 1.5.2 and library version 3.0.0. My Serializer is version 2. The parameter does not seem to have any effect--I can set it anywhere from 1 to 1000 and the ramp up to speed remains the same which is fairly slow. The parameter *does* work at the firmware level using Hyperterminal. So setting dpid to 1:0:0:20:10 gives faster acceleration than 1:0:0:1:10. However, there is no effect at the .NET library level. Is it possible that the DistAcceleration parameter is being ignored in the library?

The other DPID and VPID parameters I am using are:

VelProportional = 2;
VelIntegral = 0;
VelDerivative = 5;
VelLoop = 5;
DistProportional = 1;
DistIntegral = 0;
DistDerivative = 0;
DistAcceleration = 20;
DistDeadband = 10;
DeadbandEnabled = true;

Thanks!
patrick

Post #1532
Posted Thursday, January 14, 2010 6:08 PM


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Administrators
Last Login: Monday, October 31, 2011 9:18 PM
Posts: 640, Visits: 819
It shouldn't be ignored, but there could be a bug.   I'll check it out in the morning.

Best Regards!

Jason Summerour
President,
Summerour Robotics Corporation
www.roboticsconnection.com

Post #1547
Posted Tuesday, January 19, 2010 4:02 PM
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

Group: Forum Members
Last Login: Saturday, December 31, 2011 10:37 AM
Posts: 69, Visits: 315
Hi Jason,

Any luck figuring this out?

Thanks!
patrick

Post #1556
Posted Tuesday, January 19, 2010 8:41 PM


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Administrators
Last Login: Monday, October 31, 2011 9:18 PM
Posts: 640, Visits: 819
Nope, but I WILL get to it tomorrow afternoon. I'll post the results...

Best Regards,

Jason Summerour
President,
Summerour Robotics Corporation
www.roboticsconnection.com

Post #1564
Posted Friday, January 22, 2010 2:39 PM
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

Group: Forum Members
Last Login: Saturday, December 31, 2011 10:37 AM
Posts: 69, Visits: 315
Hi Jason,

Any luck looking at the code?

--patrick

Post #1596
Posted Tuesday, January 26, 2010 10:18 PM


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Administrators
Last Login: Monday, October 31, 2011 9:18 PM
Posts: 640, Visits: 819
Hey Patrick,

So, what I just did is wrote a quick app to invoke the new PIDMotorController.SetDefaultTraxsterPidParams() interface, and then exit.  I then verified that the dpid params were set as follows:  P:1  I:0  D:0  A:1  B:5 using PuTTY.   Then, I took the same app, and manually set all of the dpid params using the PIDMotorController properties, as I suspect you were doing, and again verified using PuTTY.  The dpid params are getting set correctly, and the code looks correct too.

Can you perform this same test too?  Also, remember that you cannot set ANY PIDMotorcontroller params until after the CommunicationStarted event has occured!  This is because the .NET has to have communication established w/ the Serializer FIRST, before it can send the commands down to change the values.  So, the best place to set any PID params is inside a CommunicationStarted event handler (see below).

I verified correct behavior using a Serializer 2.0 with 1.5.2 firmware and a Serializer 3.0.

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading;

using RoboticsConnection.Serializer;

using RoboticsConnection.Serializer.Components;

using RoboticsConnection.Serializer.Controllers;

using RoboticsConnection.Serializer.Ids;

using RoboticsConnection.Serializer.Sensors;

namespace JunkExample

{

   class Program

   {

      static Serializer s;

      static PIDMotorController pmc;

      static void Main(string[] args)

      {

         s = new Serializer();

         s.BaudRate = 19200;

         s.PortName = "COM3";

         s.CommunicationStarted += new SerializerEventHandler(s_CommunicationStarted);

         pmc = new PIDMotorController(s);

         s.StartCommunication();

         while (true)

         {

            s.PumpEvents();

            Thread.Sleep(250);

            Console.WriteLine("x ");

         }

      }

      static void s_CommunicationStarted(Serializer sender)

      {

         Console.WriteLine("Communication Started");

         pmc.DeadbandEnabled = true;

         //pmc.SetDefaultTraxsterPidParams();

         SetPid();

      }

      static void SetPid()

      {

         // Set velocity and distance PID parameters to some bogus values to see that they change:

         pmc.VelProportional = 10;

         pmc.VelIntegral = 0;

         pmc.VelDerivative = 5;

         pmc.VelLoop = 7;

         pmc.DistProportional = 5;

         pmc.DistIntegral = 13;

         pmc.DistDerivative = 7;

         pmc.DistAcceleration = 2;

         pmc.DistDeadband = 3;

         pmc.DeadbandEnabled = true;

      }

   }

}

Let us know what you find!   Now, I'm going to work through the other PID forum post that's outstanding.

Best Regards!

Jason

Jason Summerour
President,
Summerour Robotics Corporation
www.roboticsconnection.com

Post #1606
Posted Tuesday, February 02, 2010 12:12 PM
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

Group: Forum Members
Last Login: Saturday, December 31, 2011 10:37 AM
Posts: 69, Visits: 315
Hi Jason,

Many thanks for testing it out. I confirmed that I am also getting the DPID parameters to the firmware when I set them via the .NET library. So perhaps I am just expecting something more from the A parameter. When you change the A parameter on the Traxster from 1 to 255, do you see a noticeable change in acceleration up to the target speed? Even when I change A at the firmware level, I can't see any difference in the acceleration.

The reason I'm interested in acceleration is that I want the quickest movement I can get from 0 to a given target speed. The target speed is actually quite low, but I want to get there quickly. I am rotating the robot to keep a target directly in front, so when the target movement changes suddenly, I need to change the wheel velocities quickly.

What do you think?

--patrick
Post #1630
Posted Sunday, February 14, 2010 8:05 PM


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Administrators
Last Login: Monday, October 31, 2011 9:18 PM
Posts: 640, Visits: 819
I just played w/ the accel param w/ my Traxster, and I see that it doesn't seem to provide much control based on how we implemented it.  We're looking at improving this now...But for what you want to do, then any value above about 5 will give you maximum acceleration.   The improvment would only affect VEERRRRYYY SSSLLOOOWWW acceleration.

Best Regards!

Jason Summerour
President,
Summerour Robotics Corporation
www.roboticsconnection.com

Post #1690
Posted Sunday, February 14, 2010 11:09 PM
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

Group: Forum Members
Last Login: Saturday, December 31, 2011 10:37 AM
Posts: 69, Visits: 315
Hi Jason,

Thanks for the reply. I'll set the acceleration to 5 and assume that's the highest it can be.

--patrick

Post #1693
Posted Tuesday, February 16, 2010 5:31 PM


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Administrators
Last Login: Monday, October 31, 2011 9:18 PM
Posts: 640, Visits: 819
We're working to correct this now...

Hopefully by the weekend, it will be fixed, and we'll release a new firmware version with:

  • PID Acceleration fix
  • PID Encoder distance internal count type fix (so you can drive more than 32k ticks)
  • Periodic Heartbeat command - Yes!!! We've finally added it!

Best Regards!

Jason Summerour
President,
Summerour Robotics Corporation
www.roboticsconnection.com

Post #1703
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 1 (1 guest, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: jsummerour

Permissions Expand / Collapse

All times are GMT -8:00, Time now is 4:54pm

Powered By InstantForum.NET v4.1.4 © 2012
Execution: 0.141. 10 queries. Compression Disabled.