Skip to content

Set init position & yaw angle in the same frame as /hydrus/uav/cog/odom topic in simulator #537

@HarukiKozukapenguin

Description

@HarukiKozukapenguin

I'm now using HYDRUS simulator following this instruction
I now want to set initial position and initial yaw as I want by setting spawn_x, spawn_y, spawn_yaw in bringup.launch
in the following coordinate:, which is the same coordinate as /hydrus/uav/cog/odom topic

  • position is CoG of hydrus
  • yaw is the direction of link2

But, I found that this initial position and yaw angle is "initial edge of link1 before changing the servo angle set in Servo.yaml (before this change, all link is 0 deg)"

So, I tuned the initial position in the following way

  1. set joint angle in Servo.yaml file
  2. launch w/o any spawn argument, and check initial yaw angle by rostopic echo /hydrus/uav/cog/odom
  3. launch again by setting argument spawn_yaw = -(2's yaw angle) , and check initial position by rostopic echo /hydrus/uav/cog/odom
  4. launch again by setting argument spawn_x:=-(3's x) spawn_y:=-(3's y) spawn_yaw:= -(2's yaw angle) and the hydrus show up in the origin and yaw direction is link2 direction

In the above algorithm, it is difficult to set initial spwawn position as I want in the desired coodinate, so, in my personal code, I make new argument in bringup.launch (init_(x,y,yaw)_error) to tune and spawn easily now.

Question
Is there any other ways to set initial position in /hydrus/uav/cog/odom coodinate?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions