You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(13) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(50) |
Feb
(137) |
Mar
(84) |
Apr
(36) |
May
(100) |
Jun
(5) |
Jul
|
Aug
(4) |
Sep
(13) |
Oct
(1) |
Nov
(4) |
Dec
(22) |
2011 |
Jan
(4) |
Feb
(9) |
Mar
(113) |
Apr
(76) |
May
(31) |
Jun
(19) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
(4) |
Feb
|
Mar
(2) |
Apr
(6) |
May
(19) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
(2) |
Apr
(22) |
May
(6) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Jérémie D. <Ba...@us...> - 2011-04-18 19:33:00
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 1063889e6c9547426e6f4a8322fef1f4bd8f85f7 (commit) from 89e804e0141a8c908fb78fa549e50f1dc08864dd (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 1063889e6c9547426e6f4a8322fef1f4bd8f85f7 Author: Jérémie Dimino <je...@di...> Date: Mon Apr 18 20:06:16 2011 +0200 [krobot_message] use C stubs for serializing/deserializing strange structures ----------------------------------------------------------------------- Changes: diff --git a/info/control2011/_oasis b/info/control2011/_oasis index 85e61ae..c14f942 100644 --- a/info/control2011/_oasis +++ b/info/control2011/_oasis @@ -31,9 +31,9 @@ Flag gtk Library krobot FindlibName: krobot - BuildDepends: lwt.unix, lwt.syntax, obus, krobot.interfaces, bitstring, bitstring.syntax + BuildDepends: lwt.unix, lwt.syntax, obus, krobot.interfaces XMETADescription: The [Kro]bot library - XMETARequires: lwt.unix, obus, krobot.interfaces, bitstring + XMETARequires: lwt.unix, obus, krobot.interfaces Path: src/lib Install: true Modules: @@ -43,6 +43,8 @@ Library krobot Krobot_service, Krobot_geom, Krobot_planner + CSources: + krobot_message_stubs.c Library "krobot-can" FindlibName: can diff --git a/info/control2011/_tags b/info/control2011/_tags index f8002fe..650cedb 100644 --- a/info/control2011/_tags +++ b/info/control2011/_tags @@ -2,7 +2,7 @@ <src/interfaces/*.ml>: -syntax_camlp4o # OASIS_START -# DO NOT EDIT (digest: bc62a620a945818c8391362124b031c3) +# DO NOT EDIT (digest: 28c051595fc8936deb8eca602b892268) # Library krobot-interfaces "src/interfaces": include "src/interfaces/krobot-interfaces.cmxs": use_krobot-interfaces @@ -10,12 +10,15 @@ # Library krobot "src/lib": include "src/lib/krobot.cmxs": use_krobot +<src/lib/krobot.{cma,cmxa}>: use_libkrobot <src/lib/*.ml{,i}>: use_krobot-interfaces <src/lib/*.ml{,i}>: pkg_obus <src/lib/*.ml{,i}>: pkg_lwt.unix <src/lib/*.ml{,i}>: pkg_lwt.syntax -<src/lib/*.ml{,i}>: pkg_bitstring.syntax -<src/lib/*.ml{,i}>: pkg_bitstring +"src/lib/krobot_message_stubs.c": use_krobot-interfaces +"src/lib/krobot_message_stubs.c": pkg_obus +"src/lib/krobot_message_stubs.c": pkg_lwt.unix +"src/lib/krobot_message_stubs.c": pkg_lwt.syntax # Library krobot-can "src/can": include "src/can/krobot-can.cmxs": use_krobot-can @@ -25,31 +28,23 @@ <src/can/*.ml{,i}>: pkg_obus <src/can/*.ml{,i}>: pkg_lwt.unix <src/can/*.ml{,i}>: pkg_lwt.syntax -<src/can/*.ml{,i}>: pkg_bitstring.syntax -<src/can/*.ml{,i}>: pkg_bitstring "src/can/can_stubs.c": use_krobot "src/can/can_stubs.c": use_krobot-interfaces "src/can/can_stubs.c": pkg_obus "src/can/can_stubs.c": pkg_lwt.unix "src/can/can_stubs.c": pkg_lwt.syntax -"src/can/can_stubs.c": pkg_bitstring.syntax -"src/can/can_stubs.c": pkg_bitstring # Executable krobot-dump <src/tools/krobot_dump.{native,byte}>: use_krobot <src/tools/krobot_dump.{native,byte}>: use_krobot-interfaces <src/tools/krobot_dump.{native,byte}>: pkg_obus <src/tools/krobot_dump.{native,byte}>: pkg_lwt.unix <src/tools/krobot_dump.{native,byte}>: pkg_lwt.syntax -<src/tools/krobot_dump.{native,byte}>: pkg_bitstring.syntax -<src/tools/krobot_dump.{native,byte}>: pkg_bitstring # Executable krobot-dump-encoders <src/tools/krobot_dump_encoders.{native,byte}>: use_krobot <src/tools/krobot_dump_encoders.{native,byte}>: use_krobot-interfaces <src/tools/krobot_dump_encoders.{native,byte}>: pkg_obus <src/tools/krobot_dump_encoders.{native,byte}>: pkg_lwt.unix <src/tools/krobot_dump_encoders.{native,byte}>: pkg_lwt.syntax -<src/tools/krobot_dump_encoders.{native,byte}>: pkg_bitstring.syntax -<src/tools/krobot_dump_encoders.{native,byte}>: pkg_bitstring # Executable krobot-driver <src/driver/krobot_driver.{native,byte}>: use_krobot-can <src/driver/krobot_driver.{native,byte}>: use_krobot @@ -57,16 +52,12 @@ <src/driver/krobot_driver.{native,byte}>: pkg_obus <src/driver/krobot_driver.{native,byte}>: pkg_lwt.unix <src/driver/krobot_driver.{native,byte}>: pkg_lwt.syntax -<src/driver/krobot_driver.{native,byte}>: pkg_bitstring.syntax -<src/driver/krobot_driver.{native,byte}>: pkg_bitstring <src/driver/*.ml{,i}>: use_krobot-can <src/driver/*.ml{,i}>: use_krobot <src/driver/*.ml{,i}>: use_krobot-interfaces <src/driver/*.ml{,i}>: pkg_obus <src/driver/*.ml{,i}>: pkg_lwt.unix <src/driver/*.ml{,i}>: pkg_lwt.syntax -<src/driver/*.ml{,i}>: pkg_bitstring.syntax -<src/driver/*.ml{,i}>: pkg_bitstring # Executable krobot-viewer <src/tools/krobot_viewer.{native,byte}>: use_krobot <src/tools/krobot_viewer.{native,byte}>: use_krobot-interfaces @@ -76,8 +67,6 @@ <src/tools/krobot_viewer.{native,byte}>: pkg_lwt.glib <src/tools/krobot_viewer.{native,byte}>: pkg_lablgtk2.glade <src/tools/krobot_viewer.{native,byte}>: pkg_cairo.lablgtk2 -<src/tools/krobot_viewer.{native,byte}>: pkg_bitstring.syntax -<src/tools/krobot_viewer.{native,byte}>: pkg_bitstring <src/tools/*.ml{,i}>: pkg_lablgtk2.glade # Executable krobot-hil-simulator <src/tools/krobot_hil_simulator.{native,byte}>: use_krobot @@ -85,8 +74,6 @@ <src/tools/krobot_hil_simulator.{native,byte}>: pkg_obus <src/tools/krobot_hil_simulator.{native,byte}>: pkg_lwt.unix <src/tools/krobot_hil_simulator.{native,byte}>: pkg_lwt.syntax -<src/tools/krobot_hil_simulator.{native,byte}>: pkg_bitstring.syntax -<src/tools/krobot_hil_simulator.{native,byte}>: pkg_bitstring # Executable send-can <examples/send_can.{native,byte}>: use_krobot-can <examples/send_can.{native,byte}>: use_krobot @@ -94,8 +81,6 @@ <examples/send_can.{native,byte}>: pkg_obus <examples/send_can.{native,byte}>: pkg_lwt.unix <examples/send_can.{native,byte}>: pkg_lwt.syntax -<examples/send_can.{native,byte}>: pkg_bitstring.syntax -<examples/send_can.{native,byte}>: pkg_bitstring # Executable krobot-plot-battery <src/tools/krobot_plot_battery.{native,byte}>: use_krobot <src/tools/krobot_plot_battery.{native,byte}>: use_krobot-interfaces @@ -104,39 +89,29 @@ <src/tools/krobot_plot_battery.{native,byte}>: pkg_lwt.syntax <src/tools/krobot_plot_battery.{native,byte}>: pkg_lwt.glib <src/tools/krobot_plot_battery.{native,byte}>: pkg_cairo.lablgtk2 -<src/tools/krobot_plot_battery.{native,byte}>: pkg_bitstring.syntax -<src/tools/krobot_plot_battery.{native,byte}>: pkg_bitstring # Executable krobot-service-planner <src/services/krobot_service_planner.{native,byte}>: use_krobot <src/services/krobot_service_planner.{native,byte}>: use_krobot-interfaces <src/services/krobot_service_planner.{native,byte}>: pkg_obus <src/services/krobot_service_planner.{native,byte}>: pkg_lwt.unix <src/services/krobot_service_planner.{native,byte}>: pkg_lwt.syntax -<src/services/krobot_service_planner.{native,byte}>: pkg_bitstring.syntax -<src/services/krobot_service_planner.{native,byte}>: pkg_bitstring <src/services/*.ml{,i}>: use_krobot <src/services/*.ml{,i}>: use_krobot-interfaces <src/services/*.ml{,i}>: pkg_obus <src/services/*.ml{,i}>: pkg_lwt.unix <src/services/*.ml{,i}>: pkg_lwt.syntax -<src/services/*.ml{,i}>: pkg_bitstring.syntax -<src/services/*.ml{,i}>: pkg_bitstring # Executable krobot-remote <src/tools/krobot_remote.{native,byte}>: use_krobot <src/tools/krobot_remote.{native,byte}>: use_krobot-interfaces <src/tools/krobot_remote.{native,byte}>: pkg_obus <src/tools/krobot_remote.{native,byte}>: pkg_lwt.unix <src/tools/krobot_remote.{native,byte}>: pkg_lwt.syntax -<src/tools/krobot_remote.{native,byte}>: pkg_bitstring.syntax -<src/tools/krobot_remote.{native,byte}>: pkg_bitstring # Executable krobot-replay <src/tools/krobot_replay.{native,byte}>: use_krobot <src/tools/krobot_replay.{native,byte}>: use_krobot-interfaces <src/tools/krobot_replay.{native,byte}>: pkg_obus <src/tools/krobot_replay.{native,byte}>: pkg_lwt.unix <src/tools/krobot_replay.{native,byte}>: pkg_lwt.syntax -<src/tools/krobot_replay.{native,byte}>: pkg_bitstring.syntax -<src/tools/krobot_replay.{native,byte}>: pkg_bitstring # Executable dump-can <examples/dump_can.{native,byte}>: use_krobot-can <examples/dump_can.{native,byte}>: use_krobot @@ -144,32 +119,24 @@ <examples/dump_can.{native,byte}>: pkg_obus <examples/dump_can.{native,byte}>: pkg_lwt.unix <examples/dump_can.{native,byte}>: pkg_lwt.syntax -<examples/dump_can.{native,byte}>: pkg_bitstring.syntax -<examples/dump_can.{native,byte}>: pkg_bitstring <examples/*.ml{,i}>: use_krobot-can <examples/*.ml{,i}>: use_krobot <examples/*.ml{,i}>: use_krobot-interfaces <examples/*.ml{,i}>: pkg_obus <examples/*.ml{,i}>: pkg_lwt.unix <examples/*.ml{,i}>: pkg_lwt.syntax -<examples/*.ml{,i}>: pkg_bitstring.syntax -<examples/*.ml{,i}>: pkg_bitstring # Executable krobot-local <src/tools/krobot_local.{native,byte}>: use_krobot <src/tools/krobot_local.{native,byte}>: use_krobot-interfaces <src/tools/krobot_local.{native,byte}>: pkg_obus <src/tools/krobot_local.{native,byte}>: pkg_lwt.unix <src/tools/krobot_local.{native,byte}>: pkg_lwt.syntax -<src/tools/krobot_local.{native,byte}>: pkg_bitstring.syntax -<src/tools/krobot_local.{native,byte}>: pkg_bitstring # Executable krobot-record <src/tools/krobot_record.{native,byte}>: use_krobot <src/tools/krobot_record.{native,byte}>: use_krobot-interfaces <src/tools/krobot_record.{native,byte}>: pkg_obus <src/tools/krobot_record.{native,byte}>: pkg_lwt.unix <src/tools/krobot_record.{native,byte}>: pkg_lwt.syntax -<src/tools/krobot_record.{native,byte}>: pkg_bitstring.syntax -<src/tools/krobot_record.{native,byte}>: pkg_bitstring # Executable krobot-plot <src/tools/krobot_plot.{native,byte}>: use_krobot <src/tools/krobot_plot.{native,byte}>: use_krobot-interfaces @@ -178,8 +145,6 @@ <src/tools/krobot_plot.{native,byte}>: pkg_lwt.syntax <src/tools/krobot_plot.{native,byte}>: pkg_lwt.glib <src/tools/krobot_plot.{native,byte}>: pkg_cairo.lablgtk2 -<src/tools/krobot_plot.{native,byte}>: pkg_bitstring.syntax -<src/tools/krobot_plot.{native,byte}>: pkg_bitstring <src/tools/*.ml{,i}>: pkg_lwt.glib <src/tools/*.ml{,i}>: pkg_cairo.lablgtk2 # Executable krobot-simulator @@ -188,13 +153,9 @@ <src/tools/krobot_simulator.{native,byte}>: pkg_obus <src/tools/krobot_simulator.{native,byte}>: pkg_lwt.unix <src/tools/krobot_simulator.{native,byte}>: pkg_lwt.syntax -<src/tools/krobot_simulator.{native,byte}>: pkg_bitstring.syntax -<src/tools/krobot_simulator.{native,byte}>: pkg_bitstring <src/tools/*.ml{,i}>: use_krobot <src/tools/*.ml{,i}>: use_krobot-interfaces <src/tools/*.ml{,i}>: pkg_obus <src/tools/*.ml{,i}>: pkg_lwt.unix <src/tools/*.ml{,i}>: pkg_lwt.syntax -<src/tools/*.ml{,i}>: pkg_bitstring.syntax -<src/tools/*.ml{,i}>: pkg_bitstring # OASIS_STOP diff --git a/info/control2011/myocamlbuild.ml b/info/control2011/myocamlbuild.ml index 08cc900..20d8e84 100644 --- a/info/control2011/myocamlbuild.ml +++ b/info/control2011/myocamlbuild.ml @@ -1,5 +1,5 @@ (* OASIS_START *) -(* DO NOT EDIT (digest: 570b31c8f48685aca9662d28e560f425) *) +(* DO NOT EDIT (digest: 1ca7268f789f49955feedef89f6b4ca9) *) module OASISGettext = struct # 21 "/home/dim/sources/oasis/src/oasis/OASISGettext.ml" @@ -457,7 +457,7 @@ let package_default = ("src/lib/krobot", ["src/lib"]); ("src/can/krobot-can", ["src/can"]) ]; - lib_c = [("krobot-can", "src/can", [])]; + lib_c = [("krobot", "src/lib", []); ("krobot-can", "src/can", [])]; flags = []; } ;; diff --git a/info/control2011/setup.ml b/info/control2011/setup.ml index 8d91fa9..5b8befa 100644 --- a/info/control2011/setup.ml +++ b/info/control2011/setup.ml @@ -1,7 +1,7 @@ (* setup.ml generated for the first time by OASIS v0.2.0~alpha1 *) (* OASIS_START *) -(* DO NOT EDIT (digest: 0d24f30592bfc03631b0c362d4d27577) *) +(* DO NOT EDIT (digest: b04695e11f7527ee760b637f6ae5beb4) *) (* Regenerated by OASIS v0.2.0 Visit http://oasis.forge.ocamlcore.org for more information and @@ -5106,12 +5106,10 @@ let setup_t = FindlibPackage ("lwt.unix", None); FindlibPackage ("lwt.syntax", None); FindlibPackage ("obus", None); - InternalLibrary "krobot-interfaces"; - FindlibPackage ("bitstring", None); - FindlibPackage ("bitstring.syntax", None) + InternalLibrary "krobot-interfaces" ]; bs_build_tools = [ExternalTool "ocamlbuild"]; - bs_c_sources = []; + bs_c_sources = ["krobot_message_stubs.c"]; bs_data_files = []; bs_ccopt = [(OASISExpr.EBool true, [])]; bs_cclib = [(OASISExpr.EBool true, [])]; diff --git a/info/control2011/src/lib/META b/info/control2011/src/lib/META index 47df438..8cab18d 100644 --- a/info/control2011/src/lib/META +++ b/info/control2011/src/lib/META @@ -1,8 +1,8 @@ # OASIS_START -# DO NOT EDIT (digest: 060bacace64817181263e75a71185b59) +# DO NOT EDIT (digest: 6d4fe02a501933ad8464e70af7fcf3b1) version = "1.0" description = "The [Kro]bot library" -requires = "lwt.unix obus krobot.interfaces bitstring" +requires = "lwt.unix obus krobot.interfaces" archive(byte) = "krobot.cma" archive(native) = "krobot.cmxa" exists_if = "krobot.cma" diff --git a/info/control2011/src/lib/krobot_message.ml b/info/control2011/src/lib/krobot_message.ml index 7640a41..c9da849 100644 --- a/info/control2011/src/lib/krobot_message.ml +++ b/info/control2011/src/lib/krobot_message.ml @@ -126,6 +126,8 @@ let to_string = function let pi = 4. *. atan 1. +external encode_bezier : int * int * int * int * int * int -> string = "krobot_message_encode_bezier" + let encode = function | Encoder_position_direction_3_4(pos3, dir3, pos4, dir4) -> let data = String.create 6 in @@ -213,22 +215,12 @@ let encode = function and d2 = int_of_float (d2 *. 100.) and theta = int_of_float (theta *. 1000.) land 0b1111111111111; and v = int_of_float (v *. 1000.) in - let data = Bitstring.string_of_bitstring - (BITSTRING{ - x : 12 : littleendian, unsigned; - y : 12 : littleendian, unsigned; - d1 : 8 : littleendian, unsigned; - d2 : 8 : littleendian, unsigned; - theta : 13 : littleendian, unsigned; - v : 11 : littleendian, unsigned - }) - in frame ~identifier:206 ~kind:Data ~remote:false ~format:F29bits - ~data + ~data:(encode_bezier (x, y, d1, d2, theta, v)) | Set_odometry(x, y, theta) -> let data = String.create 6 in put_sint16 data 0 (truncate (x *. 1000.)); @@ -324,102 +316,98 @@ let () = | _ -> None) +external decode_bezier : string -> int * int * int * int * int * int = "krobot_message_decode_bezier" + let decode frame = try - if frame.remote then - match frame.identifier with - | 103 -> - Req_motor_status - | _ -> - Unknown frame - else - match frame.identifier with - | 100 -> - Encoder_position_direction_3_4 - (get_uint16 frame.data 0, - (if get_uint8 frame.data 4 = 0 then Forward else Backward), - get_uint16 frame.data 2, - (if get_uint8 frame.data 5 = 0 then Forward else Backward)) - | 101 -> - Encoder_position_speed_3 - (get_float32 frame.data 0, - get_float32 frame.data 4) - | 102 -> - Encoder_position_speed_4 - (get_float32 frame.data 0, - get_float32 frame.data 4) - | 103 -> - let x = get_uint8 frame.data 0 in - Motor_status(x land 1 <> 0, - x land 2 <> 0, - x land 4 <> 0, - x land 8 <> 0) - | 104 -> - Odometry - (float (get_sint16 frame.data 0) /. 1000., - float (get_sint16 frame.data 2) /. 1000., - float (get_sint16 frame.data 4) /. 10000.) - | 201 -> - Motor_move - (float (get_sint32 frame.data 0) /. 1000., - float (get_uint16 frame.data 4) /. 1000., - float (get_uint16 frame.data 6) /. 1000.) - | 202 -> - Motor_turn - (float (get_sint32 frame.data 0) /. 10000., - float (get_uint16 frame.data 4) /. 1000., - float (get_uint16 frame.data 6) /. 1000.) - | 203 -> - Set_odometry - (float (get_sint16 frame.data 0) /. 1000., - float (get_sint16 frame.data 2) /. 1000., - float (get_sint16 frame.data 4) /. 10000.) - | 204 -> - Motor_stop - | 205 -> - Set_controller_mode - (get_uint8 frame.data 0 <> 0) - | 206 -> - (bitmatch Bitstring.bitstring_of_string frame.data with - | { x : 12 : littleendian; - y : 12 : littleendian; - d1 : 8 : littleendian; - d2 : 8 : littleendian; - theta : 13 : littleendian; - v : 11 : littleendian } -> - Motor_bezier(float x /. 1000., - float y /. 1000., - float d1 /. 100., - float d2 /. 100., - (if theta >= 4096 then - float (theta - 8192) /. 1000. - else - float theta /. 1000.), - float v /. 1000.)) - | 301 -> - Beacon_position - (float (get_uint16 frame.data 0) /. 10000., - float (get_uint16 frame.data 2) /. 1000., - float (get_uint16 frame.data 4) /. 10000.) - | 302 -> - Beacon_lowlevel_position - (float (get_uint16 frame.data 0) /. 10000., - float (get_uint16 frame.data 2) /. 100000., - get_uint32 frame.data 4) - | 401 -> - Battery1_voltages - (float (get_uint16 frame.data 0) /. 10000., - float (get_uint16 frame.data 2) /. 10000., - float (get_uint16 frame.data 4) /. 10000., - float (get_uint16 frame.data 6) /. 10000.) - | 402 -> - Battery2_voltages - (float (get_uint16 frame.data 0) /. 10000., - float (get_uint16 frame.data 2) /. 10000., - float (get_uint16 frame.data 4) /. 10000., - float (get_uint16 frame.data 6) /. 10000.) - | _ -> - Unknown frame + if frame.remote then + match frame.identifier with + | 103 -> + Req_motor_status + | _ -> + Unknown frame + else + match frame.identifier with + | 100 -> + Encoder_position_direction_3_4 + (get_uint16 frame.data 0, + (if get_uint8 frame.data 4 = 0 then Forward else Backward), + get_uint16 frame.data 2, + (if get_uint8 frame.data 5 = 0 then Forward else Backward)) + | 101 -> + Encoder_position_speed_3 + (get_float32 frame.data 0, + get_float32 frame.data 4) + | 102 -> + Encoder_position_speed_4 + (get_float32 frame.data 0, + get_float32 frame.data 4) + | 103 -> + let x = get_uint8 frame.data 0 in + Motor_status(x land 1 <> 0, + x land 2 <> 0, + x land 4 <> 0, + x land 8 <> 0) + | 104 -> + Odometry + (float (get_sint16 frame.data 0) /. 1000., + float (get_sint16 frame.data 2) /. 1000., + float (get_sint16 frame.data 4) /. 10000.) + | 201 -> + Motor_move + (float (get_sint32 frame.data 0) /. 1000., + float (get_uint16 frame.data 4) /. 1000., + float (get_uint16 frame.data 6) /. 1000.) + | 202 -> + Motor_turn + (float (get_sint32 frame.data 0) /. 10000., + float (get_uint16 frame.data 4) /. 1000., + float (get_uint16 frame.data 6) /. 1000.) + | 203 -> + Set_odometry + (float (get_sint16 frame.data 0) /. 1000., + float (get_sint16 frame.data 2) /. 1000., + float (get_sint16 frame.data 4) /. 10000.) + | 204 -> + Motor_stop + | 205 -> + Set_controller_mode + (get_uint8 frame.data 0 <> 0) + | 206 -> + let x, y, d1, d2, theta, v = decode_bezier frame.data in + Motor_bezier(float x /. 1000., + float y /. 1000., + float d1 /. 100., + float d2 /. 100., + (if theta >= 4096 then + float (theta - 8192) /. 1000. + else + float theta /. 1000.), + float v /. 1000.) + | 301 -> + Beacon_position + (float (get_uint16 frame.data 0) /. 10000., + float (get_uint16 frame.data 2) /. 1000., + float (get_uint16 frame.data 4) /. 10000.) + | 302 -> + Beacon_lowlevel_position + (float (get_uint16 frame.data 0) /. 10000., + float (get_uint16 frame.data 2) /. 100000., + get_uint32 frame.data 4) + | 401 -> + Battery1_voltages + (float (get_uint16 frame.data 0) /. 10000., + float (get_uint16 frame.data 2) /. 10000., + float (get_uint16 frame.data 4) /. 10000., + float (get_uint16 frame.data 6) /. 10000.) + | 402 -> + Battery2_voltages + (float (get_uint16 frame.data 0) /. 10000., + float (get_uint16 frame.data 2) /. 10000., + float (get_uint16 frame.data 4) /. 10000., + float (get_uint16 frame.data 6) /. 10000.) + | _ -> + Unknown frame with Invalid_argument _ -> raise (Invalid_frame frame) diff --git a/info/control2011/src/lib/krobot_message_stubs.c b/info/control2011/src/lib/krobot_message_stubs.c new file mode 100644 index 0000000..0550aa1 --- /dev/null +++ b/info/control2011/src/lib/krobot_message_stubs.c @@ -0,0 +1,51 @@ +/* + * krobot_message_stubs.c + * ---------------------- + * Copyright : (c) 2011, Jeremie Dimino <je...@di...> + * Licence : BSD3 + * + * This file is a part of [kro]bot. + */ + +#include <caml/mlvalues.h> +#include <caml/memory.h> +#include <caml/alloc.h> + +static struct bezier_message { + unsigned int x : 12; + unsigned int y : 12; + unsigned int d1 : 8; + unsigned int d2 : 8; + int theta : 13; + unsigned int v : 11; +}; + +CAMLprim value krobot_message_encode_bezier(value params) +{ + CAMLparam1(params); + CAMLlocal1(str); + str = caml_alloc_string(8); + struct bezier_message *msg = (struct bezier_message*)String_val(str); + msg->x = Int_val(Field(params, 0)); + msg->y = Int_val(Field(params, 1)); + msg->d1 = Int_val(Field(params, 2)); + msg->d2 = Int_val(Field(params, 3)); + msg->theta = Int_val(Field(params, 4)); + msg->v = Int_val(Field(params, 5)); + CAMLreturn(str); +} + +CAMLprim value krobot_message_decode_bezier(value str) +{ + CAMLparam1(str); + CAMLlocal1(res); + struct bezier_message *msg = (struct bezier_message*)String_val(str); + res = caml_alloc_tuple(6); + Field(res, 0) = Val_int(msg->x); + Field(res, 1) = Val_int(msg->y); + Field(res, 2) = Val_int(msg->d1); + Field(res, 3) = Val_int(msg->d2); + Field(res, 4) = Val_int(msg->theta); + Field(res, 5) = Val_int(msg->v); + CAMLreturn(res); +} hooks/post-receive -- krobot |
From: Jérémie D. <Ba...@us...> - 2011-04-17 21:26:37
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 89e804e0141a8c908fb78fa549e50f1dc08864dd (commit) via af742329207ea5d42ea085c7c26b7d3e7c086bd9 (commit) from 5e6c03e008aa81f186f26c61430308b5084fcffc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 89e804e0141a8c908fb78fa549e50f1dc08864dd Author: Jérémie Dimino <je...@di...> Date: Sun Apr 17 23:25:37 2011 +0200 [info] send bezier curves commit af742329207ea5d42ea085c7c26b7d3e7c086bd9 Author: Jérémie Dimino <je...@di...> Date: Sun Apr 17 19:49:51 2011 +0200 [info] add messages for bezier curves ----------------------------------------------------------------------- Changes: diff --git a/info/control2011/_oasis b/info/control2011/_oasis index 5b931a1..85e61ae 100644 --- a/info/control2011/_oasis +++ b/info/control2011/_oasis @@ -31,9 +31,9 @@ Flag gtk Library krobot FindlibName: krobot - BuildDepends: lwt.unix, lwt.syntax, obus, krobot.interfaces + BuildDepends: lwt.unix, lwt.syntax, obus, krobot.interfaces, bitstring, bitstring.syntax XMETADescription: The [Kro]bot library - XMETARequires: lwt.unix, obus, krobot.interfaces + XMETARequires: lwt.unix, obus, krobot.interfaces, bitstring Path: src/lib Install: true Modules: diff --git a/info/control2011/_tags b/info/control2011/_tags index f190b59..f8002fe 100644 --- a/info/control2011/_tags +++ b/info/control2011/_tags @@ -2,7 +2,7 @@ <src/interfaces/*.ml>: -syntax_camlp4o # OASIS_START -# DO NOT EDIT (digest: 19f32386260765eb3050ee674e3a3e18) +# DO NOT EDIT (digest: bc62a620a945818c8391362124b031c3) # Library krobot-interfaces "src/interfaces": include "src/interfaces/krobot-interfaces.cmxs": use_krobot-interfaces @@ -14,6 +14,8 @@ <src/lib/*.ml{,i}>: pkg_obus <src/lib/*.ml{,i}>: pkg_lwt.unix <src/lib/*.ml{,i}>: pkg_lwt.syntax +<src/lib/*.ml{,i}>: pkg_bitstring.syntax +<src/lib/*.ml{,i}>: pkg_bitstring # Library krobot-can "src/can": include "src/can/krobot-can.cmxs": use_krobot-can @@ -23,23 +25,31 @@ <src/can/*.ml{,i}>: pkg_obus <src/can/*.ml{,i}>: pkg_lwt.unix <src/can/*.ml{,i}>: pkg_lwt.syntax +<src/can/*.ml{,i}>: pkg_bitstring.syntax +<src/can/*.ml{,i}>: pkg_bitstring "src/can/can_stubs.c": use_krobot "src/can/can_stubs.c": use_krobot-interfaces "src/can/can_stubs.c": pkg_obus "src/can/can_stubs.c": pkg_lwt.unix "src/can/can_stubs.c": pkg_lwt.syntax +"src/can/can_stubs.c": pkg_bitstring.syntax +"src/can/can_stubs.c": pkg_bitstring # Executable krobot-dump <src/tools/krobot_dump.{native,byte}>: use_krobot <src/tools/krobot_dump.{native,byte}>: use_krobot-interfaces <src/tools/krobot_dump.{native,byte}>: pkg_obus <src/tools/krobot_dump.{native,byte}>: pkg_lwt.unix <src/tools/krobot_dump.{native,byte}>: pkg_lwt.syntax +<src/tools/krobot_dump.{native,byte}>: pkg_bitstring.syntax +<src/tools/krobot_dump.{native,byte}>: pkg_bitstring # Executable krobot-dump-encoders <src/tools/krobot_dump_encoders.{native,byte}>: use_krobot <src/tools/krobot_dump_encoders.{native,byte}>: use_krobot-interfaces <src/tools/krobot_dump_encoders.{native,byte}>: pkg_obus <src/tools/krobot_dump_encoders.{native,byte}>: pkg_lwt.unix <src/tools/krobot_dump_encoders.{native,byte}>: pkg_lwt.syntax +<src/tools/krobot_dump_encoders.{native,byte}>: pkg_bitstring.syntax +<src/tools/krobot_dump_encoders.{native,byte}>: pkg_bitstring # Executable krobot-driver <src/driver/krobot_driver.{native,byte}>: use_krobot-can <src/driver/krobot_driver.{native,byte}>: use_krobot @@ -47,12 +57,16 @@ <src/driver/krobot_driver.{native,byte}>: pkg_obus <src/driver/krobot_driver.{native,byte}>: pkg_lwt.unix <src/driver/krobot_driver.{native,byte}>: pkg_lwt.syntax +<src/driver/krobot_driver.{native,byte}>: pkg_bitstring.syntax +<src/driver/krobot_driver.{native,byte}>: pkg_bitstring <src/driver/*.ml{,i}>: use_krobot-can <src/driver/*.ml{,i}>: use_krobot <src/driver/*.ml{,i}>: use_krobot-interfaces <src/driver/*.ml{,i}>: pkg_obus <src/driver/*.ml{,i}>: pkg_lwt.unix <src/driver/*.ml{,i}>: pkg_lwt.syntax +<src/driver/*.ml{,i}>: pkg_bitstring.syntax +<src/driver/*.ml{,i}>: pkg_bitstring # Executable krobot-viewer <src/tools/krobot_viewer.{native,byte}>: use_krobot <src/tools/krobot_viewer.{native,byte}>: use_krobot-interfaces @@ -62,6 +76,8 @@ <src/tools/krobot_viewer.{native,byte}>: pkg_lwt.glib <src/tools/krobot_viewer.{native,byte}>: pkg_lablgtk2.glade <src/tools/krobot_viewer.{native,byte}>: pkg_cairo.lablgtk2 +<src/tools/krobot_viewer.{native,byte}>: pkg_bitstring.syntax +<src/tools/krobot_viewer.{native,byte}>: pkg_bitstring <src/tools/*.ml{,i}>: pkg_lablgtk2.glade # Executable krobot-hil-simulator <src/tools/krobot_hil_simulator.{native,byte}>: use_krobot @@ -69,6 +85,8 @@ <src/tools/krobot_hil_simulator.{native,byte}>: pkg_obus <src/tools/krobot_hil_simulator.{native,byte}>: pkg_lwt.unix <src/tools/krobot_hil_simulator.{native,byte}>: pkg_lwt.syntax +<src/tools/krobot_hil_simulator.{native,byte}>: pkg_bitstring.syntax +<src/tools/krobot_hil_simulator.{native,byte}>: pkg_bitstring # Executable send-can <examples/send_can.{native,byte}>: use_krobot-can <examples/send_can.{native,byte}>: use_krobot @@ -76,6 +94,8 @@ <examples/send_can.{native,byte}>: pkg_obus <examples/send_can.{native,byte}>: pkg_lwt.unix <examples/send_can.{native,byte}>: pkg_lwt.syntax +<examples/send_can.{native,byte}>: pkg_bitstring.syntax +<examples/send_can.{native,byte}>: pkg_bitstring # Executable krobot-plot-battery <src/tools/krobot_plot_battery.{native,byte}>: use_krobot <src/tools/krobot_plot_battery.{native,byte}>: use_krobot-interfaces @@ -84,29 +104,39 @@ <src/tools/krobot_plot_battery.{native,byte}>: pkg_lwt.syntax <src/tools/krobot_plot_battery.{native,byte}>: pkg_lwt.glib <src/tools/krobot_plot_battery.{native,byte}>: pkg_cairo.lablgtk2 +<src/tools/krobot_plot_battery.{native,byte}>: pkg_bitstring.syntax +<src/tools/krobot_plot_battery.{native,byte}>: pkg_bitstring # Executable krobot-service-planner <src/services/krobot_service_planner.{native,byte}>: use_krobot <src/services/krobot_service_planner.{native,byte}>: use_krobot-interfaces <src/services/krobot_service_planner.{native,byte}>: pkg_obus <src/services/krobot_service_planner.{native,byte}>: pkg_lwt.unix <src/services/krobot_service_planner.{native,byte}>: pkg_lwt.syntax +<src/services/krobot_service_planner.{native,byte}>: pkg_bitstring.syntax +<src/services/krobot_service_planner.{native,byte}>: pkg_bitstring <src/services/*.ml{,i}>: use_krobot <src/services/*.ml{,i}>: use_krobot-interfaces <src/services/*.ml{,i}>: pkg_obus <src/services/*.ml{,i}>: pkg_lwt.unix <src/services/*.ml{,i}>: pkg_lwt.syntax +<src/services/*.ml{,i}>: pkg_bitstring.syntax +<src/services/*.ml{,i}>: pkg_bitstring # Executable krobot-remote <src/tools/krobot_remote.{native,byte}>: use_krobot <src/tools/krobot_remote.{native,byte}>: use_krobot-interfaces <src/tools/krobot_remote.{native,byte}>: pkg_obus <src/tools/krobot_remote.{native,byte}>: pkg_lwt.unix <src/tools/krobot_remote.{native,byte}>: pkg_lwt.syntax +<src/tools/krobot_remote.{native,byte}>: pkg_bitstring.syntax +<src/tools/krobot_remote.{native,byte}>: pkg_bitstring # Executable krobot-replay <src/tools/krobot_replay.{native,byte}>: use_krobot <src/tools/krobot_replay.{native,byte}>: use_krobot-interfaces <src/tools/krobot_replay.{native,byte}>: pkg_obus <src/tools/krobot_replay.{native,byte}>: pkg_lwt.unix <src/tools/krobot_replay.{native,byte}>: pkg_lwt.syntax +<src/tools/krobot_replay.{native,byte}>: pkg_bitstring.syntax +<src/tools/krobot_replay.{native,byte}>: pkg_bitstring # Executable dump-can <examples/dump_can.{native,byte}>: use_krobot-can <examples/dump_can.{native,byte}>: use_krobot @@ -114,24 +144,32 @@ <examples/dump_can.{native,byte}>: pkg_obus <examples/dump_can.{native,byte}>: pkg_lwt.unix <examples/dump_can.{native,byte}>: pkg_lwt.syntax +<examples/dump_can.{native,byte}>: pkg_bitstring.syntax +<examples/dump_can.{native,byte}>: pkg_bitstring <examples/*.ml{,i}>: use_krobot-can <examples/*.ml{,i}>: use_krobot <examples/*.ml{,i}>: use_krobot-interfaces <examples/*.ml{,i}>: pkg_obus <examples/*.ml{,i}>: pkg_lwt.unix <examples/*.ml{,i}>: pkg_lwt.syntax +<examples/*.ml{,i}>: pkg_bitstring.syntax +<examples/*.ml{,i}>: pkg_bitstring # Executable krobot-local <src/tools/krobot_local.{native,byte}>: use_krobot <src/tools/krobot_local.{native,byte}>: use_krobot-interfaces <src/tools/krobot_local.{native,byte}>: pkg_obus <src/tools/krobot_local.{native,byte}>: pkg_lwt.unix <src/tools/krobot_local.{native,byte}>: pkg_lwt.syntax +<src/tools/krobot_local.{native,byte}>: pkg_bitstring.syntax +<src/tools/krobot_local.{native,byte}>: pkg_bitstring # Executable krobot-record <src/tools/krobot_record.{native,byte}>: use_krobot <src/tools/krobot_record.{native,byte}>: use_krobot-interfaces <src/tools/krobot_record.{native,byte}>: pkg_obus <src/tools/krobot_record.{native,byte}>: pkg_lwt.unix <src/tools/krobot_record.{native,byte}>: pkg_lwt.syntax +<src/tools/krobot_record.{native,byte}>: pkg_bitstring.syntax +<src/tools/krobot_record.{native,byte}>: pkg_bitstring # Executable krobot-plot <src/tools/krobot_plot.{native,byte}>: use_krobot <src/tools/krobot_plot.{native,byte}>: use_krobot-interfaces @@ -140,6 +178,8 @@ <src/tools/krobot_plot.{native,byte}>: pkg_lwt.syntax <src/tools/krobot_plot.{native,byte}>: pkg_lwt.glib <src/tools/krobot_plot.{native,byte}>: pkg_cairo.lablgtk2 +<src/tools/krobot_plot.{native,byte}>: pkg_bitstring.syntax +<src/tools/krobot_plot.{native,byte}>: pkg_bitstring <src/tools/*.ml{,i}>: pkg_lwt.glib <src/tools/*.ml{,i}>: pkg_cairo.lablgtk2 # Executable krobot-simulator @@ -148,9 +188,13 @@ <src/tools/krobot_simulator.{native,byte}>: pkg_obus <src/tools/krobot_simulator.{native,byte}>: pkg_lwt.unix <src/tools/krobot_simulator.{native,byte}>: pkg_lwt.syntax +<src/tools/krobot_simulator.{native,byte}>: pkg_bitstring.syntax +<src/tools/krobot_simulator.{native,byte}>: pkg_bitstring <src/tools/*.ml{,i}>: use_krobot <src/tools/*.ml{,i}>: use_krobot-interfaces <src/tools/*.ml{,i}>: pkg_obus <src/tools/*.ml{,i}>: pkg_lwt.unix <src/tools/*.ml{,i}>: pkg_lwt.syntax +<src/tools/*.ml{,i}>: pkg_bitstring.syntax +<src/tools/*.ml{,i}>: pkg_bitstring # OASIS_STOP diff --git a/info/control2011/krobot-api.odocl b/info/control2011/krobot-api.odocl index a6dd103..c450da7 100644 --- a/info/control2011/krobot-api.odocl +++ b/info/control2011/krobot-api.odocl @@ -1,9 +1,10 @@ # OASIS_START -# DO NOT EDIT (digest: e58fdc99e81067f38e47e3f89ed4db14) +# DO NOT EDIT (digest: 38c17322394dfbb39f5f25c95efe932e) src/lib/Krobot_can src/lib/Krobot_bus src/lib/Krobot_message src/lib/Krobot_service src/lib/Krobot_geom +src/lib/Krobot_planner src/can/Krobot_can_bus # OASIS_STOP diff --git a/info/control2011/setup.ml b/info/control2011/setup.ml index d6cccba..8d91fa9 100644 --- a/info/control2011/setup.ml +++ b/info/control2011/setup.ml @@ -1,7 +1,7 @@ (* setup.ml generated for the first time by OASIS v0.2.0~alpha1 *) (* OASIS_START *) -(* DO NOT EDIT (digest: b36c743e22b6b1a7b932599bea11f68b) *) +(* DO NOT EDIT (digest: 0d24f30592bfc03631b0c362d4d27577) *) (* Regenerated by OASIS v0.2.0 Visit http://oasis.forge.ocamlcore.org for more information and @@ -5106,7 +5106,9 @@ let setup_t = FindlibPackage ("lwt.unix", None); FindlibPackage ("lwt.syntax", None); FindlibPackage ("obus", None); - InternalLibrary "krobot-interfaces" + InternalLibrary "krobot-interfaces"; + FindlibPackage ("bitstring", None); + FindlibPackage ("bitstring.syntax", None) ]; bs_build_tools = [ExternalTool "ocamlbuild"]; bs_c_sources = []; @@ -5125,7 +5127,8 @@ let setup_t = "Krobot_bus"; "Krobot_message"; "Krobot_service"; - "Krobot_geom" + "Krobot_geom"; + "Krobot_planner" ]; lib_internal_modules = []; lib_findlib_parent = None; diff --git a/info/control2011/src/lib/META b/info/control2011/src/lib/META index 8cab18d..47df438 100644 --- a/info/control2011/src/lib/META +++ b/info/control2011/src/lib/META @@ -1,8 +1,8 @@ # OASIS_START -# DO NOT EDIT (digest: 6d4fe02a501933ad8464e70af7fcf3b1) +# DO NOT EDIT (digest: 060bacace64817181263e75a71185b59) version = "1.0" description = "The [Kro]bot library" -requires = "lwt.unix obus krobot.interfaces" +requires = "lwt.unix obus krobot.interfaces bitstring" archive(byte) = "krobot.cma" archive(native) = "krobot.cmxa" exists_if = "krobot.cma" diff --git a/info/control2011/src/lib/krobot.mllib b/info/control2011/src/lib/krobot.mllib index b2daa79..2d6a922 100644 --- a/info/control2011/src/lib/krobot.mllib +++ b/info/control2011/src/lib/krobot.mllib @@ -1,8 +1,9 @@ # OASIS_START -# DO NOT EDIT (digest: d28f502a765cf0ae56f93e800363c356) +# DO NOT EDIT (digest: a2debf72e72f6ae38ea62c8b35c3784d) Krobot_can Krobot_bus Krobot_message Krobot_service Krobot_geom +Krobot_planner # OASIS_STOP diff --git a/info/control2011/src/lib/krobot_geom.ml b/info/control2011/src/lib/krobot_geom.ml index 34bf8a6..1f8a016 100644 --- a/info/control2011/src/lib/krobot_geom.ml +++ b/info/control2011/src/lib/krobot_geom.ml @@ -133,13 +133,8 @@ module Bezier = struct let t3 = t2 *. t in translate origin ((b.a *| t3) +| (b.b *| t2) +| (b.c *| t1) +| b.p) - let fold_curves f initial vertices acc = - let add_curve q r v1 v2 acc = - (* Create the bezier curve. *) - let curve = of_vertices q (translate q v1) (translate r v2) r in - - f curve acc - in + let fold_vertices f initial vertices acc = + let add_vertices q r v1 v2 acc = f q (translate q v1) (translate r v2) r acc in (* Compute cubic bezier curves. *) let rec loop acc = function @@ -149,12 +144,12 @@ module Bezier = struct let _, v1 = tangents p q r and v2, _ = tangents q r s in let v1 = v1 *| (min (distance p q) (distance q r) /. 2.) and v2 = v2 *| (min (distance q r) (distance r s) /. 2.) in - loop (add_curve q r v1 v2 acc) rest + loop (add_vertices q r v1 v2 acc) rest | [p; q; r] -> let _, v1 = tangents p q r and v2 = vector r q /| distance q r in let v1 = v1 *| (min (distance p q) (distance q r) /. 2.) and v2 = v2 *| (distance q r /. 2.) in - add_curve q r v1 v2 acc + add_vertices q r v1 v2 acc | _ -> acc in @@ -164,13 +159,16 @@ module Bezier = struct and v2, _ = tangents q r s in let v1 = v1 *| (distance q r /. 2.) and v2 = v2 *| (distance q r /. 2.) in - loop (add_curve q r v1 v2 acc) vertices + loop (add_vertices q r v1 v2 acc) vertices | [q; r] -> let v1 = initial and v2 = vector r q /| distance q r in let v1 = v1 *| (distance q r /. 2.) and v2 = v2 *| (distance q r /. 2.) in - add_curve q r v1 v2 acc + add_vertices q r v1 v2 acc | [_] | [] -> acc + + let fold_curves f initial vertices acc = + fold_vertices (fun p q r s acc -> f (of_vertices p q r s) acc) initial vertices acc end diff --git a/info/control2011/src/lib/krobot_geom.mli b/info/control2011/src/lib/krobot_geom.mli index 2226508..c611dd6 100644 --- a/info/control2011/src/lib/krobot_geom.mli +++ b/info/control2011/src/lib/krobot_geom.mli @@ -68,4 +68,8 @@ module Bezier : sig (** [fold_curves f vector vertices acc] folds [f] over the curve passing through the given list of vertices. [vector] is the initial direction vector. *) + + val fold_vertices : (vertice -> vertice -> vertice -> vertice -> 'a -> 'a) -> vector -> vertice list -> 'a -> 'a + (** [fold_vertices f vector vertices acc] same as {!fold_curves} + but pass parameters instead of curves to [f]. *) end diff --git a/info/control2011/src/lib/krobot_message.ml b/info/control2011/src/lib/krobot_message.ml index 9792c9d..7640a41 100644 --- a/info/control2011/src/lib/krobot_message.ml +++ b/info/control2011/src/lib/krobot_message.ml @@ -29,6 +29,7 @@ type t = | Motor_status of bool * bool * bool * bool | Motor_move of float * float * float | Motor_turn of float * float * float + | Motor_bezier of float * float * float * float * float * float | Motor_stop | Odometry of float * float * float | Set_odometry of float * float * float @@ -96,6 +97,10 @@ let to_string = function sprintf "Motor_turn(%f, %f, %f)" angle speed acc + | Motor_bezier(x, y, d1, d2, theta, v) -> + sprintf + "Motor_bezier(%f, %f, %f, %f, %f, %f)" + x y d1 d2 theta v | Motor_stop -> "Motor_stop" | Odometry(x, y, theta) -> @@ -201,6 +206,29 @@ let encode = function ~remote:false ~format:F29bits ~data + | Motor_bezier(x, y, d1, d2, theta, v) -> + let x = int_of_float (x *. 1000.) + and y = int_of_float (y *. 1000.) + and d1 = int_of_float (d1 *. 100.) + and d2 = int_of_float (d2 *. 100.) + and theta = int_of_float (theta *. 1000.) land 0b1111111111111; + and v = int_of_float (v *. 1000.) in + let data = Bitstring.string_of_bitstring + (BITSTRING{ + x : 12 : littleendian, unsigned; + y : 12 : littleendian, unsigned; + d1 : 8 : littleendian, unsigned; + d2 : 8 : littleendian, unsigned; + theta : 13 : littleendian, unsigned; + v : 11 : littleendian, unsigned + }) + in + frame + ~identifier:206 + ~kind:Data + ~remote:false + ~format:F29bits + ~data | Set_odometry(x, y, theta) -> let data = String.create 6 in put_sint16 data 0 (truncate (x *. 1000.)); @@ -351,6 +379,23 @@ let decode frame = | 205 -> Set_controller_mode (get_uint8 frame.data 0 <> 0) + | 206 -> + (bitmatch Bitstring.bitstring_of_string frame.data with + | { x : 12 : littleendian; + y : 12 : littleendian; + d1 : 8 : littleendian; + d2 : 8 : littleendian; + theta : 13 : littleendian; + v : 11 : littleendian } -> + Motor_bezier(float x /. 1000., + float y /. 1000., + float d1 /. 100., + float d2 /. 100., + (if theta >= 4096 then + float (theta - 8192) /. 1000. + else + float theta /. 1000.), + float v /. 1000.)) | 301 -> Beacon_position (float (get_uint16 frame.data 0) /. 10000., diff --git a/info/control2011/src/lib/krobot_message.mli b/info/control2011/src/lib/krobot_message.mli index fb116bf..991d2b4 100644 --- a/info/control2011/src/lib/krobot_message.mli +++ b/info/control2011/src/lib/krobot_message.mli @@ -44,6 +44,8 @@ type t = - [speed] is in rad/s - [acceleration] is in rad/s^2 *) + | Motor_bezier of float * float * float * float * float * float + (** [Motor_bezier(x_end, y_end, d1, d2, theta_end, v_end)] *) | Motor_stop (** Stops the motors. *) | Odometry of float * float * float diff --git a/info/control2011/src/services/krobot_service_planner.ml b/info/control2011/src/services/krobot_service_planner.ml index cdda7e5..431a08d 100644 --- a/info/control2011/src/services/krobot_service_planner.ml +++ b/info/control2011/src/services/krobot_service_planner.ml @@ -16,6 +16,8 @@ open Krobot_config open Krobot_message open Krobot_interface_planner.Fr_krobot_Planner +let section = Lwt_log.Section.make "krobot(planner)" + let pi = 4. *. atan 1. let math_mod_float a b = @@ -135,7 +137,7 @@ let go planner rotation_speed rotation_acceleration moving_speed moving_accelera if S.value planner.moving then return () else begin - let rec loop () = +(* let rec loop () = match S.value planner.vertices with | { x; y } :: rest -> let sqr x = x *. x in @@ -172,11 +174,42 @@ let go planner rotation_speed rotation_acceleration moving_speed moving_accelera Lwt_log.warning_f "can not move to (%f, %f)" x y | [] -> return () - in + in*) planner.set_moving true; planner.mover <- ( try_lwt - loop () + let o, v = S.value planner.origin in + let params = List.rev (Bezier.fold_vertices (fun p q r s acc -> (p, q, r, s) :: acc) v (o :: S.value planner.vertices) []) in + Lwt_list.iter_s + (fun (p, q, r, s) -> + + let v = vector r s in + lwt () = + Krobot_message.send + planner.bus + (Unix.gettimeofday (), + Motor_bezier(s.x, + s.y, + distance p q, + distance r s, + atan2 v.vy v.vx, + 0.)) + in + + lwt () = Lwt_unix.sleep 2.0 in + + (match S.value planner.vertices with + | _ :: l -> planner.set_vertices l + | [] -> ()); + planner.set_origin (planner.position, + { vx = cos planner.orientation; + vy = sin planner.orientation }); + + return () + ) + params + with exn -> + Lwt_log.error_f ~section ~exn "failed to move" finally planner.set_moving false; return () hooks/post-receive -- krobot |
From: Benjamin A. <Ba...@us...> - 2011-04-17 17:27:49
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 5e6c03e008aa81f186f26c61430308b5084fcffc (commit) from 42beacd6c175a6c53a93ddeeb134bd8bdba0ea39 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 5e6c03e008aa81f186f26c61430308b5084fcffc Author: Benjamin Aupetit <au...@cr...> Date: Sun Apr 17 19:26:41 2011 +0200 [meca] Adding wires hole between floors ----------------------------------------------------------------------- Changes: diff --git a/meca/2011_Senior/SupportMiroir/Mat_Balise.CATProduct b/meca/2011_Senior/SupportMiroir/Mat_Balise.CATProduct index 54ba271..4cdce1b 100644 Binary files a/meca/2011_Senior/SupportMiroir/Mat_Balise.CATProduct and b/meca/2011_Senior/SupportMiroir/Mat_Balise.CATProduct differ diff --git a/meca/2011_Senior/bati/plaque3.CATPart b/meca/2011_Senior/bati/plaque3.CATPart index ebd0334..9917255 100644 Binary files a/meca/2011_Senior/bati/plaque3.CATPart and b/meca/2011_Senior/bati/plaque3.CATPart differ diff --git a/meca/2011_Senior/bati/plaque4.CATPart b/meca/2011_Senior/bati/plaque4.CATPart index dc08265..e38d358 100644 Binary files a/meca/2011_Senior/bati/plaque4.CATPart and b/meca/2011_Senior/bati/plaque4.CATPart differ diff --git a/meca/2011_Senior/bati/plaque5.CATPart b/meca/2011_Senior/bati/plaque5.CATPart index 6549ef1..d3620ce 100644 Binary files a/meca/2011_Senior/bati/plaque5.CATPart and b/meca/2011_Senior/bati/plaque5.CATPart differ diff --git a/meca/2011_Senior/cartes/H-Bridge.CATPart b/meca/2011_Senior/cartes/H-Bridge.CATPart index bdcfe94..289272d 100644 Binary files a/meca/2011_Senior/cartes/H-Bridge.CATPart and b/meca/2011_Senior/cartes/H-Bridge.CATPart differ diff --git a/meca/2011_Senior/cartes/cartes.CATProduct b/meca/2011_Senior/cartes/cartes.CATProduct index f5d3c86..5b125e3 100644 Binary files a/meca/2011_Senior/cartes/cartes.CATProduct and b/meca/2011_Senior/cartes/cartes.CATProduct differ diff --git a/meca/2011_Senior/etages/Etage_1.CATProduct b/meca/2011_Senior/etages/Etage_1.CATProduct index 78865fc..eaa9147 100644 Binary files a/meca/2011_Senior/etages/Etage_1.CATProduct and b/meca/2011_Senior/etages/Etage_1.CATProduct differ diff --git a/meca/2011_Senior/etages/Etage_2.CATProduct b/meca/2011_Senior/etages/Etage_2.CATProduct index cbcceb0..c879607 100644 Binary files a/meca/2011_Senior/etages/Etage_2.CATProduct and b/meca/2011_Senior/etages/Etage_2.CATProduct differ diff --git a/meca/2011_Senior/etages/Etage_3.CATProduct b/meca/2011_Senior/etages/Etage_3.CATProduct index 45890f0..cca64c3 100644 Binary files a/meca/2011_Senior/etages/Etage_3.CATProduct and b/meca/2011_Senior/etages/Etage_3.CATProduct differ diff --git a/meca/2011_Senior/etages/etage2/entretoise-etage2.CATProduct b/meca/2011_Senior/etages/etage2/entretoise-etage2.CATProduct index f979efe..48ebc57 100644 Binary files a/meca/2011_Senior/etages/etage2/entretoise-etage2.CATProduct and b/meca/2011_Senior/etages/etage2/entretoise-etage2.CATProduct differ diff --git a/meca/2011_Senior/robot.CATProduct b/meca/2011_Senior/robot.CATProduct index 237726b..45714fd 100644 Binary files a/meca/2011_Senior/robot.CATProduct and b/meca/2011_Senior/robot.CATProduct differ hooks/post-receive -- krobot |
From: Benjamin A. <Ba...@us...> - 2011-04-17 16:27:02
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 42beacd6c175a6c53a93ddeeb134bd8bdba0ea39 (commit) via ed16dc2e700175a41f86104ee7aa4501a45b5f83 (commit) from 886d5df77b2a6cdabceaa6d82319a6e656cee2b9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 42beacd6c175a6c53a93ddeeb134bd8bdba0ea39 Merge: ed16dc2e700175a41f86104ee7aa4501a45b5f83 886d5df77b2a6cdabceaa6d82319a6e656cee2b9 Author: Benjamin Aupetit <au...@cr...> Date: Sun Apr 17 18:26:31 2011 +0200 Merge branch 'master' of ssh://krobot.git.sourceforge.net/gitroot/krobot/krobot commit ed16dc2e700175a41f86104ee7aa4501a45b5f83 Author: Benjamin Aupetit <au...@cr...> Date: Sun Apr 17 18:25:01 2011 +0200 [meca] Cards position and last floor ----------------------------------------------------------------------- Changes: diff --git a/meca/2011_Senior/Ecrou/Ecrou M2.CATPart b/meca/2011_Senior/Ecrou/Ecrou M2.CATPart index ad3e77b..938753c 100644 Binary files a/meca/2011_Senior/Ecrou/Ecrou M2.CATPart and b/meca/2011_Senior/Ecrou/Ecrou M2.CATPart differ diff --git a/meca/2011_Senior/Ecrou/Ecrou M3 autoblocant.CATPart b/meca/2011_Senior/Ecrou/Ecrou M3 autoblocant.CATPart index fddb039..4bebc82 100644 Binary files a/meca/2011_Senior/Ecrou/Ecrou M3 autoblocant.CATPart and b/meca/2011_Senior/Ecrou/Ecrou M3 autoblocant.CATPart differ diff --git a/meca/2011_Senior/Ecrou/Ecrou M4 autoblocant.CATPart b/meca/2011_Senior/Ecrou/Ecrou M4 autoblocant.CATPart index 411ac6c..84d86c8 100644 Binary files a/meca/2011_Senior/Ecrou/Ecrou M4 autoblocant.CATPart and b/meca/2011_Senior/Ecrou/Ecrou M4 autoblocant.CATPart differ diff --git a/meca/2011_Senior/Entretoise/Entretoise M3 M-F 10mm.CATPart b/meca/2011_Senior/Entretoise/Entretoise M3 M-F 10mm.CATPart index 6f70b77..f2be17b 100644 Binary files a/meca/2011_Senior/Entretoise/Entretoise M3 M-F 10mm.CATPart and b/meca/2011_Senior/Entretoise/Entretoise M3 M-F 10mm.CATPart differ diff --git a/meca/2011_Senior/Entretoise/Entretoise M3 M-F 30mm.CATPart b/meca/2011_Senior/Entretoise/Entretoise M3 M-F 30mm.CATPart index e993c8e..b14fcf4 100644 Binary files a/meca/2011_Senior/Entretoise/Entretoise M3 M-F 30mm.CATPart and b/meca/2011_Senior/Entretoise/Entretoise M3 M-F 30mm.CATPart differ diff --git a/meca/2011_Senior/Entretoise/Entretoise M4 M-F 10mm.CATPart b/meca/2011_Senior/Entretoise/Entretoise M4 M-F 10mm.CATPart index 7957545..c1d157e 100644 Binary files a/meca/2011_Senior/Entretoise/Entretoise M4 M-F 10mm.CATPart and b/meca/2011_Senior/Entretoise/Entretoise M4 M-F 10mm.CATPart differ diff --git a/meca/2011_Senior/Entretoise/Entretoise M4 M-F 20mm.CATPart b/meca/2011_Senior/Entretoise/Entretoise M4 M-F 20mm.CATPart index 8cdfa8b..85fcdf5 100644 Binary files a/meca/2011_Senior/Entretoise/Entretoise M4 M-F 20mm.CATPart and b/meca/2011_Senior/Entretoise/Entretoise M4 M-F 20mm.CATPart differ diff --git a/meca/2011_Senior/Entretoise/Entretoise M4 M-F 60mm.CATPart b/meca/2011_Senior/Entretoise/Entretoise M4 M-F 60mm.CATPart index 774fd24..4287dca 100644 Binary files a/meca/2011_Senior/Entretoise/Entretoise M4 M-F 60mm.CATPart and b/meca/2011_Senior/Entretoise/Entretoise M4 M-F 60mm.CATPart differ diff --git a/meca/2011_Senior/SupportMiroir/Ecrou Gros Pignon.CATPart b/meca/2011_Senior/SupportMiroir/Ecrou Gros Pignon.CATPart index 1ff7e78..2105cdc 100644 Binary files a/meca/2011_Senior/SupportMiroir/Ecrou Gros Pignon.CATPart and b/meca/2011_Senior/SupportMiroir/Ecrou Gros Pignon.CATPart differ diff --git a/meca/2011_Senior/SupportMiroir/Gros Pignon.CATPart b/meca/2011_Senior/SupportMiroir/Gros Pignon.CATPart index ee6b2a6..ff15413 100644 Binary files a/meca/2011_Senior/SupportMiroir/Gros Pignon.CATPart and b/meca/2011_Senior/SupportMiroir/Gros Pignon.CATPart differ diff --git a/meca/2011_Senior/SupportMiroir/Mat_Balise.CATProduct b/meca/2011_Senior/SupportMiroir/Mat_Balise.CATProduct index e9dbbb1..54ba271 100644 Binary files a/meca/2011_Senior/SupportMiroir/Mat_Balise.CATProduct and b/meca/2011_Senior/SupportMiroir/Mat_Balise.CATProduct differ diff --git a/meca/2011_Senior/SupportMiroir/Maxon_2326.936-22.111-028.CATPart b/meca/2011_Senior/SupportMiroir/Maxon_2326.936-22.111-028.CATPart index b0c3989..41e5092 100644 Binary files a/meca/2011_Senior/SupportMiroir/Maxon_2326.936-22.111-028.CATPart and b/meca/2011_Senior/SupportMiroir/Maxon_2326.936-22.111-028.CATPart differ diff --git a/meca/2011_Senior/SupportMiroir/Omron E3Z-R61.CATPart b/meca/2011_Senior/SupportMiroir/Omron E3Z-R61.CATPart index 2281d9e..2a3a35a 100644 Binary files a/meca/2011_Senior/SupportMiroir/Omron E3Z-R61.CATPart and b/meca/2011_Senior/SupportMiroir/Omron E3Z-R61.CATPart differ diff --git a/meca/2011_Senior/SupportMiroir/Rondelle Gros Pignon.CATPart b/meca/2011_Senior/SupportMiroir/Rondelle Gros Pignon.CATPart index af6f601..866a0ba 100644 Binary files a/meca/2011_Senior/SupportMiroir/Rondelle Gros Pignon.CATPart and b/meca/2011_Senior/SupportMiroir/Rondelle Gros Pignon.CATPart differ diff --git a/meca/2011_Senior/SupportMiroir/Soutien_Omron.CATPart b/meca/2011_Senior/SupportMiroir/Soutien_Omron.CATPart index b2f904c..02268e7 100644 Binary files a/meca/2011_Senior/SupportMiroir/Soutien_Omron.CATPart and b/meca/2011_Senior/SupportMiroir/Soutien_Omron.CATPart differ diff --git a/meca/2011_Senior/SupportMiroir/Support Adverse.CATPart b/meca/2011_Senior/SupportMiroir/Support Adverse.CATPart index 41076dc..8af8342 100644 Binary files a/meca/2011_Senior/SupportMiroir/Support Adverse.CATPart and b/meca/2011_Senior/SupportMiroir/Support Adverse.CATPart differ diff --git a/meca/2011_Senior/SupportMiroir/Support Base.CATPart b/meca/2011_Senior/SupportMiroir/Support Base.CATPart index bcc2a92..d3983c0 100644 Binary files a/meca/2011_Senior/SupportMiroir/Support Base.CATPart and b/meca/2011_Senior/SupportMiroir/Support Base.CATPart differ diff --git a/meca/2011_Senior/SupportMiroir/Support_Maxon.CATPart b/meca/2011_Senior/SupportMiroir/Support_Maxon.CATPart index 7a4dfea..a73c15d 100644 Binary files a/meca/2011_Senior/SupportMiroir/Support_Maxon.CATPart and b/meca/2011_Senior/SupportMiroir/Support_Maxon.CATPart differ diff --git a/meca/2011_Senior/SupportMiroir/Support_Miroir.CATPart b/meca/2011_Senior/SupportMiroir/Support_Miroir.CATPart index 88d5028..02fc162 100644 Binary files a/meca/2011_Senior/SupportMiroir/Support_Miroir.CATPart and b/meca/2011_Senior/SupportMiroir/Support_Miroir.CATPart differ diff --git a/meca/2011_Senior/SupportMiroir/Vis Gros Pignon.CATPart b/meca/2011_Senior/SupportMiroir/Vis Gros Pignon.CATPart index d64ba46..217844a 100644 Binary files a/meca/2011_Senior/SupportMiroir/Vis Gros Pignon.CATPart and b/meca/2011_Senior/SupportMiroir/Vis Gros Pignon.CATPart differ diff --git a/meca/2011_Senior/Vis/Vis cylindrique hexa M3x10.CATPart b/meca/2011_Senior/Vis/Vis cylindrique hexa M3x10.CATPart index 39f90f1..eb2ab64 100644 Binary files a/meca/2011_Senior/Vis/Vis cylindrique hexa M3x10.CATPart and b/meca/2011_Senior/Vis/Vis cylindrique hexa M3x10.CATPart differ diff --git a/meca/2011_Senior/Vis/Vis cylindrique hexa M4x25.CATPart b/meca/2011_Senior/Vis/Vis cylindrique hexa M4x25.CATPart index 7e20086..030720b 100644 Binary files a/meca/2011_Senior/Vis/Vis cylindrique hexa M4x25.CATPart and b/meca/2011_Senior/Vis/Vis cylindrique hexa M4x25.CATPart differ diff --git a/meca/2011_Senior/Vis/Vis cylindrique hexa M4x35.CATPart b/meca/2011_Senior/Vis/Vis cylindrique hexa M4x35.CATPart index e23b844..b2ba39e 100644 Binary files a/meca/2011_Senior/Vis/Vis cylindrique hexa M4x35.CATPart and b/meca/2011_Senior/Vis/Vis cylindrique hexa M4x35.CATPart differ diff --git a/meca/2011_Senior/Vis/Vis tete bombee hexa M3x12.CATPart b/meca/2011_Senior/Vis/Vis tete bombee hexa M3x12.CATPart index 7360489..a063422 100644 Binary files a/meca/2011_Senior/Vis/Vis tete bombee hexa M3x12.CATPart and b/meca/2011_Senior/Vis/Vis tete bombee hexa M3x12.CATPart differ diff --git a/meca/2011_Senior/Vis/Vis tete bombee hexa M4x10.CATPart b/meca/2011_Senior/Vis/Vis tete bombee hexa M4x10.CATPart index 5dc3094..d002055 100644 Binary files a/meca/2011_Senior/Vis/Vis tete bombee hexa M4x10.CATPart and b/meca/2011_Senior/Vis/Vis tete bombee hexa M4x10.CATPart differ diff --git a/meca/2011_Senior/Vis/Vis tete bombee hexa M4x12.CATPart b/meca/2011_Senior/Vis/Vis tete bombee hexa M4x12.CATPart index 3624917..76edd31 100644 Binary files a/meca/2011_Senior/Vis/Vis tete bombee hexa M4x12.CATPart and b/meca/2011_Senior/Vis/Vis tete bombee hexa M4x12.CATPart differ diff --git a/meca/2011_Senior/Vis/Vis tete bombee hexa M4x16.CATPart b/meca/2011_Senior/Vis/Vis tete bombee hexa M4x16.CATPart index 6380731..1f8048e 100644 Binary files a/meca/2011_Senior/Vis/Vis tete bombee hexa M4x16.CATPart and b/meca/2011_Senior/Vis/Vis tete bombee hexa M4x16.CATPart differ diff --git a/meca/2011_Senior/Vis/Vis tete bombee pozi M2x12.CATPart b/meca/2011_Senior/Vis/Vis tete bombee pozi M2x12.CATPart index 8b8b745..a4ec6a8 100644 Binary files a/meca/2011_Senior/Vis/Vis tete bombee pozi M2x12.CATPart and b/meca/2011_Senior/Vis/Vis tete bombee pozi M2x12.CATPart differ diff --git a/meca/2011_Senior/Vis/attache.CATProduct b/meca/2011_Senior/Vis/attache.CATProduct index 47fb4ad..d74ebc4 100644 Binary files a/meca/2011_Senior/Vis/attache.CATProduct and b/meca/2011_Senior/Vis/attache.CATProduct differ diff --git a/meca/2011_Senior/Vis/serrage.CATProduct b/meca/2011_Senior/Vis/serrage.CATProduct index 96aae00..609543a 100644 Binary files a/meca/2011_Senior/Vis/serrage.CATProduct and b/meca/2011_Senior/Vis/serrage.CATProduct differ diff --git a/meca/2011_Senior/ascenceurs/Ascenseur_Poulie_bas2.CATPart b/meca/2011_Senior/ascenceurs/Ascenseur_Poulie_bas2.CATPart index 4dd078e..c9f58a6 100644 Binary files a/meca/2011_Senior/ascenceurs/Ascenseur_Poulie_bas2.CATPart and b/meca/2011_Senior/ascenceurs/Ascenseur_Poulie_bas2.CATPart differ diff --git a/meca/2011_Senior/ascenceurs/Ascenseur_Poulie_moteur.CATPart b/meca/2011_Senior/ascenceurs/Ascenseur_Poulie_moteur.CATPart index b78541b..629626e 100644 Binary files a/meca/2011_Senior/ascenceurs/Ascenseur_Poulie_moteur.CATPart and b/meca/2011_Senior/ascenceurs/Ascenseur_Poulie_moteur.CATPart differ diff --git a/meca/2011_Senior/ascenceurs/Ascenseur_axe_chapeau.CATPart b/meca/2011_Senior/ascenceurs/Ascenseur_axe_chapeau.CATPart index 1a5459b..a80a881 100644 Binary files a/meca/2011_Senior/ascenceurs/Ascenseur_axe_chapeau.CATPart and b/meca/2011_Senior/ascenceurs/Ascenseur_axe_chapeau.CATPart differ diff --git a/meca/2011_Senior/ascenceurs/Ascenseur_axe_douille.CATPart b/meca/2011_Senior/ascenceurs/Ascenseur_axe_douille.CATPart index a670395..3e45683 100644 Binary files a/meca/2011_Senior/ascenceurs/Ascenseur_axe_douille.CATPart and b/meca/2011_Senior/ascenceurs/Ascenseur_axe_douille.CATPart differ diff --git a/meca/2011_Senior/ascenceurs/Ascenseur_axe_glissiere.CATPart b/meca/2011_Senior/ascenceurs/Ascenseur_axe_glissiere.CATPart index d906eb2..f96e239 100644 Binary files a/meca/2011_Senior/ascenceurs/Ascenseur_axe_glissiere.CATPart and b/meca/2011_Senior/ascenceurs/Ascenseur_axe_glissiere.CATPart differ diff --git a/meca/2011_Senior/ascenceurs/Ascenseur_plaque.CATPart b/meca/2011_Senior/ascenceurs/Ascenseur_plaque.CATPart index 59c2fa9..a6e43cb 100644 Binary files a/meca/2011_Senior/ascenceurs/Ascenseur_plaque.CATPart and b/meca/2011_Senior/ascenceurs/Ascenseur_plaque.CATPart differ diff --git a/meca/2011_Senior/ascenceurs/IG-42GM.CATPart b/meca/2011_Senior/ascenceurs/IG-42GM.CATPart index ae40236..dfaf001 100644 Binary files a/meca/2011_Senior/ascenceurs/IG-42GM.CATPart and b/meca/2011_Senior/ascenceurs/IG-42GM.CATPart differ diff --git a/meca/2011_Senior/ascenceurs/IG-42GM_support.CATPart b/meca/2011_Senior/ascenceurs/IG-42GM_support.CATPart index e15a4a3..57bd226 100644 Binary files a/meca/2011_Senior/ascenceurs/IG-42GM_support.CATPart and b/meca/2011_Senior/ascenceurs/IG-42GM_support.CATPart differ diff --git a/meca/2011_Senior/ascenceurs/Moteur_ascenseur.CATProduct b/meca/2011_Senior/ascenceurs/Moteur_ascenseur.CATProduct index ae0977a..63f5a64 100644 Binary files a/meca/2011_Senior/ascenceurs/Moteur_ascenseur.CATProduct and b/meca/2011_Senior/ascenceurs/Moteur_ascenseur.CATProduct differ diff --git a/meca/2011_Senior/ascenceurs/Poulie_bas_avec_support.CATProduct b/meca/2011_Senior/ascenceurs/Poulie_bas_avec_support.CATProduct index 822738c..7853e4b 100644 Binary files a/meca/2011_Senior/ascenceurs/Poulie_bas_avec_support.CATProduct and b/meca/2011_Senior/ascenceurs/Poulie_bas_avec_support.CATProduct differ diff --git a/meca/2011_Senior/ascenceurs/Profile en U 1x1x0.125 pouce.CATPart b/meca/2011_Senior/ascenceurs/Profile en U 1x1x0.125 pouce.CATPart index 02d61ae..aa790ad 100644 Binary files a/meca/2011_Senior/ascenceurs/Profile en U 1x1x0.125 pouce.CATPart and b/meca/2011_Senior/ascenceurs/Profile en U 1x1x0.125 pouce.CATPart differ diff --git a/meca/2011_Senior/ascenceurs/ascenseur.CATProduct b/meca/2011_Senior/ascenceurs/ascenseur.CATProduct index 3882be5..33002aa 100644 Binary files a/meca/2011_Senior/ascenceurs/ascenseur.CATProduct and b/meca/2011_Senior/ascenceurs/ascenseur.CATProduct differ diff --git a/meca/2011_Senior/ascenceurs/attache-pince.CATProduct b/meca/2011_Senior/ascenceurs/attache-pince.CATProduct index da62b6b..371d74d 100644 Binary files a/meca/2011_Senior/ascenceurs/attache-pince.CATProduct and b/meca/2011_Senior/ascenceurs/attache-pince.CATProduct differ diff --git a/meca/2011_Senior/ascenceurs/longueur_courroie.CATPart b/meca/2011_Senior/ascenceurs/longueur_courroie.CATPart index 6893749..79762bf 100644 Binary files a/meca/2011_Senior/ascenceurs/longueur_courroie.CATPart and b/meca/2011_Senior/ascenceurs/longueur_courroie.CATPart differ diff --git a/meca/2011_Senior/ascenceurs/poulie_bas_axe.CATPart b/meca/2011_Senior/ascenceurs/poulie_bas_axe.CATPart index ab794e9..c63eabd 100644 Binary files a/meca/2011_Senior/ascenceurs/poulie_bas_axe.CATPart and b/meca/2011_Senior/ascenceurs/poulie_bas_axe.CATPart differ diff --git a/meca/2011_Senior/ascenceurs/poulie_bas_coussinet.CATPart b/meca/2011_Senior/ascenceurs/poulie_bas_coussinet.CATPart index 1450057..631d99c 100644 Binary files a/meca/2011_Senior/ascenceurs/poulie_bas_coussinet.CATPart and b/meca/2011_Senior/ascenceurs/poulie_bas_coussinet.CATPart differ diff --git a/meca/2011_Senior/ascenceurs/serre-courroie-mobile.CATPart b/meca/2011_Senior/ascenceurs/serre-courroie-mobile.CATPart index 60855c8..4d4d426 100644 Binary files a/meca/2011_Senior/ascenceurs/serre-courroie-mobile.CATPart and b/meca/2011_Senior/ascenceurs/serre-courroie-mobile.CATPart differ diff --git a/meca/2011_Senior/ascenceurs/serre-courroie-serrage-element.CATProduct b/meca/2011_Senior/ascenceurs/serre-courroie-serrage-element.CATProduct index a647483..e41b14b 100644 Binary files a/meca/2011_Senior/ascenceurs/serre-courroie-serrage-element.CATProduct and b/meca/2011_Senior/ascenceurs/serre-courroie-serrage-element.CATProduct differ diff --git a/meca/2011_Senior/ascenceurs/serre-courroie-serrage.CATProduct b/meca/2011_Senior/ascenceurs/serre-courroie-serrage.CATProduct index 93a465d..37d94d4 100644 Binary files a/meca/2011_Senior/ascenceurs/serre-courroie-serrage.CATProduct and b/meca/2011_Senior/ascenceurs/serre-courroie-serrage.CATProduct differ diff --git a/meca/2011_Senior/ascenceurs/serre-courroie.CATPart b/meca/2011_Senior/ascenceurs/serre-courroie.CATPart index b507354..023b5ff 100644 Binary files a/meca/2011_Senior/ascenceurs/serre-courroie.CATPart and b/meca/2011_Senior/ascenceurs/serre-courroie.CATPart differ diff --git a/meca/2011_Senior/ascenceurs/serre-douille.CATProduct b/meca/2011_Senior/ascenceurs/serre-douille.CATProduct index e817a11..ab3dd2d 100644 Binary files a/meca/2011_Senior/ascenceurs/serre-douille.CATProduct and b/meca/2011_Senior/ascenceurs/serre-douille.CATProduct differ diff --git a/meca/2011_Senior/ascenceurs/vis-serre-courroie.CATProduct b/meca/2011_Senior/ascenceurs/vis-serre-courroie.CATProduct index 87dc910..91b8de6 100644 Binary files a/meca/2011_Senior/ascenceurs/vis-serre-courroie.CATProduct and b/meca/2011_Senior/ascenceurs/vis-serre-courroie.CATProduct differ diff --git a/meca/2011_Senior/bati/base.CATPart b/meca/2011_Senior/bati/base.CATPart index 25bb4eb..e22452c 100644 Binary files a/meca/2011_Senior/bati/base.CATPart and b/meca/2011_Senior/bati/base.CATPart differ diff --git a/meca/2011_Senior/bati/entretoise-bloc-moteur.CATProduct b/meca/2011_Senior/bati/entretoise-bloc-moteur.CATProduct index 35bfff8..70b5c4f 100644 Binary files a/meca/2011_Senior/bati/entretoise-bloc-moteur.CATProduct and b/meca/2011_Senior/bati/entretoise-bloc-moteur.CATProduct differ diff --git a/meca/2011_Senior/bati/plaque2.CATPart b/meca/2011_Senior/bati/plaque2.CATPart index 679aaaa..6baa75b 100644 Binary files a/meca/2011_Senior/bati/plaque2.CATPart and b/meca/2011_Senior/bati/plaque2.CATPart differ diff --git a/meca/2011_Senior/bati/plaque3.CATPart b/meca/2011_Senior/bati/plaque3.CATPart index 8ba8b21..ebd0334 100644 Binary files a/meca/2011_Senior/bati/plaque3.CATPart and b/meca/2011_Senior/bati/plaque3.CATPart differ diff --git a/meca/2011_Senior/bati/plaque4.CATPart b/meca/2011_Senior/bati/plaque4.CATPart index 958bc02..dc08265 100644 Binary files a/meca/2011_Senior/bati/plaque4.CATPart and b/meca/2011_Senior/bati/plaque4.CATPart differ diff --git a/meca/2011_Senior/bati/plaque5.CATPart b/meca/2011_Senior/bati/plaque5.CATPart index bc66c08..6549ef1 100644 Binary files a/meca/2011_Senior/bati/plaque5.CATPart and b/meca/2011_Senior/bati/plaque5.CATPart differ diff --git a/meca/2011_Senior/cartes/AX12 Interface.CATPart b/meca/2011_Senior/cartes/AX12 Interface.CATPart index 4b7d4e9..54d0119 100644 Binary files a/meca/2011_Senior/cartes/AX12 Interface.CATPart and b/meca/2011_Senior/cartes/AX12 Interface.CATPart differ diff --git a/meca/2011_Senior/cartes/Alim Pico-ITX.CATPart b/meca/2011_Senior/cartes/Alim Pico-ITX.CATPart index d3e9d79..b6da3ab 100644 Binary files a/meca/2011_Senior/cartes/Alim Pico-ITX.CATPart and b/meca/2011_Senior/cartes/Alim Pico-ITX.CATPart differ diff --git a/meca/2011_Senior/cartes/Carte-capteur.CATPart b/meca/2011_Senior/cartes/Carte-capteur.CATPart new file mode 100644 index 0000000..557f569 Binary files /dev/null and b/meca/2011_Senior/cartes/Carte-capteur.CATPart differ diff --git a/meca/2011_Senior/cartes/CarteAsservissement.CATPart b/meca/2011_Senior/cartes/CarteAsservissement.CATPart index 9153359..f447c5e 100644 Binary files a/meca/2011_Senior/cartes/CarteAsservissement.CATPart and b/meca/2011_Senior/cartes/CarteAsservissement.CATPart differ diff --git a/meca/2011_Senior/cartes/H-Bridge.CATPart b/meca/2011_Senior/cartes/H-Bridge.CATPart index fd8fce3..bdcfe94 100644 Binary files a/meca/2011_Senior/cartes/H-Bridge.CATPart and b/meca/2011_Senior/cartes/H-Bridge.CATPart differ diff --git a/meca/2011_Senior/cartes/PicoITX.CATPart b/meca/2011_Senior/cartes/PicoITX.CATPart new file mode 100644 index 0000000..a1b356b Binary files /dev/null and b/meca/2011_Senior/cartes/PicoITX.CATPart differ diff --git a/meca/2011_Senior/cartes/SSD.CATPart b/meca/2011_Senior/cartes/SSD.CATPart index 7afb9eb..7901dc1 100644 Binary files a/meca/2011_Senior/cartes/SSD.CATPart and b/meca/2011_Senior/cartes/SSD.CATPart differ diff --git a/meca/2011_Senior/cartes/USB-CAN.CATPart b/meca/2011_Senior/cartes/USB-CAN.CATPart new file mode 100644 index 0000000..8ac3575 Binary files /dev/null and b/meca/2011_Senior/cartes/USB-CAN.CATPart differ diff --git a/meca/2011_Senior/cartes/cartes.CATProduct b/meca/2011_Senior/cartes/cartes.CATProduct new file mode 100644 index 0000000..f5d3c86 Binary files /dev/null and b/meca/2011_Senior/cartes/cartes.CATProduct differ diff --git a/meca/2011_Senior/cartes/entretoise-et3.CATProduct b/meca/2011_Senior/cartes/entretoise-et3.CATProduct new file mode 100644 index 0000000..ffe4890 Binary files /dev/null and b/meca/2011_Senior/cartes/entretoise-et3.CATProduct differ diff --git a/meca/2011_Senior/cartes/entretoises-carte.CATProduct b/meca/2011_Senior/cartes/entretoises-carte.CATProduct new file mode 100644 index 0000000..0db4f8a Binary files /dev/null and b/meca/2011_Senior/cartes/entretoises-carte.CATProduct differ diff --git a/meca/2011_Senior/cartes/entretoises-cartes.CATProduct b/meca/2011_Senior/cartes/entretoises-cartes.CATProduct new file mode 100644 index 0000000..3a216eb Binary files /dev/null and b/meca/2011_Senior/cartes/entretoises-cartes.CATProduct differ diff --git a/meca/2011_Senior/divers/Galet.CATProduct b/meca/2011_Senior/divers/Galet.CATProduct index 8b2a3c3..2a9d7d2 100644 Binary files a/meca/2011_Senior/divers/Galet.CATProduct and b/meca/2011_Senior/divers/Galet.CATProduct differ diff --git a/meca/2011_Senior/divers/PackBatteries.CATPart b/meca/2011_Senior/divers/PackBatteries.CATPart index 208f81a..ba91394 100644 Binary files a/meca/2011_Senior/divers/PackBatteries.CATPart and b/meca/2011_Senior/divers/PackBatteries.CATPart differ diff --git a/meca/2011_Senior/divers/galet_axe.CATPart b/meca/2011_Senior/divers/galet_axe.CATPart index acd55d0..8467b1f 100644 Binary files a/meca/2011_Senior/divers/galet_axe.CATPart and b/meca/2011_Senior/divers/galet_axe.CATPart differ diff --git a/meca/2011_Senior/divers/galet_boulon.CATPart b/meca/2011_Senior/divers/galet_boulon.CATPart index 1faf3e5..71eb235 100644 Binary files a/meca/2011_Senior/divers/galet_boulon.CATPart and b/meca/2011_Senior/divers/galet_boulon.CATPart differ diff --git a/meca/2011_Senior/divers/galet_rondelle.CATPart b/meca/2011_Senior/divers/galet_rondelle.CATPart index 06379dc..76d7e2f 100644 Binary files a/meca/2011_Senior/divers/galet_rondelle.CATPart and b/meca/2011_Senior/divers/galet_rondelle.CATPart differ diff --git a/meca/2011_Senior/divers/galet_roulement.CATPart b/meca/2011_Senior/divers/galet_roulement.CATPart index de01627..01831ac 100644 Binary files a/meca/2011_Senior/divers/galet_roulement.CATPart and b/meca/2011_Senior/divers/galet_roulement.CATPart differ diff --git a/meca/2011_Senior/divers/perimetre.CATPart b/meca/2011_Senior/divers/perimetre.CATPart index 4c4b1c6..678ec84 100644 Binary files a/meca/2011_Senior/divers/perimetre.CATPart and b/meca/2011_Senior/divers/perimetre.CATPart differ diff --git a/meca/2011_Senior/divers/pince_haut.CATPart b/meca/2011_Senior/divers/pince_haut.CATPart index 8beda6f..530dd65 100644 Binary files a/meca/2011_Senior/divers/pince_haut.CATPart and b/meca/2011_Senior/divers/pince_haut.CATPart differ diff --git a/meca/2011_Senior/divers/plan.CATPart b/meca/2011_Senior/divers/plan.CATPart index bb689e9..bc270c0 100644 Binary files a/meca/2011_Senior/divers/plan.CATPart and b/meca/2011_Senior/divers/plan.CATPart differ diff --git a/meca/2011_Senior/divers/planlaser.CATPart b/meca/2011_Senior/divers/planlaser.CATPart index d3d90d2..908159f 100644 Binary files a/meca/2011_Senior/divers/planlaser.CATPart and b/meca/2011_Senior/divers/planlaser.CATPart differ diff --git a/meca/2011_Senior/divers/planlaser_avec_support.CATProduct b/meca/2011_Senior/divers/planlaser_avec_support.CATProduct index 5f37771..f08bda7 100644 Binary files a/meca/2011_Senior/divers/planlaser_avec_support.CATProduct and b/meca/2011_Senior/divers/planlaser_avec_support.CATProduct differ diff --git a/meca/2011_Senior/divers/sol.CATPart b/meca/2011_Senior/divers/sol.CATPart index 551baa4..7f13a8c 100644 Binary files a/meca/2011_Senior/divers/sol.CATPart and b/meca/2011_Senior/divers/sol.CATPart differ diff --git a/meca/2011_Senior/divers/support_planlaser.CATPart b/meca/2011_Senior/divers/support_planlaser.CATPart index 63d6a86..05b63a3 100644 Binary files a/meca/2011_Senior/divers/support_planlaser.CATPart and b/meca/2011_Senior/divers/support_planlaser.CATPart differ diff --git a/meca/2011_Senior/divers/webcam.CATProduct b/meca/2011_Senior/divers/webcam.CATProduct index 79ecbb9..7d17615 100644 Binary files a/meca/2011_Senior/divers/webcam.CATProduct and b/meca/2011_Senior/divers/webcam.CATProduct differ diff --git a/meca/2011_Senior/divers/webcam_cam.CATPart b/meca/2011_Senior/divers/webcam_cam.CATPart index 85fa09f..ab178fb 100644 Binary files a/meca/2011_Senior/divers/webcam_cam.CATPart and b/meca/2011_Senior/divers/webcam_cam.CATPart differ diff --git a/meca/2011_Senior/divers/webcam_support.CATPart b/meca/2011_Senior/divers/webcam_support.CATPart index b3fa8af..ec6b4f2 100644 Binary files a/meca/2011_Senior/divers/webcam_support.CATPart and b/meca/2011_Senior/divers/webcam_support.CATPart differ diff --git a/meca/2011_Senior/divers/webcam_vue.CATPart b/meca/2011_Senior/divers/webcam_vue.CATPart index 1841a50..4c58239 100644 Binary files a/meca/2011_Senior/divers/webcam_vue.CATPart and b/meca/2011_Senior/divers/webcam_vue.CATPart differ diff --git a/meca/2011_Senior/etages/Etage_1.CATProduct b/meca/2011_Senior/etages/Etage_1.CATProduct index b04485a..78865fc 100644 Binary files a/meca/2011_Senior/etages/Etage_1.CATProduct and b/meca/2011_Senior/etages/Etage_1.CATProduct differ diff --git a/meca/2011_Senior/etages/Etage_2.CATProduct b/meca/2011_Senior/etages/Etage_2.CATProduct index 905282e..cbcceb0 100644 Binary files a/meca/2011_Senior/etages/Etage_2.CATProduct and b/meca/2011_Senior/etages/Etage_2.CATProduct differ diff --git a/meca/2011_Senior/etages/Etage_3.CATProduct b/meca/2011_Senior/etages/Etage_3.CATProduct index 5d0bdd9..45890f0 100644 Binary files a/meca/2011_Senior/etages/Etage_3.CATProduct and b/meca/2011_Senior/etages/Etage_3.CATProduct differ diff --git a/meca/2011_Senior/etages/entretoise-etage3.CATProduct b/meca/2011_Senior/etages/entretoise-etage3.CATProduct index 9b749b1..9d89b60 100644 Binary files a/meca/2011_Senior/etages/entretoise-etage3.CATProduct and b/meca/2011_Senior/etages/entretoise-etage3.CATProduct differ diff --git a/meca/2011_Senior/etages/entretoises-m3-et2.CATProduct b/meca/2011_Senior/etages/entretoises-m3-et2.CATProduct new file mode 100644 index 0000000..4ed0fed Binary files /dev/null and b/meca/2011_Senior/etages/entretoises-m3-et2.CATProduct differ diff --git a/meca/2011_Senior/etages/etage1/axes.CATProduct b/meca/2011_Senior/etages/etage1/axes.CATProduct index 5a0ad27..1d017d7 100644 Binary files a/meca/2011_Senior/etages/etage1/axes.CATProduct and b/meca/2011_Senior/etages/etage1/axes.CATProduct differ diff --git a/meca/2011_Senior/etages/etage1/bloc_moteur.CATProduct b/meca/2011_Senior/etages/etage1/bloc_moteur.CATProduct index a9ae498..da2f81d 100644 Binary files a/meca/2011_Senior/etages/etage1/bloc_moteur.CATProduct and b/meca/2011_Senior/etages/etage1/bloc_moteur.CATProduct differ diff --git a/meca/2011_Senior/etages/etage1/entretoise-etage.CATProduct b/meca/2011_Senior/etages/etage1/entretoise-etage.CATProduct index ba32514..97eacd5 100644 Binary files a/meca/2011_Senior/etages/etage1/entretoise-etage.CATProduct and b/meca/2011_Senior/etages/etage1/entretoise-etage.CATProduct differ diff --git a/meca/2011_Senior/etages/etage1/entretoises-bloc-moteur.CATProduct b/meca/2011_Senior/etages/etage1/entretoises-bloc-moteur.CATProduct index e2bd92c..a8b7458 100644 Binary files a/meca/2011_Senior/etages/etage1/entretoises-bloc-moteur.CATProduct and b/meca/2011_Senior/etages/etage1/entretoises-bloc-moteur.CATProduct differ diff --git a/meca/2011_Senior/etages/etage1/entretoises-etage.CATProduct b/meca/2011_Senior/etages/etage1/entretoises-etage.CATProduct index 0d80d4b..4150abc 100644 Binary files a/meca/2011_Senior/etages/etage1/entretoises-etage.CATProduct and b/meca/2011_Senior/etages/etage1/entretoises-etage.CATProduct differ diff --git a/meca/2011_Senior/etages/etage1/galets.CATProduct b/meca/2011_Senior/etages/etage1/galets.CATProduct index 53f31dc..d2a4519 100644 Binary files a/meca/2011_Senior/etages/etage1/galets.CATProduct and b/meca/2011_Senior/etages/etage1/galets.CATProduct differ diff --git a/meca/2011_Senior/etages/etage1/repere.CATPart b/meca/2011_Senior/etages/etage1/repere.CATPart index ce64466..057aace 100644 Binary files a/meca/2011_Senior/etages/etage1/repere.CATPart and b/meca/2011_Senior/etages/etage1/repere.CATPart differ diff --git a/meca/2011_Senior/etages/etage1/vis-axes.CATProduct b/meca/2011_Senior/etages/etage1/vis-axes.CATProduct index 34ed964..0bac1c6 100644 Binary files a/meca/2011_Senior/etages/etage1/vis-axes.CATProduct and b/meca/2011_Senior/etages/etage1/vis-axes.CATProduct differ diff --git a/meca/2011_Senior/etages/etage1/vis_billes.CATProduct b/meca/2011_Senior/etages/etage1/vis_billes.CATProduct index 7653cc2..3b4c0bc 100644 Binary files a/meca/2011_Senior/etages/etage1/vis_billes.CATProduct and b/meca/2011_Senior/etages/etage1/vis_billes.CATProduct differ diff --git a/meca/2011_Senior/etages/etage1/vis_moteur_ascenseur.CATProduct b/meca/2011_Senior/etages/etage1/vis_moteur_ascenseur.CATProduct index 0bf3419..6f404b7 100644 Binary files a/meca/2011_Senior/etages/etage1/vis_moteur_ascenseur.CATProduct and b/meca/2011_Senior/etages/etage1/vis_moteur_ascenseur.CATProduct differ diff --git a/meca/2011_Senior/etages/etage1/visserie.CATProduct b/meca/2011_Senior/etages/etage1/visserie.CATProduct index ceaeb7e..a84fb4d 100644 Binary files a/meca/2011_Senior/etages/etage1/visserie.CATProduct and b/meca/2011_Senior/etages/etage1/visserie.CATProduct differ diff --git a/meca/2011_Senior/etages/etage2/entretoise-et2.CATProduct b/meca/2011_Senior/etages/etage2/entretoise-et2.CATProduct index 2d4eb0a..d563ecd 100644 Binary files a/meca/2011_Senior/etages/etage2/entretoise-et2.CATProduct and b/meca/2011_Senior/etages/etage2/entretoise-et2.CATProduct differ diff --git a/meca/2011_Senior/etages/etage2/entretoise-etage2.CATProduct b/meca/2011_Senior/etages/etage2/entretoise-etage2.CATProduct index 20b378b..f979efe 100644 Binary files a/meca/2011_Senior/etages/etage2/entretoise-etage2.CATProduct and b/meca/2011_Senior/etages/etage2/entretoise-etage2.CATProduct differ diff --git a/meca/2011_Senior/pinces/AX12.CATProduct b/meca/2011_Senior/pinces/AX12.CATProduct index b3bd9a8..e17b4ac 100644 Binary files a/meca/2011_Senior/pinces/AX12.CATProduct and b/meca/2011_Senior/pinces/AX12.CATProduct differ diff --git a/meca/2011_Senior/pinces/AX12_actionneur.CATPart b/meca/2011_Senior/pinces/AX12_actionneur.CATPart index a6c0c0f..5285b2a 100644 Binary files a/meca/2011_Senior/pinces/AX12_actionneur.CATPart and b/meca/2011_Senior/pinces/AX12_actionneur.CATPart differ diff --git a/meca/2011_Senior/pinces/AX12_fixation.CATPart b/meca/2011_Senior/pinces/AX12_fixation.CATPart index 8f2c7b4..fc013cd 100644 Binary files a/meca/2011_Senior/pinces/AX12_fixation.CATPart and b/meca/2011_Senior/pinces/AX12_fixation.CATPart differ diff --git a/meca/2011_Senior/pinces/AX12_mobile.CATPart b/meca/2011_Senior/pinces/AX12_mobile.CATPart index e306e4a..798860a 100644 Binary files a/meca/2011_Senior/pinces/AX12_mobile.CATPart and b/meca/2011_Senior/pinces/AX12_mobile.CATPart differ diff --git a/meca/2011_Senior/pinces/L_bas.CATPart b/meca/2011_Senior/pinces/L_bas.CATPart index b23671c..5ff594d 100644 Binary files a/meca/2011_Senior/pinces/L_bas.CATPart and b/meca/2011_Senior/pinces/L_bas.CATPart differ diff --git a/meca/2011_Senior/pinces/L_haut.CATPart b/meca/2011_Senior/pinces/L_haut.CATPart index 115534d..1976775 100644 Binary files a/meca/2011_Senior/pinces/L_haut.CATPart and b/meca/2011_Senior/pinces/L_haut.CATPart differ diff --git a/meca/2011_Senior/pinces/Pince_droite_bas.CATProduct b/meca/2011_Senior/pinces/Pince_droite_bas.CATProduct index c9f1d65..f95599f 100644 Binary files a/meca/2011_Senior/pinces/Pince_droite_bas.CATProduct and b/meca/2011_Senior/pinces/Pince_droite_bas.CATProduct differ diff --git a/meca/2011_Senior/pinces/Pince_droite_haut.CATProduct b/meca/2011_Senior/pinces/Pince_droite_haut.CATProduct index 6ac1fd2..ac4756a 100644 Binary files a/meca/2011_Senior/pinces/Pince_droite_haut.CATProduct and b/meca/2011_Senior/pinces/Pince_droite_haut.CATProduct differ diff --git a/meca/2011_Senior/pinces/Pince_gauche_bas.CATProduct b/meca/2011_Senior/pinces/Pince_gauche_bas.CATProduct index 4b84044..16c9bf4 100644 Binary files a/meca/2011_Senior/pinces/Pince_gauche_bas.CATProduct and b/meca/2011_Senior/pinces/Pince_gauche_bas.CATProduct differ diff --git a/meca/2011_Senior/pinces/Pince_gauche_haut.CATProduct b/meca/2011_Senior/pinces/Pince_gauche_haut.CATProduct index 9d1b6cd..e044cc9 100644 Binary files a/meca/2011_Senior/pinces/Pince_gauche_haut.CATProduct and b/meca/2011_Senior/pinces/Pince_gauche_haut.CATProduct differ diff --git a/meca/2011_Senior/pinces/indexeur.CATProduct b/meca/2011_Senior/pinces/indexeur.CATProduct index c8a7723..38a5d45 100644 Binary files a/meca/2011_Senior/pinces/indexeur.CATProduct and b/meca/2011_Senior/pinces/indexeur.CATProduct differ diff --git a/meca/2011_Senior/pinces/pince_bas.CATPart b/meca/2011_Senior/pinces/pince_bas.CATPart index 5161b7b..003f2ab 100644 Binary files a/meca/2011_Senior/pinces/pince_bas.CATPart and b/meca/2011_Senior/pinces/pince_bas.CATPart differ diff --git a/meca/2011_Senior/pinces/pince_haut_droit.CATPart b/meca/2011_Senior/pinces/pince_haut_droit.CATPart index 358317e..58e67bb 100644 Binary files a/meca/2011_Senior/pinces/pince_haut_droit.CATPart and b/meca/2011_Senior/pinces/pince_haut_droit.CATPart differ diff --git a/meca/2011_Senior/pinces/pince_haut_gauche.CATPart b/meca/2011_Senior/pinces/pince_haut_gauche.CATPart index e8acc78..20f8178 100644 Binary files a/meca/2011_Senior/pinces/pince_haut_gauche.CATPart and b/meca/2011_Senior/pinces/pince_haut_gauche.CATPart differ diff --git a/meca/2011_Senior/robot.CATProduct b/meca/2011_Senior/robot.CATProduct index 3fe9613..237726b 100644 Binary files a/meca/2011_Senior/robot.CATProduct and b/meca/2011_Senior/robot.CATProduct differ diff --git a/me |
From: Jérémie D. <Ba...@us...> - 2011-04-17 16:25:42
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 886d5df77b2a6cdabceaa6d82319a6e656cee2b9 (commit) from ef0c23665393de15b54be73047a9d65214d3c23d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 886d5df77b2a6cdabceaa6d82319a6e656cee2b9 Author: Jérémie Dimino <je...@di...> Date: Sun Apr 17 18:25:12 2011 +0200 [info] keep the origin while moving ----------------------------------------------------------------------- Changes: diff --git a/info/control2011/src/interfaces/krobot_interface_planner.obus b/info/control2011/src/interfaces/krobot_interface_planner.obus index 06c722a..ac8f5d7 100644 --- a/info/control2011/src/interfaces/krobot_interface_planner.obus +++ b/info/control2011/src/interfaces/krobot_interface_planner.obus @@ -10,6 +10,9 @@ (** Interface for the planner. *) interface fr.krobot.Planner { + property_r origin : ((double * double) * (double * double)) + (** The origin of the trajectory, with the initial vector. *) + property_rw vertices : (double * double) array (** Property holding the current list of vertices for the planned trajectory. *) diff --git a/info/control2011/src/lib/krobot_planner.ml b/info/control2011/src/lib/krobot_planner.ml index 918b836..c1fc2d1 100644 --- a/info/control2011/src/lib/krobot_planner.ml +++ b/info/control2011/src/lib/krobot_planner.ml @@ -17,6 +17,11 @@ type t = Krobot_bus.t let proxy bus = OBus_proxy.make (OBus_peer.make (Krobot_bus.to_bus bus) "fr.krobot.Service.Planner") ["fr"; "krobot"; "Planner"] +let origin bus = + OBus_property.map_r + (fun ((x, y), (vx, vy)) -> ({ x; y }, ({ vx; vy }))) + (OBus_property.make p_origin (proxy bus)) + let vertices bus = OBus_property.map_rw (List.map (fun (x, y) -> { x; y })) diff --git a/info/control2011/src/lib/krobot_planner.mli b/info/control2011/src/lib/krobot_planner.mli index 2287ee7..077956e 100644 --- a/info/control2011/src/lib/krobot_planner.mli +++ b/info/control2011/src/lib/krobot_planner.mli @@ -10,6 +10,9 @@ type t = Krobot_bus.t (** Type of the planner. *) +val origin : t -> (Krobot_geom.vertice * Krobot_geom.vector, [ `readable ]) OBus_property.t + (** The origin of the trajectory. *) + val vertices : t -> (Krobot_geom.vertice list, [ `readable | `writable ]) OBus_property.t (** The property holding the current trajectory. *) diff --git a/info/control2011/src/services/krobot_service_planner.ml b/info/control2011/src/services/krobot_service_planner.ml index 3626e0d..cdda7e5 100644 --- a/info/control2011/src/services/krobot_service_planner.ml +++ b/info/control2011/src/services/krobot_service_planner.ml @@ -39,6 +39,14 @@ type planner = { obus : planner OBus_object.t; (* The D-Bus object attached to this planner. *) + origin : (vertice * vector) signal; + (* If the robot is moving, this is the origin of the current + trajectory with the initial direction vector, otherwise it is the + current position with the current direction vector. *) + + set_origin : (vertice * vector) -> unit; + (* Set the origin of the trajectory. *) + vertices : vertice list signal; (* The list of vertices for the trajectory. *) @@ -155,6 +163,9 @@ let go planner rotation_speed rotation_acceleration moving_speed moving_accelera (match S.value planner.vertices with | _ :: l -> planner.set_vertices l | [] -> ()); + planner.set_origin (planner.position, + { vx = cos planner.orientation; + vy = sin planner.orientation }); loop () end else @@ -188,6 +199,9 @@ let create bus = OBus_object.make ~interfaces:[ Krobot_interface_planner.Fr_krobot_Planner.make { + p_origin = + (fun obj -> + S.map (fun ({ x; y }, { vx; vy }) -> ((x, y), (vx, vy))) (OBus_object.get obj).origin); p_vertices = ((fun obj -> S.map (List.map (fun { x; y } -> (x, y))) (OBus_object.get obj).vertices), @@ -215,11 +229,14 @@ let create bus = ] ["fr"; "krobot"; "Planner"] in + let origin, set_origin = S.create ({ x = 0.; y = 0. }, { vx = 1.; vy = 0. }) in let vertices, set_vertices = S.create [] in let moving, set_moving = S.create false in let planner = { bus; obus = obus_object; + origin; + set_origin; vertices; set_vertices; moving; @@ -238,7 +255,11 @@ let create bus = match frame with | Odometry(x, y, theta) -> planner.position <- { x; y }; - planner.orientation <- math_mod_float theta (2. *. pi) + planner.orientation <- math_mod_float theta (2. *. pi); + if not (S.value planner.moving) then + planner.set_origin (planner.position, + { vx = cos planner.orientation; + vy = sin planner.orientation }) | Motor_status(m1, m2, m3, m4) -> planner.motors_moving <- m1 || m2 | _ -> diff --git a/info/control2011/src/tools/krobot_viewer.ml b/info/control2011/src/tools/krobot_viewer.ml index 1739473..dc3ce69 100644 --- a/info/control2011/src/tools/krobot_viewer.ml +++ b/info/control2011/src/tools/krobot_viewer.ml @@ -208,6 +208,9 @@ module Board = struct mutable beacon : beacon; (* The state of the beacon. *) + origin : (vertice * vector) signal; + (* The origin of the trajectory. *) + vertices : vertice list signal; (* The current trajectory. *) @@ -415,9 +418,11 @@ module Board = struct Cairo.stroke ctx end; + let o, v = S.value board.origin in + (* Draw points. *) Cairo.set_source_rgb ctx 255. 255. 0.; - Cairo.move_to ctx board.state.pos.x board.state.pos.y; + Cairo.move_to ctx o.x o.y; List.iter (fun { x; y } -> Cairo.line_to ctx x y) (S.value board.vertices); Cairo.stroke ctx; @@ -432,9 +437,7 @@ module Board = struct Cairo.line_to ctx x y done; Cairo.stroke ctx) - { vx = cos board.state.theta; vy = sin board.state.theta } - (board.state.pos :: S.value board.vertices) - (); + v (o :: S.value board.vertices) (); let ctx = Cairo_lablgtk.create board.ui#scene#misc#window in Cairo.set_source_surface ctx surface 0. 0.; @@ -467,61 +470,9 @@ module Board = struct let tolerance = board.ui#tolerance#adjustment#value in ignore_result (Krobot_planner.simplify board.bus tolerance) -(* let bezier_vertices q r v1 v2 = - (* Create the bezier curve. *) - let curve = Bezier.of_vertices q (translate q v1) (translate r v2) r in - - (* Create vertices. *) - let vertices = Array.create 101 origin in - for i = 0 to 100 do - vertices.(i) <- Bezier.vertice curve (float i /. 100.) - done; - - vertices - in - - (* Compute cubic bezier curves. *) - let rec loop = function - | p :: (q :: r :: s :: _ as rest) -> - (* Computes tangents with a length that is half of the - minimum length of the adjacent segments. *) - let _, v1 = tangents p q r and v2, _ = tangents q r s in - let v1 = v1 *| (min (distance p q) (distance q r) /. 2.) - and v2 = v2 *| (min (distance q r) (distance r s) /. 2.) in - bezier_vertices q r v1 v2 :: loop rest - | [p; q; r] -> - let _, v1 = tangents p q r and v2 = vector r q /| distance q r in - let v1 = v1 *| (min (distance p q) (distance q r) /. 2.) - and v2 = v2 *| (distance q r /. 2.) in - [bezier_vertices q r v1 v2] - | _ -> - [] - in - begin - match board.points with - | r :: s :: _ -> - let q = board.state.pos in - let v1 = { vx = cos board.state.theta; vy = sin board.state.theta } - and v2, _ = tangents q r s in - let v1 = v1 *| (distance q r /. 2.) - and v2 = v2 *| (distance q r /. 2.) in - board.bezier <- bezier_vertices q r v1 v2 :: loop (q :: board.points); - | [r] -> - let q = board.state.pos in - let v1 = { vx = cos board.state.theta; vy = sin board.state.theta } - and v2 = vector r q /| distance q r in - let v1 = v1 *| (distance q r /. 2.) - and v2 = v2 *| (distance q r /. 2.) in - board.bezier <- bezier_vertices q r v1 v2 :: loop (q :: board.points); - | [] -> - board.bezier <- [] - end; - - queue_draw board -*) - let create bus ui = - lwt vertices = OBus_property.monitor (Krobot_planner.vertices bus) in + lwt origin = OBus_property.monitor (Krobot_planner.origin bus) + and vertices = OBus_property.monitor (Krobot_planner.vertices bus) in let board ={ bus; ui; @@ -531,6 +482,7 @@ module Board = struct theta = -0.5 *. pi }; beacon = { xbeacon = 1.; ybeacon = 1.; valid = false }; + origin; vertices; events = []; statusbar_context = ui#statusbar#new_context ""; hooks/post-receive -- krobot |
From: Jérémie D. <Ba...@us...> - 2011-04-17 15:41:30
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via ef0c23665393de15b54be73047a9d65214d3c23d (commit) from ad5a9e70c21e576b4d4fc3b9187bd134fba5982b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit ef0c23665393de15b54be73047a9d65214d3c23d Author: Jérémie Dimino <je...@di...> Date: Sun Apr 17 17:40:13 2011 +0200 [krobot_viewer] show bezier curves ----------------------------------------------------------------------- Changes: diff --git a/info/control2011/src/lib/krobot_geom.ml b/info/control2011/src/lib/krobot_geom.ml index 28178d6..34bf8a6 100644 --- a/info/control2011/src/lib/krobot_geom.ml +++ b/info/control2011/src/lib/krobot_geom.ml @@ -132,4 +132,45 @@ module Bezier = struct let t2 = t1 *. t in let t3 = t2 *. t in translate origin ((b.a *| t3) +| (b.b *| t2) +| (b.c *| t1) +| b.p) + + let fold_curves f initial vertices acc = + let add_curve q r v1 v2 acc = + (* Create the bezier curve. *) + let curve = of_vertices q (translate q v1) (translate r v2) r in + + f curve acc + in + + (* Compute cubic bezier curves. *) + let rec loop acc = function + | p :: (q :: r :: s :: _ as rest) -> + (* Computes tangents with a length that is half of the + minimum length of the adjacent segments. *) + let _, v1 = tangents p q r and v2, _ = tangents q r s in + let v1 = v1 *| (min (distance p q) (distance q r) /. 2.) + and v2 = v2 *| (min (distance q r) (distance r s) /. 2.) in + loop (add_curve q r v1 v2 acc) rest + | [p; q; r] -> + let _, v1 = tangents p q r and v2 = vector r q /| distance q r in + let v1 = v1 *| (min (distance p q) (distance q r) /. 2.) + and v2 = v2 *| (distance q r /. 2.) in + add_curve q r v1 v2 acc + | _ -> + acc + in + match vertices with + | q :: r :: s :: _ -> + let v1 = initial + and v2, _ = tangents q r s in + let v1 = v1 *| (distance q r /. 2.) + and v2 = v2 *| (distance q r /. 2.) in + loop (add_curve q r v1 v2 acc) vertices + | [q; r] -> + let v1 = initial + and v2 = vector r q /| distance q r in + let v1 = v1 *| (distance q r /. 2.) + and v2 = v2 *| (distance q r /. 2.) in + add_curve q r v1 v2 acc + | [_] | [] -> + acc end diff --git a/info/control2011/src/lib/krobot_geom.mli b/info/control2011/src/lib/krobot_geom.mli index ddeabbf..2226508 100644 --- a/info/control2011/src/lib/krobot_geom.mli +++ b/info/control2011/src/lib/krobot_geom.mli @@ -63,4 +63,9 @@ module Bezier : sig val vertice : curve -> float -> vertice (** [vertice curve u] returns the vertice on the given curve for the given paramter [u] which must be in the range [0..1]. *) + + val fold_curves : (curve -> 'a -> 'a) -> vector -> vertice list -> 'a -> 'a + (** [fold_curves f vector vertices acc] folds [f] over the curve + passing through the given list of vertices. [vector] is the + initial direction vector. *) end diff --git a/info/control2011/src/tools/krobot_viewer.ml b/info/control2011/src/tools/krobot_viewer.ml index f46bcce..1739473 100644 --- a/info/control2011/src/tools/krobot_viewer.ml +++ b/info/control2011/src/tools/krobot_viewer.ml @@ -420,11 +420,21 @@ module Board = struct Cairo.move_to ctx board.state.pos.x board.state.pos.y; List.iter (fun { x; y } -> Cairo.line_to ctx x y) (S.value board.vertices); Cairo.stroke ctx; -(* + + (* Draw bezier curves. *) Cairo.set_source_rgb ctx 255. 0. 255.; - List.iter (Array.iter (fun { x; y } -> Cairo.line_to ctx x y)) board.bezier; - Cairo.stroke ctx; -*) + Bezier.fold_curves + (fun curve () -> + let { x; y } = Bezier.vertice curve 0. in + Cairo.move_to ctx x y; + for i = 1 to 100 do + let { x; y } = Bezier.vertice curve (float i /. 100.) in + Cairo.line_to ctx x y + done; + Cairo.stroke ctx) + { vx = cos board.state.theta; vy = sin board.state.theta } + (board.state.pos :: S.value board.vertices) + (); let ctx = Cairo_lablgtk.create board.ui#scene#misc#window in Cairo.set_source_surface ctx surface 0. 0.; hooks/post-receive -- krobot |
From: Benjamin A. <Ba...@us...> - 2011-04-15 01:12:25
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via ad5a9e70c21e576b4d4fc3b9187bd134fba5982b (commit) via cc4707fdecd09d1f3ea901873f1611b17bf70b8d (commit) via 8eb0d9cde9bddfbe8018aa064bca629520115aad (commit) from 2ea0136103507eaf514c748e5f9366496ca42b28 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit ad5a9e70c21e576b4d4fc3b9187bd134fba5982b Merge: cc4707fdecd09d1f3ea901873f1611b17bf70b8d 2ea0136103507eaf514c748e5f9366496ca42b28 Author: Benjamin Aupetit <au...@cr...> Date: Fri Apr 15 03:11:45 2011 +0200 Merge branch 'master' of ssh://krobot.git.sourceforge.net/gitroot/krobot/krobot commit cc4707fdecd09d1f3ea901873f1611b17bf70b8d Author: Benjamin Aupetit <au...@cr...> Date: Fri Apr 15 03:09:36 2011 +0200 [meca] Second floor (draft version) commit 8eb0d9cde9bddfbe8018aa064bca629520115aad Author: Benjamin Aupetit <au...@cr...> Date: Fri Apr 15 03:02:54 2011 +0200 [meca] Opponent detection First modeled version of the opponent detection system, by Nicolas Dandrimont ----------------------------------------------------------------------- Changes: diff --git a/meca/2011_Senior/Etage_3.CATProduct b/meca/2011_Senior/Etage_3.CATProduct new file mode 100644 index 0000000..2045a4d Binary files /dev/null and b/meca/2011_Senior/Etage_3.CATProduct differ diff --git a/meca/2011_Senior/SupportMiroir/Ecrou Gros Pignon.CATPart b/meca/2011_Senior/SupportMiroir/Ecrou Gros Pignon.CATPart new file mode 100644 index 0000000..1ff7e78 Binary files /dev/null and b/meca/2011_Senior/SupportMiroir/Ecrou Gros Pignon.CATPart differ diff --git a/meca/2011_Senior/SupportMiroir/Gros Pignon.CATPart b/meca/2011_Senior/SupportMiroir/Gros Pignon.CATPart new file mode 100644 index 0000000..ee6b2a6 Binary files /dev/null and b/meca/2011_Senior/SupportMiroir/Gros Pignon.CATPart differ diff --git a/meca/2011_Senior/SupportMiroir/Mat_Balise.CATProduct b/meca/2011_Senior/SupportMiroir/Mat_Balise.CATProduct new file mode 100644 index 0000000..e9dbbb1 Binary files /dev/null and b/meca/2011_Senior/SupportMiroir/Mat_Balise.CATProduct differ diff --git a/meca/2011_Senior/SupportMiroir/Maxon_2326.936-22.111-028.CATPart b/meca/2011_Senior/SupportMiroir/Maxon_2326.936-22.111-028.CATPart new file mode 100644 index 0000000..b0c3989 Binary files /dev/null and b/meca/2011_Senior/SupportMiroir/Maxon_2326.936-22.111-028.CATPart differ diff --git a/meca/2011_Senior/SupportMiroir/Miroir.CATPart b/meca/2011_Senior/SupportMiroir/Miroir.CATPart new file mode 100644 index 0000000..9cb13de Binary files /dev/null and b/meca/2011_Senior/SupportMiroir/Miroir.CATPart differ diff --git a/meca/2011_Senior/SupportMiroir/Omron E3Z-R61.CATPart b/meca/2011_Senior/SupportMiroir/Omron E3Z-R61.CATPart new file mode 100644 index 0000000..2281d9e Binary files /dev/null and b/meca/2011_Senior/SupportMiroir/Omron E3Z-R61.CATPart differ diff --git a/meca/2011_Senior/SupportMiroir/Rondelle Gros Pignon.CATPart b/meca/2011_Senior/SupportMiroir/Rondelle Gros Pignon.CATPart new file mode 100644 index 0000000..af6f601 Binary files /dev/null and b/meca/2011_Senior/SupportMiroir/Rondelle Gros Pignon.CATPart differ diff --git a/meca/2011_Senior/SupportMiroir/Soutien_Omron.CATPart b/meca/2011_Senior/SupportMiroir/Soutien_Omron.CATPart new file mode 100644 index 0000000..b2f904c Binary files /dev/null and b/meca/2011_Senior/SupportMiroir/Soutien_Omron.CATPart differ diff --git a/meca/2011_Senior/SupportMiroir/Support Adverse.CATPart b/meca/2011_Senior/SupportMiroir/Support Adverse.CATPart new file mode 100644 index 0000000..41076dc Binary files /dev/null and b/meca/2011_Senior/SupportMiroir/Support Adverse.CATPart differ diff --git a/meca/2011_Senior/SupportMiroir/Support Base.CATPart b/meca/2011_Senior/SupportMiroir/Support Base.CATPart new file mode 100644 index 0000000..bcc2a92 Binary files /dev/null and b/meca/2011_Senior/SupportMiroir/Support Base.CATPart differ diff --git a/meca/2011_Senior/SupportMiroir/Support_Assemble.CATProduct b/meca/2011_Senior/SupportMiroir/Support_Assemble.CATProduct new file mode 100644 index 0000000..1839bda Binary files /dev/null and b/meca/2011_Senior/SupportMiroir/Support_Assemble.CATProduct differ diff --git a/meca/2011_Senior/SupportMiroir/Support_Maxon.CATPart b/meca/2011_Senior/SupportMiroir/Support_Maxon.CATPart new file mode 100644 index 0000000..7a4dfea Binary files /dev/null and b/meca/2011_Senior/SupportMiroir/Support_Maxon.CATPart differ diff --git a/meca/2011_Senior/SupportMiroir/Support_Miroir.CATPart b/meca/2011_Senior/SupportMiroir/Support_Miroir.CATPart new file mode 100644 index 0000000..88d5028 Binary files /dev/null and b/meca/2011_Senior/SupportMiroir/Support_Miroir.CATPart differ diff --git a/meca/2011_Senior/SupportMiroir/Vis Gros Pignon.CATPart b/meca/2011_Senior/SupportMiroir/Vis Gros Pignon.CATPart new file mode 100644 index 0000000..d64ba46 Binary files /dev/null and b/meca/2011_Senior/SupportMiroir/Vis Gros Pignon.CATPart differ diff --git a/meca/2011_Senior/SupportMiroir/Vis tete bombee hexa M3x6.CATPart b/meca/2011_Senior/SupportMiroir/Vis tete bombee hexa M3x6.CATPart new file mode 100644 index 0000000..b921047 Binary files /dev/null and b/meca/2011_Senior/SupportMiroir/Vis tete bombee hexa M3x6.CATPart differ diff --git a/meca/2011_Senior/SupportMiroir/Vis tete fraisee plate M2x4.CATPart b/meca/2011_Senior/SupportMiroir/Vis tete fraisee plate M2x4.CATPart new file mode 100644 index 0000000..55a9198 Binary files /dev/null and b/meca/2011_Senior/SupportMiroir/Vis tete fraisee plate M2x4.CATPart differ diff --git a/meca/2011_Senior/SupportMiroir/Vis tete fraisee pozi M2.5x4.CATPart b/meca/2011_Senior/SupportMiroir/Vis tete fraisee pozi M2.5x4.CATPart new file mode 100644 index 0000000..974c5f2 Binary files /dev/null and b/meca/2011_Senior/SupportMiroir/Vis tete fraisee pozi M2.5x4.CATPart differ diff --git a/meca/2011_Senior/SupportMiroir/Vis tete fraisee pozi M2x4.CATPart b/meca/2011_Senior/SupportMiroir/Vis tete fraisee pozi M2x4.CATPart new file mode 100644 index 0000000..2ab6aab Binary files /dev/null and b/meca/2011_Senior/SupportMiroir/Vis tete fraisee pozi M2x4.CATPart differ diff --git a/meca/2011_Senior/Vis/attache.CATProduct b/meca/2011_Senior/Vis/attache.CATProduct index de8e469..47fb4ad 100644 Binary files a/meca/2011_Senior/Vis/attache.CATProduct and b/meca/2011_Senior/Vis/attache.CATProduct differ diff --git a/meca/2011_Senior/Vis/serrage.CATProduct b/meca/2011_Senior/Vis/serrage.CATProduct index d7b4cfd..96aae00 100644 Binary files a/meca/2011_Senior/Vis/serrage.CATProduct and b/meca/2011_Senior/Vis/serrage.CATProduct differ diff --git a/meca/2011_Senior/ascenceurs/Ascenseur_axe_chapeau.CATPart b/meca/2011_Senior/ascenceurs/Ascenseur_axe_chapeau.CATPart index 2b5fd9e..1a5459b 100644 Binary files a/meca/2011_Senior/ascenceurs/Ascenseur_axe_chapeau.CATPart and b/meca/2011_Senior/ascenceurs/Ascenseur_axe_chapeau.CATPart differ diff --git a/meca/2011_Senior/ascenceurs/Ascenseur_axe_douille.CATPart b/meca/2011_Senior/ascenceurs/Ascenseur_axe_douille.CATPart index 64fc27f..a670395 100644 Binary files a/meca/2011_Senior/ascenceurs/Ascenseur_axe_douille.CATPart and b/meca/2011_Senior/ascenceurs/Ascenseur_axe_douille.CATPart differ diff --git a/meca/2011_Senior/ascenceurs/Poulie_bas_avec_support.CATProduct b/meca/2011_Senior/ascenceurs/Poulie_bas_avec_support.CATProduct index f47bbea..822738c 100644 Binary files a/meca/2011_Senior/ascenceurs/Poulie_bas_avec_support.CATProduct and b/meca/2011_Senior/ascenceurs/Poulie_bas_avec_support.CATProduct differ diff --git a/meca/2011_Senior/ascenceurs/ascenseur.CATProduct b/meca/2011_Senior/ascenceurs/ascenseur.CATProduct index 1ce1a22..3882be5 100644 Binary files a/meca/2011_Senior/ascenceurs/ascenseur.CATProduct and b/meca/2011_Senior/ascenceurs/ascenseur.CATProduct differ diff --git a/meca/2011_Senior/ascenceurs/attache-pince.CATProduct b/meca/2011_Senior/ascenceurs/attache-pince.CATProduct index e600d96..da62b6b 100644 Binary files a/meca/2011_Senior/ascenceurs/attache-pince.CATProduct and b/meca/2011_Senior/ascenceurs/attache-pince.CATProduct differ diff --git a/meca/2011_Senior/ascenceurs/serre-courroie-serrage-element.CATProduct b/meca/2011_Senior/ascenceurs/serre-courroie-serrage-element.CATProduct index d15003f..a647483 100644 Binary files a/meca/2011_Senior/ascenceurs/serre-courroie-serrage-element.CATProduct and b/meca/2011_Senior/ascenceurs/serre-courroie-serrage-element.CATProduct differ diff --git a/meca/2011_Senior/ascenceurs/serre-courroie-serrage.CATProduct b/meca/2011_Senior/ascenceurs/serre-courroie-serrage.CATProduct index 728ac72..93a465d 100644 Binary files a/meca/2011_Senior/ascenceurs/serre-courroie-serrage.CATProduct and b/meca/2011_Senior/ascenceurs/serre-courroie-serrage.CATProduct differ diff --git a/meca/2011_Senior/ascenceurs/serre-douille.CATProduct b/meca/2011_Senior/ascenceurs/serre-douille.CATProduct index 33200f8..e817a11 100644 Binary files a/meca/2011_Senior/ascenceurs/serre-douille.CATProduct and b/meca/2011_Senior/ascenceurs/serre-douille.CATProduct differ diff --git a/meca/2011_Senior/ascenceurs/vis-serre-courroie.CATProduct b/meca/2011_Senior/ascenceurs/vis-serre-courroie.CATProduct index cfc7355..87dc910 100644 Binary files a/meca/2011_Senior/ascenceurs/vis-serre-courroie.CATProduct and b/meca/2011_Senior/ascenceurs/vis-serre-courroie.CATProduct differ diff --git a/meca/2011_Senior/bati/base.CATPart b/meca/2011_Senior/bati/base.CATPart index 7e52e94..25bb4eb 100644 Binary files a/meca/2011_Senior/bati/base.CATPart and b/meca/2011_Senior/bati/base.CATPart differ diff --git a/meca/2011_Senior/bati/plaque2.CATPart b/meca/2011_Senior/bati/plaque2.CATPart index 56f3fd2..679aaaa 100644 Binary files a/meca/2011_Senior/bati/plaque2.CATPart and b/meca/2011_Senior/bati/plaque2.CATPart differ diff --git a/meca/2011_Senior/bati/plaque3.CATPart b/meca/2011_Senior/bati/plaque3.CATPart new file mode 100644 index 0000000..8ba8b21 Binary files /dev/null and b/meca/2011_Senior/bati/plaque3.CATPart differ diff --git a/meca/2011_Senior/bati/plaque4.CATPart b/meca/2011_Senior/bati/plaque4.CATPart new file mode 100644 index 0000000..958bc02 Binary files /dev/null and b/meca/2011_Senior/bati/plaque4.CATPart differ diff --git a/meca/2011_Senior/bati/plaque5.CATPart b/meca/2011_Senior/bati/plaque5.CATPart new file mode 100644 index 0000000..bc66c08 Binary files /dev/null and b/meca/2011_Senior/bati/plaque5.CATPart differ diff --git a/meca/2011_Senior/cartes/AX12 Interface.CATPart b/meca/2011_Senior/cartes/AX12 Interface.CATPart new file mode 100644 index 0000000..4b7d4e9 Binary files /dev/null and b/meca/2011_Senior/cartes/AX12 Interface.CATPart differ diff --git a/meca/2011_Senior/cartes/Alim Pico-ITX.CATPart b/meca/2011_Senior/cartes/Alim Pico-ITX.CATPart new file mode 100644 index 0000000..d3e9d79 Binary files /dev/null and b/meca/2011_Senior/cartes/Alim Pico-ITX.CATPart differ diff --git a/meca/2011_Senior/cartes/Boussole CMP03.CATPart b/meca/2011_Senior/cartes/Boussole CMP03.CATPart new file mode 100644 index 0000000..7e629ab Binary files /dev/null and b/meca/2011_Senior/cartes/Boussole CMP03.CATPart differ diff --git a/meca/2011_Senior/cartes/CarteAsservissement.CATPart b/meca/2011_Senior/cartes/CarteAsservissement.CATPart new file mode 100644 index 0000000..9153359 Binary files /dev/null and b/meca/2011_Senior/cartes/CarteAsservissement.CATPart differ diff --git a/meca/2011_Senior/cartes/H-Bridge.CATPart b/meca/2011_Senior/cartes/H-Bridge.CATPart new file mode 100644 index 0000000..fd8fce3 Binary files /dev/null and b/meca/2011_Senior/cartes/H-Bridge.CATPart differ diff --git a/meca/2011_Senior/cartes/Monitoring batteries.CATPart b/meca/2011_Senior/cartes/Monitoring batteries.CATPart new file mode 100644 index 0000000..f1385f2 Binary files /dev/null and b/meca/2011_Senior/cartes/Monitoring batteries.CATPart differ diff --git a/meca/2011_Senior/cartes/PontH.CATPart b/meca/2011_Senior/cartes/PontH.CATPart new file mode 100644 index 0000000..e968419 Binary files /dev/null and b/meca/2011_Senior/cartes/PontH.CATPart differ diff --git a/meca/2011_Senior/cartes/Proximity Sensor.CATPart b/meca/2011_Senior/cartes/Proximity Sensor.CATPart new file mode 100644 index 0000000..19a2dd4 Binary files /dev/null and b/meca/2011_Senior/cartes/Proximity Sensor.CATPart differ diff --git a/meca/2011_Senior/cartes/Robot Interface.CATPart b/meca/2011_Senior/cartes/Robot Interface.CATPart new file mode 100644 index 0000000..f6950a8 Binary files /dev/null and b/meca/2011_Senior/cartes/Robot Interface.CATPart differ diff --git a/meca/2011_Senior/cartes/SSD.CATPart b/meca/2011_Senior/cartes/SSD.CATPart new file mode 100644 index 0000000..7afb9eb Binary files /dev/null and b/meca/2011_Senior/cartes/SSD.CATPart differ diff --git a/meca/2011_Senior/cartes/VIA EPIA P700-A.CATPart b/meca/2011_Senior/cartes/VIA EPIA P700-A.CATPart new file mode 100644 index 0000000..f845216 Binary files /dev/null and b/meca/2011_Senior/cartes/VIA EPIA P700-A.CATPart differ diff --git a/meca/2011_Senior/cartes/VIA EPIA P700.CATPart b/meca/2011_Senior/cartes/VIA EPIA P700.CATPart new file mode 100644 index 0000000..2332b4c Binary files /dev/null and b/meca/2011_Senior/cartes/VIA EPIA P700.CATPart differ diff --git a/meca/2011_Senior/divers/PackBatteries.CATPart b/meca/2011_Senior/divers/PackBatteries.CATPart new file mode 100644 index 0000000..208f81a Binary files /dev/null and b/meca/2011_Senior/divers/PackBatteries.CATPart differ diff --git a/meca/2011_Senior/divers/galet_axe.CATPart b/meca/2011_Senior/divers/galet_axe.CATPart index e42ee5c..acd55d0 100644 Binary files a/meca/2011_Senior/divers/galet_axe.CATPart and b/meca/2011_Senior/divers/galet_axe.CATPart differ diff --git a/meca/2011_Senior/divers/planlaser.CATPart b/meca/2011_Senior/divers/planlaser.CATPart new file mode 100644 index 0000000..d3d90d2 Binary files /dev/null and b/meca/2011_Senior/divers/planlaser.CATPart differ diff --git a/meca/2011_Senior/divers/planlaser_avec_support.CATProduct b/meca/2011_Senior/divers/planlaser_avec_support.CATProduct index 47b2f4a..5f37771 100644 Binary files a/meca/2011_Senior/divers/planlaser_avec_support.CATProduct and b/meca/2011_Senior/divers/planlaser_avec_support.CATProduct differ diff --git a/meca/2011_Senior/divers/webcam.CATProduct b/meca/2011_Senior/divers/webcam.CATProduct index 227a222..79ecbb9 100644 Binary files a/meca/2011_Senior/divers/webcam.CATProduct and b/meca/2011_Senior/divers/webcam.CATProduct differ diff --git a/meca/2011_Senior/divers/webcam_vue.CATPart b/meca/2011_Senior/divers/webcam_vue.CATPart index c0e7f68..1841a50 100644 Binary files a/meca/2011_Senior/divers/webcam_vue.CATPart and b/meca/2011_Senior/divers/webcam_vue.CATPart differ diff --git a/meca/2011_Senior/etages/Etage_1.CATProduct b/meca/2011_Senior/etages/Etage_1.CATProduct index b1ee597..b04485a 100644 Binary files a/meca/2011_Senior/etages/Etage_1.CATProduct and b/meca/2011_Senior/etages/Etage_1.CATProduct differ diff --git a/meca/2011_Senior/etages/Etage_2.CATProduct b/meca/2011_Senior/etages/Etage_2.CATProduct new file mode 100644 index 0000000..905282e Binary files /dev/null and b/meca/2011_Senior/etages/Etage_2.CATProduct differ diff --git a/meca/2011_Senior/etages/Etage_3.CATProduct b/meca/2011_Senior/etages/Etage_3.CATProduct new file mode 100644 index 0000000..5d0bdd9 Binary files /dev/null and b/meca/2011_Senior/etages/Etage_3.CATProduct differ diff --git a/meca/2011_Senior/etages/entretoise-etage3.CATProduct b/meca/2011_Senior/etages/entretoise-etage3.CATProduct new file mode 100644 index 0000000..9b749b1 Binary files /dev/null and b/meca/2011_Senior/etages/entretoise-etage3.CATProduct differ diff --git a/meca/2011_Senior/etages/etage1/axes.CATProduct b/meca/2011_Senior/etages/etage1/axes.CATProduct index 6d6afbe..5a0ad27 100644 Binary files a/meca/2011_Senior/etages/etage1/axes.CATProduct and b/meca/2011_Senior/etages/etage1/axes.CATProduct differ diff --git a/meca/2011_Senior/etages/etage1/bloc_moteur.CATProduct b/meca/2011_Senior/etages/etage1/bloc_moteur.CATProduct index 59cb6bb..a9ae498 100644 Binary files a/meca/2011_Senior/etages/etage1/bloc_moteur.CATProduct and b/meca/2011_Senior/etages/etage1/bloc_moteur.CATProduct differ diff --git a/meca/2011_Senior/etages/etage1/cartes_etage1.CATProduct b/meca/2011_Senior/etages/etage1/cartes_etage1.CATProduct new file mode 100644 index 0000000..5846b14 Binary files /dev/null and b/meca/2011_Senior/etages/etage1/cartes_etage1.CATProduct differ diff --git a/meca/2011_Senior/etages/etage1/entretoise-etage.CATProduct b/meca/2011_Senior/etages/etage1/entretoise-etage.CATProduct new file mode 100644 index 0000000..ba32514 Binary files /dev/null and b/meca/2011_Senior/etages/etage1/entretoise-etage.CATProduct differ diff --git a/meca/2011_Senior/etages/etage1/entretoises-bloc-moteur.CATProduct b/meca/2011_Senior/etages/etage1/entretoises-bloc-moteur.CATProduct index 7663416..e2bd92c 100644 Binary files a/meca/2011_Senior/etages/etage1/entretoises-bloc-moteur.CATProduct and b/meca/2011_Senior/etages/etage1/entretoises-bloc-moteur.CATProduct differ diff --git a/meca/2011_Senior/etages/etage1/entretoises-etage.CATProduct b/meca/2011_Senior/etages/etage1/entretoises-etage.CATProduct new file mode 100644 index 0000000..0d80d4b Binary files /dev/null and b/meca/2011_Senior/etages/etage1/entretoises-etage.CATProduct differ diff --git a/meca/2011_Senior/etages/etage1/galets.CATProduct b/meca/2011_Senior/etages/etage1/galets.CATProduct index 3c0cfe2..53f31dc 100644 Binary files a/meca/2011_Senior/etages/etage1/galets.CATProduct and b/meca/2011_Senior/etages/etage1/galets.CATProduct differ diff --git a/meca/2011_Senior/etages/etage1/visserie.CATProduct b/meca/2011_Senior/etages/etage1/visserie.CATProduct index 5983e14..ceaeb7e 100644 Binary files a/meca/2011_Senior/etages/etage1/visserie.CATProduct and b/meca/2011_Senior/etages/etage1/visserie.CATProduct differ diff --git a/meca/2011_Senior/etages/etage2/entretoise-et2.CATProduct b/meca/2011_Senior/etages/etage2/entretoise-et2.CATProduct new file mode 100644 index 0000000..2d4eb0a Binary files /dev/null and b/meca/2011_Senior/etages/etage2/entretoise-et2.CATProduct differ diff --git a/meca/2011_Senior/etages/etage2/entretoise-etage2.CATProduct b/meca/2011_Senior/etages/etage2/entretoise-etage2.CATProduct new file mode 100644 index 0000000..20b378b Binary files /dev/null and b/meca/2011_Senior/etages/etage2/entretoise-etage2.CATProduct differ diff --git a/meca/2011_Senior/pinces/AX12.CATProduct b/meca/2011_Senior/pinces/AX12.CATProduct index 80d7627..b3bd9a8 100644 Binary files a/meca/2011_Senior/pinces/AX12.CATProduct and b/meca/2011_Senior/pinces/AX12.CATProduct differ diff --git a/meca/2011_Senior/pinces/Pince_droite_bas.CATProduct b/meca/2011_Senior/pinces/Pince_droite_bas.CATProduct index 1dfdce3..c9f1d65 100644 Binary files a/meca/2011_Senior/pinces/Pince_droite_bas.CATProduct and b/meca/2011_Senior/pinces/Pince_droite_bas.CATProduct differ diff --git a/meca/2011_Senior/pinces/Pince_droite_haut.CATProduct b/meca/2011_Senior/pinces/Pince_droite_haut.CATProduct index 7dbfef5..6ac1fd2 100644 Binary files a/meca/2011_Senior/pinces/Pince_droite_haut.CATProduct and b/meca/2011_Senior/pinces/Pince_droite_haut.CATProduct differ diff --git a/meca/2011_Senior/pinces/Pince_gauche_bas.CATProduct b/meca/2011_Senior/pinces/Pince_gauche_bas.CATProduct index 4b5bafc..4b84044 100644 Binary files a/meca/2011_Senior/pinces/Pince_gauche_bas.CATProduct and b/meca/2011_Senior/pinces/Pince_gauche_bas.CATProduct differ diff --git a/meca/2011_Senior/pinces/Pince_gauche_haut.CATProduct b/meca/2011_Senior/pinces/Pince_gauche_haut.CATProduct index a2bb648..9d1b6cd 100644 Binary files a/meca/2011_Senior/pinces/Pince_gauche_haut.CATProduct and b/meca/2011_Senior/pinces/Pince_gauche_haut.CATProduct differ diff --git a/meca/2011_Senior/pinces/indexeur.CATProduct b/meca/2011_Senior/pinces/indexeur.CATProduct index d177b78..c8a7723 100644 Binary files a/meca/2011_Senior/pinces/indexeur.CATProduct and b/meca/2011_Senior/pinces/indexeur.CATProduct differ diff --git a/meca/2011_Senior/robot.CATProduct b/meca/2011_Senior/robot.CATProduct new file mode 100644 index 0000000..3fe9613 Binary files /dev/null and b/meca/2011_Senior/robot.CATProduct differ diff --git a/meca/2011_Senior/roues/Bloc_roue.CATProduct b/meca/2011_Senior/roues/Bloc_roue.CATProduct index c4cb090..10561cf 100644 Binary files a/meca/2011_Senior/roues/Bloc_roue.CATProduct and b/meca/2011_Senior/roues/Bloc_roue.CATProduct differ diff --git a/meca/2011_Senior/roues/GuideCodeur-bloc.CATPart b/meca/2011_Senior/roues/GuideCodeur-bloc.CATPart index 98607ee..26de3de 100644 Binary files a/meca/2011_Senior/roues/GuideCodeur-bloc.CATPart and b/meca/2011_Senior/roues/GuideCodeur-bloc.CATPart differ diff --git a/meca/2011_Senior/roues/Support.CATPart b/meca/2011_Senior/roues/Support.CATPart index 1755f91..cf0b1a6 100644 Binary files a/meca/2011_Senior/roues/Support.CATPart and b/meca/2011_Senior/roues/Support.CATPart differ diff --git a/meca/2011_Senior/roues/bille.CATProduct b/meca/2011_Senior/roues/bille.CATProduct index 8a78c12..96e3662 100644 Binary files a/meca/2011_Senior/roues/bille.CATProduct and b/meca/2011_Senior/roues/bille.CATProduct differ hooks/post-receive -- krobot |
From: Nicolas D. <Ba...@us...> - 2011-04-13 13:10:59
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 2ea0136103507eaf514c748e5f9366496ca42b28 (commit) via f4c9d45d3f8fab3f1d3fc4353d22772d57f8515d (commit) via c6c16ad06692621a2393a638352b5d840ff5df45 (commit) from c6ae35bf3d2cdae0486c1515706d70e85913070b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2ea0136103507eaf514c748e5f9366496ca42b28 Author: Nicolas Dandrimont <Nic...@cr...> Date: Wed Apr 13 01:04:00 2011 +0200 [krobot_viewer] UI overhaul commit f4c9d45d3f8fab3f1d3fc4353d22772d57f8515d Author: Nicolas Dandrimont <Nic...@cr...> Date: Wed Apr 13 15:09:59 2011 +0200 [krobot_planner] Fix typo commit c6c16ad06692621a2393a638352b5d840ff5df45 Author: Nicolas Dandrimont <Nic...@cr...> Date: Wed Apr 13 14:16:39 2011 +0200 [krobot_simulator] Use the differential drive convention for motor status messages ----------------------------------------------------------------------- Changes: diff --git a/info/control2011/src/services/krobot_service_planner.ml b/info/control2011/src/services/krobot_service_planner.ml index 4506831..3626e0d 100644 --- a/info/control2011/src/services/krobot_service_planner.ml +++ b/info/control2011/src/services/krobot_service_planner.ml @@ -135,7 +135,7 @@ let go planner rotation_speed rotation_acceleration moving_speed moving_accelera if x >= radius && x <= world_width -. radius && y >= radius && y <= world_height -. radius then begin (* Turn the robot. *) let alpha = math_mod_float (atan2 (y -. planner.position.y) (x -. planner.position.x) -. planner.orientation) (2. *. pi) in - lwt () = Lwt_log.info_f "turning by %f radiants" alpha in + lwt () = Lwt_log.info_f "turning by %f radians" alpha in lwt () = Krobot_message.send planner.bus (Unix.gettimeofday (), Motor_turn(alpha, rotation_speed, diff --git a/info/control2011/src/tools/krobot_simulator.ml b/info/control2011/src/tools/krobot_simulator.ml index d0f31d7..cce3773 100644 --- a/info/control2011/src/tools/krobot_simulator.ml +++ b/info/control2011/src/tools/krobot_simulator.ml @@ -225,8 +225,15 @@ lwt () = sim.command <- Idle; return () | Req_motor_status -> - let moving = sim.command <> Idle in - Krobot_message.send bus (Unix.gettimeofday (), Motor_status(moving, moving, false, false)) + begin + match sim.command with + | Turn(a, b) -> + Krobot_message.send bus (Unix.gettimeofday (), Motor_status(false, true, false, false)) + | Move(a, b) -> + Krobot_message.send bus (Unix.gettimeofday (), Motor_status(true, false, false, false)) + | _ -> + Krobot_message.send bus (Unix.gettimeofday (), Motor_status(false, false, false, false)) + end | Set_odometry(x, y, theta) -> sim.state <- { x; y; theta }; return () diff --git a/info/control2011/src/tools/krobot_viewer.ml b/info/control2011/src/tools/krobot_viewer.ml index 9b30a63..f46bcce 100644 --- a/info/control2011/src/tools/krobot_viewer.ml +++ b/info/control2011/src/tools/krobot_viewer.ml @@ -199,6 +199,9 @@ module Board = struct ui : Krobot_viewer_ui.window; (* The UI of the board. *) + statusbar_context : GMisc.statusbar_context; + (* The context of the statusbar. *) + mutable state : state; (* The state of the robot. *) @@ -520,11 +523,13 @@ module Board = struct beacon = { xbeacon = 1.; ybeacon = 1.; valid = false }; vertices; events = []; + statusbar_context = ui#statusbar#new_context ""; } in board.ui#beacon_status#set_text "-"; board.ui#beacon_distance#set_text "-"; board.ui#beacon_angle#set_text "-"; board.ui#beacon_period#set_text "-"; + board.ui#scene_paned#set_position ((board.ui#window#default_width * 5) / 8); queue_draw board; (* Move the robot on the board when we receive odometry informations. *) @@ -544,6 +549,20 @@ module Board = struct queue_draw board end | Motor_status(m1, m2, m3, m4) -> + let moving = m1 || m2 in + if moving then begin + board.statusbar_context#pop (); + let _ = board.statusbar_context#push + (if m1 then + "Moving..." + else + (if m2 then + "Turning..." + else + "") + ) in (); + end else + board.statusbar_context#pop (); board.ui#entry_moving1#set_text (if m1 then "yes" else "no"); board.ui#entry_moving2#set_text (if m2 then "yes" else "no"); board.ui#entry_moving3#set_text (if m3 then "yes" else "no"); diff --git a/info/control2011/src/tools/krobot_viewer_ui.glade b/info/control2011/src/tools/krobot_viewer_ui.glade index c1cf4e5..1643fe5 100644 --- a/info/control2011/src/tools/krobot_viewer_ui.glade +++ b/info/control2011/src/tools/krobot_viewer_ui.glade @@ -178,8 +178,9 @@ </packing> </child> <child> - <widget class="GtkHBox" id="hbox1"> + <widget class="GtkHPaned" id="scene_paned"> <property name="visible">True</property> + <property name="can_focus">True</property> <child> <widget class="GtkDrawingArea" id="scene"> <property name="visible">True</property> @@ -188,17 +189,8 @@ <property name="double_buffered">False</property> </widget> <packing> - <property name="position">0</property> - </packing> - </child> - <child> - <widget class="GtkVSeparator" id="vseparator1"> - <property name="visible">True</property> - <property name="orientation">vertical</property> - </widget> - <packing> - <property name="expand">False</property> - <property name="position">1</property> + <property name="resize">False</property> + <property name="shrink">True</property> </packing> </child> <child> @@ -303,7 +295,7 @@ </packing> </child> <child> - <widget class="GtkHBox" id="hbox13"> + <widget class="GtkHSeparator" id="hseparator1"> <property name="visible">True</property> </widget> <packing> @@ -312,332 +304,437 @@ </packing> </child> <child> - <widget class="GtkHBox" id="hbox2"> + <widget class="GtkExpander" id="position_expander"> <property name="visible">True</property> - </widget> - <packing> - <property name="expand">False</property> - <property name="position">3</property> - </packing> - </child> - <child> - <widget class="GtkHBox" id="hbox12"> - <property name="visible">True</property> - </widget> - <packing> - <property name="expand">False</property> - <property name="position">4</property> - </packing> - </child> - <child> - <widget class="GtkTable" id="table1"> - <property name="visible">True</property> - <property name="n_rows">10</property> - <property name="n_columns">2</property> - <child> - <widget class="GtkSpinButton" id="moving_speed"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="invisible_char">●</property> - <property name="adjustment">0.5 0 2 0.10000000000000001 0 0</property> - <property name="digits">2</property> - <property name="numeric">True</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">6</property> - <property name="bottom_attach">7</property> - <property name="y_options">GTK_FILL</property> - </packing> - </child> - <child> - <widget class="GtkSpinButton" id="moving_acceleration"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="invisible_char">●</property> - <property name="adjustment">1 0 10 0.10000000000000001 0 0</property> - <property name="digits">2</property> - <property name="numeric">True</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">7</property> - <property name="bottom_attach">8</property> - <property name="y_options">GTK_FILL</property> - </packing> - </child> - <child> - <widget class="GtkSpinButton" id="rotation_speed"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="invisible_char">•</property> - <property name="adjustment">0.99999999999999989 0 4 0.10000000000000001 0 0</property> - <property name="digits">2</property> - <property name="numeric">True</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">8</property> - <property name="bottom_attach">9</property> - <property name="y_options">GTK_FILL</property> - </packing> - </child> - <child> - <widget class="GtkSpinButton" id="rotation_acceleration"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="invisible_char">•</property> - <property name="adjustment">2.0000000000000009 0 10 0.10000000000000001 0 0</property> - <property name="digits">2</property> - <property name="numeric">True</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">9</property> - <property name="bottom_attach">10</property> - <property name="y_options">GTK_FILL</property> - </packing> - </child> + <property name="can_focus">True</property> + <property name="expanded">True</property> <child> - <widget class="GtkHBox" id="hbox4"> + <widget class="GtkHBox" id="position_values"> <property name="visible">True</property> + <property name="homogeneous">True</property> <child> - <widget class="GtkLabel" id="label3"> - <property name="visible">True</property> - <property name="label" translatable="yes">Moving speed: </property> - </widget> - <packing> - <property name="expand">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <widget class="GtkAlignment" id="alignment1"> + <widget class="GtkHBox" id="position_x"> <property name="visible">True</property> <child> - <placeholder/> + <widget class="GtkLabel" id="position_x_label"> + <property name="visible">True</property> + <property name="xpad">2</property> + <property name="label" translatable="yes">x</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <widget class="GtkEntry" id="entry_x"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">False</property> + <property name="invisible_char">•</property> + </widget> + <packing> + <property name="position">1</property> + </packing> </child> </widget> <packing> - <property name="position">1</property> - </packing> - </child> - </widget> - <packing> - <property name="top_attach">6</property> - <property name="bottom_attach">7</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options">GTK_FILL</property> - </packing> - </child> - <child> - <widget class="GtkHBox" id="hbox5"> - <property name="visible">True</property> - <child> - <widget class="GtkLabel" id="label4"> - <property name="visible">True</property> - <property name="label" translatable="yes">Moving acceleration: </property> - </widget> - <packing> - <property name="expand">False</property> <property name="position">0</property> </packing> </child> <child> - <widget class="GtkAlignment" id="alignment2"> + <widget class="GtkHBox" id="position_y"> <property name="visible">True</property> <child> - <placeholder/> + <widget class="GtkLabel" id="position_y_label"> + <property name="visible">True</property> + <property name="xpad">2</property> + <property name="label" translatable="yes">y</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <widget class="GtkEntry" id="entry_y"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">False</property> + <property name="invisible_char">•</property> + </widget> + <packing> + <property name="position">1</property> + </packing> </child> </widget> <packing> <property name="position">1</property> </packing> </child> - </widget> - <packing> - <property name="top_attach">7</property> - <property name="bottom_attach">8</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options">GTK_FILL</property> - </packing> - </child> - <child> - <widget class="GtkHBox" id="hbox6"> - <property name="visible">True</property> - <child> - <widget class="GtkLabel" id="label5"> - <property name="visible">True</property> - <property name="label" translatable="yes">Rotation speed: </property> - </widget> - <packing> - <property name="expand">False</property> - <property name="position">0</property> - </packing> - </child> <child> - <widget class="GtkAlignment" id="alignment3"> + <widget class="GtkHBox" id="position_theta"> <property name="visible">True</property> <child> - <placeholder/> + <widget class="GtkLabel" id="position_theta_label"> + <property name="visible">True</property> + <property name="xpad">2</property> + <property name="label" translatable="yes">θ</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <widget class="GtkEntry" id="entry_theta"> + <property name="width_request">1</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">False</property> + <property name="invisible_char">•</property> + </widget> + <packing> + <property name="position">1</property> + </packing> </child> </widget> <packing> - <property name="position">1</property> + <property name="position">2</property> </packing> </child> </widget> - <packing> - <property name="top_attach">8</property> - <property name="bottom_attach">9</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options">GTK_FILL</property> - </packing> </child> <child> - <widget class="GtkHBox" id="hbox7"> + <widget class="GtkLabel" id="position_label"> <property name="visible">True</property> - <child> - <widget class="GtkLabel" id="label6"> - <property name="visible">True</property> - <property name="label" translatable="yes">Rotation acceleration: </property> - </widget> - <packing> - <property name="expand">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <widget class="GtkAlignment" id="alignment4"> - <property name="visible">True</property> - <child> - <placeholder/> - </child> - </widget> - <packing> - <property name="position">1</property> - </packing> - </child> + <property name="label" translatable="yes"><b>Robot position</b></property> + <property name="use_markup">True</property> + <property name="justify">center</property> </widget> <packing> - <property name="top_attach">9</property> - <property name="bottom_attach">10</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options">GTK_FILL</property> + <property name="type">label_item</property> </packing> </child> + </widget> + <packing> + <property name="position">3</property> + </packing> + </child> + <child> + <widget class="GtkHSeparator" id="hseparator2"> + <property name="visible">True</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="position">4</property> + </packing> + </child> + <child> + <widget class="GtkExpander" id="beacon_expander"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="expanded">True</property> <child> - <widget class="GtkHBox" id="hbox8"> + <widget class="GtkHBox" id="beacon_values"> <property name="visible">True</property> + <property name="homogeneous">True</property> <child> - <widget class="GtkLabel" id="label2"> + <widget class="GtkEntry" id="beacon_status"> + <property name="width_request">1</property> <property name="visible">True</property> - <property name="label" translatable="yes">Moving: </property> + <property name="can_focus">True</property> + <property name="editable">False</property> + <property name="invisible_char">•</property> </widget> <packing> - <property name="expand">False</property> <property name="position">0</property> </packing> </child> <child> - <widget class="GtkAlignment" id="alignment5"> + <widget class="GtkHBox" id="beacon_distance_box"> <property name="visible">True</property> <child> - <placeholder/> + <widget class="GtkLabel" id="beacon_distance_label"> + <property name="visible">True</property> + <property name="xpad">2</property> + <property name="label" translatable="yes">d</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <widget class="GtkEntry" id="beacon_distance"> + <property name="width_request">1</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">False</property> + <property name="invisible_char">•</property> + </widget> + <packing> + <property name="position">1</property> + </packing> </child> </widget> <packing> <property name="position">1</property> </packing> </child> - </widget> - <packing> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - </packing> - </child> - <child> - <widget class="GtkHBox" id="hbox3"> - <property name="visible">True</property> <child> - <widget class="GtkLabel" id="label7"> + <widget class="GtkHBox" id="beacon_angle_box"> <property name="visible">True</property> - <property name="label" translatable="yes">x: </property> + <child> + <widget class="GtkLabel" id="beacon_angle_label"> + <property name="visible">True</property> + <property name="xpad">2</property> + <property name="label" translatable="yes">α</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <widget class="GtkEntry" id="beacon_angle"> + <property name="width_request">1</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">False</property> + <property name="invisible_char">•</property> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> </widget> <packing> - <property name="expand">False</property> - <property name="position">0</property> + <property name="position">2</property> </packing> </child> <child> - <widget class="GtkAlignment" id="alignment6"> + <widget class="GtkHBox" id="beacon_period_box"> <property name="visible">True</property> <child> - <placeholder/> + <widget class="GtkLabel" id="beacon_period_label"> + <property name="visible">True</property> + <property name="xpad">2</property> + <property name="label" translatable="yes">T</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <widget class="GtkEntry" id="beacon_period"> + <property name="width_request">1</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">False</property> + <property name="invisible_char">•</property> + </widget> + <packing> + <property name="position">1</property> + </packing> </child> </widget> <packing> - <property name="position">1</property> + <property name="position">3</property> </packing> </child> </widget> - <packing> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - </packing> </child> <child> - <widget class="GtkHBox" id="hbox9"> + <widget class="GtkLabel" id="beacon_label"> <property name="visible">True</property> - <child> - <widget class="GtkLabel" id="label8"> - <property name="visible">True</property> - <property name="label" translatable="yes">y: </property> - </widget> - <packing> - <property name="expand">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <widget class="GtkAlignment" id="alignment7"> - <property name="visible">True</property> - <child> - <placeholder/> - </child> - </widget> - <packing> - <property name="position">1</property> - </packing> - </child> + <property name="label" translatable="yes"><b>Beacon</b></property> + <property name="use_markup">True</property> </widget> <packing> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> + <property name="type">label_item</property> </packing> </child> + </widget> + <packing> + <property name="position">5</property> + </packing> + </child> + <child> + <widget class="GtkHSeparator" id="hseparator3"> + <property name="visible">True</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="position">6</property> + </packing> + </child> + <child> + <widget class="GtkExpander" id="settings_expander"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="expanded">True</property> <child> - <widget class="GtkHBox" id="hbox10"> + <widget class="GtkHBox" id="settings_subbox"> <property name="visible">True</property> + <property name="homogeneous">True</property> <child> - <widget class="GtkLabel" id="label9"> + <widget class="GtkVBox" id="line_settings_box"> <property name="visible">True</property> - <property name="label" translatable="yes">theta: </property> + <property name="orientation">vertical</property> + <child> + <widget class="GtkLabel" id="line_settings_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">Lines</property> + </widget> + <packing> + <property name="position">0</property> + </packing> + </child> + <child> + <widget class="GtkHBox" id="line_settings_label_box"> + <property name="visible">True</property> + <property name="homogeneous">True</property> + <child> + <widget class="GtkLabel" id="lines_speed_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">speed</property> + </widget> + <packing> + <property name="position">0</property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="lines_acceleration_label"> + <property name="visible">True</property> + <property name="yalign">0.47999998927116394</property> + <property name="label" translatable="yes">accel</property> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> + <child> + <widget class="GtkHBox" id="line_settings_value_box"> + <property name="visible">True</property> + <property name="homogeneous">True</property> + <child> + <widget class="GtkSpinButton" id="moving_speed"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">•</property> + <property name="adjustment">0.99999999999999989 0 2 0.10000000000000001 0 0</property> + <property name="digits">2</property> + <property name="numeric">True</property> + </widget> + <packing> + <property name="position">0</property> + </packing> + </child> + <child> + <widget class="GtkSpinButton" id="moving_acceleration"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">•</property> + <property name="adjustment">1 0 10 0.10000000000000001 0 0</property> + <property name="digits">2</property> + <property name="numeric">True</property> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> + </widget> + <packing> + <property name="position">2</property> + </packing> + </child> </widget> <packing> - <property name="expand">False</property> <property name="position">0</property> </packing> </child> <child> - <widget class="GtkAlignment" id="alignment8"> + <widget class="GtkVBox" id="rotation_settings_box"> <property name="visible">True</property> + <property name="orientation">vertical</property> + <child> + <widget class="GtkLabel" id="rotation_settings_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">Rotation</property> + <property name="selectable">True</property> + </widget> + <packing> + <property name="position">0</property> + </packing> + </child> <child> - <placeholder/> + <widget class="GtkHBox" id="rotation_settings_label_box"> + <property name="visible">True</property> + <property name="homogeneous">True</property> + <child> + <widget class="GtkLabel" id="rotation_speed_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">speed</property> + </widget> + <packing> + <property name="position">0</property> + </packing> + </child> + <child> + <widget class="GtkLabel" id="rotation_acceleration_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">accel</property> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> + <child> + <widget class="GtkHBox" id="rotation_settings_value_box"> + <property name="visible">True</property> + <property name="homogeneous">True</property> + <child> + <widget class="GtkSpinButton" id="rotation_speed"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">•</property> + <property name="adjustment">2.0000000000000004 0 4 0.10000000000000001 0 0</property> + <property name="digits">2</property> + <property name="numeric">True</property> + </widget> + <packing> + <property name="position">0</property> + </packing> + </child> + <child> + <widget class="GtkSpinButton" id="rotation_acceleration"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">•</property> + <property name="adjustment">2.0000000000000009 0 10 0.10000000000000001 0 0</property> + <property name="digits">2</property> + <property name="numeric">True</property> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> + </widget> + <packing> + <property name="position">2</property> + </packing> </child> </widget> <packing> @@ -645,55 +742,75 @@ </packing> </child> </widget> - <packing> - <property name="top_attach">5</property> - <property name="bottom_attach">6</property> - </packing> </child> <child> - <widget class="GtkEntry" id="entry_x"> + <widget class="GtkLabel" id="settings_label"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="invisible_char">•</property> + <property name="label" translatable="yes"><b>Settings</b></property> + <property name="use_markup">True</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> + <property name="type">label_item</property> </packing> </child> + </widget> + <packing> + <property name="position">7</property> + </packing> + </child> + <child> + <widget class="GtkHSeparator" id="hseparator4"> + <property name="visible">True</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="position">8</property> + </packing> + </child> + <child> + <widget class="GtkExpander" id="simplification_expander"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="expanded">True</property> <child> - <widget class="GtkEntry" id="entry_y"> + <widget class="GtkHScale" id="tolerance"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="invisible_char">•</property> + <property name="adjustment">0.40000000000000002 0 1 0.10000000000000001 0.20000000000000001 0.5</property> + <property name="draw_value">False</property> </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> - </packing> </child> <child> - <widget class="GtkEntry" id="entry_theta"> + <widget class="GtkLabel" id="simplification_label"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="invisible_char">•</property> + <property name="label" translatable="yes"><b>Simplification tolerance</b></property> + <property name="use_markup">True</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">5</property> - <property name="bottom_attach">6</property> + <property name="type">label_item</property> </packing> </child> + </widget> + <packing> + <property name="position">9</property> + </packing> + </child> + <child> + <widget class="GtkHSeparator" id="hseparator5"> + <property name="visible">True</property> + </widget> + <packing> + <property name="expand">False</property> + <property name="position">10</property> + </packing> + </child> + <child> + <widget class="GtkExpander" id="moving_expander"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="expanded">True</property> <child> - <widget class="GtkHBox" id="hbox11"> + <widget class="GtkHBox" id="entry_moving_box"> <property name="visible">True</property> <child> <widget class="GtkEntry" id="entry_moving1"> @@ -748,193 +865,98 @@ </packing> </child> </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - </packing> - </child> - <child> - <widget class="GtkHScale" id="tolerance"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="adjustment">0.10000000000000001 0 1 0.10000000000000001 0.20000000000000001 0.5</property> - <property name="draw_value">False</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - </packing> - </child> - <child> - <widget class="GtkHBox" id="hbox15"> - <property name="visible">True</property> - <child> - <widget class="GtkLabel" id="label1"> - <property name="visible">True</property> - <property name="label" translatable="yes">Tolerance: </property> - </widget> - <packing> - <property name="expand">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <widget class="GtkAlignment" id="alignment9"> - <property name="visible">True</property> - <child> - <placeholder/> - </child> - </widget> - <packing> - <property name="position">1</property> - </packing> - </child> - </widget> - </child> - <child> - <widget class="GtkHBox" id="hbox16"> - <property name="visible">True</property> - <child> - <widget class="GtkLabel" id="label10"> - <property name="visible">True</property> - <property name="label" translatable="yes">Beacon status:</property> - </widget> - <packing> - <property name="expand">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <widget class="GtkAlignment" id="alignment10"> - <property name="visible">True</property> - <child> - <placeholder/> - </child> - </widget> - <packing> - <property name="position">1</property> - </packing> - </child> - </widget> - <packing> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - </packing> </child> <child> - <widget class="GtkHBox" id="hbox17"> + <widget class="GtkLabel" id="moving_label"> <property name="visible">True</property> - <child> - <widget class="GtkEntry" id="beacon_status"> - <property name="width_request">1</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="invisible_char">•</property> - </widget> - <packing> - <property name="position">0</property> - </packing> - </child> - <child> - <widget class="GtkEntry" id="beacon_distance"> - <property name="width_request">1</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="invisible_char">•</property> - </widget> - <packing> - <property name="position">1</property> - </packing> - </child> - <child> - <widget class="GtkEntry" id="beacon_angle"> - <property name="width_request">1</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="invisible_char">•</property> - </widget> - <packing> - <property name="position">2</property> - </packing> - </child> - <child> - <widget class="GtkEntry" id="beacon_period"> - <property name="width_request">1</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="invisible_char">•</property> - </widget> - <packing> - <property name="position">3</property> - </packing> - </child> + <property name="label" translatable="yes"><b>Moving</b></property> + <property name="use_markup">True</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> + <property name="type">label_item</property> </packing> </child> </widget> <packing> - <property name="expand">False</property> - <property name="position">5</property> + <property name="position">11</property> </packing> </child> <child> - <widget class="GtkHBox" id="hbox14"> + <widget class="GtkAlignment" id="alignment1"> + <property name="height_request">0</property> <property name="visible">True</property> + <child> + <placeholder/> + </child> </widget> <packing> - <property name="expand">False</property> - <property name="position">6</property> + <property name="position">12</property> </packing> </child> <child> - <widget class="GtkHSeparator" id="hseparator1"> + <widget class="GtkHSeparator" id="hseparator6"> <property name="visible">True</property> </widget> <packing> <property name="expand">False</property> - <property name="position">7</property> + <property name="position">13</property> </packing> </child> <child> - <widget class="GtkScrolledWindow" id="scrolled_logs"> + <widget class="GtkExpander" id="logs_expander"> <property name="visible">True</property> <property name="can_focus">True</property> - <prop... [truncated message content] |
From: Jérémie D. <Ba...@us...> - 2011-04-13 12:54:55
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via c6ae35bf3d2cdae0486c1515706d70e85913070b (commit) from 70a0dbab54eee22555b30b3f73c62a042e10289c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit c6ae35bf3d2cdae0486c1515706d70e85913070b Author: Jérémie Dimino <je...@di...> Date: Wed Apr 13 14:53:56 2011 +0200 [krobot_viewer] show logs sent by other programs ----------------------------------------------------------------------- Changes: diff --git a/info/control2011/src/lib/krobot_service.ml b/info/control2011/src/lib/krobot_service.ml index 348d139..9593dee 100644 --- a/info/control2011/src/lib/krobot_service.ml +++ b/info/control2011/src/lib/krobot_service.ml @@ -117,19 +117,16 @@ let init bus ?(fork=true) ?(kill=false) name = let dbus_logger = Lwt_log.make (fun section level lines -> - if level > Lwt_log.Info then - let buf = Buffer.create 42 in - let lines = - List.map - (fun line -> - Buffer.clear buf; - Lwt_log.render ~buffer:buf ~template:"$(level)@$(name)[$(section)]: $(message)" ~section ~level ~message:line; - Buffer.contents buf) - lines - in - OBus_signal.emit s_log obj (String.concat "\n" lines) - else - return ()) + let buf = Buffer.create 42 in + let lines = + List.map + (fun line -> + Buffer.clear buf; + Lwt_log.render ~buffer:buf ~template:"$(name)[$(section)]: $(message)" ~section ~level ~message:line; + Buffer.contents buf) + lines + in + OBus_signal.emit s_log obj (String.concat "\n" lines)) return in diff --git a/info/control2011/src/services/krobot_service_planner.ml b/info/control2011/src/services/krobot_service_planner.ml index bed9a94..4506831 100644 --- a/info/control2011/src/services/krobot_service_planner.ml +++ b/info/control2011/src/services/krobot_service_planner.ml @@ -271,6 +271,9 @@ options are:" lwt () = Arg.parse options ignore usage; + (* Display all informative messages. *) + Lwt_log.Section.set_level Lwt_log.Section.main Lwt_log.Info; + lwt bus = Krobot_bus.get () in (* Create a new planner. *) diff --git a/info/control2011/src/tools/krobot_viewer.ml b/info/control2011/src/tools/krobot_viewer.ml index d93c17f..9b30a63 100644 --- a/info/control2011/src/tools/krobot_viewer.ml +++ b/info/control2011/src/tools/krobot_viewer.ml @@ -602,6 +602,7 @@ lwt () = ignore (ui#window#connect#destroy ~callback:(wakeup wakener)); ui#window#show (); + (* Write logs to the log buffer. *) Lwt_log.default := Lwt_log.broadcast [ !Lwt_log.default; @@ -610,13 +611,22 @@ lwt () = List.iter (fun line -> ui#logs#buffer#insert - (Printf.sprintf "%s: %s\n" (Lwt_log.Section.name section) line)) + (Printf.sprintf "krobot-viewer[%s]: %s\n" (Lwt_log.Section.name section) line)) lines; ui#scrolled_logs#vadjustment#set_value ui#scrolled_logs#vadjustment#upper; return ()) ~close:return ]; + (* Send logs received from other daemons to the log buffer. *) + lwt ev_logs = OBus_signal.connect (Krobot_service.log (Krobot_service.all bus)) in + E.keep + (E.map + (fun line -> + ui#logs#buffer#insert (line ^ "\n"); + ui#scrolled_logs#vadjustment#set_value ui#scrolled_logs#vadjustment#upper) + ev_logs); + let lcd = LCD.create ui in ignore (ui#lcd#event#connect#expose (fun ev -> LCD.draw lcd; true)); hooks/post-receive -- krobot |
From: Jérémie D. <Ba...@us...> - 2011-04-13 12:02:01
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 70a0dbab54eee22555b30b3f73c62a042e10289c (commit) via bb40194d4aab57e09c461b717f5dc7157629856d (commit) via 90290f3e7f9e4affaf0daf20657278993e4eb7b8 (commit) from 1ef13ef11b4502205f9bc4b8f6a54af1375c274a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 70a0dbab54eee22555b30b3f73c62a042e10289c Author: Jérémie Dimino <je...@di...> Date: Wed Apr 13 13:58:16 2011 +0200 [krobot_service_planner] starts the service after registering the planner object to avoid a race condition commit bb40194d4aab57e09c461b717f5dc7157629856d Author: Jérémie Dimino <je...@di...> Date: Wed Apr 13 13:56:14 2011 +0200 [krobot_service_planner] typo in the service file commit 90290f3e7f9e4affaf0daf20657278993e4eb7b8 Author: Jérémie Dimino <je...@di...> Date: Wed Apr 13 13:55:21 2011 +0200 [krobot_remote] use "ssh -C" ----------------------------------------------------------------------- Changes: diff --git a/info/control2011/src/services/fr.krobot.Service.Planner.service.ab b/info/control2011/src/services/fr.krobot.Service.Planner.service.ab index 5fa58a5..13dc4d3 100644 --- a/info/control2011/src/services/fr.krobot.Service.Planner.service.ab +++ b/info/control2011/src/services/fr.krobot.Service.Planner.service.ab @@ -1,3 +1,3 @@ [D-BUS Service] Name=fr.krobot.Service.Planner -Exec=$(bindir)/bin/krobot-service-planner +Exec=$(bindir)/krobot-service-planner diff --git a/info/control2011/src/services/krobot_service_planner.ml b/info/control2011/src/services/krobot_service_planner.ml index f33d448..bed9a94 100644 --- a/info/control2011/src/services/krobot_service_planner.ml +++ b/info/control2011/src/services/krobot_service_planner.ml @@ -272,7 +272,6 @@ lwt () = Arg.parse options ignore usage; lwt bus = Krobot_bus.get () in - lwt () = Krobot_service.init bus ~kill:!kill ~fork:!fork "Planner" in (* Create a new planner. *) let planner = create bus in @@ -280,5 +279,8 @@ lwt () = (* Export it on the krobot bus. *) OBus_object.export (Krobot_bus.to_bus bus) planner.obus; + (* Start the service. *) + lwt () = Krobot_service.init bus ~kill:!kill ~fork:!fork "Planner" in + (* Wait forever. *) fst (wait ()) diff --git a/info/control2011/src/tools/krobot_remote.ml b/info/control2011/src/tools/krobot_remote.ml index f9ad3a6..ee2711e 100644 --- a/info/control2011/src/tools/krobot_remote.ml +++ b/info/control2011/src/tools/krobot_remote.ml @@ -17,7 +17,7 @@ let rec copy ta tb = let handle_connection server ta = ignore ( lwt () = Lwt_log.info "new connection" in - let process = Lwt_process.open_process ("ssh", [|"ssh"; "krobot"; "/home/krobot/bin/krobot-local"|]) in + let process = Lwt_process.open_process ("ssh", [|"ssh"; "krobot"; "-C"; "/home/krobot/bin/krobot-local"|]) in try_lwt lwt _ = Lwt_io.read_char process#stdout in let tb = hooks/post-receive -- krobot |
From: Benjamin A. <Ba...@us...> - 2011-04-12 22:50:35
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 1ef13ef11b4502205f9bc4b8f6a54af1375c274a (commit) from 267bcf969f0866a9da25d3040e1ab0f589eb9566 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 1ef13ef11b4502205f9bc4b8f6a54af1375c274a Author: Benjamin Aupetit <au...@cr...> Date: Wed Apr 13 00:49:12 2011 +0200 [meca] First floor - with screw! ----------------------------------------------------------------------- Changes: diff --git a/meca/2010_Senior/PackBatteries.CATPart b/meca/2010_Senior/PackBatteries.CATPart index 645c7e6..208f81a 100644 Binary files a/meca/2010_Senior/PackBatteries.CATPart and b/meca/2010_Senior/PackBatteries.CATPart differ diff --git a/meca/2011_Senior/Arbre moteur.CATPart b/meca/2011_Senior/Arbre moteur.CATPart deleted file mode 100644 index 9913b0d..0000000 Binary files a/meca/2011_Senior/Arbre moteur.CATPart and /dev/null differ diff --git a/meca/2011_Senior/Assemblage BH102-40-606 et 606ZZ.CATProduct b/meca/2011_Senior/Assemblage BH102-40-606 et 606ZZ.CATProduct deleted file mode 100644 index 9566d0f..0000000 Binary files a/meca/2011_Senior/Assemblage BH102-40-606 et 606ZZ.CATProduct and /dev/null differ diff --git a/meca/2011_Senior/Assemblage P20.CATProduct b/meca/2011_Senior/Assemblage P20.CATProduct deleted file mode 100644 index 743477f..0000000 Binary files a/meca/2011_Senior/Assemblage P20.CATProduct and /dev/null differ diff --git a/meca/2011_Senior/Assemblage moteur.CATProduct b/meca/2011_Senior/Assemblage moteur.CATProduct deleted file mode 100644 index 9fda053..0000000 Binary files a/meca/2011_Senior/Assemblage moteur.CATProduct and /dev/null differ diff --git a/meca/2011_Senior/BH0102-40-606.CATPart b/meca/2011_Senior/BH0102-40-606.CATPart deleted file mode 100644 index 220ce74..0000000 Binary files a/meca/2011_Senior/BH0102-40-606.CATPart and /dev/null differ diff --git a/meca/2011_Senior/Ecrou/Ecrou M2.CATPart b/meca/2011_Senior/Ecrou/Ecrou M2.CATPart new file mode 100644 index 0000000..ad3e77b Binary files /dev/null and b/meca/2011_Senior/Ecrou/Ecrou M2.CATPart differ diff --git a/meca/2011_Senior/Ecrou/Ecrou M3 autoblocant.CATPart b/meca/2011_Senior/Ecrou/Ecrou M3 autoblocant.CATPart new file mode 100644 index 0000000..fddb039 Binary files /dev/null and b/meca/2011_Senior/Ecrou/Ecrou M3 autoblocant.CATPart differ diff --git a/meca/2011_Senior/Ecrou/Ecrou M4 autoblocant.CATPart b/meca/2011_Senior/Ecrou/Ecrou M4 autoblocant.CATPart new file mode 100644 index 0000000..411ac6c Binary files /dev/null and b/meca/2011_Senior/Ecrou/Ecrou M4 autoblocant.CATPart differ diff --git a/meca/2011_Senior/Ecrou/Ecrou M8 autoblocant.CATPart b/meca/2011_Senior/Ecrou/Ecrou M8 autoblocant.CATPart new file mode 100644 index 0000000..5705314 Binary files /dev/null and b/meca/2011_Senior/Ecrou/Ecrou M8 autoblocant.CATPart differ diff --git a/meca/2011_Senior/Encodeur HEDL 55__.CATPart b/meca/2011_Senior/Encodeur HEDL 55__.CATPart deleted file mode 100644 index 93b4058..0000000 Binary files a/meca/2011_Senior/Encodeur HEDL 55__.CATPart and /dev/null differ diff --git a/meca/2011_Senior/Entretoise/Entretoise M3 F-F 10mm.CATPart b/meca/2011_Senior/Entretoise/Entretoise M3 F-F 10mm.CATPart new file mode 100644 index 0000000..5762b02 Binary files /dev/null and b/meca/2011_Senior/Entretoise/Entretoise M3 F-F 10mm.CATPart differ diff --git a/meca/2011_Senior/Entretoise/Entretoise M3 M-F 10mm.CATPart b/meca/2011_Senior/Entretoise/Entretoise M3 M-F 10mm.CATPart new file mode 100644 index 0000000..6f70b77 Binary files /dev/null and b/meca/2011_Senior/Entretoise/Entretoise M3 M-F 10mm.CATPart differ diff --git a/meca/2011_Senior/Entretoise/Entretoise M3 M-F 30mm.CATPart b/meca/2011_Senior/Entretoise/Entretoise M3 M-F 30mm.CATPart new file mode 100644 index 0000000..e993c8e Binary files /dev/null and b/meca/2011_Senior/Entretoise/Entretoise M3 M-F 30mm.CATPart differ diff --git a/meca/2011_Senior/Entretoise/Entretoise M3 M-F 40mm.CATPart b/meca/2011_Senior/Entretoise/Entretoise M3 M-F 40mm.CATPart new file mode 100644 index 0000000..36c3bf8 Binary files /dev/null and b/meca/2011_Senior/Entretoise/Entretoise M3 M-F 40mm.CATPart differ diff --git a/meca/2011_Senior/Entretoise/Entretoise M4 M-F 10mm.CATPart b/meca/2011_Senior/Entretoise/Entretoise M4 M-F 10mm.CATPart new file mode 100644 index 0000000..7957545 Binary files /dev/null and b/meca/2011_Senior/Entretoise/Entretoise M4 M-F 10mm.CATPart differ diff --git a/meca/2011_Senior/Entretoise/Entretoise M4 M-F 20mm.CATPart b/meca/2011_Senior/Entretoise/Entretoise M4 M-F 20mm.CATPart new file mode 100644 index 0000000..8cdfa8b Binary files /dev/null and b/meca/2011_Senior/Entretoise/Entretoise M4 M-F 20mm.CATPart differ diff --git a/meca/2011_Senior/Entretoise/Entretoise M4 M-F 60mm.CATPart b/meca/2011_Senior/Entretoise/Entretoise M4 M-F 60mm.CATPart new file mode 100644 index 0000000..774fd24 Binary files /dev/null and b/meca/2011_Senior/Entretoise/Entretoise M4 M-F 60mm.CATPart differ diff --git a/meca/2011_Senior/Moteur.CATPart b/meca/2011_Senior/Moteur.CATPart deleted file mode 100644 index ed0031b..0000000 Binary files a/meca/2011_Senior/Moteur.CATPart and /dev/null differ diff --git a/meca/2011_Senior/Moyeu hexa BaneBots.CATPart b/meca/2011_Senior/Moyeu hexa BaneBots.CATPart deleted file mode 100644 index 83ac523..0000000 Binary files a/meca/2011_Senior/Moyeu hexa BaneBots.CATPart and /dev/null differ diff --git a/meca/2011_Senior/P20 Arbre.CATPart b/meca/2011_Senior/P20 Arbre.CATPart deleted file mode 100644 index 30beb0e..0000000 Binary files a/meca/2011_Senior/P20 Arbre.CATPart and /dev/null differ diff --git a/meca/2011_Senior/P20 Boitier.CATPart b/meca/2011_Senior/P20 Boitier.CATPart deleted file mode 100644 index 6245810..0000000 Binary files a/meca/2011_Senior/P20 Boitier.CATPart and /dev/null differ diff --git a/meca/2011_Senior/P20 Sortie.CATPart b/meca/2011_Senior/P20 Sortie.CATPart deleted file mode 100644 index 2b2cf00..0000000 Binary files a/meca/2011_Senior/P20 Sortie.CATPart and /dev/null differ diff --git a/meca/2011_Senior/PCMR19-6-5-A.CATPart b/meca/2011_Senior/PCMR19-6-5-A.CATPart deleted file mode 100644 index 41aa0b9..0000000 Binary files a/meca/2011_Senior/PCMR19-6-5-A.CATPart and /dev/null differ diff --git a/meca/2011_Senior/Roue BaneBots 3-7_8.CATPart b/meca/2011_Senior/Roue BaneBots 3-7_8.CATPart deleted file mode 100644 index e973a55..0000000 Binary files a/meca/2011_Senior/Roue BaneBots 3-7_8.CATPart and /dev/null differ diff --git a/meca/2011_Senior/Roulement a billes 606ZZ.CATPart b/meca/2011_Senior/Roulement a billes 606ZZ.CATPart deleted file mode 100644 index 2420e54..0000000 Binary files a/meca/2011_Senior/Roulement a billes 606ZZ.CATPart and /dev/null differ diff --git a/meca/2011_Senior/Vis/Vis cylindrique hexa M3x10.CATPart b/meca/2011_Senior/Vis/Vis cylindrique hexa M3x10.CATPart new file mode 100644 index 0000000..39f90f1 Binary files /dev/null and b/meca/2011_Senior/Vis/Vis cylindrique hexa M3x10.CATPart differ diff --git a/meca/2011_Senior/Vis/Vis cylindrique hexa M4x16.CATPart b/meca/2011_Senior/Vis/Vis cylindrique hexa M4x16.CATPart new file mode 100644 index 0000000..269fe49 Binary files /dev/null and b/meca/2011_Senior/Vis/Vis cylindrique hexa M4x16.CATPart differ diff --git a/meca/2011_Senior/Vis/Vis cylindrique hexa M4x25.CATPart b/meca/2011_Senior/Vis/Vis cylindrique hexa M4x25.CATPart new file mode 100644 index 0000000..7e20086 Binary files /dev/null and b/meca/2011_Senior/Vis/Vis cylindrique hexa M4x25.CATPart differ diff --git a/meca/2011_Senior/Vis/Vis cylindrique hexa M4x35.CATPart b/meca/2011_Senior/Vis/Vis cylindrique hexa M4x35.CATPart new file mode 100644 index 0000000..e23b844 Binary files /dev/null and b/meca/2011_Senior/Vis/Vis cylindrique hexa M4x35.CATPart differ diff --git a/meca/2011_Senior/Vis/Vis tete bombee hexa M3x12.CATPart b/meca/2011_Senior/Vis/Vis tete bombee hexa M3x12.CATPart new file mode 100644 index 0000000..7360489 Binary files /dev/null and b/meca/2011_Senior/Vis/Vis tete bombee hexa M3x12.CATPart differ diff --git a/meca/2011_Senior/Vis/Vis tete bombee hexa M4x10.CATPart b/meca/2011_Senior/Vis/Vis tete bombee hexa M4x10.CATPart new file mode 100644 index 0000000..5dc3094 Binary files /dev/null and b/meca/2011_Senior/Vis/Vis tete bombee hexa M4x10.CATPart differ diff --git a/meca/2011_Senior/Vis/Vis tete bombee hexa M4x12.CATPart b/meca/2011_Senior/Vis/Vis tete bombee hexa M4x12.CATPart new file mode 100644 index 0000000..3624917 Binary files /dev/null and b/meca/2011_Senior/Vis/Vis tete bombee hexa M4x12.CATPart differ diff --git a/meca/2011_Senior/Vis/Vis tete bombee hexa M4x16.CATPart b/meca/2011_Senior/Vis/Vis tete bombee hexa M4x16.CATPart new file mode 100644 index 0000000..6380731 Binary files /dev/null and b/meca/2011_Senior/Vis/Vis tete bombee hexa M4x16.CATPart differ diff --git a/meca/2011_Senior/Vis/Vis tete bombee pozi M2x12.CATPart b/meca/2011_Senior/Vis/Vis tete bombee pozi M2x12.CATPart new file mode 100644 index 0000000..8b8b745 Binary files /dev/null and b/meca/2011_Senior/Vis/Vis tete bombee pozi M2x12.CATPart differ diff --git a/meca/2011_Senior/Vis/Vis tete bombee pozi M4x40.CATPart b/meca/2011_Senior/Vis/Vis tete bombee pozi M4x40.CATPart new file mode 100644 index 0000000..a032083 Binary files /dev/null and b/meca/2011_Senior/Vis/Vis tete bombee pozi M4x40.CATPart differ diff --git a/meca/2011_Senior/Vis/Vis tete plate fendue M4x50.CATPart b/meca/2011_Senior/Vis/Vis tete plate fendue M4x50.CATPart new file mode 100644 index 0000000..4ef5523 Binary files /dev/null and b/meca/2011_Senior/Vis/Vis tete plate fendue M4x50.CATPart differ diff --git a/meca/2011_Senior/Vis/attache.CATProduct b/meca/2011_Senior/Vis/attache.CATProduct new file mode 100644 index 0000000..de8e469 Binary files /dev/null and b/meca/2011_Senior/Vis/attache.CATProduct differ diff --git a/meca/2011_Senior/Vis/serrage.CATProduct b/meca/2011_Senior/Vis/serrage.CATProduct new file mode 100644 index 0000000..d7b4cfd Binary files /dev/null and b/meca/2011_Senior/Vis/serrage.CATProduct differ diff --git a/meca/2011_Senior/ascenceurs/Ascenseur_Poulie_bas.CATPart b/meca/2011_Senior/ascenceurs/Ascenseur_Poulie_bas.CATPart new file mode 100644 index 0000000..86c3ec0 Binary files /dev/null and b/meca/2011_Senior/ascenceurs/Ascenseur_Poulie_bas.CATPart differ diff --git a/meca/2011_Senior/ascenceurs/Ascenseur_Poulie_bas2.CATPart b/meca/2011_Senior/ascenceurs/Ascenseur_Poulie_bas2.CATPart new file mode 100644 index 0000000..4dd078e Binary files /dev/null and b/meca/2011_Senior/ascenceurs/Ascenseur_Poulie_bas2.CATPart differ diff --git a/meca/2011_Senior/ascenceurs/Ascenseur_Poulie_moteur.CATPart b/meca/2011_Senior/ascenceurs/Ascenseur_Poulie_moteur.CATPart new file mode 100644 index 0000000..b78541b Binary files /dev/null and b/meca/2011_Senior/ascenceurs/Ascenseur_Poulie_moteur.CATPart differ diff --git a/meca/2011_Senior/ascenceurs/Ascenseur_axe_chapeau.CATPart b/meca/2011_Senior/ascenceurs/Ascenseur_axe_chapeau.CATPart new file mode 100644 index 0000000..2b5fd9e Binary files /dev/null and b/meca/2011_Senior/ascenceurs/Ascenseur_axe_chapeau.CATPart differ diff --git a/meca/2011_Senior/ascenceurs/Ascenseur_axe_douille.CATPart b/meca/2011_Senior/ascenceurs/Ascenseur_axe_douille.CATPart new file mode 100644 index 0000000..64fc27f Binary files /dev/null and b/meca/2011_Senior/ascenceurs/Ascenseur_axe_douille.CATPart differ diff --git a/meca/2011_Senior/ascenceurs/Ascenseur_axe_glissiere.CATPart b/meca/2011_Senior/ascenceurs/Ascenseur_axe_glissiere.CATPart new file mode 100644 index 0000000..d906eb2 Binary files /dev/null and b/meca/2011_Senior/ascenceurs/Ascenseur_axe_glissiere.CATPart differ diff --git a/meca/2011_Senior/ascenceurs/Ascenseur_plaque.CATPart b/meca/2011_Senior/ascenceurs/Ascenseur_plaque.CATPart new file mode 100644 index 0000000..59c2fa9 Binary files /dev/null and b/meca/2011_Senior/ascenceurs/Ascenseur_plaque.CATPart differ diff --git a/meca/2011_Senior/ascenceurs/Ascenseur_renvoiconique.CATPart b/meca/2011_Senior/ascenceurs/Ascenseur_renvoiconique.CATPart new file mode 100644 index 0000000..9a6098a Binary files /dev/null and b/meca/2011_Senior/ascenceurs/Ascenseur_renvoiconique.CATPart differ diff --git a/meca/2011_Senior/ascenceurs/IG-42GM.CATPart b/meca/2011_Senior/ascenceurs/IG-42GM.CATPart new file mode 100644 index 0000000..ae40236 Binary files /dev/null and b/meca/2011_Senior/ascenceurs/IG-42GM.CATPart differ diff --git a/meca/2011_Senior/ascenceurs/IG-42GM_support.CATPart b/meca/2011_Senior/ascenceurs/IG-42GM_support.CATPart new file mode 100644 index 0000000..e15a4a3 Binary files /dev/null and b/meca/2011_Senior/ascenceurs/IG-42GM_support.CATPart differ diff --git a/meca/2011_Senior/ascenceurs/Moteur_ascenseur.CATProduct b/meca/2011_Senior/ascenceurs/Moteur_ascenseur.CATProduct new file mode 100644 index 0000000..ae0977a Binary files /dev/null and b/meca/2011_Senior/ascenceurs/Moteur_ascenseur.CATProduct differ diff --git a/meca/2011_Senior/ascenceurs/Poulie_bas_avec_support.CATProduct b/meca/2011_Senior/ascenceurs/Poulie_bas_avec_support.CATProduct new file mode 100644 index 0000000..f47bbea Binary files /dev/null and b/meca/2011_Senior/ascenceurs/Poulie_bas_avec_support.CATProduct differ diff --git a/meca/2011_Senior/ascenceurs/Profile en U 1x1x0.125 pouce.CATPart b/meca/2011_Senior/ascenceurs/Profile en U 1x1x0.125 pouce.CATPart new file mode 100644 index 0000000..02d61ae Binary files /dev/null and b/meca/2011_Senior/ascenceurs/Profile en U 1x1x0.125 pouce.CATPart differ diff --git a/meca/2011_Senior/ascenceurs/Support_poulie-orig.CATPart b/meca/2011_Senior/ascenceurs/Support_poulie-orig.CATPart new file mode 100644 index 0000000..01bdf89 Binary files /dev/null and b/meca/2011_Senior/ascenceurs/Support_poulie-orig.CATPart differ diff --git a/meca/2011_Senior/ascenceurs/Support_poulie.CATPart b/meca/2011_Senior/ascenceurs/Support_poulie.CATPart new file mode 100644 index 0000000..01bdf89 Binary files /dev/null and b/meca/2011_Senior/ascenceurs/Support_poulie.CATPart differ diff --git a/meca/2011_Senior/ascenceurs/ascenseur.CATProduct b/meca/2011_Senior/ascenceurs/ascenseur.CATProduct new file mode 100644 index 0000000..1ce1a22 Binary files /dev/null and b/meca/2011_Senior/ascenceurs/ascenseur.CATProduct differ diff --git a/meca/2011_Senior/ascenceurs/attache-pince.CATProduct b/meca/2011_Senior/ascenceurs/attache-pince.CATProduct new file mode 100644 index 0000000..e600d96 Binary files /dev/null and b/meca/2011_Senior/ascenceurs/attache-pince.CATProduct differ diff --git a/meca/2011_Senior/ascenceurs/longueur_courroie.CATPart b/meca/2011_Senior/ascenceurs/longueur_courroie.CATPart new file mode 100644 index 0000000..6893749 Binary files /dev/null and b/meca/2011_Senior/ascenceurs/longueur_courroie.CATPart differ diff --git a/meca/2011_Senior/ascenceurs/poulie_bas_axe.CATPart b/meca/2011_Senior/ascenceurs/poulie_bas_axe.CATPart new file mode 100644 index 0000000..ab794e9 Binary files /dev/null and b/meca/2011_Senior/ascenceurs/poulie_bas_axe.CATPart differ diff --git a/meca/2011_Senior/ascenceurs/poulie_bas_coussinet.CATPart b/meca/2011_Senior/ascenceurs/poulie_bas_coussinet.CATPart new file mode 100644 index 0000000..1450057 Binary files /dev/null and b/meca/2011_Senior/ascenceurs/poulie_bas_coussinet.CATPart differ diff --git a/meca/2011_Senior/ascenceurs/serre-courroie-mobile.CATPart b/meca/2011_Senior/ascenceurs/serre-courroie-mobile.CATPart new file mode 100644 index 0000000..60855c8 Binary files /dev/null and b/meca/2011_Senior/ascenceurs/serre-courroie-mobile.CATPart differ diff --git a/meca/2011_Senior/ascenceurs/serre-courroie-serrage-element.CATProduct b/meca/2011_Senior/ascenceurs/serre-courroie-serrage-element.CATProduct new file mode 100644 index 0000000..d15003f Binary files /dev/null and b/meca/2011_Senior/ascenceurs/serre-courroie-serrage-element.CATProduct differ diff --git a/meca/2011_Senior/ascenceurs/serre-courroie-serrage.CATProduct b/meca/2011_Senior/ascenceurs/serre-courroie-serrage.CATProduct new file mode 100644 index 0000000..728ac72 Binary files /dev/null and b/meca/2011_Senior/ascenceurs/serre-courroie-serrage.CATProduct differ diff --git a/meca/2011_Senior/ascenceurs/serre-courroie.CATPart b/meca/2011_Senior/ascenceurs/serre-courroie.CATPart new file mode 100644 index 0000000..b507354 Binary files /dev/null and b/meca/2011_Senior/ascenceurs/serre-courroie.CATPart differ diff --git a/meca/2011_Senior/ascenceurs/serre-douille.CATProduct b/meca/2011_Senior/ascenceurs/serre-douille.CATProduct new file mode 100644 index 0000000..33200f8 Binary files /dev/null and b/meca/2011_Senior/ascenceurs/serre-douille.CATProduct differ diff --git a/meca/2011_Senior/ascenceurs/vis-serre-courroie.CATProduct b/meca/2011_Senior/ascenceurs/vis-serre-courroie.CATProduct new file mode 100644 index 0000000..cfc7355 Binary files /dev/null and b/meca/2011_Senior/ascenceurs/vis-serre-courroie.CATProduct differ diff --git a/meca/2011_Senior/aupetit/Ascenseur_Poulie_bas.CATPart b/meca/2011_Senior/aupetit/Ascenseur_Poulie_bas.CATPart new file mode 100644 index 0000000..58a6d85 Binary files /dev/null and b/meca/2011_Senior/aupetit/Ascenseur_Poulie_bas.CATPart differ diff --git a/meca/2011_Senior/aupetit/Ascenseur_Poulie_moteur.CATPart b/meca/2011_Senior/aupetit/Ascenseur_Poulie_moteur.CATPart new file mode 100644 index 0000000..d398a14 Binary files /dev/null and b/meca/2011_Senior/aupetit/Ascenseur_Poulie_moteur.CATPart differ diff --git a/meca/2011_Senior/aupetit/AxeGlissiereAscenceur.CATPart b/meca/2011_Senior/aupetit/AxeGlissiereAscenceur.CATPart index a3a363a..f30cb49 100644 Binary files a/meca/2011_Senior/aupetit/AxeGlissiereAscenceur.CATPart and b/meca/2011_Senior/aupetit/AxeGlissiereAscenceur.CATPart differ diff --git a/meca/2011_Senior/aupetit/Bille3.CATPart b/meca/2011_Senior/aupetit/Bille3.CATPart index 4cece39..99a2a4e 100644 Binary files a/meca/2011_Senior/aupetit/Bille3.CATPart and b/meca/2011_Senior/aupetit/Bille3.CATPart differ diff --git a/meca/2011_Senior/aupetit/DouilleGlissiereAscenceur.CATPart b/meca/2011_Senior/aupetit/DouilleGlissiereAscenceur.CATPart index 4ac3877..f8b64fd 100644 Binary files a/meca/2011_Senior/aupetit/DouilleGlissiereAscenceur.CATPart and b/meca/2011_Senior/aupetit/DouilleGlissiereAscenceur.CATPart differ diff --git a/meca/2011_Senior/aupetit/Etage1.CATPart b/meca/2011_Senior/aupetit/Etage1.CATPart index c254bf7..11f4f69 100644 Binary files a/meca/2011_Senior/aupetit/Etage1.CATPart and b/meca/2011_Senior/aupetit/Etage1.CATPart differ diff --git a/meca/2011_Senior/aupetit/Etate1.bis.CATPart b/meca/2011_Senior/aupetit/Etate1.bis.CATPart new file mode 100644 index 0000000..a4820af Binary files /dev/null and b/meca/2011_Senior/aupetit/Etate1.bis.CATPart differ diff --git a/meca/2011_Senior/aupetit/Etate2.bis.CATPart b/meca/2011_Senior/aupetit/Etate2.bis.CATPart new file mode 100644 index 0000000..16cd320 Binary files /dev/null and b/meca/2011_Senior/aupetit/Etate2.bis.CATPart differ diff --git a/meca/2011_Senior/aupetit/GuideCodeur.CATPart b/meca/2011_Senior/aupetit/GuideCodeur.CATPart index 47a80d4..0eb58a9 100644 Binary files a/meca/2011_Senior/aupetit/GuideCodeur.CATPart and b/meca/2011_Senior/aupetit/GuideCodeur.CATPart differ diff --git a/meca/2011_Senior/aupetit/IG-42GM.CATPart b/meca/2011_Senior/aupetit/IG-42GM.CATPart new file mode 100644 index 0000000..2e0a00a Binary files /dev/null and b/meca/2011_Senior/aupetit/IG-42GM.CATPart differ diff --git a/meca/2011_Senior/aupetit/ModuleRoue.CATProduct b/meca/2011_Senior/aupetit/ModuleRoue.CATProduct index 821f89c..b7db5c0 100644 Binary files a/meca/2011_Senior/aupetit/ModuleRoue.CATProduct and b/meca/2011_Senior/aupetit/ModuleRoue.CATProduct differ diff --git a/meca/2011_Senior/aupetit/OF-12SH.CATPart b/meca/2011_Senior/aupetit/OF-12SH.CATPart index 117838b..dd4aead 100644 Binary files a/meca/2011_Senior/aupetit/OF-12SH.CATPart and b/meca/2011_Senior/aupetit/OF-12SH.CATPart differ diff --git a/meca/2011_Senior/aupetit/Part40.CATPart b/meca/2011_Senior/aupetit/Part40.CATPart new file mode 100644 index 0000000..05dda34 Binary files /dev/null and b/meca/2011_Senior/aupetit/Part40.CATPart differ diff --git a/meca/2011_Senior/aupetit/Part46.CATPart b/meca/2011_Senior/aupetit/Part46.CATPart new file mode 100644 index 0000000..9da166e Binary files /dev/null and b/meca/2011_Senior/aupetit/Part46.CATPart differ diff --git a/meca/2011_Senior/aupetit/Profile en L 2x2x0.125 pouce pour IG-42GM.CATPart b/meca/2011_Senior/aupetit/Profile en L 2x2x0.125 pouce pour IG-42GM.CATPart new file mode 100644 index 0000000..7dea1ba Binary files /dev/null and b/meca/2011_Senior/aupetit/Profile en L 2x2x0.125 pouce pour IG-42GM.CATPart differ diff --git a/meca/2011_Senior/aupetit/Robot.CATProduct b/meca/2011_Senior/aupetit/Robot.CATProduct index 3704b00..40d611f 100644 Binary files a/meca/2011_Senior/aupetit/Robot.CATProduct and b/meca/2011_Senior/aupetit/Robot.CATProduct differ diff --git a/meca/2011_Senior/aupetit/RoueCodeuse.CATPart b/meca/2011_Senior/aupetit/RoueCodeuse.CATPart index f8a607f..504b5d0 100644 Binary files a/meca/2011_Senior/aupetit/RoueCodeuse.CATPart and b/meca/2011_Senior/aupetit/RoueCodeuse.CATPart differ diff --git a/meca/2011_Senior/aupetit/RoulementArbreRoue.CATPart b/meca/2011_Senior/aupetit/RoulementArbreRoue.CATPart index 6dac518..b1d045e 100644 Binary files a/meca/2011_Senior/aupetit/RoulementArbreRoue.CATPart and b/meca/2011_Senior/aupetit/RoulementArbreRoue.CATPart differ diff --git a/meca/2011_Senior/aupetit/SupportRoue.CATPart b/meca/2011_Senior/aupetit/SupportRoue.CATPart index b77d18a..8c69962 100644 Binary files a/meca/2011_Senior/aupetit/SupportRoue.CATPart and b/meca/2011_Senior/aupetit/SupportRoue.CATPart differ diff --git a/meca/2011_Senior/aupetit/Symmetry of Arbre moteur.CATPart b/meca/2011_Senior/aupetit/Symmetry of Arbre moteur.CATPart new file mode 100644 index 0000000..11b7a6b Binary files /dev/null and b/meca/2011_Senior/aupetit/Symmetry of Arbre moteur.CATPart differ diff --git a/meca/2011_Senior/aupetit/Symmetry of Assemblage BH102-40-606 et 606ZZ.CATProduct b/meca/2011_Senior/aupetit/Symmetry of Assemblage BH102-40-606 et 606ZZ.CATProduct new file mode 100644 index 0000000..47a354f Binary files /dev/null and b/meca/2011_Senior/aupetit/Symmetry of Assemblage BH102-40-606 et 606ZZ.CATProduct differ diff --git a/meca/2011_Senior/aupetit/Symmetry of Assemblage P20.CATProduct b/meca/2011_Senior/aupetit/Symmetry of Assemblage P20.CATProduct new file mode 100644 index 0000000..35a61a5 Binary files /dev/null and b/meca/2011_Senior/aupetit/Symmetry of Assemblage P20.CATProduct differ diff --git a/meca/2011_Senior/aupetit/Symmetry of Assemblage moteur.CATProduct b/meca/2011_Senior/aupetit/Symmetry of Assemblage moteur.CATProduct new file mode 100644 index 0000000..fbd11a0 Binary files /dev/null and b/meca/2011_Senior/aupetit/Symmetry of Assemblage moteur.CATProduct differ diff --git a/meca/2011_Senior/aupetit/Symmetry of BH0102-40-606.CATPart b/meca/2011_Senior/aupetit/Symmetry of BH0102-40-606.CATPart new file mode 100644 index 0000000..10243a5 Binary files /dev/null and b/meca/2011_Senior/aupetit/Symmetry of BH0102-40-606.CATPart differ diff --git a/meca/2011_Senior/aupetit/Symmetry of Bille MRM-017.CATPart b/meca/2011_Senior/aupetit/Symmetry of Bille MRM-017.CATPart index 5fadc90..6fee7a7 100644 Binary files a/meca/2011_Senior/aupetit/Symmetry of Bille MRM-017.CATPart and b/meca/2011_Senior/aupetit/Symmetry of Bille MRM-017.CATPart differ diff --git a/meca/2011_Senior/aupetit/Symmetry of Encodeur HEDL 55__.CATPart b/meca/2011_Senior/aupetit/Symmetry of Encodeur HEDL 55__.CATPart new file mode 100644 index 0000000..31d6d4a Binary files /dev/null and b/meca/2011_Senior/aupetit/Symmetry of Encodeur HEDL 55__.CATPart differ diff --git a/meca/2011_Senior/aupetit/Symmetry of GuideCodeur.CATPart b/meca/2011_Senior/aupetit/Symmetry of GuideCodeur.CATPart new file mode 100644 index 0000000..b3293af Binary files /dev/null and b/meca/2011_Senior/aupetit/Symmetry of GuideCodeur.CATPart differ diff --git a/meca/2011_Senior/aupetit/Symmetry of ModuleRoue.CATProduct b/meca/2011_Senior/aupetit/Symmetry of ModuleRoue.CATProduct new file mode 100644 index 0000000..65c155d Binary files /dev/null and b/meca/2011_Senior/aupetit/Symmetry of ModuleRoue.CATProduct differ diff --git a/meca/2011_Senior/aupetit/Symmetry of Moteur.CATPart b/meca/2011_Senior/aupetit/Symmetry of Moteur.CATPart new file mode 100644 index 0000000..df843b6 Binary files /dev/null and b/meca/2011_Senior/aupetit/Symmetry of Moteur.CATPart differ diff --git a/meca/2011_Senior/aupetit/Symmetry of Moyeu hexa BaneBots.CATPart b/meca/2011_Senior/aupetit/Symmetry of Moyeu hexa BaneBots.CATPart new file mode 100644 index 0000000..a42dca1 Binary files /dev/null and b/meca/2011_Senior/aupetit/Symmetry of Moyeu hexa BaneBots.CATPart differ diff --git a/meca/2011_Senior/aupetit/Symmetry of P20 Arbre.CATPart b/meca/2011_Senior/aupetit/Symmetry of P20 Arbre.CATPart new file mode 100644 index 0000000..862e168 Binary files /dev/null and b/meca/2011_Senior/aupetit/Symmetry of P20 Arbre.CATPart differ diff --git a/meca/2011_Senior/aupetit/Symmetry of P20 Boitier.CATPart b/meca/2011_Senior/aupetit/Symmetry of P20 Boitier.CATPart new file mode 100644 index 0000000..956da9a Binary files /dev/null and b/meca/2011_Senior/aupetit/Symmetry of P20 Boitier.CATPart differ diff --git a/meca/2011_Senior/aupetit/Symmetry of P20 Sortie.CATPart b/meca/2011_Senior/aupetit/Symmetry of P20 Sortie.CATPart new file mode 100644 index 0000000..c72be6d Binary files /dev/null and b/meca/2011_Senior/aupetit/Symmetry of P20 Sortie.CATPart differ diff --git a/meca/2011_Senior/aupetit/Symmetry of PCMR19-6-5-A.CATPart b/meca/2011_Senior/aupetit/Symmetry of PCMR19-6-5-A.CATPart new file mode 100644 index 0000000..fe83a61 Binary files /dev/null and b/meca/2011_Senior/aupetit/Symmetry of PCMR19-6-5-A.CATPart differ diff --git a/meca/2011_Senior/aupetit/Symmetry of RoueCodeuse.CATPart b/meca/2011_Senior/aupetit/Symmetry of RoueCodeuse.CATPart new file mode 100644 index 0000000..0f558f4 Binary files /dev/null and b/meca/2011_Senior/aupetit/Symmetry of RoueCodeuse.CATPart differ diff --git a/meca/2011_Senior/aupetit/Symmetry of RoulementArbreRoue.CATPart b/meca/2011_Senior/aupetit/Symmetry of RoulementArbreRoue.CATPart new file mode 100644 index 0000000..eaf7080 Binary files /dev/null and b/meca/2011_Senior/aupetit/Symmetry of RoulementArbreRoue.CATPart differ diff --git a/meca/2011_Senior/aupetit/Symmetry of SupportRoue.CATPart b/meca/2011_Senior/aupetit/Symmetry of SupportRoue.CATPart new file mode 100644 index 0000000..bdc7cb5 Binary files /dev/null and b/meca/2011_Senior/aupetit/Symmetry of SupportRoue.CATPart differ diff --git a/meca/2011_Senior/aupetit/Symmetry of Symmetry of Bille MRM-017.CATPart b/meca/2011_Senior/aupetit/Symmetry of Symmetry of Bille MRM-017.CATPart index 2b99057..11cba42 100644 Binary files a/meca/2011_Senior/aupetit/Symmetry of Symmetry of Bille MRM-017.CATPart and b/meca/2011_Senior/aupetit/Symmetry of Symmetry of Bille MRM-017.CATPart differ diff --git a/meca/2011_Senior/aupetit/Symmetry of codeur.CATPart b/meca/2011_Senior/aupetit/Symmetry of codeur.CATPart new file mode 100644 index 0000000..34b999f Binary files /dev/null and b/meca/2011_Senior/aupetit/Symmetry of codeur.CATPart differ diff --git a/meca/2011_Senior/aupetit/asc-plaque.CATPart b/meca/2011_Senior/aupetit/asc-plaque.CATPart index 16a5cdc..7eb2ca1 100644 Binary files a/meca/2011_Senior/aupetit/asc-plaque.CATPart and b/meca/2011_Senior/aupetit/asc-plaque.CATPart differ diff --git a/meca/2011_Senior/aupetit/asc/AX-12.CATPart b/meca/2011_Senior/aupetit/asc/AX-12.CATPart index ae98ebd..14b882b 100644 Binary files a/meca/2011_Senior/aupetit/asc/AX-12.CATPart and b/meca/2011_Senior/aupetit/asc/AX-12.CATPart differ diff --git a/meca/2011_Senior/aupetit/asc/L_ascenceur.CATPart b/meca/2011_Senior/aupetit/asc/L_ascenceur.CATPart index bea8e12..64a3644 100644 Binary files a/meca/2011_Senior/aupetit/asc/L_ascenceur.CATPart and b/meca/2011_Senior/aupetit/asc/L_ascenceur.CATPart differ diff --git a/meca/2011_Senior/aupetit/asc/OF-12S.CATPart b/meca/2011_Senior/aupetit/asc/OF-12S.CATPart index e67b7fd..7b43960 100644 Binary files a/meca/2011_Senior/aupetit/asc/OF-12S.CATPart and b/meca/2011_Senior/aupetit/asc/OF-12S.CATPart differ diff --git a/meca/2011_Senior/aupetit/asc/pince.CATPart b/meca/2011_Senior/aupetit/asc/pince.CATPart index 5592b76..31dea93 100644 Binary files a/meca/2011_Senior/aupetit/asc/pince.CATPart and b/meca/2011_Senior/aupetit/asc/pince.CATPart differ diff --git a/meca/2011_Senior/aupetit/base.CATPart b/meca/2011_Senior/aupetit/base.CATPart index b4c417a..a60b06a 100644 Binary files a/meca/2011_Senior/aupetit/base.CATPart and b/meca/2011_Senior/aupetit/base.CATPart differ diff --git a/meca/2011_Senior/aupetit/codeur.CATPart b/meca/2011_Senior/aupetit/codeur.CATPart index c779b98..d228f3b 100644 Binary files a/meca/2011_Senior/aupetit/codeur.CATPart and b/meca/2011_Senior/aupetit/codeur.CATPart differ diff --git a/meca/2011_Senior/aupetit/pince/pince.stl b/meca/2011_Senior/aupetit/pince/pince.stl index 5d0a33a..e69de29 100644 Binary files a/meca/2011_Senior/aupetit/pince/pince.stl and b/meca/2011_Senior/aupetit/pince/pince.stl differ diff --git a/meca/2011_Senior/aupetit/pince2.CATPart b/meca/2011_Senior/aupetit/pince2.CATPart index f047797..7904dc5 100644 Binary files a/meca/2011_Senior/aupetit/pince2.CATPart and b/meca/2011_Senior/aupetit/pince2.CATPart differ diff --git a/meca/2011_Senior/aupetit/pince2_indexeur.CATPart b/meca/2011_Senior/aupetit/pince2_indexeur.CATPart new file mode 100644 index 0000000..2ec7824 Binary files /dev/null and b/meca/2011_Senior/aupetit/pince2_indexeur.CATPart differ diff --git a/meca/2011_Senior/bati/base.CATPart b/meca/2011_Senior/bati/base.CATPart new file mode 100644 index 0000000..7e52e94 Binary files /dev/null and b/meca/2011_Senior/bati/base.CATPart differ diff --git a/meca/2011_Senior/bati/entretoise-bloc-moteur.CATProduct b/meca/2011_Senior/bati/entretoise-bloc-moteur.CATProduct new file mode 100644 index 0000000..35bfff8 Binary files /dev/null and b/meca/2011_Senior/bati/entretoise-bloc-moteur.CATProduct differ diff --git a/meca/2011_Senior/bati/plaque2.CATPart b/meca/2011_Senior/bati/plaque2.CATPart new file mode 100644 index 0000000..56f3fd2 Binary files /dev/null and b/meca/2011_Senior/bati/plaque2.CATPart differ diff --git a/meca/2011_Senior/divers/Galet.CATProduct b/meca/2011_Senior/divers/Galet.CATProduct new file mode 100644 index 0000000..8b2a3c3 Binary files /dev/null and b/meca/2011_Senior/divers/Galet.CATProduct differ diff --git a/meca/2011_Senior/divers/galet_axe.CATPart b/meca/2011_Senior/divers/galet_axe.CATPart new file mode 100644 index 0000000..e42ee5c Binary files /dev/null and b/meca/2011_Senior/divers/galet_axe.CATPart differ diff --git a/meca/2011_Senior/divers/galet_boulon.CATPart b/meca/2011_Senior/divers/galet_boulon.CATPart new file mode 100644 index 0000000..1faf3e5 Binary files /dev/null and b/meca/2011_Senior/divers/galet_boulon.CATPart differ diff --git a/meca/2011_Senior/divers/galet_rondelle.CATPart b/meca/2011_Senior/divers/galet_rondelle.CATPart new file mode 100644 index 0000000..06379dc Binary files /dev/null and b/meca/2011_Senior/divers/galet_rondelle.CATPart differ diff --git a/meca/2011_Senior/divers/galet_roulement.CATPart b/meca/2011_Senior/divers/galet_roulement.CATPart new file mode 100644 index 0000000..de01627 Binary files /dev/null and b/meca/2011_Senior/divers/galet_roulement.CATPart differ diff --git a/meca/2011_Senior/divers/perimetre.CATPart b/meca/2011_Senior/divers/perimetre.CATPart new file mode 100644 index 0000000..4c4b1c6 Binary files /dev/null and b/meca/2011_Senior/divers/perimetre.CATPart differ diff --git a/meca/2011_Senior/divers/pince_haut.CATPart b/meca/2011_Senior/divers/pince_haut.CATPart new file mode 100644 index 0000000..8beda6f Binary files /dev/null and b/meca/2011_Senior/divers/pince_haut.CATPart differ diff --git a/meca/2011_Senior/divers/plan.CATPart b/meca/2011_Senior/divers/plan.CATPart new file mode 100644 index 0000000..bb689e9 Binary files /dev/null and b/meca/2011_Senior/divers/plan.CATPart differ diff --git a/meca/2011_Senior/divers/planlaser_avec_support.CATProduct b/meca/2011_Senior/divers/planlaser_avec_support.CATProduct new file mode 100644 index 0000000..47b2f4a Binary files /dev/null and b/meca/2011_Senior/divers/planlaser_avec_support.CATProduct differ diff --git a/meca/2011_Senior/divers/sol.CATPart b/meca/2011_Senior/divers/sol.CATPart new file mode 100644 index 0000000..551baa4 Binary files /dev/null and b/meca/2011_Senior/divers/sol.CATPart differ diff --git a/meca/2011_Senior/divers/support_planlaser.CATPart b/meca/2011_Senior/divers/support_planlaser.CATPart new file mode 100644 index 0000000..63d6a86 Binary files /dev/null and b/meca/2011_Senior/divers/support_planlaser.CATPart differ diff --git a/meca/2011_Senior/divers/webcam.CATProduct b/meca/2011_Senior/divers/webcam.CATProduct new file mode 100644 index 0000000..227a222 Binary files /dev/null and b/meca/2011_Senior/divers/webcam.CATProduct differ diff --git a/meca/2011_Senior/divers/webcam_cam.CATPart b/meca/2011_Senior/divers/webcam_cam.CATPart new file mode 100644 index 0000000..85fa09f Binary files /dev/null and b/meca/2011_Senior/divers/webcam_cam.CATPart differ diff --git a/meca/2011_Senior/divers/webcam_support.CATPart b/meca/2011_Senior/divers/webcam_support.CATPart new file mode 100644 index 0000000..b3fa8af Binary files /dev/null and b/meca/2011_Senior/divers/webcam_support.CATPart differ diff --git a/meca/2011_Senior/divers/webcam_vue.CATPart b/meca/2011_Senior/divers/webcam_vue.CATPart new file mode 100644 index 0000000..c0e7f68 Binary files /dev/null and b/meca/2011_Senior/divers/webcam_vue.CATPart differ diff --git a/meca/2011_Senior/etages/Etage_1.CATProduct b/meca/2011_Senior/etages/Etage_1.CATProduct new file mode 100644 index 0000000..b1ee597 Binary files /dev/null and b/meca/2011_Senior/etages/Etage_1.CATProduct differ diff --git a/meca/2011_Senior/etages/etage1/attache.CATProduct b/meca/2011_Senior/etages/etage1/attache.CATProduct new file mode 100644 index 0000000..8208122 Binary files /dev/null and b/meca/2011_Senior/etages/etage1/attache.CATProduct differ diff --git a/meca/2011_Senior/etages/etage1/axes.CATProduct b/meca/2011_Senior/etages/etage1/axes.CATProduct new file mode 100644 index 0000000..6d6afbe Binary files /dev/null and b/meca/2011_Senior/etages/etage1/axes.CATProduct differ diff --git a/meca/2011_Senior/etages/etage1/bloc_moteur.CATProduct b/meca/2011_Senior/etages/etage1/bloc_moteur.CATProduct new file mode 100644 index 0000000..59cb6bb Binary files /dev/null and b/meca/2011_Senior/etages/etage1/bloc_moteur.CATProduct differ diff --git a/meca/2011_Senior/etages/etage1/entretoises-bloc-moteur.CATProduct b/meca/2011_Senior/etages/etage1/entretoises-bloc-moteur.CATProduct new file mode 100644 index 0000000..7663416 Binary files /dev/null and b/meca/2011_Senior/etages/etage1/entretoises-bloc-moteur.CATProduct differ diff --git a/meca/2011_Senior/etages/etage1/galets.CATProduct b/meca/2011_Senior/etages/etage1/galets.CATProduct new file mode 100644 index 0000000..3c0cfe2 Binary files /dev/null and b/meca/2011_Senior/etages/etage1/galets.CATProduct differ diff --git a/meca/2011_Senior/etages/etage1/repere.CATPart b/meca/2011_Senior/etages/etage1/repere.CATPart new file mode 100644 index 0000000..ce64466 Binary files /dev/null and b/meca/2011_Senior/etages/etage1/repere.CATPart differ diff --git a/meca/2011_Senior/etages/etage1/vis-axes.CATProduct b/meca/2011_Senior/etages/etage1/vis-axes.CATProduct new file mode 100644 index 0000000..34ed964 Binary files /dev/null and b/meca/2011_Senior/etages/etage1/vis-axes.CATProduct differ diff --git a/meca/2011_Senior/etages/etage1/vis_billes.CATProduct b/meca/2011_Senior/etages/etage1/vis_billes.CATProduct new file mode 100644 index 0000000..7653cc2 Binary files /dev/null and b/meca/2011_Senior/etages/etage1/vis_billes.CATProduct differ diff --git a/meca/2011_Senior/etages/etage1/vis_moteur_ascenseur.CATProduct b/meca/2011_Senior/etages/etage1/vis_moteur_ascenseur.CATProduct new file mode 100644 index 0000000..0bf3419 Binary files /dev/null and b/meca/2011_Senior/etages/etage1/vis_moteur_ascenseur.CATProduct differ diff --git a/meca/2011_Senior/etages/etage1/visserie.CATProduct b/meca/2011_Senior/etages/etage1/visserie.CATProduct new file mode 100644 index 0000000..5983e14 Binary files /dev/null and b/meca/2011_Senior/etages/etage1/visserie.CATProduct differ diff --git a/meca/2011_Senior/old/Arbre moteur.CATPart b/meca/2011_Senior/old/Arbre moteur.CATPart new file mode 100644 index 0000000..fcd22fd Binary files /dev/null and b/meca/2011_Senior/old/Arbre moteur.CATPart differ diff --git a/meca/2011_Senior/old/Assemblage BH102-40-606 et 606ZZ.CATProduct b/meca/2011_Senior/old/Assemblage BH102-40-606 et 606ZZ.CATProduct new file mode 100644 index 0000000..9566d0f Binary files /dev/null and b/meca/2011_Senior/old/Assemblage BH102-40-606 et 606ZZ.CATProduct differ diff --git a/meca/2011_Senior/old/Assemblage P20.CATProduct b/meca/2011_Senior/old/Assemblage P20.CATProduct new file mode 100644 index 0000000..743477f Binary files /dev/null and b/meca/2011_Senior/old/Assemblage P20.CATProduct differ diff --git a/meca/2011_Senior/old/Assemblage moteur.CATProduct b/meca/2011_Senior/old/Assemblage moteur.CATProduct new file mode 100644 index 0000000..9fda053 Binary files /dev/null and b/meca/2011_Senior/old/Assemblage moteur.CATProduct differ diff --git a/meca/2011_Senior/old/BH0102-40-606.CATPart b/meca/2011_Senior/old/BH0102-40-606.CATPart new file mode 100644 index 0000000..e4ae084 Binary files /dev/null and b/meca/2011_Senior/old/BH0102-40-606.CATPart differ diff --git a/meca/2011_Senior/old/Encodeur HEDL 55__.CATPart b/meca/2011_Senior/old/Encodeur HEDL 55__.CATPart new file mode 100644 index 0000000..ff47ca4 Binary files /dev/null and b/meca/2011_Senior/old/Encodeur HEDL 55__.CATPart differ diff --git a/meca/2011_Senior/old/Moteur.CATPart b/meca/2011_Senior/old/Moteur.CATPart new file mode 100644 index 0000000..9ddc52f Binary files /dev/null and b/meca/2011_Senior/old/Moteur.CATPart differ diff --git a/meca/2011_Senior/old/Moyeu hexa BaneBots.CATPart b/meca/2011_Senior/old/Moyeu hexa BaneBots.CATPart new file mode 100644 index 0000000..83ac523 Binary files /dev/null and b/meca/2011_Senior/old/Moyeu hexa BaneBots.CATPart differ diff --git a/meca/2011_Senior/old/P20 Arbre.CATPart b/meca/2011_Senior/old/P20 Arbre.CATPart new file mode 100644 index 0000000..120cac8 Binary files /dev/null and b/meca/2011_Senior/old/P20 Arbre.CATPart differ diff --git a/meca/2011_Senior/old/P20 Boitier.CATPart b/meca/2011_Senior/old/P20 Boitier.CATPart new file mode 100644 index 0000000..25b40ab Binary files /dev/null and b/meca/2011_Senior/old/P20 Boitier.CATPart differ diff --git a/meca/2011_Senior/old/P20 Sortie.CATPart b/meca/2011_Senior/old/P20 Sortie.CATPart new file mode 100644 index 0000000..6d410f2 Binary files /dev/null and b/meca/2011_Senior/old/P20 Sortie.CATPart differ diff --git a/meca/2011_Senior/old/PCMR19-6-5-A.CATPart b/meca/2011_Senior/old/PCMR19-6-5-A.CATPart new file mode 100644 index 0000000..41aa0b9 Binary files /dev/null and b/meca/2011_Senior/old/PCMR19-6-5-A.CATPart differ diff --git a/meca/2011_Senior/old/Roue BaneBots 3-7_8.CATPart b/meca/2011_Senior/old/Roue BaneBots 3-7_8.CATPart new file mode 100644 index 0000000..e973a55 Binary files /dev/null and b/meca/2011_Senior/old/Roue BaneBots 3-7_8.CATPart differ diff --git a/meca/2011_Senior/old/Roulement a billes 606ZZ.CATPart b/meca/2011_Senior/old/Roulement a billes 606ZZ.CATPart new file mode 100644 index 0000000..1dfee9a Binary files /dev/null and b/meca/2011_Senior/old/Roulement a billes 606ZZ.CATPart differ diff --git a/meca/2011_Senior/pinces/AX12.CATProduct b/meca/2011_Senior/pinces/AX12.CATProduct new file mode 100644 index 0000000..80d7627 Binary files /dev/null and b/meca/2011_Senior/pinces/AX12.CATProduct differ diff --git a/meca/2011_Senior/pinces/AX12_actionneur.CATPart b/meca/2011_Senior/pinces/AX12_actionneur.CATPart new file mode 100644 index 0000000..a6c0c0f Binary files /dev/null and b/meca/2011_Senior/pinces/AX12_actionneur.CATPart differ diff --git a/meca/2011_Senior/pinces/AX12_fixation.CATPart b/meca/2011_Senior/pinces/AX12_fixation.CATPart new file mode 100644 index 0000000..8f2c7b4 Binary files /dev/null and b/meca/2011_Senior/pinces/AX12_fixation.CATPart differ diff --git a/meca/2011_Senior/pinces/AX12_mobile.CATPart b/meca/2011_Senior/pinces/AX12_mobile.CATPart new file mode 100644 index 0000000..e306e4a Binary files /dev/null and b/meca/2011_Senior/pinces/AX12_mobile.CATPart differ diff --git a/meca/2011_Senior/pinces/L_bas.CATPart b/meca/2011_Senior/pinces/L_bas.CATPart new file mode 100644 index 0000000..b23671c Binary files /dev/null and b/meca/2011_Senior/pinces/L_bas.CATPart differ diff --git a/meca/2011_Senior/pinces/L_haut.CATPart b/meca/2011_Senior/pinces/L_haut.CATPart new file mode 100644 index 0000000..115534d Binary files /dev/null and b/meca/2011_Senior/pinces/L_haut.CATPart differ diff --git a/meca/2011_Senior/pinces/Pince_droite_bas.CATProduct b/meca/2011_Senior/pinces/Pince_droite_bas.CATProduct new file mode 100644 index 0000000..1dfdce3 Binary files /dev/null and b/meca/2011_Senior/pinces/Pince_droite_bas.CATProduct differ diff --git a/meca/2011_Senior/pinces/Pince_droite_haut.CATProduct b/meca/2011_Senior/pinces/Pince_droite_haut.CATProduct new file mode 100644 index 0000000..7dbfef5 Binary files /dev/null and b/meca/2011_Senior/pinces/Pince_droite_haut.CATProduct differ diff --git a/meca/2011_Senior/pinces/Pince_gauche_bas.CATProduct b/meca/2011_Senior/pinces/Pince_gauche_bas.CATProduct new file mode 100644 index 0000000..4b5bafc Binary files /dev/null and b/meca/2011_Senior/pinces/Pince_gauche_bas.CATProduct differ diff --git a/meca/2011_Senior/pinces/Pince_gauche_haut.CATProduct b/meca/2011_Senior/pinces/Pince_gauche_haut.CATProduct new file mode 100644 index 0000000..a2bb648 Binary files /dev/null and b/meca/2011_Senior/pinces/Pince_gauche_haut.CATProduct differ diff --git a/meca/2011_Senior/pinces/indexeur.CATProduct b/meca/2011_Senior/pinces/indexeur.CATProduct new file mode 100644 index 0000000..d177b78 Binary files /dev/null and b/meca/2011_Senior/pinces/indexeur.CATProduct differ diff --git a/meca/2011_Senior/pinces/pince_bas.CATPart b/meca/2011_Senior/pinces/pince_bas.CATPart new file mode 100644 index 0000000..5161b7b Binary files /dev/null and b/meca/2011_Senior/pinces/pince_bas.CATPart differ diff --git a/meca/2011_Senior/pinces/pince_haut_droit.CATPart b/meca/2011_Senior/pinces/pince_haut_droit.CATPart new file mode 100644 index 0000000..358317e Binary files /dev/null and b/meca/2011_Senior/pinces/pince_haut_droit.CATPart differ diff --git a/meca/2011_Senior/pinces/pince_haut_gauche.CATPart b/meca/2011_Senior/pinces/pince_haut_gauche.CATPart new file mode 100644 index 0000000..e8acc78 Binary files /dev/null and b/meca/2011_Senior/pinces/pince_haut_gauche.CATPart differ diff --git a/meca/2011_Senior/planlaser.CATPart b/meca/2011_Senior/planlaser.CATPart new file mode 100644 index 0000000..d3d90d2 Binary files /dev/null and b/meca/2011_Senior/planlaser.CATPart differ diff --git a/meca/2011_Senior/roues/Arbre moteur.CATPart b/meca/2011_Senior/roues/Arbre moteur.CATPart new file mode 100644 index 0000000..13b0e1d Binary files /dev/null and b/meca/2011_Senior/roues/Arbre moteur.CATPart differ diff --git a/meca/2011_Senior/roues/Assemblage BH102-40-606 et 606ZZ.CATProduct b/meca/2011_Senior/roues/Assemblage BH102-40-606 et 606ZZ.CATProduct new file mode 100644 index 0000000..4d757ff Binary files /dev/null and b/meca/2011_Senior/roues/Assemblage BH102-40-606 et 606ZZ.CATProduct differ diff --git a/meca/2011_Senior/roues/Assemblage P20.CATProduct b/meca/2011_Senior/roues/Assemblage P20.CATProduct new file mode 100644 index 0000000..7b5ba9c Binary files /dev/null and b/meca/2011_Senior/roues/Assemblage P20.CATProduct differ diff --git a/meca/2011_Senior/roues/Assemblage moteur.CATProduct b/meca/2011_Senior/roues/Assemblage moteur.CATProduct new file mode 100644 index 0000000..5b17058 Binary files /dev/null and b/meca/2011_Senior/roues/Assemblage moteur.CATProduct differ diff --git a/meca/2011_Senior/roues/BH0102-40-606.CATPart b/meca/2011_Senior/roues/BH0102-40-606.CATPart new file mode 100644 index 0000000..791d2ba Binary files /dev/null and b/meca/2011_Senior/roues/BH0102-40-606.CATPart differ diff --git a/meca/2011_Senior/roues/Bille.CATPart b/meca/2011_Senior/roues/Bille.CATPart new file mode 100644 index 0000000..e8a9e30 Binary files /dev/null and b/meca/2011_Senior/roues/Bille.CATPart differ diff --git a/meca/2011_Senior/roues/Bloc_roue.CATProduct b/meca/2011_Senior/roues/Bloc_roue.CATProduct new file mode 100644 index 0000000..c4cb090 Binary files /dev/null and b/meca/2011_Senior/roues/Bloc_roue.CATProduct differ diff --git a/meca/2011_Senior/roues/Encodeur HEDL 55__.CATPart b/meca/2011_Senior/roues/Encodeur HEDL 55__.CATPart new file mode 100644 index 0000000..6603e30 Binary files /dev/null and b/meca/2011_Senior/roues/Encodeur HEDL 55__.CATPart differ diff --git a/meca/2011_Senior/roues/GuideCodeur-bloc.CATPart b/meca/2011_Senior/roues/GuideCodeur-bloc.CATPart new file mode 100644 index 0000000..98607ee Binary files /dev/null and b/meca/2011_Senior/roues/GuideCodeur-bloc.CATPart differ diff --git a/meca/2011_Senior/roues/GuideCodeur.CATPart b/meca/2011_Senior/roues/GuideCodeur.CATPart new file mode 100644 index 0000000..6a34cf3 Binary files /dev/null and b/meca/2011_Senior/roues/GuideCodeur.CATPart differ diff --git a/meca/2011_Senior/roues/Moteur.CATPart b/meca/2011_Senior/roues/Moteur.CATPart new file mode 100644 index 0000000..a008df4 Binary files /dev/null and b/meca/2011_Senior/roues/Moteur.CATPart differ diff --git a/meca/2011_Senior/roues/Moyeu hexa BaneBots.CATPart b/meca/2011_Senior/roues/Moyeu hexa BaneBots.CATPart new file mode 100644 index 0000000..4cdfc21 Binary files /dev/null and b/meca/2011_Senior/roues/Moyeu hexa BaneBots.CATPart differ diff --git a/meca/2011_Senior/roues/P20 Arbre.CATPart b/meca/2011_Senior/roues/P20 Arbre.CATPart new file mode 100644 index 0000000..9e42dd2 Binary files /dev/null and b/meca/2011_Senior/roues/P20 Arbre.CATPart differ diff --git a/meca/2011_Senior/roues/P20 Boitier.CATPart b/meca/2011_Senior/roues/P20 Boitier.CATPart new file mode 100644 index 0000000..d4f5cd8 Binary files /dev/null and b/meca/2011_Senior/roues/P20 Boitier.CATPart differ diff --git a/meca/2011_Senior/roues/P20 Sortie.CATPart b/meca/2011_Senior/roues/P20 Sortie.CATPart new file mode 100644 index 0000000..d02b623 Binary files /dev/null and b/meca/2011_Senior/roues/P20 Sortie.CATPart differ diff --git a/meca/2011_Senior/roues/PCMR19-6-5-A.CATPart b/meca/2011_Senior/roues/PCMR19-6-5-A.CATPart new file mode 100644 index 0000000..f2224c0 Binary files /dev/null and b/meca/2011_Senior/roues/PCMR19-6-5-A.CATPart differ diff --git a/meca/2011_Senior/roues/Produit39.CATProduct b/meca/2011_Senior/roues/Produit39.CATProduct new file mode 100644 index 0000000..666dd6a Binary files /dev/null and b/meca/2011_Senior/roues/Produit39.CATProduct differ diff --git a/meca/2011_Senior/roues/Roue BaneBots 3-7_8.CATPart b/meca/2011_Senior/roues/Roue BaneBots 3-7_8.CATPart new file mode 100644 index 0000000..0408c56 Binary files /dev/null and b/meca/2011_Senior/roues/Roue BaneBots 3-7_8.CATPart differ diff --git a/meca/2011_Senior/roues/RoueCodeuse.CATPart b/meca/2011_Senior/roues/RoueCodeuse.CATPart new file mode 100644 index 0000000..f5b11be Binary files /dev/null and b/meca/2011_Senior/roues/RoueCodeuse.CATPart differ diff --git a/meca/2011_Senior/roues/Roulement a billes 606ZZ.CATPart b/meca/2011_Senior/roues/Roulement a billes 606ZZ.CATPart new file mode 100644 index 0000000..88ad064 Binary files /dev/null and b/meca/2011_Senior/roues/Roulement a billes 606ZZ.CATPart differ diff --git a/meca/2011_Senior/roues/RoulementArbreRoue.CATPart b/meca/2011_Senior/roues/RoulementArbreRoue.CATPart new file mode 100644 index 0000000..91d71f0 Binary files /dev/null and b/meca/2011_Senior/roues/RoulementArbreRoue.CATPart differ diff --git a/meca/2011_Senior/roues/Support.CATPart b/meca/2011_Senior/roues/Support.CATPart new file mode 100644 index 0000000..1755f91 Binary files /dev/null and b/meca/2011_Senior/roues/Support.CATPart differ diff --git a/meca/2011_Senior/roues/axe_codeur.CATPart b/meca/2011_Senior/roues/axe_codeur.CATPart new file mode 100644 index 0000000..be6fa77 Binary files /dev/null and b/meca/2011_Senior/roues/axe_codeur.CATPart differ diff --git a/meca/2011_Senior/roues/axe_roue.CATPart b/meca/2011_Senior/roues/axe_roue.CATPart new file mode 100644 index 0000000..db6c154 Binary files /dev/null and b/meca/2011_Senior/roues/axe_roue.CATPart differ diff --git a/meca/2011_Senior/roues/bille.CATProduct b/meca/2011_Senior/roues/bille.CATProduct new file mode 100644 index 0000000..8a78c12 Binary files /dev/null and b/meca/2011_Senior/roues/bille.CATProduct differ diff --git a/meca/2011_Senior/roues/brut.CATPart b/meca/2011_Senior/roues/brut.CATPart new file mode 100644 index 0000000..c114aa8 Binary files /dev/null and b/meca/2011_Senior/roues/brut.CATPart differ diff --git a/meca/2011_Senior/roues/codeur.CATPart b/meca/2011_Senior/roues/codeur.CATPart new file mode 100644 index 0000000..c3fca36 Binary files /dev/null and b/meca/2011_Senior/roues/codeur.CATPart differ diff --git a/meca/2011_Senior/roues/coussinet.CATPart b/meca/2011_Senior/roues/coussinet.CATPart new file mode 100644 index 0000000..1b7d35f Binary files /dev/null and b/meca/2011_Senior/roues/coussinet.CATPart differ diff --git a/meca/2011_Senior/roues/entretoise.CATPart b/meca/2011_Senior/roues/entretoise.CATPart new file mode 100644 index 0000000..642bb3e Binary files /dev/null and b/meca/2011_Senior/roues/entretoise.CATPart differ diff --git a/meca/2011_Senior/roues/pince_haut_gauche.CATPart b/meca/2011_Senior/roues/pince_haut_gauche.CATPart new file mode 100644 index 0000000..4dc8616 Binary files /dev/null and b/meca/2011_Senior/roues/pince_haut_gauche.CATPart differ diff --git a/meca/2011_Senior/usinage/Process1.CATProcess b/meca/2011_Senior/usinage/Process1.CATProcess new file mode 100644 index 0000000..731090b Binary files /dev/null and b/meca/2011_Senior/usinage/Process1.CATProcess differ diff --git a/meca/2011_Senior/usinage/Process2.CATProcess b/meca/2011_Senior/usinage/Process2.CATProcess new file mode 100644 index 0000000..cb9be57 Binary files /dev/null and b/meca/2011_Senior/usinage/Process2.CATProcess differ diff --git a/meca/2011_Senior/usinage/support-odometrie-brut.CATPart b/meca/2011_Senior/usinage/support-odometrie-brut.CATPart new file mode 100644 index 0000000..bbbd97c Binary files /dev/null and b/meca/2011_Senior/usinage/support-odometrie-brut.CATPart differ diff --git a/meca/2011_Senior/usinage/support-odometrie.CATProduct b/meca/2011_Senior/usinage/support-odometrie.CATProduct new file mode 100644 index 0000000..6ebbdc8 Binary files /dev/null and b/meca/2011_Senior/usinage/support-odometrie.CATProduct differ diff --git a/meca/2011_Senior/usinage/usinage-bloc-brut.CATPart b/meca/2011_Senior/usinage/usinage-bloc-brut.CATPart new file mode 100644 index 0000000..6ad6320 Binary files /dev/null and b/meca/2011_Senior/usinage/usinage-bloc-brut.CATPart differ diff --git a/meca/2011_Senior/usinage/usinage-bloc.CATProduct b/meca/2011_Senior/usinage/usinage-bloc.CATProduct new file mode 100644 index 0000000..49b79c6 Binary files /dev/null and b/meca/2011_Senior/usinage/usinage-bloc.CATProduct differ diff --git a/meca/2011_Table/Elements/Pion-base.CATPart b/meca/2011_Table/Elements/Pion-base.CATPart index 3105d04..5b8ff8a 100644 Binary files a/meca/2011_Table/Elements/Pion-base.CATPart and b/meca/2011_Table/Elements/Pion-base.CATPart differ diff --git a/meca/2011_Table/Elements/couronne-roi.CATPart b/meca/2011_Table/Elements/couronne-roi.CATPart index efc1648..8e1fc8a 100644 Binary files a/meca/2011_Table/Elements/couronne-roi.CATPart and b/meca/2011_Table/Elements/couronne-roi.CATPart differ diff --git a/meca/2011_Table/Pion.CATProduct b/meca/2011_Table/Pion.CATProduct index 5de2f76..ff5d5fa 100644 Binary files a/meca/2011_Table/Pion.CATProduct and b/meca/2011_Table/Pion.CATProduct differ diff --git a/meca/2011_Table/Roi.CATProduct b/meca/2011_Table/Roi.CATProduct index 09263ba..24b61ad 100644 Binary files a/meca/2011_Table/Roi.CATProduct and b/meca/2011_Table/Roi.CATProduct differ diff --git a/meca/2011_Table/Tour_complete.CATProduct b/meca/2011_Table/Tour_complete.CATProduct new file mode 100644 index 0000000..e5a57b5 Binary files /dev/null and b/meca/2011_Table/Tour_complete.CATProduct differ diff --git a/meca/Common/Profile en U 1x1x0.125 pouce.CATPart b/meca/Common/Profile en U 1x1x0.125 pouce.CATPart index 118249d..e50b094 100644 Binary files a/meca/Common/Profile en U 1x1x0.125 pouce.CATPart and b/meca/Common/Profile en U 1x1x0.125 pouce.CATPart differ hooks/post-receive -- krobot |
From: Jérémie D. <Ba...@us...> - 2011-04-12 21:50:58
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 267bcf969f0866a9da25d3040e1ab0f589eb9566 (commit) from ea122f2120a515a92164b114a030ece3485da728 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 267bcf969f0866a9da25d3040e1ab0f589eb9566 Author: Jérémie Dimino <je...@di...> Date: Tue Apr 12 23:50:16 2011 +0200 [info] split the viewer and the planner ----------------------------------------------------------------------- Changes: diff --git a/.gitignore b/.gitignore index a443cd9..263aa3c 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ setup.data setup.log _build info/control2011/src/driver/bus.conf +info/control2011/src/services/*.service buildrev.h images obj diff --git a/info/control2011/_oasis b/info/control2011/_oasis index e588a36..5b931a1 100644 --- a/info/control2011/_oasis +++ b/info/control2011/_oasis @@ -13,7 +13,9 @@ BuildTools: ocamlbuild Plugins: DevFiles (0.2), META (0.2) Synopsis: [Kro]bot Description: Control program for the Eurobot robotic cup. -FilesAB: src/driver/bus.conf.ab +FilesAB: + src/driver/bus.conf.ab, + src/services/fr.krobot.Service.Planner.service.ab # +-------------------------------------------------------------------+ # | Flags | @@ -39,7 +41,8 @@ Library krobot Krobot_bus, Krobot_message, Krobot_service, - Krobot_geom + Krobot_geom, + Krobot_planner Library "krobot-can" FindlibName: can @@ -62,7 +65,8 @@ Library "krobot-interfaces" Install: true Modules: Krobot_interface_can, - Krobot_interface_service + Krobot_interface_service, + Krobot_interface_planner # +-------------------------------------------------------------------+ # | The driver | @@ -161,6 +165,18 @@ Executable "krobot-hil-simulator" BuildDepends: krobot, lwt.syntax # +-------------------------------------------------------------------+ +# | Services | +# +-------------------------------------------------------------------+ + +Executable "krobot-service-planner" + Path: src/services + Install: true + CompiledObject: best + MainIs: krobot_service_planner.ml + BuildDepends: krobot, lwt.syntax + DataFiles: fr.krobot.Service.Planner.service ($datadir/$pkg_name/services) + +# +-------------------------------------------------------------------+ # | Examples | # +-------------------------------------------------------------------+ diff --git a/info/control2011/_tags b/info/control2011/_tags index 29a64d4..f190b59 100644 --- a/info/control2011/_tags +++ b/info/control2011/_tags @@ -2,7 +2,7 @@ <src/interfaces/*.ml>: -syntax_camlp4o # OASIS_START -# DO NOT EDIT (digest: 37f25f8d73f8ace7a5648c2d0f189bda) +# DO NOT EDIT (digest: 19f32386260765eb3050ee674e3a3e18) # Library krobot-interfaces "src/interfaces": include "src/interfaces/krobot-interfaces.cmxs": use_krobot-interfaces @@ -84,6 +84,17 @@ <src/tools/krobot_plot_battery.{native,byte}>: pkg_lwt.syntax <src/tools/krobot_plot_battery.{native,byte}>: pkg_lwt.glib <src/tools/krobot_plot_battery.{native,byte}>: pkg_cairo.lablgtk2 +# Executable krobot-service-planner +<src/services/krobot_service_planner.{native,byte}>: use_krobot +<src/services/krobot_service_planner.{native,byte}>: use_krobot-interfaces +<src/services/krobot_service_planner.{native,byte}>: pkg_obus +<src/services/krobot_service_planner.{native,byte}>: pkg_lwt.unix +<src/services/krobot_service_planner.{native,byte}>: pkg_lwt.syntax +<src/services/*.ml{,i}>: use_krobot +<src/services/*.ml{,i}>: use_krobot-interfaces +<src/services/*.ml{,i}>: pkg_obus +<src/services/*.ml{,i}>: pkg_lwt.unix +<src/services/*.ml{,i}>: pkg_lwt.syntax # Executable krobot-remote <src/tools/krobot_remote.{native,byte}>: use_krobot <src/tools/krobot_remote.{native,byte}>: use_krobot-interfaces diff --git a/info/control2011/setup.ml b/info/control2011/setup.ml index 1ab732c..d6cccba 100644 --- a/info/control2011/setup.ml +++ b/info/control2011/setup.ml @@ -1,7 +1,7 @@ (* setup.ml generated for the first time by OASIS v0.2.0~alpha1 *) (* OASIS_START *) -(* DO NOT EDIT (digest: 2fd774d555ea6bdcec2ed57e38e9bc94) *) +(* DO NOT EDIT (digest: b36c743e22b6b1a7b932599bea11f68b) *) (* Regenerated by OASIS v0.2.0 Visit http://oasis.forge.ocamlcore.org for more information and @@ -5049,7 +5049,11 @@ let setup_t = pre_command = [(OASISExpr.EBool true, None)]; post_command = [(OASISExpr.EBool true, None)]; }; - files_ab = ["src/driver/bus.conf.ab"]; + files_ab = + [ + "src/driver/bus.conf.ab"; + "src/services/fr.krobot.Service.Planner.service.ab" + ]; sections = [ Library @@ -5076,7 +5080,11 @@ let setup_t = }, { lib_modules = - ["Krobot_interface_can"; "Krobot_interface_service"]; + [ + "Krobot_interface_can"; + "Krobot_interface_service"; + "Krobot_interface_planner" + ]; lib_internal_modules = []; lib_findlib_parent = Some "krobot"; lib_findlib_name = Some "interfaces"; @@ -5430,6 +5438,40 @@ let setup_t = }); Executable ({ + cs_name = "krobot-service-planner"; + cs_data = PropList.Data.create (); + cs_plugin_data = []; + }, + { + bs_build = [(OASISExpr.EBool true, true)]; + bs_install = [(OASISExpr.EBool true, true)]; + bs_path = "src/services"; + bs_compiled_object = Best; + bs_build_depends = + [ + InternalLibrary "krobot"; + FindlibPackage ("lwt.syntax", None) + ]; + bs_build_tools = [ExternalTool "ocamlbuild"]; + bs_c_sources = []; + bs_data_files = + [ + ("fr.krobot.Service.Planner.service", + Some "$datadir/$pkg_name/services") + ]; + bs_ccopt = [(OASISExpr.EBool true, [])]; + bs_cclib = [(OASISExpr.EBool true, [])]; + bs_dlllib = [(OASISExpr.EBool true, [])]; + bs_dllpath = [(OASISExpr.EBool true, [])]; + bs_byteopt = [(OASISExpr.EBool true, [])]; + bs_nativeopt = [(OASISExpr.EBool true, [])]; + }, + { + exec_custom = false; + exec_main_is = "krobot_service_planner.ml"; + }); + Executable + ({ cs_name = "krobot-remote"; cs_data = PropList.Data.create (); cs_plugin_data = []; diff --git a/info/control2011/src/interfaces/krobot-interfaces.mllib b/info/control2011/src/interfaces/krobot-interfaces.mllib index b25ba41..612c59f 100644 --- a/info/control2011/src/interfaces/krobot-interfaces.mllib +++ b/info/control2011/src/interfaces/krobot-interfaces.mllib @@ -1,5 +1,6 @@ # OASIS_START -# DO NOT EDIT (digest: ca580479098ade9ac95ba1a5fb876b9b) +# DO NOT EDIT (digest: 0fb519fe846821801a9941698a640eef) Krobot_interface_can Krobot_interface_service +Krobot_interface_planner # OASIS_STOP diff --git a/info/control2011/src/interfaces/krobot_interface_planner.obus b/info/control2011/src/interfaces/krobot_interface_planner.obus new file mode 100644 index 0000000..06c722a --- /dev/null +++ b/info/control2011/src/interfaces/krobot_interface_planner.obus @@ -0,0 +1,36 @@ +(* + * krobot_interface_planner.obus + * ----------------------------- + * Copyright : (c) 2011, Jeremie Dimino <je...@di...> + * Licence : BSD3 + * + * This file is a part of [kro]bot. + *) + +(** Interface for the planner. *) + +interface fr.krobot.Planner { + property_rw vertices : (double * double) array + (** Property holding the current list of vertices for the planned + trajectory. *) + + method add_vertice : (vertice : (double * double)) -> () + (** Add a new vertice after all current ones to [vertices]. *) + + method simplify : (tolerance : double) -> () + (** Simplify the trajectory using the given tolerance. *) + + (** Move the robot according to the current trajectory. *) + method go : ( + rotation_speed : double, + rotation_acceleration : double, + moving_speed : double, + moving_acceleration : double + ) -> () + + method stop : () -> () + (** Stop the current trajectory. *) + + property_r moving : boolean + (** Is the robot currently following a trajectory ? *) +} diff --git a/info/control2011/src/lib/krobot_planner.ml b/info/control2011/src/lib/krobot_planner.ml new file mode 100644 index 0000000..918b836 --- /dev/null +++ b/info/control2011/src/lib/krobot_planner.ml @@ -0,0 +1,39 @@ +(* + * krobot_planner.ml + * ----------------- + * Copyright : (c) 2011, Jeremie Dimino <je...@di...> + * Licence : BSD3 + * + * This file is a part of [kro]bot. + *) + +open Lwt +open Lwt_react +open Krobot_geom +open Krobot_interface_planner.Fr_krobot_Planner + +type t = Krobot_bus.t + +let proxy bus = + OBus_proxy.make (OBus_peer.make (Krobot_bus.to_bus bus) "fr.krobot.Service.Planner") ["fr"; "krobot"; "Planner"] + +let vertices bus = + OBus_property.map_rw + (List.map (fun (x, y) -> { x; y })) + (List.map (fun { x; y } -> (x, y))) + (OBus_property.make p_vertices (proxy bus)) + +let add_vertice bus { x; y } = + OBus_method.call m_add_vertice (proxy bus) (x, y) + +let simplify bus tolerance = + OBus_method.call m_simplify (proxy bus) tolerance + +let moving bus = + OBus_property.make p_moving (proxy bus) + +let go bus a b c d = + OBus_method.call m_go (proxy bus) (a, b, c, d) + +let stop bus = + OBus_method.call m_stop (proxy bus) () diff --git a/info/control2011/src/lib/krobot_planner.mli b/info/control2011/src/lib/krobot_planner.mli new file mode 100644 index 0000000..2287ee7 --- /dev/null +++ b/info/control2011/src/lib/krobot_planner.mli @@ -0,0 +1,30 @@ +(* + * krobot_planner.mli + * ------------------ + * Copyright : (c) 2011, Jeremie Dimino <je...@di...> + * Licence : BSD3 + * + * This file is a part of [kro]bot. + *) + +type t = Krobot_bus.t + (** Type of the planner. *) + +val vertices : t -> (Krobot_geom.vertice list, [ `readable | `writable ]) OBus_property.t + (** The property holding the current trajectory. *) + +val add_vertice : t -> Krobot_geom.vertice -> unit Lwt.t + (** Add a vertice at the end of the current trajectory. *) + +val simplify : t -> float -> unit Lwt.t + (** [simplify planner tolerance] simplify the trajectory. *) + +val moving : t -> (bool, [ `readable ]) OBus_property.t + (** Is the robot currently following a trajectory ? *) + +val go : t -> float -> float -> float -> float -> unit Lwt.t + (** [go planner rotation_speed rotation_acceleration moving_speed + moving_acceleration] make the robot to follow the trajectory. *) + +val stop : t -> unit Lwt.t + (** Stop the current trajectory. *) diff --git a/info/control2011/src/services/fr.krobot.Service.Planner.service.ab b/info/control2011/src/services/fr.krobot.Service.Planner.service.ab new file mode 100644 index 0000000..5fa58a5 --- /dev/null +++ b/info/control2011/src/services/fr.krobot.Service.Planner.service.ab @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=fr.krobot.Service.Planner +Exec=$(bindir)/bin/krobot-service-planner diff --git a/info/control2011/src/services/krobot_service_planner.ml b/info/control2011/src/services/krobot_service_planner.ml new file mode 100644 index 0000000..f33d448 --- /dev/null +++ b/info/control2011/src/services/krobot_service_planner.ml @@ -0,0 +1,284 @@ +(* + * krobot_service_planner.ml + * ------------------------- + * Copyright : (c) 2011, Jeremie Dimino <je...@di...> + * Licence : BSD3 + * + * This file is a part of [kro]bot. + *) + +(* The trajectory planner. *) + +open Lwt +open Lwt_react +open Krobot_geom +open Krobot_config +open Krobot_message +open Krobot_interface_planner.Fr_krobot_Planner + +let pi = 4. *. atan 1. + +let math_mod_float a b = + let b2 = b /. 2. in + let modf = mod_float a b in + if modf > b2 then + modf -. b + else if modf < -. b2 then + modf +. b + else + modf;; + +(* +-----------------------------------------------------------------+ + | Types | + +-----------------------------------------------------------------+ *) + +type planner = { + bus : Krobot_bus.t; + (* The message bus used to communicate with the robot. *) + + obus : planner OBus_object.t; + (* The D-Bus object attached to this planner. *) + + vertices : vertice list signal; + (* The list of vertices for the trajectory. *) + + set_vertices : vertice list -> unit; + (* Set the list of vertices. *) + + moving : bool signal; + (* Is the robot moving ? *) + + set_moving : bool -> unit; + (* Set the moving status. *) + + mutable motors_moving : bool; + (* Are the motor currently active ? *) + + mutable mover : unit Lwt.t; + (* The thread moving the robot. *) + + mutable position : vertice; + (* The position of the robot on the board. *) + + mutable orientation : float; + (* The orientation of the robot. *) + + mutable event : unit event; + (* Event kept in the planner. *) +} + +(* +-----------------------------------------------------------------+ + | Primitives | + +-----------------------------------------------------------------+ *) + +let add_vertice planner vertice = + planner.set_vertices (S.value planner.vertices @ [vertice]) + +let simplify planner tolerance = + match S.value planner.vertices with + | [] -> + () + | points -> + let points = Array.of_list points in + let rec loop = function + | i1 :: i2 :: rest -> + let { x = x1; y = y1 } = points.(i1) and { x = x2; y = y2 } = points.(i2) in + let a = y2 -. y1 and b = x1 -. x2 and c = x2 *. y1 -. x1 *. y2 in + let r = sqrt (a *. a +. b *. b) in + if r <> 0. then begin + (* Search the furthest point from the line passing by (x1, + y1) and (x2, y2) *) + let max_dist = ref 0. and at_max = ref i1 in + for i = i1 + 1 to i2 - 1 do + let { x; y } = points.(i) in + let d = abs_float (a *. x +. b *. y +. c) /. r in + if d > !max_dist then begin + max_dist := d; + at_max := i + end + done; + if !max_dist > tolerance then + (* The furthest point is out of tolerance, we split the + current region with it. *) + loop (i1 :: !at_max :: i2 :: rest) + else + (* The point is acceptable, we pass the next region. *) + i1:: loop (i2 :: rest) + end else + (* The two point are the same so we drop one. *) + loop (i2 :: rest) + | rest -> + rest + in + let result = loop [0; Array.length points - 1] in + planner.set_vertices (List.map (fun i -> points.(i)) result) + +let wait_done planner = + lwt () = Lwt_log.info "waiting for the robot to stop moving" in + lwt () = Lwt_unix.sleep 0.3 in + lwt () = + while_lwt planner.motors_moving do + Lwt_unix.sleep 0.2 + done + in + Lwt_log.info "trajectory done" + +let go planner rotation_speed rotation_acceleration moving_speed moving_acceleration = + if S.value planner.moving then + return () + else begin + let rec loop () = + match S.value planner.vertices with + | { x; y } :: rest -> + let sqr x = x *. x in + let radius = sqrt (sqr (max wheels_position (robot_size -. wheels_position)) +. sqr (robot_size /. 2.)) in + if x >= radius && x <= world_width -. radius && y >= radius && y <= world_height -. radius then begin + (* Turn the robot. *) + let alpha = math_mod_float (atan2 (y -. planner.position.y) (x -. planner.position.x) -. planner.orientation) (2. *. pi) in + lwt () = Lwt_log.info_f "turning by %f radiants" alpha in + lwt () = Krobot_message.send planner.bus (Unix.gettimeofday (), + Motor_turn(alpha, + rotation_speed, + rotation_acceleration)) in + lwt () = wait_done planner in + + (* Move the robot. *) + let dist = sqrt (sqr (x -. planner.position.x) +. sqr (y -. planner.position.y)) in + lwt () = Lwt_log.info_f "moving by %f meters" dist in + lwt () = Krobot_message.send planner.bus (Unix.gettimeofday (), + Motor_move(dist, + moving_speed, + moving_acceleration)) in + lwt () = wait_done planner in + + (* Remove the point. *) + (match S.value planner.vertices with + | _ :: l -> planner.set_vertices l + | [] -> ()); + + loop () + end else + Lwt_log.warning_f "can not move to (%f, %f)" x y + | [] -> + return () + in + planner.set_moving true; + planner.mover <- ( + try_lwt + loop () + finally + planner.set_moving false; + return () + ); + return () + end + +let stop planner = + cancel planner.mover; + planner.set_moving false; + planner.set_vertices []; + Krobot_message.send planner.bus (Unix.gettimeofday (), Motor_stop) + +(* +-----------------------------------------------------------------+ + | Object creation | + +-----------------------------------------------------------------+ *) + +let create bus = + let obus_object = + OBus_object.make + ~interfaces:[ + Krobot_interface_planner.Fr_krobot_Planner.make { + p_vertices = + ((fun obj -> + S.map (List.map (fun { x; y } -> (x, y))) (OBus_object.get obj).vertices), + (fun obj vertices -> + (OBus_object.get obj).set_vertices (List.map (fun (x, y) -> { x; y }) vertices); + return ())); + p_moving = + (fun obj -> + (OBus_object.get obj).moving); + m_simplify = + (fun obj tolerance -> + simplify (OBus_object.get obj) tolerance; + return ()); + m_add_vertice = + (fun obj (x, y) -> + add_vertice (OBus_object.get obj) { x; y }; + return ()); + m_go = + (fun obj (a, b, c, d) -> + go (OBus_object.get obj) a b c d); + m_stop = + (fun obj () -> + stop (OBus_object.get obj)); + }; + ] + ["fr"; "krobot"; "Planner"] + in + let vertices, set_vertices = S.create [] in + let moving, set_moving = S.create false in + let planner = { + bus; + obus = obus_object; + vertices; + set_vertices; + moving; + set_moving; + motors_moving = false; + mover = return (); + position = { x = 0.; y = 0. }; + orientation = 0.; + event = E.never; + } in + OBus_object.attach obus_object planner; + + planner.event <- ( + E.map + (fun (ts, frame) -> + match frame with + | Odometry(x, y, theta) -> + planner.position <- { x; y }; + planner.orientation <- math_mod_float theta (2. *. pi) + | Motor_status(m1, m2, m3, m4) -> + planner.motors_moving <- m1 || m2 + | _ -> + ()) + (Krobot_message.recv bus) + ); + + planner + +(* +-----------------------------------------------------------------+ + | Command-line arguments | + +-----------------------------------------------------------------+ *) + +let fork = ref true +let kill = ref false + +let options = Arg.align [ + "-no-fork", Arg.Clear fork, " Run in foreground"; + "-kill", Arg.Set kill, " Kill any running planner and exit"; +] + +let usage = "\ +Usage: krobot-planner [options] +options are:" + +(* +-----------------------------------------------------------------+ + | Entry point | + +-----------------------------------------------------------------+ *) + +lwt () = + Arg.parse options ignore usage; + + lwt bus = Krobot_bus.get () in + lwt () = Krobot_service.init bus ~kill:!kill ~fork:!fork "Planner" in + + (* Create a new planner. *) + let planner = create bus in + + (* Export it on the krobot bus. *) + OBus_object.export (Krobot_bus.to_bus bus) planner.obus; + + (* Wait forever. *) + fst (wait ()) diff --git a/info/control2011/src/tools/krobot_viewer.ml b/info/control2011/src/tools/krobot_viewer.ml index 91ac856..d93c17f 100644 --- a/info/control2011/src/tools/krobot_viewer.ml +++ b/info/control2011/src/tools/krobot_viewer.ml @@ -194,13 +194,22 @@ module Board = struct type t = { bus : Krobot_bus.t; + (* The D-Bus message bus used by this board. *) + ui : Krobot_viewer_ui.window; + (* The UI of the board. *) + mutable state : state; + (* The state of the robot. *) + mutable beacon : beacon; - mutable points : vertice list; - mutable bezier : vertice array list; - mutable event : unit event; - mutable moving : bool; + (* The state of the beacon. *) + + vertices : vertice list signal; + (* The current trajectory. *) + + mutable events : unit event list; + (* List of events kept in the board. *) } type color = @@ -406,11 +415,13 @@ module Board = struct (* Draw points. *) Cairo.set_source_rgb ctx 255. 255. 0.; Cairo.move_to ctx board.state.pos.x board.state.pos.y; - List.iter (fun { x; y } -> Cairo.line_to ctx x y) board.points; + List.iter (fun { x; y } -> Cairo.line_to ctx x y) (S.value board.vertices); Cairo.stroke ctx; +(* Cairo.set_source_rgb ctx 255. 0. 255.; List.iter (Array.iter (fun { x; y } -> Cairo.line_to ctx x y)) board.bezier; Cairo.stroke ctx; +*) let ctx = Cairo_lablgtk.create board.ui#scene#misc#window in Cairo.set_source_surface ctx surface 0. 0.; @@ -428,15 +439,11 @@ module Board = struct let scale = dw /. (world_width +. 0.204) in let x0 = (width -. dw) /. 2. and y0 = (height -. dh) /. 2. in let x = (x -. x0) /. scale -. 0.102 and y = world_height -. ((y -. y0) /. scale -. 0.102) in - if x >= 0. && x < world_width && y >= 0. && y < world_height then begin - board.points <- board.points @ [{ x; y }]; - queue_draw board - end + if x >= 0. && x < world_width && y >= 0. && y < world_height then + ignore_result (Krobot_planner.add_vertice board.bus { x; y }) let clear board = - board.points <- []; - board.bezier <- []; - queue_draw board + ignore_result (OBus_property.set (Krobot_planner.vertices board.bus) []) let rec last = function | [] -> failwith "Krobot_viewer.Board.last" @@ -444,42 +451,10 @@ module Board = struct | _ :: l -> last l let smooth board = - let points = Array.of_list ({ x = board.state.pos.x; y = board.state.pos.y } :: board.points) in let tolerance = board.ui#tolerance#adjustment#value in - let rec loop = function - | i1 :: i2 :: rest -> - let { x = x1; y = y1 } = points.(i1) and { x = x2; y = y2 } = points.(i2) in - let a = y2 -. y1 and b = x1 -. x2 and c = x2 *. y1 -. x1 *. y2 in - let r = sqrt (a *. a +. b *. b) in - if r <> 0. then begin - (* Search the furthest point from the line passing by (x1, - y1) and (x2, y2) *) - let max_dist = ref 0. and at_max = ref i1 in - for i = i1 + 1 to i2 - 1 do - let { x; y } = points.(i) in - let d = abs_float (a *. x +. b *. y +. c) /. r in - if d > !max_dist then begin - max_dist := d; - at_max := i - end - done; - if !max_dist > tolerance then - (* The furthest point is out of tolerance, we split the - current region with it. *) - loop (i1 :: !at_max :: i2 :: rest) - else - (* The point is acceptable, we pass the next region. *) - i1:: loop (i2 :: rest) - end else - (* The two point are the same so we drop one. *) - loop (i2 :: rest) - | rest -> - rest - in - let result = List.tl (loop [0; Array.length points - 1]); in - board.points <- List.map (fun i -> points.(i)) result; + ignore_result (Krobot_planner.simplify board.bus tolerance) - let bezier_vertices q r v1 v2 = +(* let bezier_vertices q r v1 v2 = (* Create the bezier curve. *) let curve = Bezier.of_vertices q (translate q v1) (translate r v2) r in @@ -530,62 +505,10 @@ module Board = struct end; queue_draw board - - let wait_done board = - lwt () = Lwt_log.info "waiting for the robot to stop moving" in - lwt () = Lwt_unix.sleep 0.3 in - lwt () = - while_lwt board.moving do - Lwt_unix.sleep 0.2 - done - in - Lwt_log.info "trajectory done" - - let go board = - let rec loop () = - match board.points with - | { x; y } :: rest -> - let sqr x = x *. x in - let radius = sqrt (sqr (max wheels_position (robot_size -. wheels_position)) +. sqr (robot_size /. 2.)) in - if x >= radius && x <= world_width -. radius && y >= radius && y <= world_height -. radius then begin - (* Turn the robot. *) - let alpha = math_mod_float (atan2 (y -. board.state.pos.y) (x -. board.state.pos.x) -. board.state.theta) (2. *. pi) in - lwt () = Lwt_log.info_f "turning by %f radiants" alpha in - lwt () = Krobot_message.send board.bus (Unix.gettimeofday (), - Motor_turn(alpha, - board.ui#rotation_speed#adjustment#value, - board.ui#rotation_acceleration#adjustment#value)) in - lwt () = wait_done board in - - (* Move the robot. *) - let dist = sqrt (sqr (x -. board.state.pos.x) +. sqr (y -. board.state.pos.y)) in - lwt () = Lwt_log.info_f "moving by %f meters" dist in - lwt () = Krobot_message.send board.bus (Unix.gettimeofday (), - Motor_move(dist, - board.ui#moving_speed#adjustment#value, - board.ui#moving_acceleration#adjustment#value)) in - lwt () = wait_done board in - - (* Remove the point. *) - (match board.points with - | _ :: l -> board.points <- l - | [] -> ()); - (match board.bezier with - | _ :: l -> board.bezier <- l - | [] -> ()); - - (* Redraw everything without the last point. *) - queue_draw board; - - loop () - end else - Lwt_log.warning_f "can not move to (%f, %f)" x y - | [] -> - return () - in - loop () +*) let create bus ui = + lwt vertices = OBus_property.monitor (Krobot_planner.vertices bus) in let board ={ bus; ui; @@ -595,10 +518,8 @@ module Board = struct theta = -0.5 *. pi }; beacon = { xbeacon = 1.; ybeacon = 1.; valid = false }; - points = []; - bezier = []; - event = E.never; - moving = false; + vertices; + events = []; } in board.ui#beacon_status#set_text "-"; board.ui#beacon_distance#set_text "-"; @@ -607,7 +528,8 @@ module Board = struct queue_draw board; (* Move the robot on the board when we receive odometry informations. *) - board.event <- ( + board.events <- [ + (* Handle CAN frames. *) E.map (fun (ts, frame) -> match frame with @@ -622,7 +544,6 @@ module Board = struct queue_draw board end | Motor_status(m1, m2, m3, m4) -> - board.moving <- m1 || m2; board.ui#entry_moving1#set_text (if m1 then "yes" else "no"); board.ui#entry_moving2#set_text (if m2 then "yes" else "no"); board.ui#entry_moving3#set_text (if m3 then "yes" else "no"); @@ -648,9 +569,12 @@ module Board = struct board.ui#menu_mode_normal#set_active true | _ -> ()) - (Krobot_message.recv bus) - ); - board + (Krobot_message.recv bus); + + (* Redraw everything when the list of vertices changes. *) + E.map (fun _ -> queue_draw board) (S.changes vertices); + ]; + return board end (* +-----------------------------------------------------------------+ @@ -696,7 +620,7 @@ lwt () = let lcd = LCD.create ui in ignore (ui#lcd#event#connect#expose (fun ev -> LCD.draw lcd; true)); - let board = Board.create bus ui in + lwt board = Board.create bus ui in ignore (ui#scene#event#connect#expose (fun ev -> Board.draw board; true)); ignore (ui#scene#event#connect#button_press @@ -723,25 +647,22 @@ lwt () = Board.smooth board; false)); - let thread_go = ref (return ()) in ignore (ui#button_go#event#connect#button_release (fun ev -> if GdkEvent.Button.button ev = 1 then ignore_result ( - ui#button_go#misc#set_sensitive false; - try_lwt - thread_go := Board.go board; - !thread_go - with - | Canceled -> - return () - finally - ui#button_go#misc#set_sensitive true; - return () + Krobot_planner.go bus + ui#rotation_speed#adjustment#value + ui#rotation_acceleration#adjustment#value + ui#moving_speed#adjustment#value + ui#moving_acceleration#adjustment#value ); false)); + lwt moving = OBus_property.monitor (Krobot_planner.moving bus) in + S.keep (S.map (fun state -> ui#button_go#misc#set_sensitive (not state)) moving); + ignore (ui#button_start_red#event#connect#button_release (fun ev -> @@ -767,13 +688,8 @@ lwt () = ignore (ui#button_stop#event#connect#button_release (fun ev -> - if GdkEvent.Button.button ev = 1 then begin - Board.clear board; - cancel !thread_go; - ignore_result ( - Krobot_message.send bus (Unix.gettimeofday (), Motor_stop) - ) - end; + if GdkEvent.Button.button ev = 1 then + ignore_result (Krobot_planner.stop bus); false)); ignore hooks/post-receive -- krobot |
From: Xavier L. <Ba...@us...> - 2011-04-12 15:03:43
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via ea122f2120a515a92164b114a030ece3485da728 (commit) via ae777de7a4849b774636e041ee4735f89b857610 (commit) from 81ad433ad4992f4c336e5bcf236cb4c3edf49ac5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit ea122f2120a515a92164b114a030ece3485da728 Author: Xavier Lagorce <Xav...@cr...> Date: Tue Apr 12 17:02:47 2011 +0200 [info] Added menu items to manage normal/HIL mode. This menu items react to CAN message to allow setting the mode in a collaborative manner between viewers and other programs (like krobot-hil-simulator). commit ae777de7a4849b774636e041ee4735f89b857610 Author: Xavier Lagorce <Xav...@cr...> Date: Tue Apr 12 14:56:13 2011 +0200 [info] Re-enabling automatic passage in HIL mode when starting krobot-hil-simulator ----------------------------------------------------------------------- Changes: diff --git a/info/control2011/src/tools/krobot_hil_simulator.ml b/info/control2011/src/tools/krobot_hil_simulator.ml index 57e9105..10881c0 100644 --- a/info/control2011/src/tools/krobot_hil_simulator.ml +++ b/info/control2011/src/tools/krobot_hil_simulator.ml @@ -122,7 +122,7 @@ lwt () = return ()) (Krobot_message.recv bus)); -(* lwt () = Krobot_message.send bus (Unix.gettimeofday (), Set_controller_mode true) in*) + lwt () = Krobot_message.send bus (Unix.gettimeofday (), Set_controller_mode true) in while_lwt true do let time = Unix.gettimeofday () in diff --git a/info/control2011/src/tools/krobot_viewer.ml b/info/control2011/src/tools/krobot_viewer.ml index 7406bc0..91ac856 100644 --- a/info/control2011/src/tools/krobot_viewer.ml +++ b/info/control2011/src/tools/krobot_viewer.ml @@ -641,6 +641,11 @@ module Board = struct board.ui#beacon_period#set_text (string_of_float period); queue_draw board end + | Set_controller_mode (hil) -> + if hil then + board.ui#menu_mode_hil#set_active true + else + board.ui#menu_mode_normal#set_active true | _ -> ()) (Krobot_message.recv bus) @@ -771,6 +776,28 @@ lwt () = end; false)); + ignore + (ui#menu_mode_normal#event#connect#button_release + (fun ev -> + if GdkEvent.Button.button ev = 1 then + ignore_result ( + Krobot_message.send bus + (Unix.gettimeofday (), + Set_controller_mode false) + ); + false)); + + ignore + (ui#menu_mode_hil#event#connect#button_release + (fun ev -> + if GdkEvent.Button.button ev = 1 then + ignore_result ( + Krobot_message.send bus + (Unix.gettimeofday (), + Set_controller_mode true) + ); + false)); + pick [ waiter; (* Sends motor status request continously. *) diff --git a/info/control2011/src/tools/krobot_viewer_ui.glade b/info/control2011/src/tools/krobot_viewer_ui.glade index 485278d..c1cf4e5 100644 --- a/info/control2011/src/tools/krobot_viewer_ui.glade +++ b/info/control2011/src/tools/krobot_viewer_ui.glade @@ -121,6 +121,37 @@ </widget> </child> <child> + <widget class="GtkMenuItem" id="menu_mode"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Mode</property> + <property name="use_underline">True</property> + <child> + <widget class="GtkMenu" id="menu4"> + <property name="visible">True</property> + <child> + <widget class="GtkRadioMenuItem" id="menu_mode_normal"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Normal</property> + <property name="use_underline">True</property> + <property name="active">True</property> + <property name="draw_as_radio">True</property> + <property name="group">menu_mode_hil</property> + </widget> + </child> + <child> + <widget class="GtkRadioMenuItem" id="menu_mode_hil"> + <property name="visible">True</property> + <property name="label" translatable="yes">_HIL</property> + <property name="use_underline">True</property> + <property name="draw_as_radio">True</property> + <property name="group">menu_mode_normal</property> + </widget> + </child> + </widget> + </child> + </widget> + </child> + <child> <widget class="GtkMenuItem" id="menuitem4"> <property name="visible">True</property> <property name="label" translatable="yes">Aid_e</property> hooks/post-receive -- krobot |
From: Xavier L. <Ba...@us...> - 2011-04-12 12:48:27
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 81ad433ad4992f4c336e5bcf236cb4c3edf49ac5 (commit) from 95c331e1f020fae9b686285a13fa515fd647e229 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 81ad433ad4992f4c336e5bcf236cb4c3edf49ac5 Author: Xavier Lagorce <Xav...@cr...> Date: Tue Apr 12 14:47:38 2011 +0200 [Controller_Motor_STM32] Refactored blinkyness in motor_controller The HIL mode has been tested and works perfectly. ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/can_monitor.c b/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/can_monitor.c index 0625ce5..2c0e6da 100644 --- a/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/can_monitor.c +++ b/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/can_monitor.c @@ -17,7 +17,7 @@ PROC_DEFINE_STACK(stack_can_send, KERN_MINSTACKSIZE * 8); PROC_DEFINE_STACK(stack_can_receive, KERN_MINSTACKSIZE * 8); // globals -uint8_t mode; +volatile uint8_t mode; // Structures to represent data into CAN messages typedef struct { diff --git a/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/motor_controller.c b/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/motor_controller.c index 56fef1a..3bc54e0 100644 --- a/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/motor_controller.c +++ b/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/motor_controller.c @@ -52,6 +52,40 @@ static inline uint8_t get_motor_index(uint8_t motor_id) { return motor_ind; } +static inline void motor_led_on(uint8_t motor_id) { + switch (motor_id) { + case MOTOR1: + LED1_ON(); + break; + case MOTOR2: + LED2_ON(); + break; + case MOTOR3: + LED3_ON(); + break; + case MOTOR4: + LED4_ON(); + break; + } +} + +static inline void motor_led_off(uint8_t motor_id) { + switch (motor_id) { + case MOTOR1: + LED1_OFF(); + break; + case MOTOR2: + LED2_OFF(); + break; + case MOTOR3: + LED3_OFF(); + break; + case MOTOR4: + LED4_OFF(); + break; + } +} + // Process functions for control and simulation static void NORETURN motorController_process(void); static void NORETURN motorController_HIL_process(void); @@ -131,6 +165,9 @@ static void NORETURN motorController_process(void) { timer_setDelay(&timer, ms_to_ticks((mtime_t)(params->T*1000))); timer_setEvent(&timer); + // Switch off motor LED + motor_led_off(params->motor); + while (1) { if (params->enable == 0) { params->running = 0; @@ -202,38 +239,11 @@ static void NORETURN motorController_HIL_process(void) { timer_add(&timer); if (last_t >= 0.2) { - if (led_state == 0) { - led_state = 1; - switch (params->motor) { - case MOTOR1: - LED1_ON(); - break; - case MOTOR2: - LED2_ON(); - break; - case MOTOR3: - LED3_ON(); - break; - case MOTOR4: - LED4_ON(); - break; - } + led_state = !led_state; + if (led_state) { + motor_led_on(params->motor); } else { - led_state = 0; - switch (params->motor) { - case MOTOR1: - LED1_OFF(); - break; - case MOTOR2: - LED2_OFF(); - break; - case MOTOR3: - LED3_OFF(); - break; - case MOTOR4: - LED4_OFF(); - break; - } + motor_led_off(params->motor); } last_t -= 0.2; } hooks/post-receive -- krobot |
From: Xavier L. <Ba...@us...> - 2011-04-11 15:22:19
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 95c331e1f020fae9b686285a13fa515fd647e229 (commit) from 6372a8e32c1daf34673376822b685c0f6468ecb1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 95c331e1f020fae9b686285a13fa515fd647e229 Author: Xavier Lagorce <Xav...@cr...> Date: Mon Apr 11 17:22:04 2011 +0200 [Controller_Motor_STM32] Use static stacks in motor_controller instead of the heap ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/motor_controller.c b/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/motor_controller.c index 14f0777..56fef1a 100644 --- a/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/motor_controller.c +++ b/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/motor_controller.c @@ -15,6 +15,8 @@ #define MIN(x,y) ((x) > (y) ? (y) : (x)) #endif +#define CONTROLLERS_STACK_SIZE (KERN_MINSTACKSIZE*16) + typedef struct { uint8_t enable; // Is this controller enabled ? @@ -34,10 +36,13 @@ typedef struct uint16_t last_encoder_pos; // Last encoder position measured float F[4]; // evolution matrix float G[2]; // command application matrix - float T; // sampling period in seconds + float T; // sampling period in seconds + cpu_stack_t *stack; // controller process stack + size_t stack_size; // controller process stack size } control_params_t; static control_params_t controllers[4]; +static cpu_stack_t controllers_stacks[4][(CONTROLLERS_STACK_SIZE + sizeof(cpu_stack_t) - 1) / sizeof(cpu_stack_t)]; static inline uint8_t get_motor_index(uint8_t motor_id) { uint8_t motor_ind; @@ -251,6 +256,8 @@ void motorControllerInit() { for (motor_ind = 0; motor_ind < 4; motor_ind++) { controllers[motor_ind].enable = 0; controllers[motor_ind].running = 0; + controllers[motor_ind].stack = &controllers_stacks[motor_ind][0]; + controllers[motor_ind].stack_size = sizeof(controllers_stacks[motor_ind]); } encodersInit(); @@ -323,12 +330,12 @@ uint8_t mc_new_controller(motor_controller_params_t *cntr_params, command_genera // start the correct controller depending on the mode params->mode = mode; if (mode == CONTROLLER_MODE_NORMAL) { - proc_new(motorController_process, params, KERN_MINSTACKSIZE * 16, NULL); + proc_new(motorController_process, params, params->stack_size, params->stack); enableMotor(cntr_params->motor); motorSetSpeed(cntr_params->motor, 0); } else { - proc_new(motorController_HIL_process, params, KERN_MINSTACKSIZE * 16, NULL); + proc_new(motorController_HIL_process, params, params->stack_size, params->stack); } return CONTROLLER_OK; @@ -380,12 +387,12 @@ void mc_change_mode(uint8_t motor, uint8_t new_mode) { // start the correct controller depending on the mode if (new_mode == CONTROLLER_MODE_NORMAL) { - proc_new(motorController_process, params, KERN_MINSTACKSIZE * 16, NULL); + proc_new(motorController_process, params, params->stack_size, params->stack); enableMotor(params->motor); motorSetSpeed(params->motor, 0); } else { - proc_new(motorController_HIL_process, params, KERN_MINSTACKSIZE * 16, NULL); + proc_new(motorController_HIL_process, params, params->stack_size, params->stack); } } } diff --git a/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/motor_controller.h b/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/motor_controller.h index edf226c..f78cde4 100644 --- a/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/motor_controller.h +++ b/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/motor_controller.h @@ -9,6 +9,7 @@ #include "motor.h" #include "encoder.h" #include "command_generator.h" +#include <kern/proc.h> #define CONTROLLER_OK 0 #define CONTROLLER_ALREADY_USED 1 hooks/post-receive -- krobot |
From: Xavier L. <Ba...@us...> - 2011-04-11 14:24:29
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 6372a8e32c1daf34673376822b685c0f6468ecb1 (commit) from a5fddbe02e67831b0025060be4a9ca30827f82f4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 6372a8e32c1daf34673376822b685c0f6468ecb1 Author: Xavier Lagorce <Xav...@cr...> Date: Mon Apr 11 16:23:13 2011 +0200 [Controller_Motor_STM32] More relevant blinky in HIL mode ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/motor_controller.c b/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/motor_controller.c index 4875872..14f0777 100644 --- a/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/motor_controller.c +++ b/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/motor_controller.c @@ -34,7 +34,7 @@ typedef struct uint16_t last_encoder_pos; // Last encoder position measured float F[4]; // evolution matrix float G[2]; // command application matrix - ticks_t T; // sampling period in seconds + float T; // sampling period in seconds } control_params_t; static control_params_t controllers[4]; @@ -196,17 +196,41 @@ static void NORETURN motorController_HIL_process(void) { } else { timer_add(&timer); - if (last_t >= 1.0) { + if (last_t >= 0.2) { if (led_state == 0) { led_state = 1; - LED3_ON(); - LED4_ON(); + switch (params->motor) { + case MOTOR1: + LED1_ON(); + break; + case MOTOR2: + LED2_ON(); + break; + case MOTOR3: + LED3_ON(); + break; + case MOTOR4: + LED4_ON(); + break; + } } else { led_state = 0; - LED3_ON(); - LED4_ON(); + switch (params->motor) { + case MOTOR1: + LED1_OFF(); + break; + case MOTOR2: + LED2_OFF(); + break; + case MOTOR3: + LED3_OFF(); + break; + case MOTOR4: + LED4_OFF(); + break; + } } - last_t -= 1.0; + last_t -= 0.2; } // Compute "state estimation" hooks/post-receive -- krobot |
From: Nicolas D. <Ba...@us...> - 2011-04-10 21:08:19
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via a5fddbe02e67831b0025060be4a9ca30827f82f4 (commit) from 318972860cd4780ebc131f01cd87017239268874 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a5fddbe02e67831b0025060be4a9ca30827f82f4 Author: Nicolas Dandrimont <Nic...@cr...> Date: Sun Apr 10 23:07:23 2011 +0200 [USB_CAN] Fix off by one error in size verifications ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/USB_CAN/Firmware/usb_can/usb_can/usb_can.c b/elec/boards/USB_CAN/Firmware/usb_can/usb_can/usb_can.c index f1e6314..259d2d5 100644 --- a/elec/boards/USB_CAN/Firmware/usb_can/usb_can/usb_can.c +++ b/elec/boards/USB_CAN/Firmware/usb_can/usb_can/usb_can.c @@ -137,7 +137,7 @@ int usb_can_execute_command(usb_can *usbcan, char *command, size_t len) { frame.dlc = nibble_to_uint32(&command[9], 1); for (i = 0; i < frame.dlc; i++) frame.data8[i] = nibble_to_uint32(&command[10 + 2*i], 2); - if (len == (size_t)(8 + 1 + 2*frame.dlc)) + if (len == (size_t)(9 + 1 + 2*frame.dlc)) send = true; else broken = true; @@ -151,7 +151,7 @@ int usb_can_execute_command(usb_can *usbcan, char *command, size_t len) { frame.dlc = nibble_to_uint32(&command[4], 1); for (i = 0; i < frame.dlc; i++) frame.data8[i] = nibble_to_uint32(&command[5 + 2*i], 2); - if (len == (size_t)(3 + 1 + 2*frame.dlc)) + if (len == (size_t)(4 + 1 + 2*frame.dlc)) send = true; else broken = true; hooks/post-receive -- krobot |
From: Xavier L. <Ba...@us...> - 2011-04-10 20:17:15
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 318972860cd4780ebc131f01cd87017239268874 (commit) from 5a886f436c126dc5f45bcb7f6c51daac842b0247 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 318972860cd4780ebc131f01cd87017239268874 Author: Xavier Lagorce <Xav...@cr...> Date: Sun Apr 10 22:14:52 2011 +0200 [info] Rotational speed expression correction in krobot_hil_simulator ----------------------------------------------------------------------- Changes: diff --git a/info/control2011/src/tools/krobot_hil_simulator.ml b/info/control2011/src/tools/krobot_hil_simulator.ml index 33b9e2e..57e9105 100644 --- a/info/control2011/src/tools/krobot_hil_simulator.ml +++ b/info/control2011/src/tools/krobot_hil_simulator.ml @@ -135,7 +135,7 @@ lwt () = lwt () = print sim in let u1 = (sim.velocity_l +. sim.velocity_r) *. wheels_diameter /. 4. - and u2 = (sim.velocity_l -. sim.velocity_r) *. wheels_diameter /. wheels_distance in + and u2 = (sim.velocity_l -. sim.velocity_r) *. wheels_diameter /. wheels_distance /. 2. in let dx = u1 *. (cos sim.state.theta) and dy = u1 *. (sin sim.state.theta) and dtheta = u2 in hooks/post-receive -- krobot |
From: Nicolas D. <Ba...@us...> - 2011-04-10 18:55:02
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 5a886f436c126dc5f45bcb7f6c51daac842b0247 (commit) via 8fb9994adad41e9ee8eded43f0ede77b4e0d56d3 (commit) from a76fb714ce409ede1b0357665e51a6b6c3bb3878 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 5a886f436c126dc5f45bcb7f6c51daac842b0247 Author: Nicolas Dandrimont <Nic...@cr...> Date: Sun Apr 10 20:51:21 2011 +0200 [USB_CAN] Drop BeRTOS's serial driver for one of our own This driver should be lighter and thus faster than the one from BeRTOS. The card now also sends an error CAN packet to the USB side when it gets unexpected data from the serial port. commit 8fb9994adad41e9ee8eded43f0ede77b4e0d56d3 Author: Nicolas Dandrimont <Nic...@cr...> Date: Sun Apr 10 20:50:40 2011 +0200 [USB_CAN] Fix debug module ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/USB_CAN/Firmware/bertos/cpu/cortex-m3/drv/kdebug_stm32.c b/elec/boards/USB_CAN/Firmware/bertos/cpu/cortex-m3/drv/kdebug_stm32.c index a60d19e..d6b1582 100644 --- a/elec/boards/USB_CAN/Firmware/bertos/cpu/cortex-m3/drv/kdebug_stm32.c +++ b/elec/boards/USB_CAN/Firmware/bertos/cpu/cortex-m3/drv/kdebug_stm32.c @@ -77,9 +77,9 @@ INLINE void kdbg_hw_init(void) RCC->APB2ENR |= RCC_APB2_AFIO; /* Configure USART pins */ #if CONFIG_KDEBUG_PORT == 0 - RCC->APB2ENR |= RCC_APB2_GPIOA; + RCC->APB2ENR |= RCC_APB2_GPIOB; RCC->APB2ENR |= RCC_APB2_USART1; - stm32_gpioPinConfig((struct stm32_gpio *)GPIOA_BASE, GPIO_USART1_TX_PIN, + stm32_gpioPinConfig((struct stm32_gpio *)GPIOB_BASE, GPIO_USART1_TX_PIN, GPIO_MODE_AF_PP, GPIO_SPEED_50MHZ); #elif CONFIG_KDEBUG_PORT == 1 RCC->APB2ENR |= RCC_APB2_GPIOA; diff --git a/elec/boards/USB_CAN/Firmware/bertos/cpu/cortex-m3/drv/ser_stm32.c b/elec/boards/USB_CAN/Firmware/bertos/cpu/cortex-m3/drv/ser_stm32.c index 0b8c4f3..5ba253a 100644 --- a/elec/boards/USB_CAN/Firmware/bertos/cpu/cortex-m3/drv/ser_stm32.c +++ b/elec/boards/USB_CAN/Firmware/bertos/cpu/cortex-m3/drv/ser_stm32.c @@ -82,10 +82,10 @@ static const struct gpio_uart_info gpio_uart[SER_CNT] = { /* UART1 */ { - .base = GPIOA_BASE, + .base = GPIOB_BASE, .rx_pin = GPIO_USART1_RX_PIN, .tx_pin = GPIO_USART1_TX_PIN, - .sysctl_gpio = RCC_APB2_GPIOA, + .sysctl_gpio = RCC_APB2_GPIOB, .sysctl_usart = RCC_APB2_USART1, }, /* UART2 */ diff --git a/elec/boards/USB_CAN/Firmware/bertos/cpu/cortex-m3/io/stm32.h b/elec/boards/USB_CAN/Firmware/bertos/cpu/cortex-m3/io/stm32.h index 49ee9b1..7496baa 100644 --- a/elec/boards/USB_CAN/Firmware/bertos/cpu/cortex-m3/io/stm32.h +++ b/elec/boards/USB_CAN/Firmware/bertos/cpu/cortex-m3/io/stm32.h @@ -57,8 +57,8 @@ #define GPIO_USART2_TX_PIN BV(2) #define GPIO_USART2_RX_PIN BV(3) #elif CPU_CM3_STM32F103RB || CPU_CM3_STM32F103RE - #define GPIO_USART1_TX_PIN BV(9) - #define GPIO_USART1_RX_PIN BV(10) + #define GPIO_USART1_TX_PIN BV(6) + #define GPIO_USART1_RX_PIN BV(7) #define GPIO_USART2_TX_PIN BV(2) #define GPIO_USART2_RX_PIN BV(3) #define GPIO_USART3_TX_PIN BV(10) diff --git a/elec/boards/USB_CAN/Firmware/project.bertos b/elec/boards/USB_CAN/Firmware/project.bertos index db0a5ab..14fd002 100644 --- a/elec/boards/USB_CAN/Firmware/project.bertos +++ b/elec/boards/USB_CAN/Firmware/project.bertos @@ -29,50 +29,46 @@ p13 (lp14 S'signal' p15 -aS'debug' -p16 aS'kernel' +p16 +aS'monitor' p17 -aS'ser' -p18 aS'kfile' -p19 +p18 aS'sprintf' +p19 +aS'timer' p20 -aS'monitor' +aS'formatwr' p21 -aS'timer' +aS'semaphores' p22 -aS'formatwr' +aS'heap' p23 -aS'semaphores' +aS'can' p24 -aS'heap' +aS'i2c' p25 -aS'can' +asS'CPU_NAME' p26 -aS'i2c' +VSTM32F103RE p27 -asS'CPU_NAME' +sS'PROJECT_HW_PATH' p28 -VSTM32F103RE +Vusb_can p29 -sS'PROJECT_HW_PATH' +sS'PROJECT_SRC_PATH' p30 Vusb_can p31 -sS'PROJECT_SRC_PATH' -p32 -Vusb_can -p33 sS'PRESET' -p34 +p32 NsS'PROJECT_SRC_PATH_FROM_MAKEFILE' -p35 +p33 g7 sS'OUTPUT' -p36 -(lp37 +p34 +(lp35 S'codelite' -p38 +p36 as. \ No newline at end of file diff --git a/elec/boards/USB_CAN/Firmware/usb_can/cfg/cfg_context_switch.h b/elec/boards/USB_CAN/Firmware/usb_can/cfg/cfg_context_switch.h index fe0b4f8..2607d50 100644 --- a/elec/boards/USB_CAN/Firmware/usb_can/cfg/cfg_context_switch.h +++ b/elec/boards/USB_CAN/Firmware/usb_can/cfg/cfg_context_switch.h @@ -45,7 +45,7 @@ * $WIZ$ module= "boolean" * $WIZ$ conditional_deps = "ser" */ -#define CONFIG_USE_HP_TIMER 1 +#define CONFIG_USE_HP_TIMER 0 /** diff --git a/elec/boards/USB_CAN/Firmware/usb_can/cfg/cfg_debug.h b/elec/boards/USB_CAN/Firmware/usb_can/cfg/cfg_debug.h index e922362..1063984 100644 --- a/elec/boards/USB_CAN/Firmware/usb_can/cfg/cfg_debug.h +++ b/elec/boards/USB_CAN/Firmware/usb_can/cfg/cfg_debug.h @@ -49,7 +49,7 @@ * Baudrate for the debug console. * $WIZ$ type = "int"; min = 300 */ -#define CONFIG_KDEBUG_BAUDRATE 38400UL +#define CONFIG_KDEBUG_BAUDRATE 115200UL /** * Clock source for the UART module. You need to write the code to reprogram the respective clock at the required frequency in your project before calling kdbg_init(). diff --git a/elec/boards/USB_CAN/Firmware/usb_can/main.c b/elec/boards/USB_CAN/Firmware/usb_can/main.c index 3f61e9a..4f984b8 100644 --- a/elec/boards/USB_CAN/Firmware/usb_can/main.c +++ b/elec/boards/USB_CAN/Firmware/usb_can/main.c @@ -28,11 +28,11 @@ #include <cpu/irq.h> +#include <drv/clock_stm32.h> #include <drv/gpio_stm32.h> #include <drv/can.h> #include <drv/i2c.h> -#include <drv/ser.h> #include <drv/timer.h> #include <kern/monitor.h> @@ -40,14 +40,13 @@ #include <io/kfile.h> #include "battery_monitoring/battery_monitoring.h" +#include "usb_can/serial.h" #include "usb_can/usb_can.h" #define SERIAL_BAUDRATE 1000000 PROC_DEFINE_STACK(stack_blinky, KERN_MINSTACKSIZE * 2); -static struct Serial ser; - static I2c i2c; static void init(void) @@ -67,8 +66,11 @@ static void init(void) /* Enable all the interrupts */ IRQ_ENABLE; + //RCC->APB2ENR |= RCC_APB2_AFIO; + //stm32_gpioRemap(GPIO_REMAP_USART1, GPIO_REMAP_ENABLE); + /* Initialize debugging module (allow kprintf(), etc.) */ - kdbg_init(); + //kdbg_init(); /* Initialize system timer */ timer_init(); @@ -84,8 +86,7 @@ static void init(void) LED3_ON(); /* Initialize Serial driver */ - ser_init(&ser, SER_UART3); - ser_setbaudrate(&ser, SERIAL_BAUDRATE); + serial_init(SERIAL_BAUDRATE); /* Initialize I2c interface */ i2c_init(&i2c, 0, CONFIG_I2C_FREQ); @@ -97,7 +98,7 @@ static void init(void) proc_init(); /* Initialize USB-CAN logic */ - usbcan = usb_can_init(CAND1, &ser); + usbcan = usb_can_init(CAND1); /* Initialize battery monitoring */ battery_monitoring_init(usbcan, &i2c); diff --git a/elec/boards/USB_CAN/Firmware/usb_can/usb_can.mk b/elec/boards/USB_CAN/Firmware/usb_can/usb_can.mk index 5467363..2f28cec 100644 --- a/elec/boards/USB_CAN/Firmware/usb_can/usb_can.mk +++ b/elec/boards/USB_CAN/Firmware/usb_can/usb_can.mk @@ -4,7 +4,7 @@ # # Constants automatically defined by the selected modules -Firmware_DEBUG = 1 + # Our target application TRG += usb_can @@ -19,26 +19,24 @@ usb_can_HW_PATH = usb_can # Files automatically generated by the wizard. DO NOT EDIT, USE usb_can_USER_CSRC INSTEAD! usb_can_WIZARD_CSRC = \ - bertos/cpu/cortex-m3/drv/ser_stm32.c \ - bertos/cpu/cortex-m3/hw/switch_ctx_cm3.c \ - bertos/mware/event.c \ - bertos/kern/sem.c \ - bertos/kern/monitor.c \ - bertos/cpu/cortex-m3/drv/timer_cm3.c \ - bertos/struct/heap.c \ - bertos/drv/i2c_bitbang.c \ bertos/cpu/cortex-m3/drv/can_stm32.c \ - bertos/io/kfile.c \ - bertos/mware/formatwr.c \ - bertos/mware/sprintf.c \ - bertos/drv/can.c \ bertos/cpu/cortex-m3/drv/i2c_stm32.c \ + bertos/cpu/cortex-m3/drv/timer_cm3.c \ + bertos/cpu/cortex-m3/hw/switch_ctx_cm3.c \ + bertos/drv/can.c \ + bertos/drv/i2c.c \ + bertos/drv/i2c_bitbang.c \ bertos/drv/timer.c \ - bertos/kern/signal.c \ + bertos/io/kfile.c \ + bertos/kern/monitor.c \ bertos/kern/proc.c \ - bertos/drv/ser.c \ + bertos/kern/sem.c \ + bertos/kern/signal.c \ + bertos/mware/event.c \ + bertos/mware/formatwr.c \ bertos/mware/hex.c \ - bertos/drv/i2c.c \ + bertos/mware/sprintf.c \ + bertos/struct/heap.c \ # # Files automatically generated by the wizard. DO NOT EDIT, USE usb_can_USER_PCSRC INSTEAD! diff --git a/elec/boards/USB_CAN/Firmware/usb_can/usb_can/serial.c b/elec/boards/USB_CAN/Firmware/usb_can/usb_can/serial.c new file mode 100644 index 0000000..39f973f --- /dev/null +++ b/elec/boards/USB_CAN/Firmware/usb_can/usb_can/serial.c @@ -0,0 +1,119 @@ +/** + * USB-CAN converter + * + * This file contains the interface for a very simple serial driver for STM32 + * + * Copyright © 2011 Nicolas Dandrimont <ol...@cr...> + * Authors: Nicolas Dandrimont <ol...@cr...> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +#include "serial.h" + +#define ENDLINE '\r' +#define RX_BUF_SIZE 4096 + +static char receive_buffer[RX_BUF_SIZE]; +static uint64_t read; +static uint64_t write; + +static DECLARE_ISR(uart_irq_handler) { + struct stm32_usart *base = (struct stm32_usart *)USART3_BASE; + + base->CR1 &= ~(BV(CR1_RXNEIE)); + while (base->SR & (BV(SR_RXNE) | BV(SR_ORE))) { + + receive_buffer[write % RX_BUF_SIZE] = base->DR; + write++; + } + base->CR1 |= BV(CR1_RXNEIE); +} + +// Hardcoded to port 3 +struct stm32_usart *serial_init(unsigned long baudrate) { + struct stm32_usart *base = (struct stm32_usart *)USART3_BASE; + + read = 0; + write = 0; + + // Enable clocks + RCC->APB2ENR |= RCC_APB2_AFIO | RCC_APB2_GPIOB; + RCC->APB1ENR |= RCC_APB1_USART3; + + // Enable pins + stm32_gpioPinConfig((struct stm32_gpio *)GPIOB_BASE, BV(10), + GPIO_MODE_AF_PP, GPIO_SPEED_50MHZ); + stm32_gpioPinConfig((struct stm32_gpio *)GPIOB_BASE, BV(11), + GPIO_MODE_IN_FLOATING, GPIO_SPEED_50MHZ); + + // Clear registers + base->CR2 = 0; + base->CR1 = 0; + base->CR3 = 0; + base->SR = 0; + + // Set baudrate + base->BRR = evaluate_brr(base, CPU_FREQ, baudrate); + + // No parity, 8 bits, 1 stop bit : no further configuration needed + + // Enable TX and RX + base->CR1 |= BV(CR1_TE) | BV(CR1_RE); + + // Enable the RX interrupt + sysirq_setHandler(USART3_IRQHANDLER, uart_irq_handler); + + base->CR1 |= BV(CR1_RXNEIE); + + // Start up + base->CR1 |= BV(CR1_UE); + + return base; +} + +size_t serial_readline(char *buffer, size_t max_len) { + size_t i = 0; + char c; + + while (i < max_len-1) { + if (read == write) { + cpu_relax(); + continue; + } + c = receive_buffer[read % RX_BUF_SIZE]; + read++; + if (c == ENDLINE) { + break; + } + buffer[i] = c; + i++; + } + buffer[i] = '\0'; + + return i; +} + +void serial_transmit(const char *buffer, size_t len) { + struct stm32_usart *base = (struct stm32_usart *)USART3_BASE; + + size_t i; + + for(i=0; i < len; i++) { + while (!(base->SR & BV(SR_TXE))) + cpu_relax(); + base->DR = buffer[i]; + } +} diff --git a/elec/boards/USB_CAN/Firmware/usb_can/usb_can/serial.h b/elec/boards/USB_CAN/Firmware/usb_can/usb_can/serial.h new file mode 100644 index 0000000..c6e5488 --- /dev/null +++ b/elec/boards/USB_CAN/Firmware/usb_can/usb_can/serial.h @@ -0,0 +1,48 @@ +/** + * USB-CAN converter + * + * This file contains the interface for a very simple serial driver for STM32 + * + * Copyright © 2011 Nicolas Dandrimont <ol...@cr...> + * Authors: Nicolas Dandrimont <ol...@cr...> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +#ifndef SERIAL_H +#define SERIAL_H + +#include <string.h> + +#include <cpu/irq.h> +#include <cpu/power.h> + +#include <drv/clock_stm32.h> +#include <drv/gpio_stm32.h> +#include <drv/irq_cm3.h> +#include <drv/timer.h> + +#include "hw/hw_led.h" + +#include <io/stm32_uart.h> + +#include <kern/sem.h> + +struct stm32_usart *serial_init(unsigned long baudrate); + +size_t serial_readline(char *buffer, size_t max_len); +void serial_transmit(const char *buffer, size_t len); + +#endif diff --git a/elec/boards/USB_CAN/Firmware/usb_can/usb_can/usb_can.c b/elec/boards/USB_CAN/Firmware/usb_can/usb_can/usb_can.c index 1e5f360..f1e6314 100644 --- a/elec/boards/USB_CAN/Firmware/usb_can/usb_can/usb_can.c +++ b/elec/boards/USB_CAN/Firmware/usb_can/usb_can/usb_can.c @@ -62,10 +62,9 @@ uint16_t get_timestamp(void) { return ticks_to_ms(timer_clock()) % 60000; } -usb_can *usb_can_init(can_driver *can, struct Serial *ser) { +usb_can *usb_can_init(can_driver *can) { usbcan->can = can; - usbcan->ser = ser; usbcan->is_open = false; usbcan->timestamped = false; usbcan->get_timestamp = get_timestamp; @@ -79,35 +78,38 @@ usb_can *usb_can_init(can_driver *can, struct Serial *ser) { void usb_can_open(usb_can *usbcan) { if (usbcan->is_open) - kfile_write(&usbcan->ser->fd, "\a", 1); + serial_transmit("\a", 1); else { usbcan->is_open = true; - kfile_write(&usbcan->ser->fd, "\r", 1); + serial_transmit("\r", 1); } } void usb_can_close(usb_can *usbcan) { if (usbcan->is_open) { usbcan->is_open = false; - kfile_write(&usbcan->ser->fd, "\r", 1); + serial_transmit("\r", 1); } else { - kfile_write(&usbcan->ser->fd, "\a", 1); + serial_transmit("\a", 1); } } void usb_can_set_baudrate(usb_can *usbcan, char *baudrate) { /* FIXME: Implement it for real! */ (void)baudrate; - kfile_write(&usbcan->ser->fd, "\r", 1); + (void)usbcan; + serial_transmit("\r", 1); } -int usb_can_execute_command(usb_can *usbcan, char *command) { +int usb_can_execute_command(usb_can *usbcan, char *command, size_t len) { can_tx_frame frame; - bool send = false, ret = false; + bool send = false, ret = false, broken = false; int i; + can_rx_frame error_frame; + frame.rtr = 0; frame.ide = 0; frame.eid = 0; @@ -116,16 +118,51 @@ int usb_can_execute_command(usb_can *usbcan, char *command) { frame.data32[0] = 0; frame.data32[1] = 0; - sem_obtain(&usbcan->sem_receive); + error_frame.rtr = 0; + error_frame.ide = 1; + error_frame.eid = 0x4242; + error_frame.dlc = 0; + + while(!sem_attempt(&usbcan->sem_receive)) + cpu_relax(); switch (command[0]) { + case 'R': + /* Send an extended RTR frame */ + frame.rtr = 1; + /* Fallthrough */ + case 'T': + frame.ide = 1; + frame.eid = nibble_to_uint32(&command[1], 8); + frame.dlc = nibble_to_uint32(&command[9], 1); + for (i = 0; i < frame.dlc; i++) + frame.data8[i] = nibble_to_uint32(&command[10 + 2*i], 2); + if (len == (size_t)(8 + 1 + 2*frame.dlc)) + send = true; + else + broken = true; + break; + case 'r': + /* Send a classic RTR frame */ + frame.rtr = 1; + /* Fallthrough */ + case 't': + frame.sid = nibble_to_uint32(&command[1], 3); + frame.dlc = nibble_to_uint32(&command[4], 1); + for (i = 0; i < frame.dlc; i++) + frame.data8[i] = nibble_to_uint32(&command[5 + 2*i], 2); + if (len == (size_t)(3 + 1 + 2*frame.dlc)) + send = true; + else + broken = true; + break; case 'V': /* Version number */ - kfile_write(&usbcan->ser->fd, "V0402\r", strlen("V0402\r")); + serial_transmit("V0402\r", strlen("V0402\r")); break; case 'N': /* Serial number */ - kfile_write(&usbcan->ser->fd, "NKROB\r", strlen("NKROB\r")); + serial_transmit("NKROB\r", strlen("NKROB\r")); break; case 'O': /* Open CAN Channel */ @@ -143,55 +180,30 @@ int usb_can_execute_command(usb_can *usbcan, char *command) { usbcan->timestamped = false; else if (command[0] == '1') usbcan->timestamped = true; - kfile_write(&usbcan->ser->fd, "\r", 1); - break; - case 'R': - /* Send an extended RTR frame */ - frame.rtr = 1; - frame.ide = 1; - frame.eid = nibble_to_uint32(&command[1], 8); - frame.dlc = nibble_to_uint32(&command[9], 1); - for (i = 0; i < frame.dlc; i++) - frame.data8[i] = nibble_to_uint32(&command[10 + 2*i], 2); - send = true; - break; - case 'r': - /* Send a classic RTR frame */ - frame.rtr = 1; - frame.sid = nibble_to_uint32(&command[1], 3); - frame.dlc = nibble_to_uint32(&command[4], 1); - for (i = 0; i < frame.dlc; i++) - frame.data8[i] = nibble_to_uint32(&command[5 + 2*i], 2); - send = true; - break; - case 'T': - frame.ide = 1; - frame.eid = nibble_to_uint32(&command[1], 8); - frame.dlc = nibble_to_uint32(&command[9], 1); - for (i = 0; i < frame.dlc; i++) - frame.data8[i] = nibble_to_uint32(&command[10 + 2*i], 2); - send = true; - break; - case 't': - frame.sid = nibble_to_uint32(&command[1], 3); - frame.dlc = nibble_to_uint32(&command[4], 1); - for (i = 0; i < frame.dlc; i++) - frame.data8[i] = nibble_to_uint32(&command[5 + 2*i], 2); - send = true; + serial_transmit("\r", 1); break; default: break; } if (send) { - ret = can_transmit(usbcan->can, &frame, ms_to_ticks(10)); - if (ret) - kfile_write(&usbcan->ser->fd, "\r", 1); - else - kfile_write(&usbcan->ser->fd, "\a", 1); + if (!broken) { + ret = can_transmit(usbcan->can, &frame, ms_to_ticks(10)); + if (ret) + serial_transmit("\r", 1); + else + serial_transmit("\a", 1); + } else { + serial_transmit("\a", 1); + } } + + // You are in a maze of twisty little deadlocks, all alike sem_release(&usbcan->sem_receive); + if (send && (broken || !ret)) + usb_can_emit(usbcan, &error_frame); + return 0; } @@ -202,8 +214,8 @@ int usb_can_emit(usb_can *usbcan, can_rx_frame *frame) { uint16_t timestamp; // Do not interfere with the send ACK - if (!sem_attempt(&usbcan->sem_receive)) - return 1; + while(!sem_attempt(&usbcan->sem_receive)) + cpu_relax(); buffer[0] = frame->rtr ? 'r' : 't'; @@ -234,7 +246,8 @@ int usb_can_emit(usb_can *usbcan, can_rx_frame *frame) { buffer[i] = '\r'; i++; - kfile_write(&usbcan->ser->fd, buffer, i); + serial_transmit(buffer, i); + //serial_transmit("T000044420\r", strlen("T000044420\r")); sem_release(&usbcan->sem_receive); return 0; @@ -243,18 +256,17 @@ int usb_can_emit(usb_can *usbcan, can_rx_frame *frame) { static void NORETURN serial_receive_process(void) { int nbytes = 0, retval, i = 0; - char command[MAX_CMD_SIZE+1]; + char command[MAX_CMD_SIZE]; for (;;) { i = !i; - nbytes = kfile_gets(&usbcan->ser->fd, command, MAX_CMD_SIZE+1); - if (nbytes != EOF) { - retval = usb_can_execute_command(usbcan, command); - if (i) - LED1_ON(); - else - LED1_OFF(); - } + nbytes = serial_readline(command, MAX_CMD_SIZE); + retval = usb_can_execute_command(usbcan, command, nbytes); + if (i) + LED1_ON(); + else + LED1_OFF(); + cpu_relax(); } } diff --git a/elec/boards/USB_CAN/Firmware/usb_can/usb_can/usb_can.h b/elec/boards/USB_CAN/Firmware/usb_can/usb_can/usb_can.h index 6aed083..3f027ce 100644 --- a/elec/boards/USB_CAN/Firmware/usb_can/usb_can/usb_can.h +++ b/elec/boards/USB_CAN/Firmware/usb_can/usb_can/usb_can.h @@ -29,16 +29,16 @@ #include <kern/sem.h> #include <drv/can.h> -#include <drv/ser.h> #include <drv/timer.h> #include <hw/hw_led.h> #include <io/kfile.h> +#include "serial.h" + typedef uint16_t (usb_can_timestamp(void)); typedef struct _usb_can { can_driver *can; // CAN Device - struct Serial *ser; // Serial Device bool is_open; // Channel open? bool timestamped; // Emit timestamps? usb_can_timestamp *get_timestamp; // Get Timestamp function @@ -47,14 +47,14 @@ typedef struct _usb_can { uint16_t get_timestamp(void); -usb_can *usb_can_init(can_driver *can, struct Serial *ser); +usb_can *usb_can_init(can_driver *can); void usb_can_open(usb_can *usbcan); void usb_can_close(usb_can *usbcan); void usb_can_set_baudrate(usb_can *usbcan, char *baudrate); -int usb_can_execute_command(usb_can *usbcan, char *command); +int usb_can_execute_command(usb_can *usbcan, char *command, size_t len); int usb_can_emit(usb_can *usbcan, can_rx_frame *frame); diff --git a/elec/boards/USB_CAN/Firmware/usb_can/usb_can_user.mk b/elec/boards/USB_CAN/Firmware/usb_can/usb_can_user.mk index 8bfea09..d6bff03 100644 --- a/elec/boards/USB_CAN/Firmware/usb_can/usb_can_user.mk +++ b/elec/boards/USB_CAN/Firmware/usb_can/usb_can_user.mk @@ -11,6 +11,7 @@ usb_can_PROGRAMMER_PORT = none usb_can_USER_CSRC = \ $(usb_can_SRC_PATH)/battery_monitoring/ads7828.c \ $(usb_can_SRC_PATH)/battery_monitoring/battery_monitoring.c \ + $(usb_can_SRC_PATH)/usb_can/serial.c \ $(usb_can_SRC_PATH)/usb_can/usb_can.c \ $(usb_can_SRC_PATH)/main.c \ # hooks/post-receive -- krobot |
From: Xavier L. <Ba...@us...> - 2011-04-10 18:51:25
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via a76fb714ce409ede1b0357665e51a6b6c3bb3878 (commit) from 67f7559b01cbcc94a3a9832903f18fc93eb63dc6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a76fb714ce409ede1b0357665e51a6b6c3bb3878 Author: Xavier Lagorce <Xav...@cr...> Date: Sun Apr 10 20:46:17 2011 +0200 [vision2008] Minor fix ----------------------------------------------------------------------- Changes: diff --git a/info/vision/coupe2008/camfilter.c b/info/vision/coupe2008/camfilter.c index ac37ab0..72e1d3f 100644 --- a/info/vision/coupe2008/camfilter.c +++ b/info/vision/coupe2008/camfilter.c @@ -1,5 +1,5 @@ -#include "cv.h" -#include "highgui.h" +#include <cv.h> +#include <highgui.h> #include <math.h> #include <stdio.h> hooks/post-receive -- krobot |
From: Jérémie D. <Ba...@us...> - 2011-04-10 16:48:24
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 67f7559b01cbcc94a3a9832903f18fc93eb63dc6 (commit) via ab898e133c7988f154a43df090c3acf74d4bfb1b (commit) from 09f53a63386e5040989f92aa9ef00498ec72931f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 67f7559b01cbcc94a3a9832903f18fc93eb63dc6 Author: Jérémie Dimino <je...@di...> Date: Sun Apr 10 18:47:45 2011 +0200 [info] add hil simulator commit ab898e133c7988f154a43df090c3acf74d4bfb1b Author: Jérémie Dimino <je...@di...> Date: Tue Apr 5 22:30:56 2011 +0200 [krobot_message] add messages for the simulation mode ----------------------------------------------------------------------- Changes: diff --git a/info/control2011/_oasis b/info/control2011/_oasis index a1e18d0..e588a36 100644 --- a/info/control2011/_oasis +++ b/info/control2011/_oasis @@ -153,6 +153,13 @@ Executable "krobot-simulator" MainIs: krobot_simulator.ml BuildDepends: krobot, lwt.syntax +Executable "krobot-hil-simulator" + Path: src/tools + Install: true + CompiledObject: best + MainIs: krobot_hil_simulator.ml + BuildDepends: krobot, lwt.syntax + # +-------------------------------------------------------------------+ # | Examples | # +-------------------------------------------------------------------+ diff --git a/info/control2011/_tags b/info/control2011/_tags index 593a279..29a64d4 100644 --- a/info/control2011/_tags +++ b/info/control2011/_tags @@ -2,7 +2,7 @@ <src/interfaces/*.ml>: -syntax_camlp4o # OASIS_START -# DO NOT EDIT (digest: c5fb31f60362628ba2becc8b6a98c80b) +# DO NOT EDIT (digest: 37f25f8d73f8ace7a5648c2d0f189bda) # Library krobot-interfaces "src/interfaces": include "src/interfaces/krobot-interfaces.cmxs": use_krobot-interfaces @@ -63,6 +63,12 @@ <src/tools/krobot_viewer.{native,byte}>: pkg_lablgtk2.glade <src/tools/krobot_viewer.{native,byte}>: pkg_cairo.lablgtk2 <src/tools/*.ml{,i}>: pkg_lablgtk2.glade +# Executable krobot-hil-simulator +<src/tools/krobot_hil_simulator.{native,byte}>: use_krobot +<src/tools/krobot_hil_simulator.{native,byte}>: use_krobot-interfaces +<src/tools/krobot_hil_simulator.{native,byte}>: pkg_obus +<src/tools/krobot_hil_simulator.{native,byte}>: pkg_lwt.unix +<src/tools/krobot_hil_simulator.{native,byte}>: pkg_lwt.syntax # Executable send-can <examples/send_can.{native,byte}>: use_krobot-can <examples/send_can.{native,byte}>: use_krobot diff --git a/info/control2011/setup.ml b/info/control2011/setup.ml index 2ba8666..1ab732c 100644 --- a/info/control2011/setup.ml +++ b/info/control2011/setup.ml @@ -1,7 +1,7 @@ (* setup.ml generated for the first time by OASIS v0.2.0~alpha1 *) (* OASIS_START *) -(* DO NOT EDIT (digest: 4dcf80b777e23d14096fb05b034e73dc) *) +(* DO NOT EDIT (digest: 2fd774d555ea6bdcec2ed57e38e9bc94) *) (* Regenerated by OASIS v0.2.0 Visit http://oasis.forge.ocamlcore.org for more information and @@ -5323,6 +5323,36 @@ let setup_t = {exec_custom = false; exec_main_is = "krobot_viewer.ml"; }); Executable ({ + cs_name = "krobot-hil-simulator"; + cs_data = PropList.Data.create (); + cs_plugin_data = []; + }, + { + bs_build = [(OASISExpr.EBool true, true)]; + bs_install = [(OASISExpr.EBool true, true)]; + bs_path = "src/tools"; + bs_compiled_object = Best; + bs_build_depends = + [ + InternalLibrary "krobot"; + FindlibPackage ("lwt.syntax", None) + ]; + bs_build_tools = [ExternalTool "ocamlbuild"]; + bs_c_sources = []; + bs_data_files = []; + bs_ccopt = [(OASISExpr.EBool true, [])]; + bs_cclib = [(OASISExpr.EBool true, [])]; + bs_dlllib = [(OASISExpr.EBool true, [])]; + bs_dllpath = [(OASISExpr.EBool true, [])]; + bs_byteopt = [(OASISExpr.EBool true, [])]; + bs_nativeopt = [(OASISExpr.EBool true, [])]; + }, + { + exec_custom = false; + exec_main_is = "krobot_hil_simulator.ml"; + }); + Executable + ({ cs_name = "send-can"; cs_data = PropList.Data.create (); cs_plugin_data = []; diff --git a/info/control2011/src/lib/krobot_message.ml b/info/control2011/src/lib/krobot_message.ml index 89abb84..9792c9d 100644 --- a/info/control2011/src/lib/krobot_message.ml +++ b/info/control2011/src/lib/krobot_message.ml @@ -32,6 +32,7 @@ type t = | Motor_stop | Odometry of float * float * float | Set_odometry of float * float * float + | Set_controller_mode of bool | Req_motor_status | Unknown of frame @@ -105,6 +106,10 @@ let to_string = function sprintf "Set_odometry(%f, %f, %f)" x y theta + | Set_controller_mode b -> + sprintf + "Set_controller_mode(%B)" + b | Req_motor_status -> "Req_motor_status" | Unknown frame -> @@ -231,10 +236,10 @@ let encode = function ~data | Battery1_voltages(elem1, elem2, elem3, elem4) -> let data = String.create 8 in - put_uint16 data 0 (truncate (elem1 *. 10000.)); - put_uint16 data 2 (truncate (elem2 *. 10000.)); - put_uint16 data 4 (truncate (elem3 *. 10000.)); - put_uint16 data 5 (truncate (elem4 *. 10000.)); + put_uint16 data 0 (truncate (elem1 *. 10000.)); + put_uint16 data 2 (truncate (elem2 *. 10000.)); + put_uint16 data 4 (truncate (elem3 *. 10000.)); + put_uint16 data 5 (truncate (elem4 *. 10000.)); frame ~identifier:401 ~kind:Data @@ -243,10 +248,10 @@ let encode = function ~data | Battery2_voltages(elem1, elem2, elem3, elem4) -> let data = String.create 8 in - put_uint16 data 0 (truncate (elem1 *. 10000.)); - put_uint16 data 2 (truncate (elem2 *. 10000.)); - put_uint16 data 4 (truncate (elem3 *. 10000.)); - put_uint16 data 5 (truncate (elem4 *. 10000.)); + put_uint16 data 0 (truncate (elem1 *. 10000.)); + put_uint16 data 2 (truncate (elem2 *. 10000.)); + put_uint16 data 4 (truncate (elem3 *. 10000.)); + put_uint16 data 5 (truncate (elem4 *. 10000.)); frame ~identifier:402 ~kind:Data @@ -260,6 +265,13 @@ let encode = function ~remote:false ~format:F29bits ~data:"\x01" + | Set_controller_mode b -> + frame + ~identifier:205 + ~kind:Data + ~remote:false + ~format:F29bits + ~data:(if b then "\x01" else "\x00") | Req_motor_status -> frame ~identifier:103 @@ -336,6 +348,9 @@ let decode frame = float (get_sint16 frame.data 4) /. 10000.) | 204 -> Motor_stop + | 205 -> + Set_controller_mode + (get_uint8 frame.data 0 <> 0) | 301 -> Beacon_position (float (get_uint16 frame.data 0) /. 10000., diff --git a/info/control2011/src/lib/krobot_message.mli b/info/control2011/src/lib/krobot_message.mli index 9324094..fb116bf 100644 --- a/info/control2011/src/lib/krobot_message.mli +++ b/info/control2011/src/lib/krobot_message.mli @@ -52,6 +52,8 @@ type t = | Set_odometry of float * float * float (** [set_odometry(x, y, theta)] sets the parameters of the odometry to the given ones. *) + | Set_controller_mode of bool + (** Put the card into simulation mode or not. *) | Req_motor_status (** Request the status of the motors. *) diff --git a/info/control2011/src/tools/krobot_hil_simulator.ml b/info/control2011/src/tools/krobot_hil_simulator.ml new file mode 100644 index 0000000..33b9e2e --- /dev/null +++ b/info/control2011/src/tools/krobot_hil_simulator.ml @@ -0,0 +1,153 @@ +(* + * krobot_hil_simulator.ml + * ----------------------- + * Copyright : (c) 2011, Jeremie Dimino <je...@di...> + * Licence : BSD3 + * + * This file is a part of [kro]bot. + *) + +(* Simulate the robot. *) + +open Lwt +open Lwt_react +open Krobot_config +open Krobot_message + +let pi = 4. *. atan 1. + +let math_mod_float a b = + let b2 = b /. 2. in + let modf = mod_float a b in + if modf > b2 then + modf -. b + else if modf < -. b2 then + modf +. b + else + modf;; + +(* +-----------------------------------------------------------------+ + | Types | + +-----------------------------------------------------------------+ *) + +(* State of the robot. *) +type state = { + x : float; + y : float; + theta : float; +} + +type internal_state = { + theta_l : float; + theta_r : float; +} + +type command = + | Idle + (* The robot is doint nothing. *) + | Speed of float * float + (* [Speed(left_velocity, right_velocity)] *) + | Turn of float * float + (* [Turn(t_acc, velocity)] *) + | Move of float * float + (* [Move(t_acc, velocity)] *) + +(* Type of simulators. *) +type simulator = { + mutable state : state; + (* The state of the robot. *) + mutable internal_state : internal_state; + (* The state of the wheels. *) + mutable velocity_l : float; + (* Velocity of the left motor (read from the CAN). *) + mutable velocity_r : float; + (* Velocity of the right motor (read from the CAN). *) + mutable time : float; + (* The current time. *) +} + +(* +-----------------------------------------------------------------+ + | Entry point | + +-----------------------------------------------------------------+ *) + +let print sim = + Lwt_log.debug_f " +time = %f +state: + x = %f + y = %f + theta = %f +internal_state: + theta_l = %f + theta_r = %f +velocities: + left = %f + right = %f +" + sim.time + sim.state.x + sim.state.y + sim.state.theta + sim.internal_state.theta_l + sim.internal_state.theta_r + sim.velocity_l + sim.velocity_r + +lwt () = + lwt bus = Krobot_bus.get () in + + let sim = { + state = { x = 0.; y = 0.; theta = 0. }; + internal_state = { theta_l = 0.; theta_r = 0. }; + velocity_l = 0.; + velocity_r = 0.; + time = Unix.gettimeofday (); + } in + + (* Handle commands. *) + E.keep + (E.map_s + (fun (ts, msg) -> + match msg with + | Encoder_position_speed_3(pos, speed) -> + sim.velocity_r <- speed; + return () + | Encoder_position_speed_4(pos, speed) -> + sim.velocity_l <- speed; + return () + | Set_odometry(x, y, theta) -> + sim.state <- { x; y; theta }; + return () + | _ -> + return ()) + (Krobot_message.recv bus)); + +(* lwt () = Krobot_message.send bus (Unix.gettimeofday (), Set_controller_mode true) in*) + + while_lwt true do + let time = Unix.gettimeofday () in + let delta = time -. sim.time in + sim.time <- time; + + (* Sends the state of the robot. *) + lwt () = Krobot_message.send bus (sim.time, Odometry(sim.state.x, sim.state.y, sim.state.theta)) in + + lwt () = print sim in + + let u1 = (sim.velocity_l +. sim.velocity_r) *. wheels_diameter /. 4. + and u2 = (sim.velocity_l -. sim.velocity_r) *. wheels_diameter /. wheels_distance in + let dx = u1 *. (cos sim.state.theta) + and dy = u1 *. (sin sim.state.theta) + and dtheta = u2 in + sim.state <- { + x = sim.state.x +. dx *. delta; + y = sim.state.y +. dy *. delta; + theta = math_mod_float (sim.state.theta +. dtheta *. delta) (2. *. pi); + }; + sim.internal_state <- { + theta_l = sim.internal_state.theta_l +. delta *. (u1 *. 4. +. u2 *. wheels_distance) /. (2. *. wheels_diameter); + theta_r = sim.internal_state.theta_r +. delta *. (u1 *. 4. -. u2 *. wheels_distance) /. (2. *. wheels_diameter); + }; + + Lwt_unix.sleep 0.01 + done hooks/post-receive -- krobot |
From: Xavier L. <Ba...@us...> - 2011-04-05 20:40:49
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 09f53a63386e5040989f92aa9ef00498ec72931f (commit) from 1005cb05df3f739bc9c6002e002a5b4eb5956c4a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 09f53a63386e5040989f92aa9ef00498ec72931f Author: Xavier Lagorce <Xav...@cr...> Date: Tue Apr 5 22:39:55 2011 +0200 [Controller_Motor_STM32] Blink LEDs when in HIL simulation mode (+typo) ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/can_monitor.c b/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/can_monitor.c index 0613ca0..0625ce5 100644 --- a/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/can_monitor.c +++ b/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/can_monitor.c @@ -278,7 +278,7 @@ static void NORETURN canMonitorListen_process(void) { odo_setState(&odometry); break; case CAN_MSG_ODOMETRY: - // We should only receiv such message in HIL mode + // We should only receive such message in HIL mode if (mode == ROBOT_MODE_HIL) { odometry_msg.data32[0] = frame.data32[0]; odometry_msg.data32[1] = frame.data32[1]; diff --git a/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/motor_controller.c b/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/motor_controller.c index 967a552..4875872 100644 --- a/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/motor_controller.c +++ b/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/motor_controller.c @@ -176,6 +176,8 @@ static void NORETURN motorController_process(void) { static void NORETURN motorController_HIL_process(void) { control_params_t *params; Timer timer; + float last_t = 0; + uint8_t led_state = 0; // get data params = (control_params_t *) proc_currentUserData(); @@ -194,6 +196,19 @@ static void NORETURN motorController_HIL_process(void) { } else { timer_add(&timer); + if (last_t >= 1.0) { + if (led_state == 0) { + led_state = 1; + LED3_ON(); + LED4_ON(); + } else { + led_state = 0; + LED3_ON(); + LED4_ON(); + } + last_t -= 1.0; + } + // Compute "state estimation" params->last_estimate[0] = get_output_value(params->reference); params->last_estimate[1] = (params->last_estimate[0] - params->last_output) / params->T; @@ -202,6 +217,7 @@ static void NORETURN motorController_HIL_process(void) { params->last_output = params->last_estimate[0]; } timer_waitEvent(&timer); // Wait for the remaining of the sample period + last_t += params->T; } } hooks/post-receive -- krobot |
From: Jérémie D. <Ba...@us...> - 2011-04-05 20:22:29
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 1005cb05df3f739bc9c6002e002a5b4eb5956c4a (commit) from 239dbffd5fba4a3b3e9b1c3a96306914523dba14 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 1005cb05df3f739bc9c6002e002a5b4eb5956c4a Author: Jérémie Dimino <je...@di...> Date: Tue Apr 5 22:21:48 2011 +0200 [krobot_viewer] add bezier curves for the first and last points of the trajectory ----------------------------------------------------------------------- Changes: diff --git a/info/control2011/src/tools/krobot_viewer.ml b/info/control2011/src/tools/krobot_viewer.ml index 22a5c20..7406bc0 100644 --- a/info/control2011/src/tools/krobot_viewer.ml +++ b/info/control2011/src/tools/krobot_viewer.ml @@ -479,6 +479,19 @@ module Board = struct let result = List.tl (loop [0; Array.length points - 1]); in board.points <- List.map (fun i -> points.(i)) result; + let bezier_vertices q r v1 v2 = + (* Create the bezier curve. *) + let curve = Bezier.of_vertices q (translate q v1) (translate r v2) r in + + (* Create vertices. *) + let vertices = Array.create 101 origin in + for i = 0 to 100 do + vertices.(i) <- Bezier.vertice curve (float i /. 100.) + done; + + vertices + in + (* Compute cubic bezier curves. *) let rec loop = function | p :: (q :: r :: s :: _ as rest) -> @@ -487,21 +500,34 @@ module Board = struct let _, v1 = tangents p q r and v2, _ = tangents q r s in let v1 = v1 *| (min (distance p q) (distance q r) /. 2.) and v2 = v2 *| (min (distance q r) (distance r s) /. 2.) in - - (* Create the bezier curve. *) - let curve = Bezier.of_vertices q (translate q v1) (translate r v2) r in - - (* Create vertices. *) - let vertices = Array.create 101 origin in - for i = 0 to 100 do - vertices.(i) <- Bezier.vertice curve (float i /. 100.) - done; - - vertices :: loop rest + bezier_vertices q r v1 v2 :: loop rest + | [p; q; r] -> + let _, v1 = tangents p q r and v2 = vector r q /| distance q r in + let v1 = v1 *| (min (distance p q) (distance q r) /. 2.) + and v2 = v2 *| (distance q r /. 2.) in + [bezier_vertices q r v1 v2] | _ -> [] in - board.bezier <- [||] :: loop ({ x = board.state.pos.x; y = board.state.pos.y } :: board.points); + begin + match board.points with + | r :: s :: _ -> + let q = board.state.pos in + let v1 = { vx = cos board.state.theta; vy = sin board.state.theta } + and v2, _ = tangents q r s in + let v1 = v1 *| (distance q r /. 2.) + and v2 = v2 *| (distance q r /. 2.) in + board.bezier <- bezier_vertices q r v1 v2 :: loop (q :: board.points); + | [r] -> + let q = board.state.pos in + let v1 = { vx = cos board.state.theta; vy = sin board.state.theta } + and v2 = vector r q /| distance q r in + let v1 = v1 *| (distance q r /. 2.) + and v2 = v2 *| (distance q r /. 2.) in + board.bezier <- bezier_vertices q r v1 v2 :: loop (q :: board.points); + | [] -> + board.bezier <- [] + end; queue_draw board hooks/post-receive -- krobot |
From: Xavier L. <Ba...@us...> - 2011-04-05 16:04:52
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 239dbffd5fba4a3b3e9b1c3a96306914523dba14 (commit) via e7280a871e4b495f78d9f389ada95544fd5400df (commit) via 0cd6a2657478189d74a2a0f43dae9a9c8c5d95f3 (commit) from 773e02438462c3eb9d7b58086faac1e5e096d280 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 239dbffd5fba4a3b3e9b1c3a96306914523dba14 Author: Xavier Lagorce <Xav...@cr...> Date: Tue Apr 5 18:04:05 2011 +0200 [Controller_Motor_STM32] Added support for an Hardware in the Loop simulator commit e7280a871e4b495f78d9f389ada95544fd5400df Author: Xavier Lagorce <Xav...@cr...> Date: Tue Apr 5 15:55:00 2011 +0200 [Controller_Motor_STM32] Add indicator to monitor odometry thread commit 0cd6a2657478189d74a2a0f43dae9a9c8c5d95f3 Author: Xavier Lagorce <Xav...@cr...> Date: Tue Apr 5 15:43:39 2011 +0200 [Controller_Motor_STM32] Added some possibilities to monitor motor controllers status ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/can_monitor.c b/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/can_monitor.c index 2617638..0613ca0 100644 --- a/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/can_monitor.c +++ b/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/can_monitor.c @@ -10,8 +10,14 @@ #include "can_monitor.h" #include "hw/hw_led.h" +#define ROBOT_MODE_NORMAL 0 +#define ROBOT_MODE_HIL 1 + +// Processes stacks PROC_DEFINE_STACK(stack_can_send, KERN_MINSTACKSIZE * 8); PROC_DEFINE_STACK(stack_can_receive, KERN_MINSTACKSIZE * 8); +// globals +uint8_t mode; // Structures to represent data into CAN messages typedef struct { @@ -53,6 +59,10 @@ typedef struct { uint8_t stop; // stop everything } stop_msg_t; +typedef struct { + uint8_t mode; +} controller_mode_msg_t; + // Union to manipulate CAN messages' data easily typedef union { encoder_msg_t data; @@ -89,6 +99,11 @@ typedef union { uint32_t data32[2]; } stop_can_msg_t; +typedef union { + controller_mode_msg_t data; + uint32_t data32[2]; +} controller_mode_can_msg_t; + // Can messages IDs #define CAN_MSG_ENCODERS34 100 // encoder_can_msg_t #define CAN_MSG_MOTOR3 101 // motor_can_msg_t @@ -99,6 +114,7 @@ typedef union { #define CAN_MSG_TURN 202 // turn_can_msg_t #define CAN_MSG_ODOMETRY_SET 203 // odometry_can_msg_t #define CAN_MSG_STOP 204 // stop_can_msg_t +#define CAN_MSG_CONTROLLER_MODE 205 // controller_mode_msg_t // Process for communication static void NORETURN canMonitor_process(void); @@ -117,6 +133,8 @@ void canMonitorInit(void) { can_init(); can_start(CAND1, &cfg); + mode = ROBOT_MODE_NORMAL; + // Start communication process proc_new(canMonitor_process, NULL, sizeof(stack_can_send), stack_can_send); proc_new(canMonitorListen_process, NULL, sizeof(stack_can_receive), stack_can_receive); @@ -171,21 +189,23 @@ static void NORETURN canMonitor_process(void) { txm.eid = CAN_MSG_MOTOR4; can_transmit(CAND1, &txm, ms_to_ticks(10)); - // Sending odometry data - odo_getState(&odometry); - msg_odo.data.x = (int16_t)(odometry.x * 1000.0); - msg_odo.data.y = (int16_t)(odometry.y * 1000.0); - odometry.theta = fmodf(odometry.theta, 2*M_PI); - if (odometry.theta > M_PI) - odometry.theta -= 2*M_PI; - if (odometry.theta < -M_PI) - odometry.theta += 2*M_PI; - msg_odo.data.theta = (int16_t)(odometry.theta * 10000.0); - - txm.data32[0] = msg_odo.data32[0]; - txm.data32[1] = msg_odo.data32[1]; - txm.eid = CAN_MSG_ODOMETRY; - can_transmit(CAND1, &txm, ms_to_ticks(10)); + // Sending odometry data if not in HIL mode + if (mode != ROBOT_MODE_HIL) { + odo_getState(&odometry); + msg_odo.data.x = (int16_t)(odometry.x * 1000.0); + msg_odo.data.y = (int16_t)(odometry.y * 1000.0); + odometry.theta = fmodf(odometry.theta, 2*M_PI); + if (odometry.theta > M_PI) + odometry.theta -= 2*M_PI; + if (odometry.theta < -M_PI) + odometry.theta += 2*M_PI; + msg_odo.data.theta = (int16_t)(odometry.theta * 10000.0); + + txm.data32[0] = msg_odo.data32[0]; + txm.data32[1] = msg_odo.data32[1]; + txm.eid = CAN_MSG_ODOMETRY; + can_transmit(CAND1, &txm, ms_to_ticks(10)); + } // Wait for the next transmission timer timer_waitEvent(&timer_can); @@ -204,6 +224,7 @@ static void NORETURN canMonitorListen_process(void) { turn_can_msg_t turn_msg; odometry_can_msg_t odometry_msg; stop_can_msg_t stop_msg; + controller_mode_can_msg_t controller_mode_msg; // Initialize constant parameters of TX frame txm.dlc = 8; @@ -256,6 +277,32 @@ static void NORETURN canMonitorListen_process(void) { odometry.theta = ((float)odometry_msg.data.theta) / 10000.0; odo_setState(&odometry); break; + case CAN_MSG_ODOMETRY: + // We should only receiv such message in HIL mode + if (mode == ROBOT_MODE_HIL) { + odometry_msg.data32[0] = frame.data32[0]; + odometry_msg.data32[1] = frame.data32[1]; + odometry.x = ((float)odometry_msg.data.x) / 1000.0; + odometry.y = ((float)odometry_msg.data.y) / 1000.0; + odometry.theta = ((float)odometry_msg.data.theta) / 10000.0; + odo_setState(&odometry); + } + break; + case CAN_MSG_CONTROLLER_MODE: + controller_mode_msg.data32[0] = frame.data32[0]; + controller_mode_msg.data32[1] = frame.data32[0]; + if (controller_mode_msg.data.mode == 1) { + mc_change_mode(MOTOR3, CONTROLLER_MODE_HIL); + mc_change_mode(MOTOR4, CONTROLLER_MODE_HIL); + odo_disable(); + mode = ROBOT_MODE_HIL; + } else { + mc_change_mode(MOTOR3, CONTROLLER_MODE_NORMAL); + mc_change_mode(MOTOR4, CONTROLLER_MODE_NORMAL); + odo_restart(); + mode = ROBOT_MODE_NORMAL; + } + break; } } } diff --git a/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/main.c b/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/main.c index 647f9fa..926c6ad 100644 --- a/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/main.c +++ b/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/main.c @@ -61,11 +61,11 @@ static void init(void) // Initialize left motor params.motor = MOTOR3; params.encoder = ENCODER3; - mc_new_controller(¶ms, dd_get_left_wheel_generator()); + mc_new_controller(¶ms, dd_get_left_wheel_generator(), CONTROLLER_MODE_NORMAL); // Initialize right motor params.motor = MOTOR4; params.encoder = ENCODER4; - mc_new_controller(¶ms, dd_get_right_wheel_generator()); + mc_new_controller(¶ms, dd_get_right_wheel_generator(), CONTROLLER_MODE_NORMAL); // Start odometry odometryInit(1e-3, WHEEL_RADIUS, SHAFT_WIDTH, -2.0*M_PI/2000.0/15.0); diff --git a/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/motor_controller.c b/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/motor_controller.c index 537c174..967a552 100644 --- a/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/motor_controller.c +++ b/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/motor_controller.c @@ -18,6 +18,8 @@ typedef struct { uint8_t enable; // Is this controller enabled ? + uint8_t running; // Is this controller running ? + uint8_t mode; // Is this a real controller or an HIL controller uint8_t motor; // Motor ID to control uint8_t encoder; // Encoder ID to measure motor position from float encoder_gain; // Gain to convert encoder value unit to reference unit @@ -32,7 +34,7 @@ typedef struct uint16_t last_encoder_pos; // Last encoder position measured float F[4]; // evolution matrix float G[2]; // command application matrix - ticks_t T; // sampling period in systicks + ticks_t T; // sampling period in seconds } control_params_t; static control_params_t controllers[4]; @@ -45,8 +47,9 @@ static inline uint8_t get_motor_index(uint8_t motor_id) { return motor_ind; } -// Callback for control +// Process functions for control and simulation static void NORETURN motorController_process(void); +static void NORETURN motorController_HIL_process(void); float mc_getSpeed(uint8_t motor) { @@ -116,12 +119,16 @@ static void NORETURN motorController_process(void) { // get data params = (control_params_t *) proc_currentUserData(); + // Indicate we are running + params->running = 1; + // configure timer - timer_setDelay(&timer, ms_to_ticks(params->T)); + timer_setDelay(&timer, ms_to_ticks((mtime_t)(params->T*1000))); timer_setEvent(&timer); while (1) { if (params->enable == 0) { + params->running = 0; proc_exit(); } else { timer_add(&timer); @@ -161,17 +168,80 @@ static void NORETURN motorController_process(void) { } } +/* Hardware in the loop controller process + * This process is to be used for Hardware in the loop simulation. It will consider + * that the motor control process is perfect and send position data to the simulator + * through the CAN bus every sampling period. + */ +static void NORETURN motorController_HIL_process(void) { + control_params_t *params; + Timer timer; + + // get data + params = (control_params_t *) proc_currentUserData(); + + // Indicate we are running + params->running = 1; + + // configure timer + timer_setDelay(&timer, ms_to_ticks((time_t)(params->T*1000))); + timer_setEvent(&timer); + + while (1) { + if (params->enable == 0) { + params->running = 0; + proc_exit(); + } else { + timer_add(&timer); + + // Compute "state estimation" + params->last_estimate[0] = get_output_value(params->reference); + params->last_estimate[1] = (params->last_estimate[0] - params->last_output) / params->T; + + // Keep some infos + params->last_output = params->last_estimate[0]; + } + timer_waitEvent(&timer); // Wait for the remaining of the sample period + } +} + void motorControllerInit() { uint8_t motor_ind; - for (motor_ind = 0; motor_ind < 4; motor_ind++) + for (motor_ind = 0; motor_ind < 4; motor_ind++) { controllers[motor_ind].enable = 0; + controllers[motor_ind].running = 0; + } encodersInit(); motorsInit(); } -uint8_t mc_new_controller(motor_controller_params_t *cntr_params, command_generator_t *generator) { +uint8_t mc_is_controller_enabled(uint8_t motor) { + control_params_t *params; + + params = &(controllers[get_motor_index(motor)]); + return params->enable; +} + +uint8_t mc_is_controller_running(uint8_t motor) { + control_params_t *params; + + params = &(controllers[get_motor_index(motor)]); + return params->running; +} + +uint8_t mc_controller_mode(uint8_t motor) { + control_params_t *params; + + params = &(controllers[get_motor_index(motor)]); + if (params->enable) + return params->mode; + else + return 0; +} + +uint8_t mc_new_controller(motor_controller_params_t *cntr_params, command_generator_t *generator, uint8_t mode) { uint8_t motor_ind; control_params_t *params; float tau, T; @@ -180,20 +250,20 @@ uint8_t mc_new_controller(motor_controller_params_t *cntr_params, command_genera motor_ind = get_motor_index(cntr_params->motor); params = &(controllers[motor_ind]); - if (params->enable == 0) { + if (params->enable == 0 && params->running == 0) { // define user parameters params->motor = cntr_params->motor; params->encoder = cntr_params->encoder; params->encoder_gain = cntr_params->encoder_gain; params->tau = cntr_params->tau; - params->T = ms_to_ticks((mtime_t)(cntr_params->T*1000)); + params->T = cntr_params->T; params->k[0] = cntr_params->k[0]; params->k[1] = cntr_params->k[1]; params->l = cntr_params->l; params->l0[0] = cntr_params->l0[0]; params->l0[1] = cntr_params->l0[1]; // compute other parameters params->last_command = 0; - params->last_estimate[0] = 0; params->last_estimate[1] = 0; + params->last_estimate[0] = get_output_value(generator); params->last_estimate[1] = 0; params->last_output = params->last_estimate[0]; params->last_encoder_pos = getEncoderPosition(cntr_params->encoder); params->reference = generator; @@ -209,11 +279,17 @@ uint8_t mc_new_controller(motor_controller_params_t *cntr_params, command_genera // enable the controller params->enable = 1; - enableMotor(cntr_params->motor); - motorSetSpeed(cntr_params->motor, 0); - // start the controller - proc_new(motorController_process, params, KERN_MINSTACKSIZE * 16, NULL); + // start the correct controller depending on the mode + params->mode = mode; + if (mode == CONTROLLER_MODE_NORMAL) { + proc_new(motorController_process, params, KERN_MINSTACKSIZE * 16, NULL); + enableMotor(cntr_params->motor); + motorSetSpeed(cntr_params->motor, 0); + } + else { + proc_new(motorController_HIL_process, params, KERN_MINSTACKSIZE * 16, NULL); + } return CONTROLLER_OK; } else { @@ -236,6 +312,40 @@ void mc_delete_controller(uint8_t motor) { // Disable the controller and the power output if (params->enable != 0) { params->enable = 0; - disableMotor(motor); + if (params->mode == CONTROLLER_MODE_NORMAL) + disableMotor(motor); + } +} + +void mc_change_mode(uint8_t motor, uint8_t new_mode) { + control_params_t *params; + + params = &(controllers[get_motor_index(motor)]); + + // Do something only if the controller is enabled and in a different mode + if (params->enable && params->mode != new_mode) { + // Delete the old controller + mc_delete_controller(motor); + // Wait for the controller process to stop + while (params->running) + cpu_relax(); + // Recreate the controller in the correct mode + params->last_command = 0; + params->last_estimate[0] = get_output_value(params->reference); params->last_estimate[1] = 0; + params->last_output = params->last_estimate[0]; + params->last_encoder_pos = getEncoderPosition(params->encoder); + params->mode = new_mode; + // enable the controller + params->enable = 1; + + // start the correct controller depending on the mode + if (new_mode == CONTROLLER_MODE_NORMAL) { + proc_new(motorController_process, params, KERN_MINSTACKSIZE * 16, NULL); + enableMotor(params->motor); + motorSetSpeed(params->motor, 0); + } + else { + proc_new(motorController_HIL_process, params, KERN_MINSTACKSIZE * 16, NULL); + } } } diff --git a/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/motor_controller.h b/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/motor_controller.h index 3b4df3f..edf226c 100644 --- a/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/motor_controller.h +++ b/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/motor_controller.h @@ -13,6 +13,13 @@ #define CONTROLLER_OK 0 #define CONTROLLER_ALREADY_USED 1 +#define CONTROLLER_MODE_NORMAL 1 +#define CONTROLLER_MODE_HIL 2 + +/* + * The motor_controller_params_t structure represents all the parameters needed + * by the motor controller. They have to be set according to the motor being controlled + */ typedef struct { uint8_t motor; // Motor ID to control uint8_t encoder; // Encoder ID to measure motor position from @@ -25,12 +32,62 @@ typedef struct { float T; // Sampling period of the controller in seconds } motor_controller_params_t; +/* + * Initializes the motor controller subsystem. This won't start any controller but has to + * be called prior to anything else. + */ void motorControllerInit(void); + +/* + * Returns 'motor' 's last estimated speed. + */ float mc_getSpeed(uint8_t motor); + +/* + * Returns 'motor' 's last position obtained from encoders. + */ float mc_getPosition(uint8_t motor); + +/* + * Change the generator providing its position reference to 'motor' 's controller. + */ void mc_setReference(uint8_t motor, command_generator_t *generator); +/* + * Creates a new motor controller. + * - cntr_params : pointer to a structure containing controller parameters + * - generator : pointer to the generator providing position reference to the controller + * - mode : controller mode : + * x CONTROLLER_MODE_NORMAL : Normal, state space controller with state estimation + * x CONTROLLER_MODE_HIL : Hardware in the loop controller, to use in conjonction with a simulator + */ +uint8_t mc_new_controller(motor_controller_params_t *cntr_params, command_generator_t *generator, uint8_t mode); -uint8_t mc_new_controller(motor_controller_params_t *cntr_params, command_generator_t *generator); +/* + * Asks for the deletion of an existing controller. This will stop the H-bridge + * command output, so the control will stop immediately (but the controlling + * thread will stop at its next sampling period). + */ void mc_delete_controller(uint8_t motor); + +/* + * Changes the mode of an existing controller. This will create a new controller with the same parameters + * as the old one but with the specifyed new mode. + */ +void mc_change_mode(uint8_t motor, uint8_t new_mode); + +/* + * Returns 1 if 'motor' 's controller is enabled. + */ +uint8_t mc_is_controller_enabled(uint8_t motor); +/* + * Returns 1 if 'motor' 's controller's process is currently running + */ +uint8_t mc_is_controller_running(uint8_t motor); +/* + * Returns 'motor' 's controller mode + */ +uint8_t mc_controller_mode(uint8_t motor); + + #endif diff --git a/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/odometry.c b/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/odometry.c index 28d2038..208c342 100644 --- a/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/odometry.c +++ b/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/odometry.c @@ -16,6 +16,7 @@ typedef struct { float wheel_radius, shaft_width, encoder_gain; float Ts; uint8_t enable; + uint8_t running; } odometry_state_t; odometry_state_t state; @@ -44,6 +45,14 @@ void odo_disable(void) { state.enable = 0; } +void odo_restart(void) { + // Start odometry process + if (state.enable == 0 && state.running == 0) { + state.enable = 1; + proc_new(odometry_process, NULL, sizeof(stack_odometry), stack_odometry); + } +} + static void NORETURN odometry_process(void) { float pos_l, pos_r, last_pos_l, last_pos_r, delta_l, delta_r; uint8_t dir_l, dir_r; @@ -53,12 +62,16 @@ static void NORETURN odometry_process(void) { timer_setDelay(&timer, ms_to_ticks(state.Ts)); timer_setEvent(&timer); + // Indicate we are running + state.running = 1; + // State initialization last_pos_l = (float)getEncoderPosition(ENCODER3); last_pos_r = (float)getEncoderPosition(ENCODER4); while (1) { if (state.enable == 0) { + state.running = 0; proc_exit(); } else { timer_add(&timer); diff --git a/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/odometry.h b/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/odometry.h index b36caa9..0e780a1 100644 --- a/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/odometry.h +++ b/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/odometry.h @@ -22,6 +22,7 @@ typedef struct { void odometryInit(float Ts, float wheel_radius, float shaft_width, float encoder_gain); void odo_disable(void); +void odo_restart(void); void odo_setState(robot_state_t *new_state); hooks/post-receive -- krobot |
From: Jérémie D. <Ba...@us...> - 2011-04-05 15:34:45
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "krobot". The branch, master has been updated via 773e02438462c3eb9d7b58086faac1e5e096d280 (commit) via 45a5cf2f19790d43b614389c01bd916972da6ce4 (commit) from e4efb4a37ad629588ff4f3a2f0308754b236bdc1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 773e02438462c3eb9d7b58086faac1e5e096d280 Author: Jérémie Dimino <je...@di...> Date: Tue Apr 5 17:33:48 2011 +0200 [krobot_viewer] compute simple bezier curves commit 45a5cf2f19790d43b614389c01bd916972da6ce4 Author: Jérémie Dimino <je...@di...> Date: Tue Apr 5 11:46:56 2011 +0200 [krobot_graph] use floats instead of ints ----------------------------------------------------------------------- Changes: diff --git a/info/control2011/_oasis b/info/control2011/_oasis index 8eb1060..a1e18d0 100644 --- a/info/control2011/_oasis +++ b/info/control2011/_oasis @@ -128,7 +128,7 @@ Executable "krobot-plot" Install$: flag(gtk) CompiledObject: best MainIs: krobot_plot.ml - BuildDepends: krobot, lwt.syntax, cairo.lablgtk2, lwt.glib, threads + BuildDepends: krobot, lwt.syntax, cairo.lablgtk2, lwt.glib Executable "krobot-plot-battery" Path: src/tools @@ -136,7 +136,7 @@ Executable "krobot-plot-battery" Install$: flag(gtk) CompiledObject: best MainIs: krobot_plot_battery.ml - BuildDepends: krobot, lwt.syntax, cairo.lablgtk2, lwt.glib, threads + BuildDepends: krobot, lwt.syntax, cairo.lablgtk2, lwt.glib Executable "krobot-viewer" Path: src/tools diff --git a/info/control2011/_tags b/info/control2011/_tags index 7c5ae73..593a279 100644 --- a/info/control2011/_tags +++ b/info/control2011/_tags @@ -2,7 +2,7 @@ <src/interfaces/*.ml>: -syntax_camlp4o # OASIS_START -# DO NOT EDIT (digest: 5cd0fff2e5e7303cfc985c8215a456e0) +# DO NOT EDIT (digest: c5fb31f60362628ba2becc8b6a98c80b) # Library krobot-interfaces "src/interfaces": include "src/interfaces/krobot-interfaces.cmxs": use_krobot-interfaces @@ -73,7 +73,6 @@ # Executable krobot-plot-battery <src/tools/krobot_plot_battery.{native,byte}>: use_krobot <src/tools/krobot_plot_battery.{native,byte}>: use_krobot-interfaces -<src/tools/krobot_plot_battery.{native,byte}>: pkg_threads <src/tools/krobot_plot_battery.{native,byte}>: pkg_obus <src/tools/krobot_plot_battery.{native,byte}>: pkg_lwt.unix <src/tools/krobot_plot_battery.{native,byte}>: pkg_lwt.syntax @@ -119,13 +118,11 @@ # Executable krobot-plot <src/tools/krobot_plot.{native,byte}>: use_krobot <src/tools/krobot_plot.{native,byte}>: use_krobot-interfaces -<src/tools/krobot_plot.{native,byte}>: pkg_threads <src/tools/krobot_plot.{native,byte}>: pkg_obus <src/tools/krobot_plot.{native,byte}>: pkg_lwt.unix <src/tools/krobot_plot.{native,byte}>: pkg_lwt.syntax <src/tools/krobot_plot.{native,byte}>: pkg_lwt.glib <src/tools/krobot_plot.{native,byte}>: pkg_cairo.lablgtk2 -<src/tools/*.ml{,i}>: pkg_threads <src/tools/*.ml{,i}>: pkg_lwt.glib <src/tools/*.ml{,i}>: pkg_cairo.lablgtk2 # Executable krobot-simulator diff --git a/info/control2011/setup.ml b/info/control2011/setup.ml index 05b8ab2..2ba8666 100644 --- a/info/control2011/setup.ml +++ b/info/control2011/setup.ml @@ -1,7 +1,7 @@ (* setup.ml generated for the first time by OASIS v0.2.0~alpha1 *) (* OASIS_START *) -(* DO NOT EDIT (digest: ab615aa1d52e40116d1afa35b031733b) *) +(* DO NOT EDIT (digest: 4dcf80b777e23d14096fb05b034e73dc) *) (* Regenerated by OASIS v0.2.0 Visit http://oasis.forge.ocamlcore.org for more information and @@ -5382,8 +5382,7 @@ let setup_t = InternalLibrary "krobot"; FindlibPackage ("lwt.syntax", None); FindlibPackage ("cairo.lablgtk2", None); - FindlibPackage ("lwt.glib", None); - FindlibPackage ("threads", None) + FindlibPackage ("lwt.glib", None) ]; bs_build_tools = [ExternalTool "ocamlbuild"]; bs_c_sources = []; @@ -5558,8 +5557,7 @@ let setup_t = InternalLibrary "krobot"; FindlibPackage ("lwt.syntax", None); FindlibPackage ("cairo.lablgtk2", None); - FindlibPackage ("lwt.glib", None); - FindlibPackage ("threads", None) + FindlibPackage ("lwt.glib", None) ]; bs_build_tools = [ExternalTool "ocamlbuild"]; bs_c_sources = []; diff --git a/info/control2011/src/lib/krobot_geom.ml b/info/control2011/src/lib/krobot_geom.ml index 7f04395..28178d6 100644 --- a/info/control2011/src/lib/krobot_geom.ml +++ b/info/control2011/src/lib/krobot_geom.ml @@ -71,12 +71,10 @@ let vector a b = { let distance a b = sqrt (sqr (a.x -. b.x) +. sqr (a.y -. b.y)) -let tangent a b c = - let a = vector origin a - and b = vector origin b - and c = vector origin c in - let v = (b -| a) +| (b -| c) in - v /| norm v +let tangents a b c = + let ba = vector b a /| distance b a and bc = vector b c /| distance b c in + let v1 = ba -| bc and v2 = bc -| ba in + (v1 /| norm v1, v2 /| norm v2) (* +-----------------------------------------------------------------+ | Cubic bezier curves | @@ -97,7 +95,7 @@ module Bezier = struct and r = vector origin r and s = vector origin s in let c = (q -| p) *| 3. in - let b = (r -| q) -| c in + let b = (r -| q) *| 3. -| c in let a = s -| p -| c -| b in { p; a; b; c } diff --git a/info/control2011/src/lib/krobot_geom.mli b/info/control2011/src/lib/krobot_geom.mli index b1a9936..ddeabbf 100644 --- a/info/control2011/src/lib/krobot_geom.mli +++ b/info/control2011/src/lib/krobot_geom.mli @@ -35,8 +35,9 @@ val vector : vertice -> vertice -> vector val norm : vector -> float val distance : vertice -> vertice -> float -val tangent : vertice -> vertice -> vertice -> vector - (** [tangent a b c] returns the tangent to the triangle abc in b. *) +val tangents : vertice -> vertice -> vertice -> vector * vector + (** [tangents a b c] returns the two unitary vectors tangent to the + triangle abc in b. *) (** {6 Cubic Bezier curves} *) diff --git a/info/control2011/src/tools/krobot_graph.ml b/info/control2011/src/tools/krobot_graph.ml index 327ae72..4a9bdde 100644 --- a/info/control2011/src/tools/krobot_graph.ml +++ b/info/control2011/src/tools/krobot_graph.ml @@ -16,10 +16,10 @@ let graph_duration = 10.0 (* Type of graphs. *) type graph = { - points : (float * int) Queue.t array; + points : (float * float) Queue.t array; (* Queue of points with their time. They are ordered by increasing date. *) - mutable max : int; + mutable max : float; (* The maximum reached. *) } @@ -27,7 +27,7 @@ type graph = { let update_graph graph time = Array.iter (fun q -> - while not (Queue.is_empty q) && fst (Queue.top q) +. graph_duration < time do + while not (Queue.is_empty q) && fst (Queue.top q) +. graph_duration *. 1.5 < time do ignore (Queue.take q) done) graph.points @@ -52,7 +52,7 @@ let plot ctx width height graph time = Queue.iter (fun (date, position) -> let x = (date -. (time -. graph_duration)) /. graph_duration *. width - and y = height -. height *. (float position /. float graph.max) in + and y = height -. height *. (position /. graph.max) in match !prev with | None -> prev := Some(x, y) diff --git a/info/control2011/src/tools/krobot_plot.ml b/info/control2011/src/tools/krobot_plot.ml index cef19f2..e5e4cab 100644 --- a/info/control2011/src/tools/krobot_plot.ml +++ b/info/control2011/src/tools/krobot_plot.ml @@ -10,81 +10,7 @@ open Lwt open Lwt_react open Krobot_message - -(* +-----------------------------------------------------------------+ - | Graphs | - +-----------------------------------------------------------------+ *) - -let graph_duration = 10.0 - (* Which amount of data to keep in graphs. *) - -(* Type of graphs. *) -type graph = { - points : (float * int) Queue.t array; - (* Queue of points with their time. They are ordered by increasing - date. *) - mutable max : int; - (* The maximum reached. *) -} - -(* Remove old points. *) -let update_graph graph time = - Array.iter - (fun q -> - while not (Queue.is_empty q) && fst (Queue.top q) +. graph_duration < time do - ignore (Queue.take q) - done) - graph.points - -(* +-----------------------------------------------------------------+ - | Plotting | - +-----------------------------------------------------------------+ *) - -let rec colors = (1., 0., 0.) :: (0., 1., 0.) :: (0., 0., 1.) :: (1., 1., 0.) :: colors - -let plot ctx width height graph time = - Cairo.set_source_rgb ctx 1. 1. 1.; - Cairo.rectangle ctx 0. 0. width height; - Cairo.fill ctx; - let colors = ref colors in - Array.iter - (fun q -> - let r, g, b = List.hd !colors in - colors := List.tl !colors; - Cairo.set_source_rgb ctx r g b; - let prev = ref None in - Queue.iter - (fun (date, position) -> - let x = (date -. (time -. graph_duration)) /. graph_duration *. width - and y = height -. height *. (float position /. float graph.max) in - match !prev with - | None -> - prev := Some(x, y) - | Some(x', y') -> - prev := Some(x, y); - Cairo.move_to ctx x' y'; - Cairo.line_to ctx x y; - Cairo.stroke ctx) - q) - graph.points - -(* +-----------------------------------------------------------------+ - | Drawing | - +-----------------------------------------------------------------+ *) - -let draw window graph = - while true do - let { Gtk.width; Gtk.height } = window#misc#allocation in - let surface = Cairo.image_surface_create Cairo.FORMAT_ARGB32 width height in - let ctx = Cairo.create surface in - plot ctx (float width) (float height) graph (Unix.gettimeofday ()); - let ctx = Cairo_lablgtk.create window#misc#window in - Cairo.set_source_surface ctx surface 0. 0.; - Cairo.rectangle ctx 0. 0. (float width) (float height); - Cairo.fill ctx; - Cairo.surface_finish surface; - ignore (Unix.select [] [] [] (1. /. 25.)) - done +open Krobot_graph (* +-----------------------------------------------------------------+ | Main-loop | @@ -103,16 +29,13 @@ lwt () = window#show (); (* Create the graph. *) - let graph = { points = Array.init 2 (fun _ -> Queue.create ()); max = 1 } in - - (* Draw in a separate thread. *) - ignore (Thread.create (fun () -> draw window graph) ()); - + let graph = { points = Array.init 2 (fun _ -> Queue.create ()); max = 1. } in E.keep (E.map (fun (timestamp, msg) -> match msg with | Encoder_position_direction_3_4(pos3, dir3, pos4, dir4) -> + let pos3 = float pos3 and pos4 = float pos4 in graph.max <- max graph.max (max pos3 pos4); Queue.push (timestamp, pos3) graph.points.(0); Queue.push (timestamp, pos4) graph.points.(1); @@ -121,4 +44,10 @@ lwt () = ()) (Krobot_message.recv bus)); - waiter + pick [ + waiter; + while_lwt true do + Krobot_graph.draw window graph; + Lwt_unix.sleep (1. /. 25.) + done; + ] diff --git a/info/control2011/src/tools/krobot_plot_battery.ml b/info/control2011/src/tools/krobot_plot_battery.ml index fa79f9b..3bbcad9 100644 --- a/info/control2011/src/tools/krobot_plot_battery.ml +++ b/info/control2011/src/tools/krobot_plot_battery.ml @@ -25,19 +25,19 @@ lwt () = (* Create the graph. *) let graph = { Krobot_graph.points = Array.init 2 (fun _ -> Queue.create ()); - Krobot_graph.max = 1 } in + Krobot_graph.max = 14. } in E.keep (E.map (fun (timestamp, msg) -> match msg with | Battery1_voltages(x1, x2, x3, x4) -> - let s = int_of_float ((x1 +. x2 +. x3 +. x4) *. 1000.) in + let s = x1 +. x2 +. x3 +. x4 in graph.Krobot_graph.max <- max graph.Krobot_graph.max s; Queue.push (timestamp, s) graph.Krobot_graph.points.(0); Krobot_graph.update_graph graph timestamp | Battery2_voltages(x1, x2, x3, x4) -> - let s = int_of_float ((x1 +. x2 +. x3 +. x4) *. 1000.) in + let s = x1 +. x2 +. x3 +. x4 in graph.Krobot_graph.max <- max graph.Krobot_graph.max s; Queue.push (timestamp, s) graph.Krobot_graph.points.(1); Krobot_graph.update_graph graph timestamp diff --git a/info/control2011/src/tools/krobot_viewer.ml b/info/control2011/src/tools/krobot_viewer.ml index 00bb54c..22a5c20 100644 --- a/info/control2011/src/tools/krobot_viewer.ml +++ b/info/control2011/src/tools/krobot_viewer.ml @@ -435,6 +435,7 @@ module Board = struct let clear board = board.points <- []; + board.bezier <- []; queue_draw board let rec last = function @@ -477,20 +478,18 @@ module Board = struct in let result = List.tl (loop [0; Array.length points - 1]); in board.points <- List.map (fun i -> points.(i)) result; -(* - let speed = board.ui#moving_speed#adjustment#value - and acceleration = board.ui#moving_acceleration#adjustment#value in (* Compute cubic bezier curves. *) let rec loop = function | p :: (q :: r :: s :: _ as rest) -> - (* Compute the speed vectors. *) - let v1 = tangent p q r and v2 = tangent q r s in - let v1 = { vx = -. v1.vy; vy = v1.vx } *| speed - and v2 = { vx = v2.vy; vy = -. v2.vx } *| speed in + (* Computes tangents with a length that is half of the + minimum length of the adjacent segments. *) + let _, v1 = tangents p q r and v2, _ = tangents q r s in + let v1 = v1 *| (min (distance p q) (distance q r) /. 2.) + and v2 = v2 *| (min (distance q r) (distance r s) /. 2.) in (* Create the bezier curve. *) - let curve = Bezier.make ~p:q ~s:r ~vp:v1 ~vs:v2 ~a:acceleration ~error_max:0.1 in + let curve = Bezier.of_vertices q (translate q v1) (translate r v2) r in (* Create vertices. *) let vertices = Array.create 101 origin in @@ -502,8 +501,8 @@ module Board = struct | _ -> [] in - board.bezier <- [||] :: loop board.points; -*) + board.bezier <- [||] :: loop ({ x = board.state.pos.x; y = board.state.pos.y } :: board.points); + queue_draw board let wait_done board = hooks/post-receive -- krobot |