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

fixed thruster.cc undefined behavior #2316

Closed
wants to merge 22 commits into from
Closed
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
9d87652
fixed thruster.cc undefined behaviour
GauravKumar9920 Feb 15, 2024
e023e3d
updating the code to check for the empty modelposes
GauravKumar9920 Feb 17, 2024
5f81ca1
adding a runtime error
GauravKumar9920 Feb 18, 2024
2db4d5d
minor fix
GauravKumar9920 Feb 18, 2024
d3f586c
Added assert false function
GauravKumar9920 Mar 2, 2024
1ad599e
added ASSERT_FALSE stement that's required elsewhere
GauravKumar9920 Mar 18, 2024
3239f41
minor changes
GauravKumar9920 Mar 18, 2024
59a0f5e
Update test/integration/thruster.cc
GauravKumar9920 Mar 19, 2024
be2d152
Fixed all the issues, I Hope
GauravKumar9920 Mar 19, 2024
19ce285
Update test/integration/thruster.cc
GauravKumar9920 Mar 20, 2024
60861c1
Add entity validation to OdometryPublisher (#2326)
Mar 1, 2024
b918724
Add entity and sdf parameters to Server's AddSystem interface (#2324)
g-arjones Mar 5, 2024
8c63d88
Fix wget in maritime tutorials (#2330)
caguero Mar 12, 2024
d56ea91
Add reference to joint_controller.md tutorial. (#2333)
francocipollone Mar 13, 2024
bce4ae2
Prepare for 8.2.0 (#2335)
azeey Mar 15, 2024
1716fe5
Publish step size in world stats topic (#2340)
iche033 Mar 22, 2024
8ca57b4
Check null mesh (#2341)
iche033 Mar 25, 2024
55cd8a6
Fixed turning error in ackermann steering (#2342)
sauk2 Mar 27, 2024
2dcec27
Added mutex to protect stored time variables (#2345)
sauk2 Mar 28, 2024
d580c2d
made the required changes
GauravKumar9920 Mar 30, 2024
0e92da8
Update test/integration/thruster.cc
GauravKumar9920 Apr 1, 2024
5a303ba
Merge branch 'gazebosim:gz-sim8' into gz-sim8
GauravKumar9920 Apr 1, 2024
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
7 changes: 3 additions & 4 deletions test/integration/thruster.cc
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ void ThrusterTest::TestWorld(const std::string &_world,

// Check no movement because of invalid commands
fixture.Server()->Run(true, 100, false);
ASSERT_FALSE(modelPoses.empty());
EXPECT_DOUBLE_EQ(0.0, modelPoses.back().Pos().X());
EXPECT_EQ(100u, modelPoses.size());
EXPECT_EQ(100u, propellerAngVels.size());
Expand Down Expand Up @@ -244,8 +245,8 @@ void ThrusterTest::TestWorld(const std::string &_world,
// Check movement
if (_namespace != "lowbattery")
{
for (sleep = 0; modelPoses.back().Pos().X() < 5.0 && sleep < maxSleep;
++sleep)
for (sleep = 0; (modelPoses.empty() || modelPoses.back().Pos().X() < 5.0) &&
sleep < maxSleep; ++sleep)
{
std::this_thread::sleep_for(std::chrono::milliseconds(100));
fixture.Server()->Run(true, 100, false);
Expand Down Expand Up @@ -331,13 +332,11 @@ void ThrusterTest::TestWorld(const std::string &_world,
EXPECT_NEAR(0.0, angVel.Y(), _baseTol);
EXPECT_NEAR(0.0, angVel.Z(), _baseTol);
}

modelPoses.clear();
propellerAngVels.clear();
propellerLinVels.clear();
// Make sure that when the deadband is disabled
// commands below the deadband should create a movement
auto latest_pose = modelPoses.back();
msgs::Boolean db_msg;
if (_namespace == "deadband")
{
Expand Down
Loading