-
Notifications
You must be signed in to change notification settings - Fork 266
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
base: master
Are you sure you want to change the base?
Changes from 103 commits
1ac1045
961bdc3
950d4e2
2ff9917
cc2750f
958f39f
74de58e
f2b40b5
545797d
8aef11c
f3ce4e0
bb5c628
489807c
aeae9ec
4fe0d0b
9a5f725
a52c5ea
17038ec
242981c
5d4379b
8ff5275
c5d836d
1a999da
7f6de12
c69b7f2
33e81f8
c4a978b
64e3c69
19d900d
12c0cae
d88a8d6
0104eeb
fd7636b
d509a79
7bde23e
8f46f0f
d34b634
4070296
e99af63
5454035
d0b39b0
1310ff6
f306db9
9445b71
7870e73
8f1a1ea
5fc7510
32adfe5
44d62b6
985096e
2bba895
bef8b4f
e15071e
bbeccc5
bdd556b
3a659a8
7a04967
e866b31
6212b10
9f1fedb
06ff103
3b6c636
2134de4
b907433
e9f527c
c55e1c1
b942c26
1122d2b
2501c21
1669113
8c9b234
2b58502
91141cb
993dd58
197ac20
031b607
b6e07ff
3fe4003
4859334
e3015ab
62249ca
d01fe43
a7d0e15
7f3f186
e02df58
ac98ed4
85b78fe
28ba9e2
a4d79e7
143aeb6
60c2fbc
c23e908
8464791
3e775c6
d4e6ab5
f4a2510
05980bb
e18044f
72c36df
a9bbc6d
0765092
f565131
1d30e0f
a78f650
2994005
8897049
e4c20ca
943294c
38687cb
022f88f
7b1ef87
ea4e900
ec63ead
f5b4bd1
75f54b0
242e695
e2c7f64
cb3d491
5a017d2
e6f9b03
dd2f6b9
0b87070
de1f6eb
0700458
a5d4d6e
e04bbfd
7171430
f38feba
0c39248
ff75133
a7b645f
ce783e9
5b30c17
b4841e1
179b0e1
513e305
0c4d642
c030cb8
02a52c7
0efea38
675ea2e
8c95725
3552677
3612f7f
555de33
6c40b0d
a413198
37429f0
cf3f3ed
37c4c3b
794e41c
bb6807e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -488,4 +488,4 @@ | |
</xml> | ||
</body> | ||
|
||
</html> | ||
</html> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Incorrect deletion of newline. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -133,4 +133,4 @@ body[data-tab="python"] #python { display: block !important; } | |
margin: 0px; | ||
padding: 10px; | ||
z-index: 999999; /* overlap some Blockly's popups */ | ||
} | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Incorrect deletion of newline. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -323,4 +323,4 @@ programSelect.addEventListener('change', function(e) { | |
} | ||
updateChanged(); | ||
} | ||
}); | ||
}); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Incorrect deletion of newline. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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}"> | ||
|
@@ -39,12 +39,13 @@ | |
</xacro:macro> | ||
<xacro:loop_links link_i="0" links_total="${led_count}"/> | ||
</link> | ||
|
||
|
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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> --> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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> | ||
|
@@ -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> --> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pointless addition. |
||
</gazebo> | ||
</xacro:if> | ||
<gazebo reference="${name}_joint"> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,7 @@ | |
</range> | ||
</ray> | ||
<plugin name="laser" filename="libgazebo_ros_range.so"> | ||
<robotNamespace></robotNamespace> <!-- FIXME: fill namespace? --> | ||
<!-- <robotNamespace></robotNamespace> --> <!-- FIXME: fill namespace? --> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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) --> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 --> | ||
|
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> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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)); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pointless change.