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

Swarm in Blocks: code adaptation to swarms #439

Draft
wants to merge 152 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 103 commits
Commits
Show all changes
152 commits
Select commit Hold shift + click to select a range
1ac1045
Create SwormAtena
guisoares9 Oct 22, 2021
961bdc3
Renamed file SwarmAtena
guisoares9 Oct 23, 2021
950d4e2
Merge branch 'CopterExpress:master' into master
Playergeek181 Oct 25, 2021
2ff9917
Swarm in Blocks project application of Atena team.
guisoares9 Oct 26, 2021
cc2750f
Merge branch 'master' of https://github.com/Grupo-SEMEAR-USP/clover
guisoares9 Oct 26, 2021
958f39f
Update Swarm_in_Blocks.md
guisoares9 Oct 26, 2021
74de58e
Merge pull request #1 from Grupo-SEMEAR-USP/Swarm_in_Blocks
guisoares9 Oct 26, 2021
f2b40b5
Fixing MAVLINK to MAVLink
guisoares9 Oct 26, 2021
545797d
Trailling spaces fixed
guisoares9 Oct 26, 2021
8aef11c
Markdown lint solved
guisoares9 Oct 26, 2021
f3ce4e0
Merge branch 'CopterExpress:master' into master
Playergeek181 Nov 12, 2021
bb5c628
Merge branch 'CopterExpress:master' into master
guisoares9 Dec 21, 2021
489807c
Merge branch 'CopterExpress:master' into Swarm_in_Blocks
guisoares9 Dec 23, 2021
aeae9ec
file renamed
guisoares9 Dec 27, 2021
4fe0d0b
file renamed
guisoares9 Dec 27, 2021
9a5f725
Merge branch 'CopterExpress:master' into master
guisoares9 Jan 25, 2022
a52c5ea
Started to update the project readme.
guisoares9 Jan 27, 2022
17038ec
Merge branch 'CopterExpress:master' into master
guisoares9 Jan 27, 2022
242981c
Merge branch 'CopterExpress:master' into Swarm_in_Blocks
Playergeek181 Feb 3, 2022
5d4379b
Update files to be possible to generate new files using then
Playergeek181 Feb 3, 2022
8ff5275
Update to be possible to use leds in multiple drones
Playergeek181 Feb 3, 2022
c5d836d
roswww_static updated to swarm_in_blocks front-end.
guisoares9 Feb 5, 2022
1a999da
favicon add on the localhost:2001 page
Felipe-Tommaselli Feb 6, 2022
7f6de12
arrumando o problema do path com o rospkg
Felipe-Tommaselli Feb 6, 2022
c69b7f2
melhorando o design do localhost
Felipe-Tommaselli Feb 10, 2022
33e81f8
roswww_static fixed
guisoares9 Feb 11, 2022
c4a978b
arrumando o localhost
Felipe-Tommaselli Feb 11, 2022
64e3c69
restaurando clover_blocks para o original
Felipe-Tommaselli Feb 12, 2022
19d900d
atualizando o localhost:2001
Felipe-Tommaselli Feb 16, 2022
12c0cae
Led names fixed
guisoares9 Feb 21, 2022
d88a8d6
minor changes
Felipe-Tommaselli Feb 22, 2022
0104eeb
Merge branch 'master' of https://github.com/Grupo-SEMEAR-USP/clover
Felipe-Tommaselli Feb 22, 2022
fd7636b
Adding initial pose to simple_offboard
guisoares9 Feb 22, 2022
d509a79
Pull request done
guisoares9 Feb 22, 2022
7bde23e
Led plugin fixed to work without camera plugin
guisoares9 Mar 8, 2022
8f46f0f
leds
guisoares9 Mar 11, 2022
d34b634
nothing
guisoares9 Mar 14, 2022
4070296
Lights world
guisoares9 Mar 16, 2022
e99af63
Merge branch 'CopterExpress:master' into master
guisoares9 Mar 17, 2022
5454035
Flashlights on clover disabled
guisoares9 Mar 17, 2022
d0b39b0
Merge branch 'master' of github.com:Grupo-SEMEAR-USP/clover
guisoares9 Mar 17, 2022
1310ff6
sim_leds fixed
guisoares9 Mar 17, 2022
f306db9
localhost assets updated
guisoares9 Mar 23, 2022
9445b71
minor changes
Felipe-Tommaselli Mar 23, 2022
7870e73
minor changes
Felipe-Tommaselli Mar 30, 2022
8f1a1ea
editing the files from "eazy to swarm" heading
Felipe-Tommaselli Mar 30, 2022
5fc7510
Final article started
guisoares9 Mar 31, 2022
32adfe5
changing size of led_ring
Playergeek181 Mar 31, 2022
44d62b6
Merge branch 'master' of https://github.com/Grupo-SEMEAR-USP/clover
Playergeek181 Mar 31, 2022
985096e
Starting the article
Rafael-Saud Mar 31, 2022
2bba895
Adding topics in the article
Rafael-Saud Mar 31, 2022
bef8b4f
Updates in the article
Rafael-Saud Mar 31, 2022
e15071e
nothing
guisoares9 Mar 31, 2022
bbeccc5
Merge branch 'master' of github.com:Grupo-SEMEAR-USP/clover
guisoares9 Mar 31, 2022
bdd556b
Swarm tools done
Rafael-Saud Mar 31, 2022
3a659a8
Conclusion
Rafael-Saud Mar 31, 2022
7a04967
Minor changes
Rafael-Saud Mar 31, 2022
e866b31
Update swarm_in_blocks.md
Felipe-Tommaselli Mar 31, 2022
6212b10
Update swarm_in_blocks.md
Felipe-Tommaselli Mar 31, 2022
9f1fedb
gifs
guisoares9 Mar 31, 2022
06ff103
Merge branch 'master' of github.com:Grupo-SEMEAR-USP/clover
guisoares9 Mar 31, 2022
3b6c636
gifs added
guisoares9 Mar 31, 2022
2134de4
Update swarm_in_blocks.md
Rafael-Saud Mar 31, 2022
b907433
Update swarm_in_blocks.md
Rafael-Saud Mar 31, 2022
e9f527c
Update swarm_in_blocks.md
Rafael-Saud Mar 31, 2022
c55e1c1
gifs added
guisoares9 Mar 31, 2022
b942c26
Merge branch 'master' of github.com:Grupo-SEMEAR-USP/clover
guisoares9 Mar 31, 2022
1122d2b
Update swarm_in_blocks.md
Rafael-Saud Mar 31, 2022
2501c21
gifs added
guisoares9 Mar 31, 2022
1669113
Merge branch 'master' of github.com:Grupo-SEMEAR-USP/clover
guisoares9 Mar 31, 2022
8c9b234
gifs added
guisoares9 Mar 31, 2022
2b58502
Update swarm_in_blocks.md
Rafael-Saud Mar 31, 2022
91141cb
Merge branch 'master' of github.com:Grupo-SEMEAR-USP/clover
guisoares9 Mar 31, 2022
993dd58
Update swarm_in_blocks.md
Rafael-Saud Mar 31, 2022
197ac20
gifs added
guisoares9 Mar 31, 2022
031b607
video added
guisoares9 Mar 31, 2022
b6e07ff
video added
guisoares9 Mar 31, 2022
3fe4003
video added
guisoares9 Mar 31, 2022
4859334
video added
guisoares9 Mar 31, 2022
e3015ab
Update swarm_in_blocks.md
Rafael-Saud Mar 31, 2022
62249ca
Update swarm_in_blocks.md
Rafael-Saud Mar 31, 2022
d01fe43
video added
guisoares9 Mar 31, 2022
a7d0e15
Merge branch 'master' of github.com:Grupo-SEMEAR-USP/clover
guisoares9 Mar 31, 2022
7f3f186
Update swarm_in_blocks.md
Rafael-Saud Mar 31, 2022
e02df58
Add files via upload
Rafael-Saud Mar 31, 2022
ac98ed4
Update swarm_in_blocks.md
Rafael-Saud Mar 31, 2022
85b78fe
Tentativa
faresedu Mar 31, 2022
28ba9e2
Update swarm_in_blocks.md
faresedu Mar 31, 2022
a4d79e7
Update swarm_in_blocks.md
faresedu Mar 31, 2022
143aeb6
Update swarm_in_blocks.md
faresedu Mar 31, 2022
60c2fbc
Update swarm_in_blocks.md
faresedu Mar 31, 2022
c23e908
Update swarm_in_blocks.md
faresedu Mar 31, 2022
8464791
Update swarm_in_blocks.md
faresedu Mar 31, 2022
3e775c6
Update swarm_in_blocks.md
faresedu Mar 31, 2022
d4e6ab5
Update swarm_in_blocks.md
faresedu Mar 31, 2022
f4a2510
Update swarm_in_blocks.md
faresedu Mar 31, 2022
05980bb
Merge branch 'CopterExpress:master' into master
guisoares9 Apr 6, 2022
e18044f
Minor changes
guisoares9 Apr 13, 2022
72c36df
Merge branch 'master' of github.com:Grupo-SEMEAR-USP/clover
guisoares9 Apr 13, 2022
a9bbc6d
Minor change
guisoares9 Apr 13, 2022
0765092
swarm_in_blocks branch updated
guisoares9 Apr 13, 2022
f565131
final article added from master to swarm_in_blocks branch
guisoares9 Apr 13, 2022
1d30e0f
Merge branch 'CopterExpress:master' into master
guisoares9 Apr 13, 2022
a78f650
Merge branch 'CopterExpress:master' into swarm_in_blocks
guisoares9 Apr 13, 2022
2994005
final article added but without assets
guisoares9 Apr 13, 2022
8897049
Assets added
guisoares9 Apr 13, 2022
e4c20ca
Added information about the Clover Platform and Swarm in Blocks repos…
guisoares9 Apr 13, 2022
943294c
Minor changes
guisoares9 Apr 13, 2022
38687cb
Minor changes
guisoares9 Apr 13, 2022
022f88f
Merge branch 'master' of github.com:Grupo-SEMEAR-USP/clover
guisoares9 Apr 13, 2022
7b1ef87
Minor changes
Rafael-Saud Apr 14, 2022
ea4e900
Minor changes
Rafael-Saud Apr 14, 2022
ec63ead
Update swarm_in_blocks.md
guisoares9 Apr 14, 2022
f5b4bd1
Add video preview image to the repo
okalachev Apr 18, 2022
75f54b0
Some editing
okalachev Apr 18, 2022
242e695
Reduce image size
okalachev Apr 18, 2022
e2c7f64
Merge branch 'master' into Grupo-SEMEAR-USP-edits
okalachev Apr 18, 2022
cb3d491
List article
okalachev Apr 18, 2022
5a017d2
Remove unused image
okalachev Apr 18, 2022
e6f9b03
Replace huge animations with external links to save space
okalachev Apr 18, 2022
dd2f6b9
pull
joseCarlosAndrade Jun 8, 2022
0b87070
merging - reviewing changes
joseCarlosAndrade Jun 18, 2022
de1f6eb
..
joseCarlosAndrade Jun 18, 2022
0700458
Merge branch 'Swarm_in_Blocks' into swarm_in_blocks
joseCarlosAndrade Jun 18, 2022
a5d4d6e
Update leds.py
guisoares9 Jun 24, 2022
e04bbfd
Update blockly_compressed.js
guisoares9 Jun 24, 2022
7171430
Update index.html
guisoares9 Jun 24, 2022
f38feba
Update index.html
guisoares9 Jun 24, 2022
0c39248
Update main.js
joseCarlosAndrade Jun 24, 2022
ff75133
Update main.css
guisoares9 Jun 24, 2022
a7b645f
Update main.css
guisoares9 Jun 24, 2022
ce783e9
Update main.js
joseCarlosAndrade Jun 24, 2022
5b30c17
Update clover4.xacro
guisoares9 Jun 24, 2022
b4841e1
Update led_strip.xacro
joseCarlosAndrade Jun 24, 2022
179b0e1
Update clover.world
guisoares9 Jun 24, 2022
513e305
Update clover_aruco.world
guisoares9 Jun 24, 2022
0c4d642
Update simulator.launch
guisoares9 Jun 24, 2022
c030cb8
Delete clover_light.world
guisoares9 Jun 24, 2022
02a52c7
Merged
guisoares9 Jun 24, 2022
0efea38
Merged with swarm_in_blocks
guisoares9 Jun 24, 2022
675ea2e
Readme fixed
guisoares9 Jun 24, 2022
8c95725
Updated copterhack2022.md
guisoares9 Jun 24, 2022
3552677
Updated copterhack2022.md
guisoares9 Jun 24, 2022
3612f7f
Update swarm_in_blocks.md
guisoares9 Jun 24, 2022
555de33
Readme files fixed.
guisoares9 Jun 24, 2022
6c40b0d
Merge branch 'swarm_in_blocks' of github.com:Grupo-SEMEAR-USP/clover …
guisoares9 Jun 24, 2022
a413198
Resolving example.launch
joseCarlosAndrade Jun 24, 2022
37429f0
Merge branch 'CopterExpress:master' into swarm_in_blocks
guisoares9 Jul 15, 2022
cf3f3ed
Namespaces on swarm are used. When it uses <robotNamespace></robotNam…
guisoares9 Jul 15, 2022
37c4c3b
Minor fixes
guisoares9 Jul 15, 2022
794e41c
Minor fixes
guisoares9 Jul 15, 2022
bb6807e
Minor fixes
guisoares9 Jul 15, 2022
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
2 changes: 2 additions & 0 deletions clover/examples/leds.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@

print('Rainbow')
set_effect(effect='rainbow') # show rainbow

# effects_list = ['fill', 'fade', 'flash', 'blink', 'blink_fast', 'wipe', 'rainbow', 'rainbow_fill']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pointless change.

2 changes: 1 addition & 1 deletion clover/launch/led.launch
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</node>

<!-- high level led effects control, events notification with leds -->
<node pkg="clover" name="led_effect" type="led" ns="led" clear_params="true" output="screen" if="$(arg led_effect)">
<node pkg="clover" name="led_effect" type="led" clear_params="true" output="screen" if="$(arg led_effect)">
<param name="blink_rate" value="2"/>
<param name="fade_period" value="0.5"/>
<param name="rainbow_period" value="5"/>
Expand Down
16 changes: 8 additions & 8 deletions clover/src/led.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,19 +310,19 @@ int main(int argc, char **argv)
nh_priv.param("notify/low_battery/threshold", low_battery_threshold, 3.7);
nh_priv.param("notify/error/ignore", error_ignore, {});

ros::service::waitForService("set_leds"); // cannot work without set_leds service
set_leds_srv = nh.serviceClient<led_msgs::SetLEDs>("set_leds", true);
ros::service::waitForService("led/set_leds"); // cannot work without set_leds service
set_leds_srv = nh.serviceClient<led_msgs::SetLEDs>("led/set_leds", true);

