Robotics StackExchange | Archived questions

simplifying jackal robot

hi everyone,

im trying to figure out how i can just read the coordinates and the angle at which my robot is situated real-time from a node.

i cant really seem to figure out which topic is sending this information and i similarly cant find a way to edit any files.

basically i wanna end up with a system of very simple nodes and topics which send me the information about the x,y coordinates and the angle of the robot in that plane. then i want the node to do something with that info (firstly say, multiply by 1) and then send it back to the jackal.

but im pretty puzzled in how to do this.

if anyone could just help me starting out. i guess i have to use odometry for the info and maybe a diff drive control to even get it to move. but how i set those up is puzzling for me

greetings

girpon

Asked by girpon on 2018-10-25 04:04:46 UTC

Comments

Answers

Is your robot in known envirronment or not ?

If yes, then you can use AMCL and just subscribe to the topic /amcl_pose.

If not then you can use gmapping (or another slam method), see #q44602.

Asked by Delb on 2018-10-25 05:11:33 UTC

Comments

I just use default jackal simulation. Im completely new to ROS, so i dont even know where to begin. For starters, which topic writes the coordinates, velociry and angle etc? Because i dont know how to get a hold on that info

Thx anyway

Asked by girpon on 2018-10-25 07:25:42 UTC

So you are using the package jackal_gazebo ? Please tell us what commands you are using to run your simulation (the roslaunch/rosrun commands, custom launch/src files if you have ones etc...). You didn't answered my question : do you have a map or are you creating one (or neither of the two) ?

Asked by Delb on 2018-10-25 07:54:00 UTC

Im using roslaunch jackal_gazebo jackal_world.launch. im using the standard world. But i might change it in the future. Im also not customizing it for now. Im just learnig how to create a node that can read the coordinates and angle. And then ill try making a controller that just makes it go f&b

Asked by girpon on 2018-10-25 08:10:21 UTC

With this launch file you are only spawning a robot in Gazebo, the robot knows only information about itself but doesn't have informations relative to the world. In order to locate the robot you need a global frame that the robot will know how it's moving relatively. So you need a map...

Asked by Delb on 2018-10-25 08:28:42 UTC

... but if you don't have one (which is the case with your launch file) you need to create one so you need senors (like a laser) to do so. So you can't locate your robot like this you need to add a sensor and use gmapping to create the map and locate the robot inside it.

Asked by Delb on 2018-10-25 08:30:00 UTC