Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4 ➡️ 5 #695

Merged
merged 27 commits into from
Mar 20, 2021
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
1b9ad9a
Check empty world name in Scene3d (#662)
iche033 Mar 5, 2021
58cc8d3
cache link poses to improve performance (#669)
adlarkin Mar 4, 2021
7d98df4
Backport #561: Use common::setenv (#666)
chapulina Mar 8, 2021
f819ab9
Master branch updates (#672)
chapulina Mar 9, 2021
6434c24
Fix entity tree for large worlds (#673)
chapulina Mar 9, 2021
d79aafd
Remove bounding box when model is deleted (#675)
chapulina Mar 9, 2021
dce8bab
Fixed docblock showGrid (#152)
ahcorde May 22, 2020
c06874c
Fix yaw units (#238)
mcres Jul 13, 2020
fcc6c6d
Qt auto scale factor for HiDPI displays (#291)
mabelzhang Aug 20, 2020
34cbbae
Update codeowners (#305)
maryaB-osr Aug 22, 2020
1aa2340
Fix Qt5 warnings for using anchors (#363)
luca-della-vedova Sep 22, 2020
cc50679
Add tutorial tweaks (#380)
Sep 26, 2020
56b5ab4
clarified performer example (#390)
jennuine Sep 29, 2020
443a9f7
Use a std::promise/std::future to avoid busy waiting the step ack mes…
ivanpauno Dec 10, 2020
23b5406
Kinetic energy monitor plugin (#492)
gonzodepedro Dec 28, 2020
84c4ce9
change nullptr to a int ptr for qt 5.15.2 bug (#527)
acxz Jan 7, 2021
c9f815a
Improve ign tool support on macOS (#477)
scpeters Jan 11, 2021
b47e7e5
Added screenshot to toolbar (#588)
jennuine Mar 11, 2021
c231bc9
3 ➡️ 4
chapulina Mar 12, 2021
5e3d867
3 ➡️ 4 (#681)
chapulina Mar 15, 2021
6603455
Remove visibility from headers that are not installed (#665)
chapulina Mar 15, 2021
9f19dd9
Ackermann Steering Plugin (#618)
knoedler Mar 16, 2021
29683a8
Add joint position controller GUI, also enable tests for GUI plugins …
chapulina Mar 17, 2021
f9a5ece
3 to 4 (#689)
adlarkin Mar 17, 2021
778ff85
Fix joint controller GUI test (#697)
chapulina Mar 19, 2021
7ef3ae2
4 ➡️ 5 (#695)
chapulina Mar 19, 2021
84ae007
Fixes for porting 4 ➡️ 5 (#695)
chapulina Mar 19, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improve ign tool support on macOS (#477)
Signed-off-by: Louise Poubel <louise@openrobotics.org>
scpeters authored and chapulina committed Mar 10, 2021

Verified

This commit was signed with the committer’s verified signature.
pradyunsg Pradyun Gedam
commit c9f815af2423462791c411f46b295d7bcb6bcf21
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -122,6 +122,12 @@ set(IGN_RENDERING_VER ${ignition-rendering3_VERSION_MAJOR})
ign_find_package(ignition-math6 REQUIRED COMPONENTS eigen3 VERSION 6.6)
set(IGN_MATH_VER ${ignition-math6_VERSION_MAJOR})

#--------------------------------------
# Find ignition-tools
ign_find_package(ignition-tools
REQUIRED
PKGCONFIG "ignition-tools")

#--------------------------------------
# Find protobuf
set(REQ_PROTOBUF_VER 3)
30 changes: 30 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -132,6 +132,36 @@ ign_build_tests(TYPE UNIT
ignition-gazebo${PROJECT_VERSION_MAJOR}
)

if(TARGET UNIT_ign_TEST)

# Running `ign gazebo` on macOS has problems when run with /usr/bin/ruby
# due to System Integrity Protection (SIP). Try to find ruby from
# homebrew as a workaround.
if (APPLE)
find_program(BREW_RUBY ruby HINTS /usr/local/opt/ruby/bin)
endif()

add_dependencies(UNIT_ign_TEST
${ign_lib_target}
TestModelSystem
TestSensorSystem
TestWorldSystem
)

target_compile_definitions(UNIT_ign_TEST PRIVATE
"BREW_RUBY=\"${BREW_RUBY} \"")

target_compile_definitions(UNIT_ign_TEST PRIVATE
"IGN_PATH=\"${IGNITION-TOOLS_BINARY_DIRS}\"")

set(_env_vars)
list(APPEND _env_vars "IGN_CONFIG_PATH=${CMAKE_BINARY_DIR}/test/conf")
list(APPEND _env_vars "IGN_GAZEBO_SYSTEM_PLUGIN_PATH=$<TARGET_FILE_DIR:TestModelSystem>")

set_tests_properties(UNIT_ign_TEST PROPERTIES
ENVIRONMENT "${_env_vars}")
endif()

if(NOT WIN32)
add_subdirectory(cmd)
endif()
23 changes: 23 additions & 0 deletions src/cmd/cmdgazebo.rb.in
Original file line number Diff line number Diff line change
@@ -338,6 +338,17 @@ class Cmd
Importer.dlload plugin
rescue DLError => e
puts "Library error for [#{plugin}]: #{e.to_s}"
if plugin.end_with? ".dylib"
puts "
If this script was executed with /usr/bin/ruby, this error may be caused by
macOS System Integrity Protection. One workaround is to use a different
version of ruby, for example:
brew install ruby
and add the following line to your shell profile:
export PATH=/usr/local/opt/ruby/bin:$PATH
If you are using a colcon workspace, please ensure that the setup script
has properly set the DYLD_LIBRARY_PATH environment variables."
end
exit(-1)
end

@@ -436,6 +447,12 @@ class Cmd
# and gui.
if options['server'] == 0 && options['gui'] == 0

if plugin.end_with? ".dylib"
puts "`ign gazebo` currently only works with the -s argument on macOS.
See https://github.com/ignitionrobotics/ign-gazebo/issues/44 for more info."
exit(-1)
end

serverPid = Process.fork do
ENV['RMT_PORT'] = '1500'
Process.setpgid(0, 0)
@@ -485,6 +502,12 @@ class Cmd
options['file'], options['record-topics'].join(':'))
# Otherwise run the gui
else options['gui']
if plugin.end_with? ".dylib"
puts "`ign gazebo` currently only works with the -s argument on macOS.
See https://github.com/ignitionrobotics/ign-gazebo/issues/44 for more info."
exit(-1)
end

ENV['RMT_PORT'] = '1501'
Importer.runGui(options['gui_config'])
end
22 changes: 2 additions & 20 deletions src/ign_TEST.cc
Original file line number Diff line number Diff line change
@@ -27,12 +27,8 @@

static const std::string kBinPath(PROJECT_BINARY_PATH);

// Command line not working on OSX, see
// https://github.com/ignitionrobotics/ign-gazebo/issues/25/
#ifndef __APPLE__
static const std::string kIgnCommand(
"IGN_GAZEBO_SYSTEM_PLUGIN_PATH=" + kBinPath + "/lib LD_LIBRARY_PATH=" +
kBinPath + "/lib:/usr/local/lib:${LD_LIBRARY_PATH} ign gazebo -s ");
std::string(BREW_RUBY) + std::string(IGN_PATH) + "/ign gazebo -s ");

/////////////////////////////////////////////////
std::string customExecStr(std::string _cmd)
@@ -91,8 +87,7 @@ TEST(CmdLine, Server)
}

/////////////////////////////////////////////////
// Not supported on Mac's command line tool
TEST(CmdLine, IGN_UTILS_TEST_DISABLED_ON_MAC(CachedFuelWorld))
TEST(CmdLine, CachedFuelWorld)
{
std::string projectPath = std::string(PROJECT_SOURCE_PATH) + "/test/worlds";
ignition::common::setenv("IGN_FUEL_CACHE_PATH", projectPath.c_str());
@@ -165,16 +160,3 @@ TEST(CmdLine, ResourcePath)
EXPECT_EQ(output.find("Unable to find file plugins.sdf"), std::string::npos)
<< output;
}
#endif

/////////////////////////////////////////////////
/// Main
int main(int _argc, char **_argv)
{
// Set IGN_CONFIG_PATH to the directory where the .yaml configuration files
// is located.
ignition::common::setenv("IGN_CONFIG_PATH", IGN_CONFIG_PATH);

::testing::InitGoogleTest(&_argc, _argv);
return RUN_ALL_TESTS();
}