Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Rover Simulation and sim config #6615

Merged
merged 9 commits into from
Apr 2, 2017
Merged

Add Rover Simulation and sim config #6615

merged 9 commits into from
Apr 2, 2017

Conversation

LorenzMeier
Copy link
Member

@LorenzMeier LorenzMeier commented Feb 19, 2017

This adds a full rover simulation for SITL and Gazebo. The physical config will follow this week for a Traxxas Stampede. This is to enable student projects at ETH.

Running it: make posix gazebo_rover

It kind of works already (tested manual and missions), needs further fine-tuning here and there. But I'm confident we can drive this outdoors already.

screen shot 2017-02-19 at 13 27 21

screen shot 2017-02-19 at 13 45 24

@mhkabir
Copy link
Member

mhkabir commented Feb 19, 2017

Sexy rover model there ;)

@dagar
Copy link
Member

dagar commented Feb 19, 2017

Likely not helpful here, but FYI there'a an old abandoned PR for adding ground firmware here - #6050

@marcozorzi
Copy link
Contributor

marcozorzi commented Feb 20, 2017

I'm trying to test this and having issues. I cloned the pr-rover branches of both Firmware and sitl_gazebo and I get the same errors as above here:
[ 36%] Building C object px4/src/systemcmds/pwm/CMakeFiles/systemcmds__pwm.dir/pwm.c.o
/job/catkin/src/px4/src/systemcmds/pwm/pwm.c: In function 'pwm_main':
/job/catkin/src/px4/src/systemcmds/pwm/pwm.c:637:9: error: ignoring return value of 'read', declared with attribute warn_unused_result [-Werror=unused-result]
read(0, &c, 1);
^
compilation terminated due to -Wfatal-errors.

This can be easily fixed by changing line 637 of src/systemcmds/pwm/pwm.c storing the return in a variable (I used ret as done below).

After that the simulation compiles and runs but I encur in errors saying:

[Err] [gazebo_mavlink_interface.cpp:933] joint_control_type[velocity_kinematic] undefined.

These disappear if the joint type in rover.sdf are changed to velocity instead of velocity_kinematic. In this case, the simulation is not working, I'm still working on a fix.

@LorenzMeier
Copy link
Member Author

@marcozorzi Worth re-trying. I removed the special joint type and added a velocity PID controller (which is also closer to what is around in HW).

@marcozorzi
Copy link
Contributor

@LorenzMeier Yes now it's working perfectly

@Kiwa21
Copy link

Kiwa21 commented Feb 27, 2017

Interesting pull request here ! It really is beginning to look like ROS/Gazebo simulations :)
I don't have a deep knowledge of the Rover stack. Do we have some kind of Lidar avoidance like we have in Copter with the SF40 ?

@LorenzMeier
Copy link
Member Author

Thanks!

@LorenzMeier LorenzMeier merged commit d50a0c4 into master Apr 2, 2017
@LorenzMeier
Copy link
Member Author

@Kiwa21 The rover parts right now are mostly for driving the vehicle. High-level navigation should be done in a higher-level software component.

@coveralls
Copy link

Coverage Status

Coverage increased (+80.4%) to 98.367% when pulling a6a74f5 on pr-rover into 6e64bff on master.

@julianoes
Copy link
Contributor

@coveralls took a while 😄.

@julianoes
Copy link
Contributor

@sarahToonsi please don't necro-bump. Open a new issue an properly describe your issue, thank you.

@sarahToonsi
Copy link

@sarahToonsi please don't necro-bump. Open a new issue an properly describe your issue, thank you.

Sorry :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants