Trufiadok

Inverse kinematics robotcontroller for Canadarm1, Canadarm2 and ANY

Recommended Posts

1 minute ago, Trufiadok said:

Momently, there is no such possibility. "0st" refers to the zero degree state of servo motors.

The target servo values are writable. It could be programmed in the plugin to save or restore these values.

if possible, no rush, now i am folding it each time by entering the values in the plugin window, it's ok :)

Share this post


Link to post
Share on other sites

I made colorable control buttons. I've uploaded the changes. (LEE's part.cfg & IKRC)

Code cleaning is also taking place so it is recommended you save the version that you are using before updating.

If you want to color the control buttons you need to modify the LEE's part.cfg file. If the color data is commented there is no coloring.

MODULE
{
	name = IkRobotController
	// ColorCode format #RRGGBBAA in hex
	controlButtonUpDownColor = #FF00004C
	controlButtonLeftRightColor = #00FF004C
	controlButtonForwardBackwardColor = #0000FF4C
}

z3L4WTm.png

Share this post


Link to post
Share on other sites
8 hours ago, Trufiadok said:

I made colorable control buttons. I've uploaded the changes. (LEE's part.cfg & IKRC)

Code cleaning is also taking place so it is recommended you save the version that you are using before updating.

If you want to color the control buttons you need to modify the LEE's part.cfg file. If the color data is commented there is no coloring.


MODULE
{
	name = IkRobotController
	// ColorCode format #RRGGBBAA in hex
	controlButtonUpDownColor = #FF00004C
	controlButtonLeftRightColor = #00FF004C
	controlButtonForwardBackwardColor = #0000FF4C
}

z3L4WTm.png

Great will test.

 

Another idea (am i bothering too much ?):

Add a button to the Toolbar (Stock or Blizzy) so you dont have to look for the LEE part:

 

Share this post


Link to post
Share on other sites

@Trufiadok Hey, maybe instead of trying to fix Laztek Stuff, you could ask DECQ if you can use his Dragon V1 Capsule - it already has an animated opening with PDGF but i cant figure out how to turn it to a proper docking port :D

 

 

Edited by Jasseji

Share this post


Link to post
Share on other sites
4 hours ago, Jasseji said:

@Trufiadok Hey, maybe instead of trying to fix Laztek Stuff, you could ask DECQ if you can use his Dragon V1 Capsule - it already has an animated opening with PDGF but i cant figure out how to turn it to a proper docking port :D

 

 

I've uploaded the target version. Doesn't it work, too? TRF_Dragon_PDGF_wT 

What is the problem? Can't dock it or can't be designated as a target?

Share this post


Link to post
Share on other sites

This is a new video from "testing Canadarm1".
I had to re-model the canadarm1 craft base of NASA's 3D model store, because the original models blocked the rotation angles at model level.
If necessary, you can use the old canadarm1 model with rotation limits.
Another problem with canadarm1 craft is that the base element in the IKRC is not possible a servo motor because of the IR rotation solution.
If you still want to use the original canadarm1 craft, you need to place it on a base part with the IKRC module.
There are a few problems I have to fix.
For example: After timewarp, the direction of rotation of the SoulderYaw servo motor is reversed.
So I think the InfernalRobotics plugin is responsible, I'll examine at it.

 

Share this post


Link to post
Share on other sites
Posted (edited)
On 11/18/2018 at 3:28 PM, Jasseji said:

tried it with you IR packages - still no luck, cant get the IR menu to show even (not even the icon is present) although IKRC works quite well apart from the misaligne automatic placement

 

Sent you my KSP.log

Hi, @Jasseji I looked at your KSP.log and found the oddity that it loaded IkRobotController.dll three times.

[LOG 10:58:31.681] AssemblyLoader: Loading assembly at C:\Games\KSP_win64\GameData\IKRC\IkRobotController.dll
[LOG 10:58:31.682] AssemblyLoader: Loading assembly at C:\Games\KSP_win64\GameData\IkRobotController\IkRobotController\bin\Debug\IkRobotController.dll
[LOG 10:58:31.683] AssemblyLoader: Loading assembly at C:\Games\KSP_win64\GameData\IkRobotController\IkRobotController\obj\Debug\IkRobotController.dll

