Jump to content

Inverse kinematics robotcontroller for Canadarm1, Canadarm2 and ANY


Trufiadok
 Share

Recommended Posts

1 hour ago, Trufiadok said:

@sciencepanda

I reviewed the log file that you send for me.

You could write or make a video about what the error is? Because the IKRC module is initialized properly based on 'KSP.log'. Can you open window of IKRC module? 

I'm not getting any windows or menus, or any other user-interface other that what's stock. I'm also not getting any sort of IR functionality on any of the joints.

I've attatched some screenshots See update below

Spoiler
 
 
0
 Advanced issue found
 
 
Spoiler

34mtb5n.png

D2fyVVU.png

MCU0SpB.png

Also, just want to point out the LeeCam is turned on in the third screenshot

Update: I solved the problem. Partially user error, partially oddity with IKRCs functionality. I hadn't noticed the "Turn on IKRC" on the other LEE. I clicked that and the window came right up. However, when i changed my window resolution back to the lower resolution I usually use, is dissapears. Turns out, when using the lower resoltuion, the IKRC window appears off-screen.

Edited by sciencepanda
Link to comment
Share on other sites

12 minutes ago, Trufiadok said:

 

You can activate the IKRC window by pressing the "Turn on IKRC" button on the base element of the robot arm.
The base element of the Canadarm2 arm is the TRFCA2LEE endeffector.

 

Figured that out. Sorry for wasting your time there. However, I found something interesting:

39 minutes ago, sciencepanda said:

Update: I solved the problem. Partially user error, partially oddity with IKRCs functionality. I hadn't noticed the "Turn on IKRC" on the other LEE. I clicked that and the window came right up. However, when i changed my window resolution back to the lower resolution I usually use, is dissapears. Turns out, when using the lower resoltuion, the IKRC window appears off-screen.

 

Link to comment
Share on other sites

Once I got a change to play around with it, I must say, this is pretty awesome. This is exactly the sort of thing I needed in my ISS build. Thank you for making this.

One thing I did notice is a problem in trying to replicate the relocation functionality of the real Canadarm2 (Grabbing one PDGF, releasing the opposite LEE and moving end-over-end). I'll attatch a video of the issue. Not sure if it's a glitch or user error. I'll attach a video.

Update: One last observation and I'll stop complaning. On orbit the red target ball drifts, and does so at a fast enough rate to prevent the LEE from grappling the PDGF. Also, if i rotate the craft, the target doesn't move with the craft.

Edited by sciencepanda
Link to comment
Share on other sites

@sciencepanda

Yes, both "errors" are real.

The function of changing the operating direction of the arm hasn't yet been solved. This is partly due to the parent/child relationship of the objects and partly due to the operation of the servo motors of the InfernalRobotics module. I'm working on implementing this mode.

The other "error" arises from the fact that on orbital the origin of the coordinate system is always the base point of the vessel's base element. If we restructure or disconnect the vessel, the coordinate system will change.

Link to comment
Share on other sites

Interesting. It'll be really cool when that's solved. In the meantime I'm sure there are plenty of workarounds.

One more question, is it possible to get the hinges to fold? Does that require a version of IR? Or is the current version not currently configured for that functionality?

Link to comment
Share on other sites

19 hours ago, sciencepanda said:

Interesting. It'll be really cool when that's solved. In the meantime I'm sure there are plenty of workarounds.

One more question, is it possible to get the hinges to fold? Does that require a version of IR? Or is the current version not currently configured for that functionality?

In theory, it’s possible through IKRC, but I have to look.
I also did the "Body Roll Joint" of the dextre unit this way.
The "IR Minimal" plugin only provides an API for servo motors, it has no interface.

Link to comment
Share on other sites

@sciencepanda

Hi,

I'm done with the first version. It is a bit difficult to identify the independent servo motor, but it works. (I'm still thinking of a simpler solution. Ideas welcome ...)

ENXeLVi.png

1. Refresh IKRC module and element of Canadarm2 from GitHub.
2. Get 'persistentId' of IndepServos from *.craft file of vessel. (e.g.: The * .craft file of the vessel in the picture: c:\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program\saves\Sandbox\Ships\VAB\Canadarm2IKRC1_9_1test000.craft -> 1890560618, 1607454241)

...

