the simulated Dexter can move its joints to NaN and disappear except for the base
error message related to a function call
The following code causes the mentioned problem:
var random_variable = 0
new Job({
name: "Hello",
user_data:{},
keep_history: false,
show_instructions: false,
do_list: [
Dexter.move_all_joints([0, 0, 0, 0, 0]),
Dexter.empty_instruction_queue(),
arm_move_and_stuff,
Dexter.move_all_joints([0, 0, 0, 0, 0])
]})
function arm_move_and_stuff(){
return loop_thing
}
function loop_thing(){
return Control.loop(5, function(){
let CMD = []
CMD.push(Dexter.move_all_joints([10, 20, 30, 40, 50]))
CMD.push(Dexter.move_all_joints([0, 0, 0, 0, 0]))
CMD.push(Dexter.empty_instruction_queue())
CMD.push(++random_variable) //this line causes the issue, it just doesn't like this. if you knew how to code, you probably would never encounter this.
return CMD
})
}
I just forgot how I made the error message appear. it was a similar code to the above where it got in the loop, but when I stopped it it gave me a message saying it called the function and wasn't supposed to. I forgot to send the error report at the time, so I guess this can't be fixed for now.
suggestion summary:
you can type over yourself
simulated robot can go in itself
if you type something, for example "//cool code before this comment" I have sometimes been able to go to any place in the code and start typing over what I have already typed. for example, if I wanted to change it to say "//awesome code before this comment" it would instead say "//awesomede before this comment" (if you delete cool and then start typing). I dont know if this is a feature or something, but it just makes it really annoying to edit things.
The simulated robot can go inside itself and it doesn't have any sort of warning. I suggest some sort of system that warns you the robot is in itself. a simple way to do that would just be setting a certain range the joints are allowed to go in, and if you are outside of that range DDE warns you. if you do it that way, it could also warn you what joint is moving the robot in itself.
give and example.
If you do :
new Job({
name: "my_job",
do_list: [
Dexter.move_all_joints(0, Number.NaN)
]
}).start()
the job completes with no error.
If you stick, say, 30 in place of 0, joint 1 moves to 30 and no other problems.
Maybe it should error if you pass in a NaN but now it just ignores that value which
is also a good way to "skip" a joint when passing in values, and leave that joint where
it already is.
2, Not specific enough to be reproducible.
the problem is that ++random_variable returns 1, and that 1 goes directly on the do_list.
A number on the do_list is invalid. For a list of valid do_list items, see
Ref Man/Robot/Robot Instructions
Yep, kinda hard to track that down. I will agree that error messages can be improved.
Its an ongoing process :-)
suggestion summary:
"you can type over yourself".
I'm not sure what you mean but, in the Editor, if you have a selection, the first char you hit
on the keyboard will replace the selection with the char. This is by design and common
in text editing.
If you don't have a selection, typing a char will insert that char where the cursor is, also common in
text editors.
yes, the robot can go into itself. One of our important users wants the flexibility to
be able to command the robot to do things that a normal users wouldn't want to do.
I would agree that we need to accommodate both this advanced usage as well as
"normal usage".
see #1 above. I didn't fully understand your situation so first making that clearer would help.
then proposing what you actually want would help too.
See #2 above. Your idea of a "warning" is a good one so you could still "perform the command"
yet be explicitly warned that what you've commanded is normally a bad idea.
issue summary:
the simulated Dexter can move its joints to NaN and disappear except for the base
error message related to a function call
The following code causes the mentioned problem: var random_variable = 0 new Job({ name: "Hello", user_data:{}, keep_history: false, show_instructions: false, do_list: [ Dexter.move_all_joints([0, 0, 0, 0, 0]), Dexter.empty_instruction_queue(), arm_move_and_stuff, Dexter.move_all_joints([0, 0, 0, 0, 0]) ]}) function arm_move_and_stuff(){ return loop_thing } function loop_thing(){ return Control.loop(5, function(){ let CMD = [] CMD.push(Dexter.move_all_joints([10, 20, 30, 40, 50])) CMD.push(Dexter.move_all_joints([0, 0, 0, 0, 0])) CMD.push(Dexter.empty_instruction_queue()) CMD.push(++random_variable) //this line causes the issue, it just doesn't like this. if you knew how to code, you probably would never encounter this. return CMD
}) }
I just forgot how I made the error message appear. it was a similar code to the above where it got in the loop, but when I stopped it it gave me a message saying it called the function and wasn't supposed to. I forgot to send the error report at the time, so I guess this can't be fixed for now.
suggestion summary:
you can type over yourself
simulated robot can go in itself
if you type something, for example "//cool code before this comment" I have sometimes been able to go to any place in the code and start typing over what I have already typed. for example, if I wanted to change it to say "//awesome code before this comment" it would instead say "//awesomede before this comment" (if you delete cool and then start typing). I dont know if this is a feature or something, but it just makes it really annoying to edit things.
The simulated robot can go inside itself and it doesn't have any sort of warning. I suggest some sort of system that warns you the robot is in itself. a simple way to do that would just be setting a certain range the joints are allowed to go in, and if you are outside of that range DDE warns you. if you do it that way, it could also warn you what joint is moving the robot in itself.