Skip to content

Commit

Permalink
Fixed compilation on macOS (#5289)
Browse files Browse the repository at this point in the history
* Fixed compilation, echo output on macOS

* Fixed echo -e

* Set JAVA_HOME automatically

* remove codesign from Makefile.include

* Update Makefile

* Update Makefile

* Compiles fixes for arm64

* Fixed compilation on arm64

* Update changelog-r2022.md

* Update changelog-r2022.md

* Got rid of aseba

* Removed aseba dependency

* Removed aseba documentation

* removed python brew

* Fixed mac distro on arm64

Co-authored-by: Yannick Goumaz <[email protected]>
  • Loading branch information
omichel and ygoumaz authored Nov 11, 2022
1 parent b90ab4d commit 1c94b8b
Show file tree
Hide file tree
Showing 40 changed files with 63 additions and 1,804 deletions.
6 changes: 0 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
[submodule "src/glm"]
path = src/glm
url = https://github.com/g-truc/glm.git
[submodule "projects/robots/mobsya/thymio/libraries/dashel-src"]
path = projects/robots/mobsya/thymio/libraries/dashel-src
url = https://github.com/aseba-community/dashel.git
[submodule "projects/robots/mobsya/thymio/controllers/thymio2_aseba/aseba"]
path = projects/robots/mobsya/thymio/controllers/thymio2_aseba/aseba
url = https://github.com/aseba-community/aseba.git
[submodule "src/stb"]
path = src/stb
url = https://github.com/nothings/stb.git
Expand Down
20 changes: 10 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,15 @@ install:

help:
@+echo
@+echo -e "\033[32;1mWebots Makefile targets:\033[0m"
@+$(ECHO) "\033[32;1mWebots Makefile targets:\033[0m"
@+echo
@+echo -e "\033[33;1mmake -j$(THREADS) release\033[0m\t# compile with maximum optimization (default)"
@+echo -e "\033[33;1mmake -j$(THREADS) debug\033[0m \t# compile with gdb debugging symbols"
@+echo -e "\033[33;1mmake -j$(THREADS) profile\033[0m\t# compile with gprof profiling information"
@+echo -e "\033[33;1mmake -j$(THREADS) distrib\033[0m\t# compile in release mode & create distribution package"
@+echo -e "\033[33;1mmake -j$(THREADS) clean\033[0m \t# clean-up the compilation output"
@+echo -e "\033[33;1mmake -j$(THREADS) cleanse\033[0m\t# deep clean-up (dependencies are also removed)"
@+echo -e "\033[33;1mmake help\033[0m\t\t# display this message and exit"
@+$(ECHO) "\033[33;1mmake -j$(THREADS) release\033[0m\t# compile with maximum optimization (default)"
@+$(ECHO) "\033[33;1mmake -j$(THREADS) debug\033[0m \t# compile with gdb debugging symbols"
@+$(ECHO) "\033[33;1mmake -j$(THREADS) profile\033[0m\t# compile with gprof profiling information"
@+$(ECHO) "\033[33;1mmake -j$(THREADS) distrib\033[0m\t# compile in release mode & create distribution package"
@+$(ECHO) "\033[33;1mmake -j$(THREADS) clean\033[0m \t# clean-up the compilation output"
@+$(ECHO) "\033[33;1mmake -j$(THREADS) cleanse\033[0m\t# deep clean-up (dependencies are also removed)"
@+$(ECHO) "\033[33;1mmake help\033[0m\t\t# display this message and exit"
@+echo
@+echo -e "\033[32;1mNote:\033[0m You seem to have a processor with $(NUMBER_OF_PROCESSORS) virtual cores,"
@+echo -e " hence the \033[33;1m-j$(THREADS)\033[0m option to speed-up the compilation."
@+$(ECHO) "\033[32;1mNote:\033[0m You seem to have a processor with $(NUMBER_OF_PROCESSORS) virtual cores,"
@+$(ECHO) " hence the \033[33;1m-j$(THREADS)\033[0m option to speed-up the compilation."
Binary file not shown.
31 changes: 3 additions & 28 deletions docs/guide/thymio2.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ More information about the Thymio II is available from its official [website](ht

Webots contains an accurate model of the Thymio II robot.
Almost all the Thymio II devices have been modeled and calibrated.
Moreover Aseba studio and VPL for Thymio II can be connected on the simulated model allowing you to program the simulated robot using Aseba.
Many Aseba examples are working directly with the simulated robot.
Finally several objects related to the Thymio II are available, including a pen which can draw on any 3D object.

### Thymio II Model
Expand Down Expand Up @@ -67,8 +65,8 @@ Thymio2 {
SFVec3f translation 0 0 0
SFRotation rotation 0 0 1 0
SFString name "Thymio II"
SFString controller "thymio2_aseba"
MFString controllerArgs "port=33333"
SFString controller "thymio2_demo"
MFString controllerArgs []
SFString customData ""
SFBool supervisor FALSE
SFBool synchronization TRUE
Expand All @@ -89,31 +87,8 @@ Thymio2 {

- `bodySlot`: Extends the robot with new nodes in the body slot.

### Connect Aseba to the Thymio II Model
### Robot Window

The default controller of the Thymio II PROTO is the `thymio2_demo` controller.
It should be changed to `thymio2_aseba` to allow the connection to Aseba programming environment.
However, most world files including the Thymio II robot are already configured to use `thymio2_aseba` as a controller for the Thymio II robot.
Technically, `thymio2_aseba` creates a TCP/IP server on which Aseba can be connected, and it wraps the Aseba API with the Webots API.

Here is how to proceed to connect Aseba to the Thymio II model in Webots.
Make sure that the simulation is running (the controller has started) and that the controller of the Thymio II robot is `thymio2_aseba`.
You can check this from the Webots scene tree, by opening the Thymio2 node.
Aseba Studio or VPL for Thymio II can then be started.
From the Aseba target selection dialog (see the [figure](#aseba-studio-and-vpl-target-selection-dialog).), select the `Network TCP/IP` option with the following parameters: `Host = localhost` and `Port = 33333`.
Then just click on the `Connect` button.

In case of a simulation containing several Thymio II, the TCP/IP port of the `thymio2_aseba` controller should be unique for each robot instance.
This value can be modified by editing the `Thymio2::controllerArgs` field.

%figure "Aseba Studio and VPL target selection dialog"

![aseba_target_selection.png](images/robots/thymio2/aseba_target_selection.png)

%end

The Thymio II window (see the [figure](#thymio-ii-robot-window)) can help you to raise some events easily.
These events are mainly useful when using the VPL for Thymio II software.
To open the Thymio II window, select the "Show Robot Window" option in the robot [context menu](the-3d-window.md#context-menu).

%figure "Thymio II robot window"
Expand Down
4 changes: 0 additions & 4 deletions lib/controller/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,4 @@
/python38
/python39
/python310
/python37_brew
/python38_brew
/python39_brew
/python310_brew
/*.so.*
4 changes: 2 additions & 2 deletions projects/default/controllers/ros/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ endif
PYTHON_COMMAND ?= python3
ifeq (, $(ROS_DISTRO))
release debug profile clean:
@echo "# \033[0;33mROS not installed or 'ROS_DISTRO' not defined\033[0m"
@$(ECHO) "# \033[0;33mROS not installed or 'ROS_DISTRO' not defined\033[0m"
else
ifeq (2, $(ROS_VERSION))
release debug profile clean:
@echo "# \033[0;33mROS_DISTRO should not be a ROS2 distribution\033[0m"
@$(ECHO) "# \033[0;33mROS_DISTRO should not be a ROS2 distribution\033[0m"
else
CXX_SOURCES = $(wildcard *.cpp)
CXX_SOURCES += $(wildcard highlevel/*.cpp)
Expand Down
4 changes: 2 additions & 2 deletions projects/default/libraries/vehicle/java/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ LIB += -L"$(WEBOTS_CONTROLLER_LIB_PATH)" -lCppController -lCppCar -lCppDriver
# rules
ifeq ($(SWIG_EXISTS),)
all release debug profile:
@echo -e "# \033[0;33mSWIG not installed, skipping Java API\033[0m"
@$(ECHO) "# \033[0;33mSWIG not installed, skipping Java API\033[0m"
else ifeq ($(JAVA_HOME),)
all release debug profile:
@echo -e "# \033[0;33mJava not installed or 'JAVA_HOME' not set, skipping Java API\033[0m"
@$(ECHO) "# \033[0;33mJava not installed or 'JAVA_HOME' not set, skipping Java API\033[0m"
else
all release debug profile: $(JAR) $(LIBRARY)

Expand Down
3 changes: 0 additions & 3 deletions projects/robots/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

LIBRARIES=robotis/darwin-op/libraries.Makefile \
neuronics/ipr/libraries.Makefile \
mobsya/thymio/libraries.Makefile \
kuka/youbot/libraries.Makefile

CONTROLLERS=\
Expand Down Expand Up @@ -96,8 +95,6 @@ robotis/darwin-op/controllers.Makefile robotis/darwin-op/plugins/robot_windows.M

neuronics/ipr/controllers.Makefile: neuronics/ipr/libraries.Makefile

mobsya/thymio/controllers.Makefile: mobsya/thymio/libraries.Makefile

kuka/youbot/controllers.Makefile: kuka/youbot/libraries.Makefile

%.Makefile:
Expand Down
12 changes: 0 additions & 12 deletions projects/robots/mobsya/thymio/controllers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,6 @@
# limitations under the License.
TARGETS = thymio2_demo.Makefile

ifneq (,$(wildcard ../libraries/dashel/dashel/dashel.h))
ADD_THYMIO2_ASEBA = 1
endif

ifeq ($(MAKECMDGOALS),clean)
ADD_THYMIO2_ASEBA = 1
endif

ifdef ADD_THYMIO2_ASEBA
TARGETS += thymio2_aseba.Makefile
endif

.PHONY: release debug profile clean

release debug profile clean: $(TARGETS)
Expand Down

This file was deleted.

47 changes: 0 additions & 47 deletions projects/robots/mobsya/thymio/controllers/thymio2_aseba/Makefile

This file was deleted.

Loading

0 comments on commit 1c94b8b

Please sign in to comment.