cfry / dde

Dexter Development Environment
Other
44 stars 25 forks source link

Issues and suggestions for DDE 3.8.7 #81

Closed A-code-user closed 2 years ago

A-code-user commented 2 years ago

issue summary:

  1. the simulated Dexter can move its joints to NaN and disappear except for the base

  2. error message related to a function call

  3. 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

    }) }

  4. 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:

  1. you can type over yourself

  2. simulated robot can go in itself

  3. 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.

  4. 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.

cfry commented 2 years ago

Issue summary

  1. 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.

  1. 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
  2. Yep, kinda hard to track that down. I will agree that error messages can be improved. Its an ongoing process :-)

suggestion summary:

  1. "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.
  2. 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".
  3. 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.
  4. 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.