https://github.com/Trufiadok/IKRC-for-Kerbal/tree/master/IkRobotController directory contains the source code. This isn't required for KSP\GameData.

I don't know if this affects anything?

The InfernalRobotics Asset file may also be missing. I'll see at tonight.

Edited by Trufiadok

Share this post


Link to post
Share on other sites
38 minutes ago, Trufiadok said:

Hi, @Jasseji I looked at your KSP.log and found the oddity that it loaded IkRobotController.dll three times.


[LOG 10:58:31.681] AssemblyLoader: Loading assembly at C:\Games\KSP_win64\GameData\IKRC\IkRobotController.dll
[LOG 10:58:31.682] AssemblyLoader: Loading assembly at C:\Games\KSP_win64\GameData\IkRobotController\IkRobotController\bin\Debug\IkRobotController.dll
[LOG 10:58:31.683] AssemblyLoader: Loading assembly at C:\Games\KSP_win64\GameData\IkRobotController\IkRobotController\obj\Debug\IkRobotController.dll

https://github.com/Trufiadok/IKRC-for-Kerbal/tree/master/IkRobotController directory contains the source code. This isn't required for KSP\GameData.

I don't know if this affects anything?

Yeah that's incorrectly installed. 

@Jasseji you need to delete that extra IkRobotController folder that's sitting in the first IkRobotController folder.

Share this post


Link to post
Share on other sites

Hi, @Jasseji I am here again.

I checked your KSP.log file, a bit late.

There may be a problem for displaying windows of the InfernalRobotics plugin there isn't the MagicSmokeIndustries directory in GameData directory.

The InfernalRoboticsMod directory on GitHub contains only the modified dll.

The IR plugin requires the entire MagicSmokeIndustries directory. The modified dll is in the Plugins directory.

Doesn't have to the InfernalRoboticsMod directory.

If you have MagicSmokeIndustries directory then I'm sorry and we're investigating next.

Share this post


Link to post
Share on other sites

 

20 hours ago, Starwaster said:

Yeah that's incorrectly installed. 

@Jasseji you need to delete that extra IkRobotController folder that's sitting in the first IkRobotController folder.

Hey thanks guys, i already noticed it and fixed, sorry for not informing sooner ;)

 

16 hours ago, Trufiadok said:

Working on Canadarm1.

mgrZA7P.png

YES YES YES :D

Share this post


Link to post
Share on other sites

RV-2F IK robot test.

Testing IKRC module on freely configured robot (RV-2F MITSUBISHI).

 

Share this post


Link to post
Share on other sites

The latest version was uploaded to GitHub.

This version already handles general robot arms.

I will describe later how to configure a robot arm.

As an example, I have configured a mitsubishi RV-2F 6-axis robot arm. The subassembly and the parts are also on the GitHub.