// wait for leds count info
handleState(*ros::topic::waitForMessage<led_msgs::LEDStateArray>("state", nh));
handleState(*ros::topic::waitForMessage<led_msgs::LEDStateArray>("led/state", nh));

auto state_sub = nh.subscribe("state", 1, &handleState);
auto state_sub = nh.subscribe("led/state", 1, &handleState);

auto set_effect = nh.advertiseService("set_effect", &setEffect);
auto set_effect = nh.advertiseService("led/set_effect", &setEffect);

auto mavros_state_sub = nh.subscribe("/mavros/state", 1, &handleMavrosState);
auto battery_sub = nh.subscribe("/mavros/battery", 1, &handleBattery);
auto rosout_sub = nh.subscribe("/rosout_agg", 1, &handleLog);
auto mavros_state_sub = nh.subscribe("mavros/state", 1, &handleMavrosState);
auto battery_sub = nh.subscribe("mavros/battery", 1, &handleBattery);
auto rosout_sub = nh.subscribe("rosout_agg", 1, &handleLog);

timer = nh.createTimer(ros::Duration(0), &proceed, false, false);

Expand Down
11 changes: 7 additions & 4 deletions clover/src/simple_offboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ AttitudeTarget att_raw_msg;
Thrust thrust_msg;
TwistStamped rates_msg;
TransformStamped target, setpoint;
geometry_msgs::TransformStamped body;
geometry_msgs::TransformStamped body, initial_pose;

