#robotics | Logs for 2016-10-04

Back
[02:43:40] <deshipu> anonnumberanon: I have a bunch
[02:44:04] <deshipu> anonnumberanon: brexit made them cheaper
[06:06:18] <veverak> finally spotted code that can display covariance matrix (3d)
[06:06:43] <veverak> and I feel I get smaller headache from entire topic
[07:13:16] <gentoo> hi, any robot here can accessing google search for me?
[07:15:33] <Jak_o_Shadows> ?
[07:17:38] <gentoo> Jak_o_Shadows: a google search robot for me, i can't access google :(
[07:17:59] <Jak_o_Shadows> thst sucks
[07:18:05] <Jak_o_Shadows> probs not the right channel here though
[07:18:53] <veverak> gentoo: use proxy?
[07:20:30] <gentoo> veverak: don't have one
[07:20:43] <veverak> https://duckduckgo.com/ ?
[07:21:32] <gentoo> time out
[07:23:16] <Jak_o_Shadows> Where are you that you're internet is filtered that heavily!
[07:24:37] <gentoo> totally blocked, not filterd
[07:25:03] <veverak> still same question
[07:25:07] <veverak> where are you? :D
[07:25:14] <Jak_o_Shadows> Bloody hell
[07:25:19] <Jak_o_Shadows> Corporate?
[07:25:20] <veverak> china
[07:25:24] <gentoo> shamed to mention
[07:25:41] <veverak> or, traceroute goes through chinatelecom
[07:26:31] <veverak> yep :)
[07:27:10] <gentoo> :)
[07:27:24] <gentoo> thx
[07:27:31] <veverak> gentoo: maybe you should be able to get VPS overseas (costs money :/)
[07:27:46] <veverak> it is than possible to make encrypted tunnel
[07:27:56] <gentoo> ok
[07:27:58] <veverak> to bypass you country firewall
[07:28:14] <veverak> but, study a lot this topic, I suppose you could have problems with law with this
[07:29:05] <veverak> ie. Tor afaik is completely blocked by firewall
[07:30:21] <gentoo> yes
[09:43:33] <rue_house> I wonder if somone can make a tunnel look like a voip stream
[09:44:46] <veverak> should be possible
[09:45:03] <veverak> afaik there is sane way to encode data into audio waveform
[09:45:15] <rue_house> hmm lossless
[09:45:41] <veverak> than you can make audio virtual devices
[09:54:20] <theBear> us old guys got our first taste of residential internet over such devices, you remember rue <grin> tho on a serious note, mdoern cellular and i would guess voip protocols are heavily optimized for intelligible speech/voice and nothing else, which means they're happy to mangle the audio if it is likely to still be intelligible assuming it is words and not some dude assing around with the voip network :)
[09:54:45] <theBear> there will be ways to best avoid it messing with you, just need to workout what they are gonna be
[09:55:46] <theBear> then again, if you control both ends of the data tunnel it can be arbitrary unaltered data just packeted up the same way as the voip bulk/raw data travels
[09:56:19] <theBear> maybe even via a service like skype if they don't sanitize their protocol properly
[12:59:57] <veverak> so, I have quaternion like PI [0,0,1], I rotate it by -PI/2 [0,0,1] quaternion and got PI/2 [0,0,-1]
[13:00:02] <veverak> not sure if that is correct
[13:00:21] <anniepoo> this is in 2D?
[13:00:26] <anniepoo> then yes, it's right
[13:00:35] <veverak> 3d
[13:00:42] <veverak> angle + vector_axis
[13:00:47] <anniepoo> then your quats are wrong arity
[13:01:03] <anniepoo> quaternions are 4 vectors
[13:01:21] <veverak> yeah, either 4 values, or can be interpreted as vector AND angle
[13:01:34] <veverak> angle [vector]
[13:01:41] <veverak> (vector of 3 values)
[13:01:43] <anniepoo> ah, this is some axis angle representation?
[13:01:53] <anniepoo> ok, then it looks good to me.
[13:02:51] <veverak> good (this worked)
[13:03:21] <veverak> than I tried to get PI/2 [0,0,-1] and rotate it by PI/2 [0,0,1]
[13:03:38] <veverak> and receive PI/2 [0,0,1]
[13:04:14] <veverak> hmm
[13:05:02] <anniepoo> ok, TEN-SHUN!!!! FALL IN!!!! ABOUT FACE!!!! ABOUT FACE!!!!
[13:05:36] <veverak> rot [0,0,180], rot[0,0,-90], rot [0,0,90]
[13:05:38] <veverak> :)
[13:05:47] <veverak> anyway, it does not work evidently
[13:06:05] <veverak> auto basic_rot = schpin::Quaternion( schpin::Point(0,0,1), angle ); next_rot = last_pose.orientation.inverse() * basic_rot * last_pose.orientation;
[13:06:14] <veverak> hmm, maybe the library I am using got it wrong? :/
[13:06:33] <anniepoo> doubtful
[13:06:49] <anniepoo> more likely you're misunderstanding how to feed coords?
[13:07:01] <veverak> https://bpaste.net/show/26ed8b93ff2c
[13:07:06] <veverak> debug ouput
[13:07:09] <veverak> 3d visualization
[13:07:26] <veverak> both told me that it works until transform when I apply PI/2[0,0,1]
[13:10:03] <anniepoo> are you tumbling gyros?
[13:10:23] <anniepoo> quats don't have pole of confusion, but axis-angle reps do
[13:10:41] <anniepoo> Ah!
[13:10:52] <anniepoo> first line of paste
[13:10:59] <anniepoo> and 5th line
[13:11:07] <anniepoo> that's pi
[13:11:34] <veverak> anniepoo: I have 3d pose (position+orientation)
[13:11:45] <veverak> and apply another transforms over it
[13:11:53] <anniepoo> ok
[13:11:58] <veverak> for now, only 'angle rotation around 'z' axis'
[13:12:02] <veverak> where z is up/down
[13:12:17] <anniepoo> so, your oriignal question, the soldier is 'facing backwards'
[13:12:33] <veverak> so turn 180 degress, than -90 degrees
[13:12:38] <anniepoo> and rotates CCW by 90
[13:12:40] <veverak> and I want it to go 90 (to get back to 180)
[13:12:46] <anniepoo> you did
[13:12:49] <veverak> aaaaand it went by 180 for some reason
[13:12:51] <veverak> :/
[13:12:59] <veverak> and got to 270
[13:13:18] <anniepoo> the secret is that the system expressed it as PI/2 [0, 0, -1]
[13:13:27] <anniepoo> it flipped the axis
[13:13:49] <veverak> yeah, realized that
[13:13:56] <veverak> but last angle change is wrong
[13:14:15] <veverak> [DEBUG] [1475602012.949014108]: Input distance: 0 angle: 1.57075 height:0
[13:14:17] <veverak> [DEBUG] [1475602012.949023024]: Previous pose:
[13:14:19] <veverak> [DEBUG] [1475602012.949034361]: pose: Quaternion: 1.57075 [0,0,-1] Position: [1.5,-0.100046,0.05]
[13:14:21] <veverak> [DEBUG] [1475602012.949042464]: New pose:
[13:14:23] <veverak> [DEBUG] [1475602012.949053301]: pose: Quaternion: 1.57075 [0,0,1] Position: [1.5,-0.100046,0.05]
[13:15:05] <veverak> hmm
[13:15:13] <veverak> anniepoo: will switch to normal quaternion debug to be sure
[13:16:06] <anniepoo> this totally looks right to me, based on it being an idiom I've done hundreds of times
[13:16:08] <anniepoo> auto basic_rot = schpin::Quaternion( schpin::Point(0,0,1), angle ); next_rot = last_pose.orientation.inverse() * basic_rot * last_pose.orientation;
[13:16:28] <anniepoo> experiment - make angle really small
[13:16:35] <anniepoo> then it shouldn't move
[13:21:09] <anniepoo> make angle near 90 on either side, see if it 'snaps' between different values. If so, you're seeing a 'tumbling gyro' problem
[13:22:20] <veverak> https://bpaste.net/show/2f5365fe3a99
[13:22:23] <veverak> new output
[13:22:26] <veverak> anniepoo: will try
[13:23:37] <anniepoo> [1,0,0,0] <-- this looks really suspicious
[13:23:48] <anniepoo> the w value is rarely 0
[13:24:47] <veverak> schpin::Quaternion( schpin::Point(0, 0, 1), 0)
[13:24:53] <veverak> that should be this
[13:25:31] <anniepoo> hmm... maybe I'm bogus there, hang on
[13:26:29] <veverak> http://i.imgur.com/HBXbGW2.png
[13:26:35] <veverak> anniepoo: 3d visual ^^
[13:27:00] <veverak> ouch
[13:27:03] <veverak> that is different data
[13:27:05] <veverak> damn it
[13:27:25] <veverak> picture is relevant to this datA: https://bpaste.net/show/37a09d005e32
[13:27:27] <veverak> damn it
[13:27:57] <veverak> (green arrow are poses, and there is linear interpolation between poses)
[13:28:19] <anniepoo> Although care should be taken (due to degeneracy as the quaternion approaches the identity quaternion (1) or the sine of the angle approaches zero) the axis and angle can be extracted via:
[13:28:19] <anniepoo> {\displaystyle {\begin{aligned}\mathbf {q} &=q_{r}+q_{i}\mathbf {i} +q_{j}\mathbf {j} +q_{k}\mathbf {k} \\\theta &=2\arccos q_{r}=2\arcsin {\sqrt {q_{i}^{2}+q_{j}^{2}+q_{k}^{2}}}\\(a_{x},a_{y},a_{z})&={\frac {1}{\sin {\tfrac {1}{2}}\theta }}(q_{i},q_{j},q_{k})\end{aligned}}} {\begin{aligned}\mathbf {q} &=q_{r}+q_{i}\mathbf {i} +q_{j}\mathbf {j} +q_{k}\mathbf {k} \\\theta &=2\arccos q_{r}=2\arcsin {\sqrt {q_{i}^{2}+q_{j}^{2}+q_{k}^{2}}}\\(a_{x},a_{y},a
[13:28:19] <anniepoo> _{z})&={\frac {1}{\sin {\tfrac {1}{2}}\theta }}(q_{i},q_{j},q_{k})\end{aligned}}
[13:28:20] <anniepoo> Note that the θ equality holds only when qr is non-negative.
[13:28:24] <anniepoo> oops, sorry
[13:28:38] <anniepoo> https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation#Proof_of_the_quaternion_rotation_identity
[13:28:56] <anniepoo> find "Although care should be taken"
[13:29:19] <anniepoo> basically, if you're not rotating at all, the axis of rotation is undefined
[13:31:00] <veverak> anniepoo: it's more like because: last_orientation^-1 * orientation_change * last_orientation
[13:31:08] <veverak> (that is how I apply orientation changes)
[13:31:19] <anniepoo> yes, and that's how I do it too
[13:31:22] <veverak> with 0 quaternion, this does not compute
[13:31:24] <veverak> :)
[13:31:51] <anniepoo> try sticking in 0 for angle
[13:32:09] <anniepoo> so orientation_change is the identity
[13:32:45] <veverak> where?
[13:32:47] <veverak> or... ?
[13:33:28] <veverak> anyway, in last step I did rotation by 0.1, and it rotated by more tahn pi/2
[13:33:44] <veverak> ok
[13:33:53] <veverak> there is something completely wrong with that 'zero' angle
[13:34:06] <veverak> https://bpaste.net/show/99788bec30c9
[13:34:18] <veverak> I had if ( angle == 0 ) { avoid calculations with quaternions }
[13:34:27] <veverak> removed it, and it went completely bananas
[13:34:54] <anniepoo> ok, so you're going through a 'degeneracy'
[13:35:08] <veverak> anniepoo: check last bpaste
[13:35:12] <anniepoo> a rotation through 0 isn't on a well defined axis
[13:38:06] <veverak> this is used http://docs.ros.org/kinetic/api/tf/html/c++/Quaternion_8h_source.html#l00062 in constructor from vector and angle
[13:39:44] <veverak> anyway, question is, what to do with it
[13:41:20] <anniepoo> sorry, sucked into meeting
[13:41:41] <anniepoo> 8c/ not sure I'm helping anyway
[13:50:18] <veverak> nah
[13:56:21] <veverak> so
[13:56:25] <veverak> now I am pretty sure
[13:56:34] <veverak> that my p = qpq^-1
[13:56:36] <veverak> does not work
[13:56:51] <veverak> (p - state, q - transform quaternion)
[14:00:49] <veverak> SOLVED
[14:00:50] <veverak> damn it
[14:01:03] <veverak> anniepoo: combination of tqo quaternions is actually: q = q2q1
[14:01:10] <veverak> n which q′ corresponds to the rotation q1 followed by the rotation q2.
[14:02:20] <anniepoo> so it was a commutivity issue?
[14:02:52] <veverak> not, more like bad formula
[14:03:01] <anniepoo> 8cP
[14:03:05] <veverak> p = qpq^-1 is for rotation point 'p' by quaternion 'q'
[14:03:07] <anniepoo> rotations are pain
[14:03:09] <veverak> to merge two quaternions
[14:03:16] <veverak> q = q_2*q_1
[14:03:31] <anniepoo> yah, that's bad api design on their part
[15:54:59] <anonnumberanon> haha that autobeacon visualization is great rue_house
[16:01:29] <anonnumberanon> okay let's see what that servo torque sensor video is about
[16:17:51] <anonnumberanon> "there is a bit of an initial jummp there, but after that it's pretty linear" more info on that?
[16:19:20] <anonnumberanon> also this system means you need to measure the edges with a micro to get timing values. Kinda the same way you would read PWMs coming from a R/C receiver.
[16:44:06] <anonnumberanon> lol damn i always have to reread my code to find how to make random numbers.
[17:22:54] <anonnumberanon> I need a really quick call to turn off a pin on a certain port. How could I do it??
[17:23:05] <anonnumberanon> This is what I have so far, is this correct? https://paste.debian.net/hidden/7c5f48c9/
[19:32:27] <anonnumberanon> ais the x, y robot position program written?
[20:04:11] <anonnumberanon> I just came up with a formula that uses 2 angles, 2 points, an tan().
[20:21:19] <anonnumberanon> I rotated the entire frame of reference, though so I have to rotate the results back to get actual results.
[20:41:40] <rue_bed2> anonnumberanon, :)
[20:42:15] <rue_bed2> I have code to work out the posiiton, havn't applied it to that yet
[20:42:56] <rue_bed2> anonnumberanon, using two points and one angle there is a curve of solutions
[21:00:36] <rue_bed2> anonnumberanon, the fastest way to clear the pins on the port is to write a fixed value to the port
[21:01:08] <rue_bed2> the indexing your doing will REALLY slow down the code
[21:01:58] <rue_bed2> what are you trying to do with that code?
[21:03:25] <rue_bed2> the jump is to about 0.5 or 0.7ms
[21:03:44] <rue_bed2> I think its from the deadtime limit for the servo
[22:14:34] * rue_shop5 thinks
[22:14:44] <rue_shop5> oh genorator, but its raining, screw it
[22:14:54] <rue_shop5> theBear,
[22:15:04] <rue_shop5> they have a phone system over there,
[22:15:13] <rue_shop5> its nortel, but under a different name
[22:16:25] <rue_shop5> http://www.norstar-phones.com/inventory_images/64.jpg
[22:16:29] <rue_shop5> they look like that
[22:16:45] <rue_shop5> bars, hotels, businesses
[22:17:06] <rue_shop5> theBear, I would like if you can tell me the brand they use over there
[23:28:35] <Snert> that's a norstar meridian centrex or digitrex I beleive.
[23:29:53] <rue_house> Snert, not in australia
[23:30:02] <rue_house> its got another name
[23:30:09] <rue_house> oh,
[23:30:21] <rue_house> maybe digitrex is what I was looking for
[23:30:48] <rue_house> na
[23:31:00] <rue_house> those phones have a different brand name there than they do here
[23:31:09] <Snert> I'm ripping out ours and putting in mitel.
[23:31:25] <rue_house> are you in australlia?
[23:31:32] <Snert> alaska
[23:31:38] <rue_house> not helping
[23:31:46] <rue_house> I need to know australlia
[23:32:01] <rue_house> every phone manuf now is trying to make systems that can take over the world
[23:32:12] <rue_house> I need a source of them for 3 set, 2 line ma-and-pa shops
[23:32:27] <Snert> a little bit of code personalities and voila.
[23:32:38] <rue_house> if somone remade nortel 308 controllers it'd be perfect
[23:32:43] <Snert> OzPhones.
[23:33:23] <rue_house> I saw then when I was over there, and thought the rebrand was amusing, but didn't note it
[23:35:28] <rue_house> it wasn't nortel or meridian
[23:35:30] <rue_house> they used another name
[23:36:42] <rue_house> theBear, if you happen upon the info I'd really like to know
[23:37:14] <rue_house> oooh bellsouth