Search found 13 matches
- 13 Apr 2024, 09:04
- Forum: General questions
- Topic: How to Import a URDF file
- Replies: 5
- Views: 421
Re: How to Import a URDF file
Yes, the URDF importer is very finicky about the resources' paths, and often those need to be adjusted... I have encountered a new problem. The joints in my URDF file are all in the same location as the base_link after import, and the coordinates set in URDF don't appear. In addition, the joint imp...
- 11 Apr 2024, 05:05
- Forum: General questions
- Topic: How to Import a URDF file
- Replies: 5
- Views: 421
Re: How to Import a URDF file
It is really transparent (opacity = 0) or it is in a hidden layer? I've found the reason. When I put them in the same folder /home/lab/model and tried to reference it using "./quad.obj" and "quad.obj", it couldn't find the file. But when I changed the path to an absolute path &q...
- 10 Apr 2024, 16:24
- Forum: General questions
- Topic: How to Import a URDF file
- Replies: 5
- Views: 421
How to Import a URDF file
hello, i have a urdf file, and in this file, <visual> <origin rpy="0 0 0" xyz="0 0 -0.02"/> <geometry> <mesh filename="./quad.obj" scale=".0875 .0875 .0875"/> </geometry> <material name="grey"> <color rgba=".2 .2 .2 1"/> </material> </visua...
- 22 May 2023, 10:41
- Forum: General questions
- Topic: Crash in while loop
- Replies: 12
- Views: 1211
Re: Crash in while loop
It would be simpler if you explain what you are trying to achieve. If you are trying to get the robot's yaw, you can simply take the robot's front-facing axis (in case of DR12 that would be -z ) project it onto the XY plane and use math.atan2(y,x) to get the angle, e.g.: function getYaw() local m=s...
- 22 May 2023, 02:00
- Forum: General questions
- Topic: Crash in while loop
- Replies: 12
- Views: 1211
Re: Crash in while loop
function sysCall_init() corout=coroutine.create(coroutineMain) end function sysCall_actuation() if coroutine.status(corout)~='dead' then local ok,errorMsg=coroutine.resume(corout) if errorMsg then error(debug.traceback(corout,errorMsg),2) end end end function sysCall_cleanup() -- do some clean-up h...
- 21 May 2023, 14:21
- Forum: General questions
- Topic: Crash in while loop
- Replies: 12
- Views: 1211
Re: Crash in while loop
function sysCall_actuation() if recive_ang ~=0 then model_matrix = sim.getObjectMatrix(model,-1) z = {0,0,1} pos={0,0,0} goal_matrix = sim.rotateAroundAxis(model_matrix,z,pos,recive_ang) while recive_ang>0 do model_matrix = sim.getObjectMatrix(model,-1) sim.setJointTargetVelocity(rightJointHandle,1...
- 20 May 2023, 15:44
- Forum: General questions
- Topic: Crash in while loop
- Replies: 12
- Views: 1211
Re: Crash in while loop
Did it now really crash, or simply hang like last time?! If it hangs, then you are probably using a long loop in a non-coroutine section. You didn't show your whole code, so difficult to say Cheers The strange thing is that I wrote the same loop function in sysCall_actuation(), sim.setJointTargetVe...
- 20 May 2023, 15:39
- Forum: General questions
- Topic: Crash in while loop
- Replies: 12
- Views: 1211
Re: Crash in while loop
that's a terrible way to operate on a transform matrix. Try sim.rotateAroundAxis or some function from matrix.lua , e.g. Matrix3x3:fromaxisangle , Matrix3x3:rotx , Matrix3x3:roty , Matrix3x3:rotz (use then Matrix4x4:fromrotation or Matrix4x4:fromrt to create a full 4x4 matrix). Thank you for your r...
- 19 May 2023, 05:43
- Forum: General questions
- Topic: Crash in while loop
- Replies: 12
- Views: 1211
Re: Crash in while loop
No, that happens is you have an infinite loop or a very long operation in a non-threaded context. Something is wrong with your algorithm. Cheers I ran into the same problem. I put a while function in sysCall_actuation() so that when it didn’t rotate to the desired angle, it kept turning, but it wou...
- 20 Apr 2023, 14:56
- Forum: General questions
- Topic: make a simple quadcopter
- Replies: 2
- Views: 290
Re: make a simple quadcopter
thanks your reply!
I have successfully make it,this is very important to me
Thank you very much:)
I have successfully make it,this is very important to me
Thank you very much:)