PART
{
	part = TRFCA2AHinge_4294577756
	partName = Part
	persistentId = 1890560618
	pos = 0.720157683,11.6895847,-3.60527706
	attPos = 0,0,0
	attPos0 = 0.206399918,2.16720009,-8.94069672E-08
	rot = 8.94069956E-08,0.707107306,-2.98023224E-08,0.707106709
	attRot = 0,0.707106769,0,0.707106769
	attRot0 = 0,0.707106829,0,0.707106829

	...

PART
{
	part = TRF.CA2.BHinge_4294577562
	partName = Part
	persistentId = 1607454241
	pos = 0.720161259,11.6895857,-4.01808739
	attPos = 0,0,0
	attPos0 = 0.206399933,-0.103199005,-9.23872221E-07
	rot = 0.707106829,-3.22557241E-07,0.707107186,-4.47034836E-07
	attRot = 0.707106709,0,0.707106709,0
	attRot0 = 0.707106829,0,0.707106829,0

	...


3. Set indepServos parameters in module configuration. (independentServoList -> partname of servos, independentServoPersistentId -> 'persistentId' from actual craft file, independentServoMinMaxAngles -> logically)

MODULE
{
	name = IkRobotController
	robotArmID = CA2
	servoList = TRFCA2ARoll, TRFCA2AYaw, TRFCA2APitch, TRFCA2CElbow, TRFCA2BPitch, TRFCA2BYaw, TRFCA2BRoll, TRFCA2LEEwCam
	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
	MaxPosErr = 10.0
	MaxOriErr = 180.0
	DistanceThreshold = 0.01
	AngleThreshold = 0.5
	dynamicSamplingAngle = True
	
	independentServoList = TRFCA2AHinge, TRF.CA2.BHinge
	independentServoPersistentId = 1890560618, 1607454241
	independentMinMaxAngles = (0 180), (0 180)
}

 

Link to comment
Share on other sites

On 5/12/2020 at 9:15 PM, josselin2196 said:

What are exactly the requirement for the mod? I have IKRC  and InfernalRobotic installed. When i activate the arm, the interface is unmovable an incomplete. The arm is unresponsive to command. 

I'm sorry, I'm watching now and the robot arm itself is doing the same for me. Repair in progress.

Link to comment
Share on other sites

17 hours ago, msp307 said:
hi i wanted to ask is the installation the same as before?

Yes, copy 'plugins' and parts directory to GameData. This version is able to run in parallel with the InfernalRobotics module. The IKRC module uses ..\Plugins\IRMin.dll (IRMinimal module) as the servo API.

Link to comment
Share on other sites

On 5/20/2020 at 8:09 PM, Trufiadok said:

Yes, copy 'plugins' and parts directory to GameData. This version is able to run in parallel with the InfernalRobotics module. The IKRC module uses ..\Plugins\IRMin.dll (IRMinimal module) as the servo API.

 
Somehow I can't do it. Could you give me instructions?
Link to comment
Share on other sites

On 5/21/2020 at 11:44 PM, msp307 said:
Somehow I can't do it. Could you give me instructions?

Hi @msp307,

1. Remove old version of IKRC.

2. Download 1.9.1 version from GitHub Trufiadok/IKRC-for-Kerbal-1.9.1 link

3. Copy 'TrufiadokAirSpaceCo' directory to GameData directory of Kerbal (e.g.: c:\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program\GameData\)

4. Use it, if doesn't work then send me a ksp.log. I"ll trying solve your problem.

I removed the binaries from source directory because this causes the problem if the source directory is also copied.

Link to comment
Share on other sites

On 5/25/2020 at 1:12 AM, rib3irojr said:

Hi, I don't if we NEED the Infernal Robotics to work on 1.9, but if we need, you know where can I find it to this version?

Does InfernalRobotics not work under 1.9? I'm sorry I haven't used IR in a long time. Maybe look at how Infernal Robotics Next stands now? (As far as I can see, they haven't worked with it in 11 months.)

Link to comment
Share on other sites

Hello

I installed like that and I don't have any "turn on IKRC" button :(

Could you also described which pieces do I need for a standard canadarm ? 

Thanks a lot for your help ! :)

 

EDIT : I use KSP 1.8.1

On 5/23/2020 at 3:05 PM, Trufiadok said:

Hi @msp307,

1. Remove old version of IKRC.

2. Download 1.9.1 version from GitHub Trufiadok/IKRC-for-Kerbal-1.9.1 link

3. Copy 'TrufiadokAirSpaceCo' directory to GameData directory of Kerbal (e.g.: c:\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program\GameData\)

4. Use it, if doesn't work then send me a ksp.log. I"ll trying solve your problem.

I removed the binaries from source directory because this causes the problem if the source directory is also copied.

 

Edited by Nefertoum
Link to comment
Share on other sites

23 hours ago, Nefertoum said:

Hello

I installed like that and I don't have any "turn on IKRC" button :(

Could you also described which pieces do I need for a standard canadarm ? 

Thanks a lot for your help ! :)

EDIT : I use KSP 1.8.1

What do you mean by 'standard canadarm': Canadarm(1)[using on SpaceShuttle] or Canadarm2 [useing on ISS]? The parts required for Canadarm2 can be found in the ..\TrufiadokAirSpaceCo\Canadarm2 subdirectory.

Are you looking for the 'turn on IKRC' button on the right part? (the IKRC pugin connected to TRFCA2LEE) (not to TRFCA2LEEwCam)

If these aren't the causes of the problem, send a ksp.log. ([email protected])

Link to comment
Share on other sites

On 6/3/2020 at 8:56 PM, Trufiadok said:

What do you mean by 'standard canadarm': Canadarm(1)[using on SpaceShuttle] or Canadarm2 [useing on ISS]? The parts required for Canadarm2 can be found in the ..\TrufiadokAirSpaceCo\Canadarm2 subdirectory.

Are you looking for the 'turn on IKRC' button on the right part? (the IKRC pugin connected to TRFCA2LEE) (not to TRFCA2LEEwCam)

If these aren't the causes of the problem, send a ksp.log. ([email protected])

Yes I put TRFCA2LEE and nothing. I sent you a picture and my log by mail. 

Link to comment
Share on other sites

Hi,

Sometimes everything is okay, but the control window still doesn't appear.

This may also be because the starting position of the window (larger than the screen size) is set incorrectly in config.xml.

I updated all the config.xml on GitHub so that the starting position is 10, 10.

Link to comment
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.

 Share

×
×
  • Create New...