Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In C++ please Task: in this assignment you start working with the simulated husky robot replicating the one we demonstrated in class. Also, starting from
In C++ please
Task: in this assignment you start working with the simulated husky robot replicating the one we demonstrated in class. Also, starting from today, your environment will no longer be empty as there will be obstacles. To start the simulation environment, type roslaunch husky_gazebo husky_playpen.1aunch Write a node goto (source code to be placed in a file called goto.cpp) that drives the robot to position x-5,y 5 (orientation does not matter). To achieve this objective: send velocity commands to/cmd_vel the current pose of the robot can be retrieved from the topic /odometry/filtered. Note that this topic gives the position of base_link in the "odom" frame. You can assume "odom" is your world frame, i.e., the position (5,5) is intended to be in the "odom" frame. you should not bump into obstacles! To this end, you should use the data coming from /scan. The field "ranges" provides the distances to the obstacles returned by the laser o top of the robot. Listing 5.1 in the lecture notes can be used as a skeleton to process data coming from /scan. In particular, it gives you the distance of the closest obstacle, so you know when you should stop. How about moving away from an obstacle? One very simple strategy is to backtrack, then make a random rotation in either direction move a bit away from the obstacle, and thern resume your navigation towards the goal location. If you want to implement something more complex, you are more than welcome, but at this time it is not necessary. Important: this exercise is about making more practice with ROS and starting to integrate action and perception. How fast you get to the goal location is not important. At the end, you should submit your whole workspace. Task: in this assignment you start working with the simulated husky robot replicating the one we demonstrated in class. Also, starting from today, your environment will no longer be empty as there will be obstacles. To start the simulation environment, type roslaunch husky_gazebo husky_playpen.1aunch Write a node goto (source code to be placed in a file called goto.cpp) that drives the robot to position x-5,y 5 (orientation does not matter). To achieve this objective: send velocity commands to/cmd_vel the current pose of the robot can be retrieved from the topic /odometry/filtered. Note that this topic gives the position of base_link in the "odom" frame. You can assume "odom" is your world frame, i.e., the position (5,5) is intended to be in the "odom" frame. you should not bump into obstacles! To this end, you should use the data coming from /scan. The field "ranges" provides the distances to the obstacles returned by the laser o top of the robot. Listing 5.1 in the lecture notes can be used as a skeleton to process data coming from /scan. In particular, it gives you the distance of the closest obstacle, so you know when you should stop. How about moving away from an obstacle? One very simple strategy is to backtrack, then make a random rotation in either direction move a bit away from the obstacle, and thern resume your navigation towards the goal location. If you want to implement something more complex, you are more than welcome, but at this time it is not necessary. Important: this exercise is about making more practice with ROS and starting to integrate action and perception. How fast you get to the goal location is not important. At the end, you should submit your whole workspaceStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started