// State
PoseStamped nav_start;
Expand Down Expand Up @@ -155,9 +155,9 @@ inline void publishBodyFrame()
q.setRPY(0, 0, tf::getYaw(local_position.pose.orientation));
tf::quaternionTFToMsg(q, body.transform.rotation);

body.transform.translation.x = local_position.pose.position.x;
body.transform.translation.y = local_position.pose.position.y;
body.transform.translation.z = local_position.pose.position.z;
body.transform.translation.x = local_position.pose.position.x + initial_pose.transform.translation.x;
body.transform.translation.y = local_position.pose.position.y + initial_pose.transform.translation.y;
body.transform.translation.z = local_position.pose.position.z + initial_pose.transform.translation.z;
body.header.frame_id = local_position.header.frame_id;
body.header.stamp = local_position.header.stamp;
transform_broadcaster->sendTransform(body);
Expand Down Expand Up @@ -874,6 +874,9 @@ int main(int argc, char **argv)
nh_priv.param("default_speed", default_speed, 0.5f);
nh_priv.param<string>("body_frame", body.child_frame_id, "body");
nh_priv.getParam("reference_frames", reference_frames);
nh.param("initial_pose/x", initial_pose.transform.translation.x, 0.0);
nh.param("initial_pose/y", initial_pose.transform.translation.y, 0.0);
nh.param("initial_pose/z", initial_pose.transform.translation.z, 0.0);

