Skip to content

Conversation

@eborghi10
Copy link
Member

TODO (@eborghi10 ):

  • Clean up code and avoid hacky code before merging.

This PR is a collaboration between @hidmic @dmnunez1993 @jlurgo and me.

hidmic and others added 2 commits November 8, 2019 10:24
* Add ca_swarm package.

Include basic swarm formation controller node.

* Get swarm_controller_node hooked up in launch.

* Add missing numpy module alias.

* Clean up ca_swarm CMakeLists.txt

* Use base geometry_msgs.msg.Twist message, w/o stamps.

* Clean up ca_swarm swarm_controller_node.

* Clean up cooperative two robots sim demo.

* Fix Michel's approach
<robot xmlns:xacro="http://ros.org/wiki/xacro">

<xacro:macro name="dummy_inertia">
<inertial>
Copy link
Member Author

Choose a reason for hiding this comment

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

Call inertial_cuboid instead of creating the inertial from scratch.


<!-- Roomblock -->
<xacro:roomblock parent="base_link" visualize="$(arg visualize)"/>
<!-- <xacro:roomblock parent="base_link" visualize="$(arg visualize)"/> -->
Copy link
Member Author

Choose a reason for hiding this comment

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

Check if roomblock affects how the robot moves the block. If so, check how we can mitigate this effect.

<xacro:caster_wheel name="caster_front">
<origin xyz="0.13 0 0" rpy="0 ${pi/2} ${pi/2}" />
</xacro:caster_wheel>
<xacro:caster_wheel name="caster_back">
Copy link
Member Author

Choose a reason for hiding this comment

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

Is this new caster necessary? Check mass distributions.

<robot xmlns:xacro="http://ros.org/wiki/xacro">

<xacro:macro name="caster_wheel">
<xacro:macro name="caster_wheel" params="name *origin">
Copy link
Member Author

Choose a reason for hiding this comment

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

Put these changes into a new PR.

<link name="${name_side_left}_cliff_sensor_link">
<xacro:dummy_inertia/>
</link>
<link name="${name_side_left}_cliff_sensor_link"/>
Copy link
Member Author

Choose a reason for hiding this comment

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

Move this into a new PR.


R = v / w if w != 0. else np.inf

self._box_error_v = v - self._box_v
Copy link
Member Author

Choose a reason for hiding this comment

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

Velocity control of the box based on information given by move_base.

w_box = 0.

if np.allclose(robot.b_T_i, np.identity(4, dtype=np.float64)):
robot.b_T_i = transformations.compose_matrix(angles=[0., 0., yaw], translate=[x, y, 0.])
Copy link
Member Author

Choose a reason for hiding this comment

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

# First time, get the initial pose between the robot and the box (bTi)

box_mass = 1 # kg

dv = self._box_error_v if R == np.inf else self._box_error_w * (R - y)
i_T_tau = transformations.compose_matrix(translate=[max(0, dv * box_mass / K), 0., 0])
Copy link
Member Author

Choose a reason for hiding this comment

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

# Calculate how much the robot needs to "penetrate" the box in order to reach the desired box velocities.

dv = self._box_error_v if R == np.inf else self._box_error_w * (R - y)
i_T_tau = transformations.compose_matrix(translate=[max(0, dv * box_mass / K), 0., 0])

c_T_tau = transformations.concatenate_matrices(
Copy link
Member Author

Choose a reason for hiding this comment

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

# Get the desired (x, y, theta) pose for the robots that move the box to the desired pose.

rho = np.linalg.norm([xd, yd])
theta = np.arctan2(yd, xd)

K_theta = 1.0
Copy link
Member Author

Choose a reason for hiding this comment

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

# Parameters of the algorithm

@eborghi10 eborghi10 added this to the Multi-robot system milestone Nov 13, 2019
@eborghi10 eborghi10 force-pushed the kinetic-devel branch 4 times, most recently from 23e75d6 to 05fa7b9 Compare January 11, 2020 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants