• Login
sketchucation logo sketchucation
  • Login
ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

Configuring Servos

Scheduled Pinned Locked Moved SketchyPhysics
10 Posts 3 Posters 8.1k Views 3 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    saeidmm
    last edited by 15 Nov 2014, 01:49

    Good morning. Is there anyway to change the start point of a Servo when I press Play to the end position?
    The way it works now it will jump to the mid position on the slider, which makes everything move when I press play.
    I know that I can extend the negative range, so that the servo starts in the 0 position. But then I have the negative range which I don't want to be able to move my objects to. DOes that make any sense??

    Also is there a way to rename the servos and joints? With the 5 figure names that SP gives to them it's very hard to keep track of what's what. Specially when you're just starting to learn SP.

    One last Q. Does 'Internal' in the UI box mean 'Grouped together'?

    Thanks very much,
    Saeid

    1 Reply Last reply Reply Quote 0
    • A Offline
      Anton_S
      last edited by 15 Nov 2014, 11:12

      @saeidmm said:

      Is there anyway to change the start point of a Servo when I press Play to the end position?
      Yes, there is!
      The slider command has 4 arguments to it:
      slider(name, value=0.5, min=0.0, max=1.0)
      By default, value is assigned 0.5, min is assigned 0.0, and max is assigned to 1.0. You may change these limits as you wish.
      Just paste this in controller, and adjust your preferred value and min/max.
      slider("my_slider", 0.0, 0.0, 1.0)

      @saeidmm said:

      Also is there a way to rename the servos and joints? With the 5 figure names that SP gives to them it's very hard to keep track of what's what. Specially when you're just starting to learn SP.

      There is no easy way, but its possible. All you need is an Atribute Inspector by Aerilius.
      From there, you can select any joint and change its name or whatever you wish:
      ae_AttributeInspector.png

      @saeidmm said:

      One last Q. Does 'Internal' in the UI box mean 'Grouped together'?

      Internal Joints represent joints within the current group.
      Connected Joints represent joints connected to the current group.

      1 Reply Last reply Reply Quote 0
      • A Offline
        Anton_S
        last edited by 16 Nov 2014, 01:15

        @saeidmm said:

        Anton, thanks for your reply. I was asking about the parameters of a Servo, not a Slider. I did try to adapt your answer to the parameters of a Servo, but couldn't get it to work. I inputted this:
        servo("my_servo", 0.0, 0.0, 90.0)
        I have attached a screen shot of the error message.

        Thanks,
        Saeid

        It should be **slider**("my_servo", 0.0, 0.0, 90.0)

        To configure servo, simply change min/max values of the servo to, 0 and 1.

        OR if you want to do it the other way around,
        Set min/max values of servo to 0, 90 and min/max values of slider to 0, 1. The final angle of a servo is the max value of the servo multiplied by the current value of the slider.

        For instance, if you set max value of servo to 90.0 and controller value to 1, your servo will rotate 90.0 degrees.
        If you set max value of servo to 90.0 and controller value to 0.5, your servo will rotate 45 degrees. And so on... Your slider returns a range between min and max, which is adjusted by the controller slider.
        Is that clear?

        1 Reply Last reply Reply Quote 0
        • S Offline
          saeidmm
          last edited by 16 Nov 2014, 17:39

          Anton, thanks for your reply. I was able to get it to work. Thanks a million,
          Saeid


          Error Message.jpg

          1 Reply Last reply Reply Quote 0
          • S Offline
            saeidmm
            last edited by 17 Nov 2014, 02:58

            Anton, yes, It's clear(ish) and I was able to make it work.

            Thanks for your complete explanation of this. It'll take a little work to use it in practice. But now I have the info to go on with.

            Thanks again,
            Saeid

            1 Reply Last reply Reply Quote 0
            • D Offline
              deskpilot
              last edited by 7 Feb 2015, 01:25

              Anton, you mention changing the slider attributes before you mention the plugin. This indicates to me that one can change the slider attributes some-where else. If so, where, exactly. I have loaded the Attribute Inspector plugin but that doesn't seem to do it as easily as you suggest.

              1 Reply Last reply Reply Quote 0
              • A Offline
                Anton_S
                last edited by 7 Feb 2015, 03:30

                Deskpilor, do you want to customize joint controller or change joint name?

                To change joint name from any name, use the AttributeInspector plugin.

                To change/customize joint controller, use SP UI.

                1 Reply Last reply Reply Quote 0
                • D Offline
                  deskpilot
                  last edited by 8 Feb 2015, 23:12

                  I want to customize the slider/controller but where do I find it in SP UI? Activating the torque joint, I get the usual values etc but not the part you mention, quote:

                  The slider command has 4 arguments to it:
                  slider(name, value=0.5, min=0.0, max=1.0)

                  How do I open this line?

                  1 Reply Last reply Reply Quote 0
                  • A Offline
                    Anton_S
                    last edited by 9 Feb 2015, 00:55

                    @deskpilot said:

                    slider(name, value=0.5, min=0.0, max=1.0)

                    This is a command. You basically write it into Joint Controller section. You don't need an attribute inspector plugin for that. All you need is open SP UI, select desired joint, and write this command with desired values into the Controller textbox. Here is a visual example:joint_controller.png

                    The slider command returns a value between the predefined min and max parameters, which is derived from the visual slider in Control Panel dialog. By default, the min value of slider is 0.0 and the max value 1.0. The default starting value is 0.5.

                    The joint Controller property can have any numeric value or a command that will return a numeric value, like a commonly used slider command. A controller value of 0.0 will rotate the hinge to its min property value. A controller value of 1.0 will rotate the hinge to its max property value. Any other value will rotate the hinge to a ratio between min and max. For instance, if hinge min property value is 0.0, max property value is 10.0, and the Controller property of 0.5 the hinge will rotate *min + (max-min)controller -> *0.0 + (10.0-0.0)0.5 = 5.0 degrees.

                    1 Reply Last reply Reply Quote 0
                    • D Offline
                      deskpilot
                      last edited by 10 Feb 2015, 03:29

                      Cheers mate.

                      1 Reply Last reply Reply Quote 0
                      • 1 / 1
                      • First post
                        Last post
                      Buy SketchPlus
                      Buy SUbD
                      Buy WrapR
                      Buy eBook
                      Buy Modelur
                      Buy Vertex Tools
                      Buy SketchCuisine
                      Buy FormFonts

                      Advertisement