// Default reference frames
std::map<string, string> default_reference_frames;
Expand Down
2 changes: 1 addition & 1 deletion clover_blocks/www/blockly/blockly_compressed.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion clover_blocks/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -488,4 +488,4 @@
</xml>
</body>

</html>
</html>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect deletion of newline.

2 changes: 1 addition & 1 deletion clover_blocks/www/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,4 @@ body[data-tab="python"] #python { display: block !important; }
margin: 0px;
padding: 10px;
z-index: 999999; /* overlap some Blockly's popups */
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect deletion of newline.

2 changes: 1 addition & 1 deletion clover_blocks/www/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,4 +323,4 @@ programSelect.addEventListener('change', function(e) {
}
updateChanged();
}
});
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect deletion of newline.

19 changes: 10 additions & 9 deletions clover_description/urdf/clover/clover4.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<xacro:arg name="gps" default="true"/>
<xacro:arg name="maintain_camera_rate" default="false"/>
<xacro:arg name="use_clover_physics" default="false"/>
<xacro:arg name="mavlink_tcp_port" default="4560"/>

<xacro:include filename="clover4_base.xacro" />
<xacro:include filename="../sensors/rpi_cam.urdf.xacro"/>
Expand All @@ -15,26 +16,26 @@

<!-- Create camera plugin -->
<xacro:if value="$(arg main_camera)">
<xacro:rpi_cam name="main_camera" parent="base_link" x="0.055" y="0.0" z="-0.03" roll="0" pitch="${pi / 2}" yaw="0" width="320" height="240" rate="40" do_throttling="$(arg maintain_camera_rate)"/>
</xacro:if>

<!-- Create rangefinder plugin -->
<xacro:if value="$(arg rangefinder)">
<xacro:distance_sensor parent="base_link" x="0.0" y="0.0" z="-0.04" roll="0" pitch="${pi / 2}" yaw="0"/>
<xacro:rpi_cam name="main_camera" parent="base_link" x="0.055" y="0.0" z="-0.03" roll="0" pitch="${pi/2}" yaw="0" width="320" height="240" rate="40" do_throttling="$(arg maintain_camera_rate)"/>
</xacro:if>

<!-- Instantiate LED strip -->
<xacro:if value="$(arg led)">
<xacro:led_strip
name="led"
parent="base_link"
radius="0.08"
bulb_radius="0.006"
led_count="58"
radius="0.1"
bulb_radius="0.01"
led_count="72"
use_plugin="true"
z="-0.002"/>
</xacro:if>

<!-- Create rangefinder plugin -->
<xacro:if value="$(arg rangefinder)">
<xacro:distance_sensor parent="base_link" x="0.0" y="0.0" z="-0.04" roll="0" pitch="${pi / 2}" yaw="0"/>
</xacro:if>

<xacro:if value="$(arg gps)">
<gazebo>
<include>
Expand Down
2 changes: 1 addition & 1 deletion clover_description/urdf/clover/clover4_base.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</xacro:if>

<!-- Gazebo plugins -->
<xacro:include filename="$(find clover_description)/urdf/clover/clover4_gazebo.xacro" />
<xacro:include filename="clover4_gazebo.xacro" />

<xacro:if value="$(arg enable_logging)">
<!-- Instantiate a logger -->
Expand Down
4 changes: 2 additions & 2 deletions clover_description/urdf/clover/clover4_gazebo.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@
<magSubTopic>/mag</magSubTopic>
<baroSubTopic>/baro</baroSubTopic>
<mavlink_addr>INADDR_ANY</mavlink_addr>
<mavlink_tcp_port>4560</mavlink_tcp_port>
<mavlink_tcp_port>$(arg mavlink_tcp_port)</mavlink_tcp_port>
<mavlink_udp_port>14560</mavlink_udp_port>
<serialEnabled>false</serialEnabled>
<serialDevice>/dev/ttyACM0</serialDevice>
<baudRate>921600</baudRate>
<qgc_addr>INADDR_ANY</qgc_addr>
<qgc_udp_port>14550</qgc_udp_port>
<qgc_udp_port>14560</qgc_udp_port>
<sdk_addr>INADDR_ANY</sdk_addr>
<sdk_udp_port>14540</sdk_udp_port>
<hil_mode>false</hil_mode>
Expand Down
18 changes: 15 additions & 3 deletions clover_description/urdf/leds/led_strip.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<origin xyz="${radius*cos(2 * pi * link_i / links_total)} ${radius*sin(2 * pi * link_i / links_total)} 0"
rpy="0 0 ${2 * pi * link_i / links_total}"/>
<geometry>
<box size="${bulb_radius} ${bulb_radius} ${bulb_radius}"/>
<box size="${bulb_radius} ${bulb_radius} ${2 * bulb_radius}"/>
</geometry>
</visual>
<xacro:unless value="${link_i + 1 == links_total}">
Expand All @@ -39,12 +39,13 @@
</xacro:macro>
<xacro:loop_links link_i="0" links_total="${led_count}"/>
</link>



Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pointless change.

<xacro:if value="${use_plugin}">
<gazebo reference="${name}_link">
<visual>
<plugin name="${name}_controller" filename="libsim_leds.so">
<robotNamespace></robotNamespace>
<!-- <robotNamespace></robotNamespace> -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the point of this?

<ledCount>${led_count}</ledCount>
</plugin>
<cast_shadows>false</cast_shadows>
Expand All @@ -55,6 +56,17 @@
<emissive>0 0 0 1</emissive>
</material>
</visual>
<!-- <light name="${name}_light" type="point">
<attenuation>
<range>20</range>
<linear>0.2</linear>
<constant>0.8</constant>
<quadratic>0.01</quadratic>
</attenuation>
<diffuse>1.0 1.0 1.0 1</diffuse>
<specular>0.1 0.1 0.1 1</specular>
<cast_shadows>false</cast_shadows>
</light> -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pointless addition.

</gazebo>
</xacro:if>
<gazebo reference="${name}_joint">
Expand Down
2 changes: 1 addition & 1 deletion clover_description/urdf/sensors/distance_sensor.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
</range>
</ray>
<plugin name="laser" filename="libgazebo_ros_range.so">
<robotNamespace></robotNamespace> <!-- FIXME: fill namespace? -->
<!-- <robotNamespace></robotNamespace> --> <!-- FIXME: fill namespace? -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose? This would break the LED plugin.

<topicName>/rangefinder/range</topicName>
<frameName>rangefinder</frameName>
<radiation>infrared</radiation>
Expand Down
2 changes: 1 addition & 1 deletion clover_simulation/launch/simulator.launch
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<arg name="mav_id" default="0"/>
<arg name="est" default="ekf2"/> <!-- PX4 estimator: lpe, ekf2 -->
<arg name="vehicle" default="clover"/> <!-- PX4 vehicle configuration: clover, clover_vpe -->
<arg name="main_camera" default="true"/> <!-- Simulated vision position estimation camera (optical flow, ArUco) -->
<arg name="main_camera" default="false"/> <!-- Simulated vision position estimation camera (optical flow, ArUco) -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change will break the Clover image and Clover simulator by default. If you need to disable the camera, then it should be done in a way without changing the original repo.