(Parts of RV-2F were made with the help of the © Mitsubishi Electric Corporation's officially available 3D model.)

3xYxz5W.png

Edited by Trufiadok

Share this post


Link to post
Share on other sites

How to configure a robot arm for IKRC:

1. Assembly of the robot arm in the Kerbal Editor. - The servo motors that move the robot arm must be unique. Unfortunately, the current version can't handle the same servo parts. It is planned that this shouldn't be a condition. We can use the same servos to duplicate and rename them. Such as TRF Canadarm2. The TRF.CA2.ARoll, TRF.CA2.APitch, TRF.CA2.AYaw, TRF.CA2.BYaw, TRF.CA2.APitch and TRF.CA2.ARoll are same servo motors also called.

2. Define the robot arm parameters in the configuration file of base part. The base part in the IKRC is not possible a servo motor because of the IR rotation solution (IR servo rotate -> rotate complete servo part /rotate-mesh & fixed-mesh/ and reverse rotate fixed-mesh). The following configuration is from the part.cfg file of TRF.Canadarm2:

MODULE
{
	name = IkRobotController
	robotArmID = CA2
	servoList = TRF.CA2.ARoll, TRF.CA2.AYaw, TRF.CA2.APitch, TRF.CA2.CElbow, TRF.CA2.BPitch, TRF.CA2.BYaw, TRF.CA2.BRoll, TRF.CA2.LEE.wCam
	servoRealAxis = (0 1 0), (1 0 0), (0 0 1), (0 0 -1), (0 0 -1), (1 0 0), (0 1 0), (0 0 0)
	minMaxAngles = (-270 270), (-270 270), (-270 270), (-270 270), (-270 270), (-270 270), (-270 270), (0 0)
	// ColorCode format #RRGGBBAA in hex
	controlButtonUpDownColor = #FF00004C
	controlButtonLeftRightColor = #00FF004C
	controlButtonForwardBackwardColor = #0000FF4C
	debugTransforms = True
	workingRange = 9.0
}

The robotArmID variable identifies the data related to the arm in the config.xml of IKRC.

The servoList variable contains a list of servos participating in the inverse kinematics control. At the end of the list you should include the end effector name of part. This ensures that the arm positions the target coordinate with the end effector. In this example, this is "TRF.CA2.LEE.wCam".

The servoRealAxis includes rotary axis definition of servo motors. These vector definitions understood in coordinate system of the base part.

The minMaxAngles variable contains the rotation range of servos.

There are also some parameters for coloring the buttons, debugging, and how far the IK algorithm should work.

3. Dump ServoStructure. When using a robotic arm for the first time, it is necessary to store the default parameters in config.xml file of module. This can be done by pressing the "Dump SevoStructure" button in the right click list of the base part. These parameters are needed by the IKRC module if, after loading, the servos of arm isn't in the default state, this ensures that the inverse kinematic control continues to work properly.

The following pictures show how the rotation axes can be interpreted for each robot arm:

ReHjSOm.png

Share this post


Link to post
Share on other sites

how can you make the ik-robot controller visible? I do not see him.

Thank you.
greeting

Share this post


Link to post
Share on other sites
On 2/23/2019 at 11:48 PM, funkheld said:

how can you make the ik-robot controller visible? I do not see him.

Thank you.
greeting

Rightclick at the Rootpart of the arm and then choose the UI.

Share this post


Link to post
Share on other sites

thanks for the information.

How do I get the IR sequencer visible?
the window does not appear.

Thank you.
greeting

Edited by funkheld

Share this post


Link to post
Share on other sites
1 hour ago, funkheld said:

thanks for the information.

How do I get the IR sequencer visible?
the window does not appear.

Thank you.
greeting

The window IS the Sequencer. You set the End-position and ready.

 

Edited by Cheesecake

Share this post


Link to post
Share on other sites

Hi good afternoon.
which is the basic element for the canadarm2 so that the control window appears.
It does not work for me.

Thank you.
greeting

Share this post


Link to post
Share on other sites
1 hour ago, funkheld said:

Hi good afternoon.
which is the basic element for the canadarm2 so that the control window appears.
It does not work for me.

Thank you.
greeting

The basic element of canadarm2 is TRF_CA2_LEE.

cG2LGfA.png

Share this post


Link to post
Share on other sites

Hello Thanks.
This not function.

TRF_CA2_LEE  is on  !!!
no robotcontroller.

why ???

this is my program:
IKRC-for-Kerbal-master.zip

greeting

 

Share this post


Link to post
Share on other sites
1 hour ago, funkheld said:

Hello Thanks.
This not function.

TRF_CA2_LEE  is on  !!!
no robotcontroller.

why ???

this is my program:
IKRC-for-Kerbal-master.zip

greeting

 

Does "Dump ServoStructure" not appear?

Share this post


Link to post
Share on other sites

-------------------------------------------------
Does "Dump ServoStructure" not appear?
-----------------------------------------------

yes ,is displayed

"Servo dumping Message"
"servo structure dumped"
                 "OK"
 

Greeting

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.