RobotnikAutomation / rbcar_sim

Robotnik Car Simulation Packages
BSD 2-Clause "Simplified" License
38 stars 25 forks source link

Using controller on hardware #5

Closed karanchawla closed 7 years ago

karanchawla commented 7 years ago

Hello,

I'm using some of this code for controlling an Ackermann drive vehicle and was wondering how does one go about porting this to hardware? I have a ros_serial node for my robot using which I can send motor commands and I can get imu data, wheel velocities etc.

Can I directly configure those msgs to the rbcar_robot_control node?

Thanks

RomanRobotnik commented 7 years ago

Hi, The rbcar_robot_control node accepts ackermann_msgs::AckermannDriveStamped msgs (/rbcar_robot_control/command).

You should adapt your controller or modify the source code of the rbcar_robot_control.

Regards,

Román

karanchawla commented 7 years ago

Hi,

Thanks for the reply. I went through the complete codebase and I can modify it easily to work on hardware now. Thanks :D

karanchawla commented 7 years ago

Gotcha, thanks @RomanRobotnik ! Also I had a conceptual doubt in the way the tf is defined, so if you connect odom to base_footprint how do we ever know the global position of the robot because base_footprint is always over the odom frame(translation in z axis). So every time you'd rostopic echo /odom frame it will always give zero irrespective of the position of the robot in the world frame. What part of the logic am I missing here?