<arg name="maintain_camera_rate" default="false"/> <!-- Slow simulation down to maintain camera rate -->
<arg name="rangefinder" default="true"/> <!-- Simulated downward-facing rangefinder, vl53l1x-like -->
<arg name="led" default="true"/> <!-- Simulated LED strip, ws281x-like -->
Expand Down
4 changes: 2 additions & 2 deletions clover_simulation/resources/worlds/clover.world
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
</include>

<scene>
<ambient>0.8 0.8 0.8 1</ambient>
<background>0.8 0.9 1 1</background>
<ambient>0.1 0.1 0.1 1</ambient>
<background>0.1 0.1 0.1 1</background>
<shadows>false</shadows>
<grid>false</grid>
<origin_visual>false</origin_visual>
Expand Down
4 changes: 2 additions & 2 deletions clover_simulation/resources/worlds/clover_aruco.world
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
</include>

<scene>
<ambient>0.8 0.8 0.8 1</ambient>
<background>0.8 0.9 1 1</background>
<ambient>0.1 0.1 0.1 1</ambient>
<background>0.1 0.1 0.1 1</background>
<shadows>false</shadows>
<grid>false</grid>
<origin_visual>false</origin_visual>
Expand Down
62 changes: 62 additions & 0 deletions clover_simulation/resources/worlds/clover_light.world
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?xml version="1.0" ?>
<sdf version="1.5">
<world name="default">
<!-- A global light source -->
<include>
<uri>model://sun</uri>
</include>
<include>
<uri>model://parquet_plane</uri>
<pose>0 0 -0.01 0 0 0</pose>
</include>

<!-- <include>
<uri>model://aruco_cmit_txt</uri>
</include> -->

<scene>
<ambient>0.8 0.8 0.8 1</ambient>
<background>0.8 0.9 1 1</background>
<shadows>false</shadows>
<grid>false</grid>
<origin_visual>false</origin_visual>
</scene>

<light type="point" name="point">
<pose>0 2 2 0 0 0</pose>
<diffuse>1 1 1 1</diffuse>
<specular>.1 .1 .1 1</specular>
<attenuation>
<range>20</range>
<linear>0.2</linear>
<constant>0.8</constant>
<quadratic>0.01</quadratic>
</attenuation>
<cast_shadows>false</cast_shadows>
</light>



<physics name='default_physics' default='0' type='ode'>
<gravity>0 0 -9.8066</gravity>
<ode>
<solver>
<type>quick</type>
<iters>10</iters>
<sor>1.3</sor>
<use_dynamic_moi_rescaling>0</use_dynamic_moi_rescaling>
</solver>
<constraints>
<cfm>0</cfm>
<erp>0.2</erp>
<contact_max_correcting_vel>100</contact_max_correcting_vel>
<contact_surface_layer>0.001</contact_surface_layer>
</constraints>
</ode>
<max_step_size>0.004</max_step_size>
<real_time_factor>1</real_time_factor>
<real_time_update_rate>250</real_time_update_rate>
<magnetic_field>6.0e-6 2.3e-5 -4.2e-5</magnetic_field>
</physics>
</world>
</sdf>
1 change: 1 addition & 0 deletions clover_simulation/src/sim_leds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class LedController
}

role = (ros::this_node::getName() == "/gazebo") ? Role::Server : Role::Client;
ROS_INFO("Led node name: %s", ros::this_node::getName().c_str());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doubtful change.

ROS_INFO_NAMED(("LedController_" + robotNamespace).c_str(), "LedController has started (as %s)", role == Role::Client ? "client" : "server");

nh.reset(new ros::NodeHandle(robotNamespace));
Expand Down
Binary file added docs/assets/swarm_in_blocks/arcs.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/swarm_in_blocks/blocks.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/swarm_in_blocks/fpv.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/swarm_in_blocks/leds.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/swarm_in_blocks/ring.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/swarm_in_blocks/scaling.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/swarm_in_blocks/swarm_preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading