diff --git a/README.md b/README.md index 22815560a1bc4261f17d18a6fff2def045fcbe78..4fc83345fc9615cf724474da710b59fabacd8b94 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,35 @@ ## Exemple e-puck2 with a camera of 640x480 -image +install ROS2 ( at the moment the latest is Jazzy vesion https://docs.ros.org/en/jazzy/index.html ) +install all the package needed. + +launch webots with world/e-puck2.wbt + +With `ros2 topic list` you can see the topics available: + + /camera/image_raw #image from the camera + /cmd_vel #Speed command of the robot + /distance_sensors #array of floats distances from the sensors + /odom #Position of the robot as the integration of the wheel's movements + /parameter_events + /rosout + +You can see and modify these values with rqt ot through your one program. + +# With ros2 on OSX + +Install ros2 with robostack https://robostack.github.io/GettingStarted.html ( probably replace humble by jazzy to have the latest version ) + +Install the needed packages like rclpy : `conda install -c ros-forge ros-humble-rclpy` + + conda install -c ros-forge ros-humble-sensor-msgs ros-humble-cv-bridge ros-humble-nav-msgs opencv ros-humble-cv-bridge + ... + +Launch Webot **in your conda environment with ros2 activated** i.e.: + + conda activate ros2 + /Applications/Webots.app/Contents/MacOS/webots + +Open the world file `world/e-puck2.wbt` and run the simulation see above. + diff --git a/worlds/.e-puck2.wbproj b/worlds/.e-puck2.wbproj index f86982ad4b21ac255a7aabe9f7893aeff2b55631..93de8024d80b213b6822a7949b4eed25af00bdfd 100644 --- a/worlds/.e-puck2.wbproj +++ b/worlds/.e-puck2.wbproj @@ -1,10 +1,10 @@ Webots Project File version R2023b -perspectives: 000000ff00000000fd0000000300000000000001c1000003e8fc0100000003fc00000000ffffffff0000000000fffffffc0200000001fb00000012005300630065006e0065005400720065006501000000000000039f0000000000000000fb0000001a0044006f00630075006d0065006e0074006100740069006f006e0000000000ffffffff0000000000000000fb0000001e00480074006d006c0052006f0062006f007400570069006e0064006f00770100000000000001c10000000000000000000000010000032f000004befc0200000001fb0000001400540065007800740045006400690074006f00720100000017000004be0000008800ffffff00000003000009bd000000d7fc0100000003fb0000000e0043006f006e0073006f006c006501000001c7000005ba0000000000000000fb0000001a0052006f0062006f0074003a00200065002d007000750063006b01000004e70000021a0000000000000000fb0000001a0043006f006e0073006f006c00650041006c006c0041006c006c0100000000000009bd0000006900ffffff0000068c000004be00000004000000040000000100000008fc00000000 +perspectives: 000000ff00000000fd0000000300000000000001c1000003e8fc0100000003fc00000000ffffffff0000000000fffffffc0200000001fb00000012005300630065006e0065005400720065006501000000000000039f0000000000000000fb0000001a0044006f00630075006d0065006e0074006100740069006f006e0000000000ffffffff0000000000000000fb0000001e00480074006d006c0052006f0062006f007400570069006e0064006f00770100000000000001c10000000000000000000000010000032f0000025bfc0200000001fb0000001400540065007800740045006400690074006f007201000000000000025b0000008a00ffffff0000000300000708000001d1fc0100000003fb0000000e0043006f006e0073006f006c006501000001c7000005ba0000000000000000fb0000001a0052006f0062006f0074003a00200065002d007000750063006b01000004e70000021a0000000000000000fb0000001a0043006f006e0073006f006c00650041006c006c0041006c006c0100000000000007080000008700ffffff000003d70000025b00000004000000040000000100000008fc00000000 simulationViewPerspectives: 000000ff00000001000000020000029e000001d40100000002010000000101 -sceneTreePerspectives: 000000ff00000001000000030000001d000002af000000fa0100000002010000000201 +sceneTreePerspectives: 000000ff00000001000000030000001e000002af000000fa0100000002010000000201 maximizedDockId: -1 centralWidgetVisible: 1 orthographicViewHeight: 1 textFiles: 0 "controllers/epuck_ros2_controller/epuck_ros2_controller.py" consoles: Console:All:All -renderingDevicePerspectives: e-puck2:camera;1;0.725;0;0.00173306 +renderingDevicePerspectives: e-puck2:camera;1;0.482812;0;0.00173306