M lib/goatherd/goatglove/server.ex +3 -2
@@ 65,7 65,6 @@ defmodule Goatherd.Goatglove.Server do
new_state()
|> add_channel(new_channel("/tf", "foxglove.FrameTransform", &Msg.tf/2))
|> add_channel(new_channel("/ground_plane", "foxglove.Grid", &Msg.ground/2))
- # |> add_channel(new_channel("/bodies", "foxglove.CubePrimitive", &Msg.body/2))
|> add_channel(new_channel("/bodies", "foxglove.FrameTransform", &Msg.body/2))
services = []
@@ 122,13 121,15 @@ defmodule Goatherd.Goatglove.Server do
{:push, msgs, state}
{:physics, world} ->
+ # Logger.info("Got world: #{inspect(world)}")
msgs = serialize_topic(state, "/ground_plane", world.ground, system_time)
msgs = world.bodies
|> Enum.reduce(msgs,
fn body, acc ->
+ # Logger.info("Serializing body #{inspect(body)}")
serialize_topic(state, "/bodies", body, system_time) ++ acc
end)
- Logger.info("Sending physics messages: #{inspect(msgs)}")
+ # Logger.info("Sending physics messages: #{inspect(msgs)}")
{:push, msgs, state}
{:tick, t} ->
M lib/goatherd/robot.ex +3 -3
@@ 101,7 101,7 @@ defmodule Goatherd.Robot do
# and produces output
defp update_robot(state, _dt) do
{:ok, _, offset_to_ltp, rot_to_ltp} = Tfex.get_transform(state.tf, :ltp, :base_link)
- Logger.debug("base_link to ltp is: #{inspect(offset_to_ltp)}, #{inspect(rot_to_ltp)}")
+ # Logger.debug("base_link to ltp is: #{inspect(offset_to_ltp)}, #{inspect(rot_to_ltp)}")
offset_amount = Vec3.create(0.0, 0.0, -0.01)
rotation_amount = Quatern.from_axis_angle(0.05, x_unit())
new_offset = Vec3.add(offset_to_ltp, offset_amount)
@@ 109,10 109,10 @@ defmodule Goatherd.Robot do
# new_offset = offset_to_ltp
# new_rotation = rot_to_ltp
new_tf = Tfex.Tf.new(:base_link, :ltp, new_offset, new_rotation)
- Logger.debug("New tf is: #{inspect(new_tf)}")
+ # Logger.debug("New tf is: #{inspect(new_tf)}")
new_tfs = state.tf
|> Tfex.put(new_tf)
- Logger.debug("New tfs is: #{inspect(state.tf)}")
+ # Logger.debug("New tfs is: #{inspect(state.tf)}")
%{state | tf: new_tfs}
end